/* ============================================================
   EXCAVATOR TRAINING — UI STYLESHEET
   Design: Dark industrial, clean, professional
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --accent:       #E8700A;
  --accent-dim:   #B35508;
  --accent-glow:  rgba(232, 112, 10, 0.18);

  --bg-deep:      #0A0B0D;
  --bg-panel:     rgba(14, 16, 20, 0.92);
  --bg-card:      rgba(22, 25, 32, 0.95);
  --bg-overlay:   rgba(6, 7, 10, 0.85);

  --border:       rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);

  --text-primary:   #F0F2F5;
  --text-secondary: #8A909C;
  --text-muted:     #4E5563;

  --severity-critical: #EF4444;
  --severity-high:     #F97316;
  --severity-medium:   #EAB308;
  --severity-low:      #22C55E;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --shadow-panel: 0 24px 64px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
  --shadow-card:  0 8px 24px rgba(0,0,0,0.4);

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --transition: 200ms ease;
  --transition-slow: 400ms ease;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Canvas ───────────────────────────────────────────────── */

#canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Loading Screen ───────────────────────────────────────── */

#loading {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: var(--bg-deep);
}

.spinner {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

#loading-text {
  font-size: 13px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Utility ──────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

/* ── Buttons ──────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition),
              color var(--transition), opacity var(--transition),
              transform var(--transition);
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

/* ── Severity Pills ───────────────────────────────────────── */

.severity-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.severity-pill::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.severity-pill.critical {
  color: var(--severity-critical);
  background: rgba(239, 68, 68, 0.12);
}

.severity-pill.high {
  color: var(--severity-high);
  background: rgba(249, 115, 22, 0.12);
}

.severity-pill.medium {
  color: var(--severity-medium);
  background: rgba(234, 179, 8, 0.12);
}

.severity-pill.low {
  color: var(--severity-low);
  background: rgba(34, 197, 94, 0.12);
}

.severity-pill.warning {
  color: var(--severity-medium);
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  font-weight: 700;
}

/* ── Home Screen ──────────────────────────────────────────── */

#screen-home {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}

#screen-home::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 1;
}

#home-trainer-img {
  position: absolute;
  bottom: 0;
  left: 25vw;
  transform: translateX(-50%);
  height: 100vh;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.home-panel {
  position: absolute;
  left: 75vw;
  z-index: 2;
  transform: translate(-50%, -50%);
  top: 50%;
  width: min(420px, 90vw);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  pointer-events: all;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-panel);
}

.home-eyebrow {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.home-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.home-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 32px;
}

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-actions .btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 14px;
}

/* ── Explorer Screen ──────────────────────────────────────── */

#screen-explorer {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 32px;
  overflow: hidden;
}

.explorer-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.explorer-header h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.explorer-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}

#explorer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  overflow-y: auto;
}

#explorer-grid::-webkit-scrollbar {
  width: 4px;
}

#explorer-grid::-webkit-scrollbar-track {
  background: transparent;
}

#explorer-grid::-webkit-scrollbar-thumb {
  background: var(--border-hover);
  border-radius: 2px;
}

.explorer-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
              transform var(--transition);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.explorer-card:hover {
  border-color: var(--border-hover);
  background: rgba(30, 34, 44, 0.98);
  transform: translateY(-1px);
}

.explorer-card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  display: block;
  background: var(--bg-deep);
}

.explorer-card-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.explorer-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.explorer-card-num {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.explorer-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.explorer-card-zone {
  font-size: 12px;
  color: var(--text-muted);
}

.explorer-card-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.explorer-card-pill::before {
  content: '';
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.explorer-card-pill.critical {
  color: var(--severity-critical);
  background: rgba(239, 68, 68, 0.12);
}

.explorer-card-pill.high {
  color: var(--severity-high);
  background: rgba(249, 115, 22, 0.12);
}

.explorer-card-pill.medium {
  color: var(--severity-medium);
  background: rgba(234, 179, 8, 0.12);
}

.explorer-card-pill.low {
  color: var(--severity-low);
  background: rgba(34, 197, 94, 0.12);
}

.explorer-card-pill.warning {
  color: var(--severity-medium);
  background: rgba(249, 115, 22, 0.2);
  border: 1px solid rgba(249, 115, 22, 0.4);
  font-weight: 700;
}

/* ── Briefing via vn-bar ──────────────────────────────────── */

/* ── Music Toggle ─────────────────────────────────────────── */

#music-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  user-select: none;
  transition: opacity 0.2s;
}

#music-toggle:hover { opacity: 0.8; }
#music-toggle.muted .progress-label { opacity: 0.4; }

/* ── Progress Bar ─────────────────────────────────────────── */

#btn-back-menu {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 30;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
  white-space: nowrap;
}

#btn-back-menu:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

#progress-bar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 8px 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.progress-label {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

#progress-dots {
  display: flex;
  align-items: center;
  gap: 5px;
}

.progress-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-hover);
  transition: background var(--transition), transform var(--transition);
}

.progress-dot.done {
  background: var(--accent-dim);
}

.progress-dot.active {
  background: var(--accent);
  transform: scale(1.3);
  box-shadow: 0 0 6px var(--accent-glow);
}

#progress-counter {
  font-size: 11px;
  font-family: var(--font-mono);
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Chapter Label ────────────────────────────────────────── */

#chapter-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.ch-zone {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

.ch-sep {
  color: var(--text-muted);
  opacity: 0.4;
}

.ch-name {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Visual Novel Bar ─────────────────────────────────────── */

#vn-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: none;
}

