/* ==================== ERROR PRESENTATION ==================== */
.error-presentation {
  position: fixed;
  inset: 0;
  background: var(--card);
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.error-presentation.is-open {
  display: flex;
}
.error-presentation-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.error-presentation-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.error-presentation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.error-presentation-body {
  flex: 1;
  overflow-y: auto;
  padding: 32px 24px 64px;
}
.error-presentation-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
}
.error-presentation-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid transparent;
}
.error-presentation-badge.not-started {
  background: var(--accent-weak);
  color: var(--ink);
  border-color: var(--border);
}
.error-presentation-badge.todo {
  background: var(--accent-weak);
  color: var(--warn);
  border-color: var(--warn);
}
.error-presentation-badge.doing {
  background: var(--accent-weak);
  color: var(--accent);
  border-color: var(--accent);
}
.error-presentation-badge.done {
  background: var(--accent-weak);
  color: var(--ok);
  border-color: var(--ok);
}
.error-presentation-datetime,
.error-presentation-reporter {
  font-size: 14px;
  color: var(--muted);
}
.error-presentation-name {
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
  margin: 8px 0 24px;
  line-height: 1.3;
  background: var(--accent-weak);
  padding: 14px 18px;
  border-left: 5px solid var(--ok);
  border-radius: 8px;
  display: inline-block;
}
.error-presentation-section {
  margin-bottom: 28px;
}
.error-presentation-section h2 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.error-presentation-content {
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.error-presentation-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.error-presentation-gallery.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 200px);
  gap: 16px;
  justify-content: center;
}
.error-presentation-gallery.list {
  grid-template-columns: 1fr;
  gap: 10px;
}
.error-presentation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.error-presentation-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--border-light);
  border: 1px solid var(--border);
}
.view-toggle-btn {
  border: none;
  background: transparent;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: #6b7280;
  font-size: 16px;
  line-height: 1;
}
.view-toggle-btn.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}
.error-presentation-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
}
.error-presentation-gallery img.failed {
  width: 100%;
  height: 220px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--border-light);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: not-allowed;
}
.error-presentation-gallery img:hover:not(.failed) {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.error-presentation-gallery img:empty,
.error-presentation-gallery img.failed {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.error-presentation-gallery.list img {
  max-height: 100px;
  max-width: 120px;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  cursor: pointer;
}
.error-presentation-gallery.list .gallery-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  cursor: pointer;
}
.error-presentation-gallery.list .gallery-item:hover {
  background: var(--border-light);
}
.error-presentation-gallery.list .gallery-item img {
  flex: 0 0 auto;
}
.error-presentation-gallery.list .gallery-meta {
  flex: 1;
  min-width: 0;
}
.error-presentation-gallery.list .gallery-meta .file-name {
  font-weight: 600;
  color: #111827;
  word-break: break-all;
}
.error-presentation-gallery.list .gallery-meta .file-size {
  font-size: 13px;
  color: #6b7280;
  margin-top: 4px;
}
.error-presentation-empty {
  color: var(--muted);
  font-size: 14px;
}
@media print {
  .error-presentation {
    position: static;
    inset: auto;
    background: var(--card);
    z-index: auto;
    display: block !important;
    overflow: visible;
  }
  .error-presentation-header,
  .error-presentation-actions {
    position: static;
  }
  .error-presentation-body {
    overflow: visible;
    padding: 0;
  }
  .error-presentation-toolbar {
    display: none;
  }
}
@media (max-width: 768px) {
  .error-presentation-body {
    padding: 20px 16px 56px;
  }
  .error-presentation-name {
    font-size: 22px;
  }
  .error-presentation-gallery {
    grid-template-columns: 1fr;
  }
}