.vn-avatar-ext {
  flex-shrink: 0;
  align-self: flex-end;
  pointer-events: none;
}

.vn-avatar-ext img {
  display: block;
  height: 320px;
  width: auto;
  object-fit: contain;
  object-position: bottom;
}

.vn-bar-inner {
  width: 100%;
  max-width: 1024px;
  background: var(--bg-panel);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-left: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 20px 28px 28px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-panel);
  transition: border-color var(--transition-slow);
  pointer-events: auto;
}

.vn-bar-body {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}


.vn-avatar {
  flex-shrink: 0;
}

.vn-avatar img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-hover);
}


.vn-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vn-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vn-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.vn-speaker {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vn-phase-tag {
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-muted);
  background: rgba(255,255,255,0.05);
}

.vn-phase-tag.phase-general {
  color: #60A5FA;
  background: rgba(96, 165, 250, 0.1);
}

.vn-phase-tag.phase-good {
  color: var(--severity-low);
  background: rgba(34, 197, 94, 0.1);
}

.vn-phase-tag.phase-bad {
  color: var(--severity-critical);
  background: rgba(239, 68, 68, 0.1);
}

.vn-dialogue-text {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 3em;
}

.vn-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.vn-steps {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vn-step {
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--border-hover);
  transition: background var(--transition), width var(--transition);
}

.vn-step.done {
  background: var(--accent-dim);
  opacity: 0.5;
}

.vn-step.active {
  background: var(--accent);
  width: 28px;
}

.vn-btns {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.vn-btns .btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* ── QCM Overlay ──────────────────────────────────────────── */

#qcm-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg-overlay);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#qcm-overlay.visible {
  display: flex;
}

.qcm-card {
  width: min(560px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-panel);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.qcm-eyebrow {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.qcm-question {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

.qcm-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.qcm-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  text-align: left;
  width: 100%;
  transition: background var(--transition), border-color var(--transition);
}

.qcm-option:hover:not(:disabled) {
  background: rgba(255,255,255,0.07);
  border-color: var(--border-hover);
}

.qcm-option:disabled {
  cursor: default;
}

.qcm-option.correct {
  border-color: var(--severity-low);
  background: rgba(34, 197, 94, 0.08);
  color: var(--text-primary);
}

.qcm-option.incorrect {
  border-color: var(--severity-critical);
  background: rgba(239, 68, 68, 0.08);
  color: var(--text-secondary);
}

.qcm-key {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--border);
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0;
  transition: background var(--transition), color var(--transition);
}

.qcm-option.correct .qcm-key {
  background: var(--severity-low);
  border-color: var(--severity-low);
  color: #fff;
}

.qcm-option.incorrect .qcm-key {
  background: var(--severity-critical);
  border-color: var(--severity-critical);
  color: #fff;
}

.qcm-explanation {
  display: none;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  padding: 14px 16px;
  background: rgba(255,255,255,0.03);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.qcm-explanation.visible {
  display: block;
}

.qcm-footer {
  display: flex;
  justify-content: flex-end;
}

#qcm-next {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  padding: 11px 24px;
  font-size: 14px;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transition: opacity var(--transition);
}

#qcm-next.visible {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#qcm-next:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

/* ── Summary Screen ───────────────────────────────────────── */

#screen-summary {
  position: fixed;
  inset: 0;
  z-index: 10;
}

#screen-summary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  pointer-events: none;
  z-index: 1;
}

#summary-trainer-img {
  position: absolute;
  bottom: 0;
  left: 25vw;
  transform: translateX(-50%);
  height: 100vh;
  object-fit: contain;
  object-position: bottom;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.summary-panel {
  position: absolute;
  left: 75vw;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(420px, 90vw);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-panel);
  z-index: 2;
  pointer-events: all;
}

.summary-speaker {
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.summary-voiceover {
  font-size: 15px;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 28px;
}

.summary-scores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.score-item {
  background: var(--bg-card);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.score-val {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1;
}

.score-val.accent {
  color: var(--accent);
}

.score-val.neutral {
  color: var(--text-secondary);
}

.score-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-family: var(--font-mono);
}

.summary-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-actions .btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 14px;
}

/* ── Phase image overlay (good / bad) ─────────────────────── */

#phase-image-overlay {
  position: fixed;
  inset: 0;
  z-index: 25;          /* above canvas and chapter-label, below VN bar (30) */
  pointer-events: none;
}

/*
 * Scale by height: the image fills 100vh, width is cropped/padded.
 * This mirrors Three.js PerspectiveCamera which uses vertical FOV —
 * the vertical angle is constant regardless of aspect ratio.
 */
#phase-image {
  display: block;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  object-position: center center;
}

/* ── Bad images grid overlay ───────────────────────────────── */

#bad-grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 27;           /* above phase image (25), below VN bar (30) */
  pointer-events: none;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Dimming backdrop */
#bad-grid-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

#bad-grid {
  position: relative; /* above ::before */
  display: grid;
  gap: 16px;
  /* size set in JS via --card-size custom property */
}

.bad-grid-card {
  width: var(--card-size);
  height: calc(var(--card-size) + 32px); /* image 1:1 + label row */
  background: rgba(10, 11, 13, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  will-change: opacity, transform;
}

.bad-grid-card img {
  display: block;
  width: var(--card-size);
  height: var(--card-size);
  object-fit: cover;
  flex-shrink: 0;
}

.bad-grid-label {
  display: block;
  padding: 0 12px;
  height: 32px;
  line-height: 32px;
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
