/* ── Reset & Variables ────────────────────────────────────────────────── */

:root {
  --bg-deep: #0c0c1d;
  --bg-base: #131328;
  --bg-surface: #1a1a36;
  --bg-raised: #21213f;
  --border: #2a2a52;
  --border-light: #35356a;
  --text: #c8c8e0;
  --text-dim: #6e6e94;
  --text-muted: #4a4a6e;
  --accent: #e94560;
  --accent-glow: rgba(233, 69, 96, 0.25);
  --green: #4ecca3;
  --green-glow: rgba(78, 204, 163, 0.2);
  --font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 100px;
}

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

body {
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 13px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────── */

.header {
  width: 100%;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 20px;
  line-height: 1;
}

.brand h1 {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 3px;
  text-transform: lowercase;
}

.stats {
  display: flex;
  gap: 6px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  border: 1px solid transparent;
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s ease;
}

.stat-icon {
  font-size: 7px;
  line-height: 1;
}

.stat-label {
  color: var(--text-dim);
  font-weight: 400;
}

.stat-value {
  font-weight: 600;
}

.stat.active-tab {
  border: 1px dashed rgba(255, 255, 255, 0.7);
}

.stat.active-tab .stat-label {
  color: #d0d0e8;
}

.stat.complete .stat-value {
  color: var(--green);
}

.stat.incomplete .stat-value {
  color: var(--accent);
}

.stat.disabled {
  opacity: 0.3;
  pointer-events: none;
}

/* ── Manage Popover ──────────────────────────────────────────────────── */

button.manage-btn {
  padding: 4px 8px;
  font-size: 16px;
  line-height: 1;
  background: var(--bg-deep);
}

.manage-popover {
  position: absolute;
  top: 48px;
  right: 20px;
  z-index: 50;
  background: var(--bg-raised);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 10px 0;
  min-width: 220px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.manage-header {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 2px 14px 8px;
  border-bottom: 1px solid var(--border);
}

.manage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
}

.manage-row-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
}

.manage-row-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  margin-left: 6px;
}

.manage-row-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.manage-row-delete {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 3px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: all 0.15s;
}

.manage-row-delete:hover {
  background: var(--accent);
  color: #fff;
}

.manage-row-delete:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.manage-row-delete:disabled:hover {
  background: transparent;
  color: var(--accent);
}

.manage-footer {
  padding: 8px 14px 2px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

.manage-delete-all {
  width: 100%;
  text-align: center;
  font-size: 10px;
}

/* ── Controls ────────────────────────────────────────────────────────── */

.controls {
  width: 100%;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-base);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.controls-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.controls-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.separator {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* ── Tabs ─────────────────────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-deep);
  border-radius: var(--radius-pill);
  padding: 2px;
  border: 1px solid var(--border);
}

.tab {
  padding: 5px 14px;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: 0.5px;
}

.tab:hover:not(:disabled) {
  color: var(--text);
  background: var(--bg-raised);
}

.tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.tab:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Selectors ────────────────────────────────────────────────────────── */

select {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.15s;
}

select:focus {
  outline: none;
  border-color: var(--accent);
}

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

.btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:hover:not(:disabled) {
  border-color: var(--text-dim);
}

.btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.btn kbd {
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--bg-deep);
  border: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1.4;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn.primary:hover:not(:disabled) {
  background: #d63851;
  border-color: #d63851;
}

.btn.primary kbd {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.7);
}

.btn.accept {
  background: var(--green);
  border-color: var(--green);
  color: var(--bg-deep);
}

.btn.accept kbd {
  background: rgba(0, 0, 0, 0.15);
  border-color: rgba(0, 0, 0, 0.15);
  color: rgba(0, 0, 0, 0.5);
}

.btn.discard {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

.btn.discard kbd {
  border-color: rgba(233, 69, 96, 0.3);
  color: rgba(233, 69, 96, 0.5);
}

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

.canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 20px;
  position: relative;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(20, 20, 50, 0.6), transparent 70%),
    var(--bg-deep);
  min-height: 0;
}

canvas#canvas {
  background: var(--bg-deep);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: crosshair;
  max-width: calc(100vw - 40px);
  max-height: calc(100vh - 220px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.3),
    0 4px 24px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

/* ── Countdown ────────────────────────────────────────────────────────── */

.countdown {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 12, 29, 0.88);
  backdrop-filter: blur(4px);
  z-index: 100;
  pointer-events: none;
}

.countdown span {
  font-family: var(--font-mono);
  font-size: 140px;
  font-weight: 700;
  color: var(--accent);
  text-shadow:
    0 0 60px var(--accent-glow),
    0 0 120px rgba(233, 69, 96, 0.15);
  animation: countPulse 1s ease-in-out infinite;
}

@keyframes countPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.05); opacity: 0.8; }
}

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

.progress-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 280px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #6ee7c0);
  transition: width 0.1s linear;
  border-radius: 2px;
  box-shadow: 0 0 8px var(--green-glow);
}

/* ── Recordings Panel ─────────────────────────────────────────────────── */

.recordings-panel {
  width: 100%;
  padding: 10px 20px 12px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.recordings-header {
  margin-bottom: 8px;
}

.recordings-panel h3 {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.recordings-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-height: 110px;
  overflow-y: auto;
}

.recordings-grid::-webkit-scrollbar {
  width: 4px;
}

.recordings-grid::-webkit-scrollbar-track {
  background: transparent;
}

.recordings-grid::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.recordings-empty {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding: 8px 0;
}

.recording-thumb {
  position: relative;
  width: 76px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.15s ease;
}

.recording-thumb:hover {
  border-color: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}

.recording-thumb canvas {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  cursor: pointer;
  max-width: none;
  max-height: none;
  box-shadow: none;
}

.recording-thumb .label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-family: var(--font-mono);
  font-size: 7px;
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-dim);
  padding: 1px 3px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.recording-thumb .delete-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  text-align: center;
  cursor: pointer;
  display: none;
  transition: transform 0.1s;
}

.recording-thumb .delete-btn:hover {
  transform: scale(1.15);
}

.recording-thumb:hover .delete-btn {
  display: block;
}

/* ── Modal ────────────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(12, 12, 29, 0.92);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  max-width: 90vw;
  box-shadow: 0 16px 64px rgba(0, 0, 0, 0.5);
}

.modal h3 {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.modal canvas {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: none;
  max-width: none;
  max-height: none;
}

.modal .modal-close {
  margin-top: 10px;
  display: block;
  margin-left: auto;
}

/* ── Direction Info ────────────────────────────────────────────────────── */

.direction-info {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.direction-info .needed {
  color: var(--accent);
  font-weight: 600;
}

.direction-info .done {
  color: var(--green);
  font-weight: 600;
}

/* ── Status Toast ─────────────────────────────────────────────────────── */

.status-msg {
  position: fixed;
  bottom: 16px;
  right: 16px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  z-index: 300;
  animation: toastIn 2.2s ease forwards;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.status-msg.success {
  background: var(--green);
  color: var(--bg-deep);
}

.status-msg.error {
  background: var(--accent);
  color: #fff;
}

@keyframes toastIn {
  0% { opacity: 0; transform: translateY(8px); }
  12% { opacity: 1; transform: translateY(0); }
  82% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}

/* ── CLS Mode ────────────────────────────────────────────────────────── */

#cls-panel {
  max-width: 920px;
}

.cls-panel.active {
  display: flex;
}

.cls-tile-wrap {
  width: 200px;
  height: 200px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cls-tile-wrap img {
  width: 100%;
  height: 100%;
  image-rendering: auto;
}

.cls-confidence {
  display: flex;
  gap: 6px;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.cls-confidence-bar {
  width: 120px;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.cls-confidence-fill {
  height: 100%;
  background: var(--green);
  border-radius: 3px;
}

.cls-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  max-width: 600px;
}

.cls-buttons .cls-btn {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  min-width: 96px;
  text-align: center;
}

.cls-buttons .cls-btn:hover {
  border-color: var(--text-dim);
  background: var(--bg-surface);
}

.cls-buttons .cls-btn.suggested {
  background: rgba(0, 200, 120, 0.35);
  border-color: var(--green);
  color: var(--text);
}

.cls-buttons .cls-btn.selected {
  background: var(--green);
  color: var(--bg-deep);
  border-color: var(--green);
}

.cls-buttons .cls-btn kbd {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text);
  margin-right: 4px;
}

.cls-buttons .cls-btn.selected kbd {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.7);
}

.cls-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.cls-progress {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.cls-keyword {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
}

/* ── CLS History ──────────────────────────────────────────────────── */

.cls-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 0;
  max-width: 520px;
  justify-content: center;
}

.cls-history-item {
  position: relative;
  width: 56px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color 0.15s;
}

.cls-history-item:hover {
  border-color: var(--green);
}

.cls-history-item.pending {
  border-color: var(--yellow, #f0c040);
  opacity: 0.85;
}

.cls-history-item.pending:hover {
  border-color: var(--red, #e05050);
}

.cls-history-item img {
  display: block;
  width: 56px;
  height: 56px;
  object-fit: cover;
}

.cls-history-item .cls-history-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 8px;
  text-align: center;
  padding: 1px 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cls-history-header {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  padding-bottom: 4px;
}

.cls-flush-btn {
  margin-top: 12px;
  padding: 8px 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  border: 1px solid var(--green);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}

.cls-flush-btn:hover {
  background: var(--green);
  color: var(--bg-deep);
}

.label-stats {
  width: 100%;
  max-width: 400px;
  margin-top: 16px;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
}

.stats-table th,
.stats-table td {
  padding: 3px 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stats-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stats-table td:nth-child(2),
.stats-table td:nth-child(3),
.stats-table th:nth-child(2),
.stats-table th:nth-child(3) {
  text-align: right;
}

.stats-table tfoot td {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  border-bottom: none;
}

.stats-table tr.stat-good td {
  color: var(--green, #00c878);
}

.stats-table tr.stat-warn td {
  color: var(--yellow, #f0c040);
}

.stats-table tr.stat-low td {
  color: #e05050;
}

/* ── Tool Panels (DET/CLS) ─────────────────────────────────────────── */

.tool-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  max-width: 500px;
  align-self: flex-start;
  margin-top: 6vh;
}

.det-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.det-outcome {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
}

.det-outcome.solved { color: var(--green); }
.det-outcome.failed { color: var(--accent); }

.det-instruction {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
}

#det-class-override {
  font-family: var(--font-mono);
  font-size: 16px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-raised);
  color: var(--text);
  cursor: pointer;
}

.tool-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
}

.tool-progress {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.tool-help {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.det-grid {
  display: grid;
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.det-cell {
  position: relative;
  cursor: pointer;
  transition: opacity 0.1s;
  user-select: none;
  -webkit-user-select: none;
}

.det-cell:hover {
  opacity: 0.85;
}

.det-cell-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.det-cell.user-pick .det-cell-overlay {
  background: rgba(78, 204, 163, 0.35);
  box-shadow: inset 0 0 0 3px rgba(78, 204, 163, 0.7);
}

.det-cell.model-pick:not(.user-pick) .det-cell-overlay {
  background: rgba(233, 69, 96, 0.25);
  box-shadow: inset 0 0 0 2px rgba(233, 69, 96, 0.5);
}

.det-cell.user-pick.model-pick .det-cell-overlay {
  background: rgba(245, 166, 35, 0.35);
  box-shadow: inset 0 0 0 3px rgba(245, 166, 35, 0.7);
}

.det-cell-overlay .check {
  font-size: 26px;
  font-weight: bold;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.det-cell.user-pick:not(.model-pick) .det-cell-overlay .check {
  color: rgba(78, 204, 163, 0.9);
}

.det-cell.user-pick.model-pick .det-cell-overlay .check {
  color: rgba(245, 166, 35, 0.95);
}

.det-cell-overlay .badge {
  position: absolute;
  top: 4px;
  right: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.det-cell.model-pick:not(.user-pick) .det-cell-overlay .badge {
  color: rgba(233, 69, 96, 0.8);
}

.det-cell.user-pick.model-pick .det-cell-overlay .badge {
  color: rgba(245, 166, 35, 0.8);
}

.cls-conf-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 280px;
}

.cls-conf-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cls-conf-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  width: 80px;
  text-align: right;
  flex-shrink: 0;
}

.cls-conf-label.top {
  color: var(--text);
  font-weight: 600;
}

.cls-conf-bar {
  flex: 1;
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.cls-conf-fill {
  height: 100%;
  background: var(--green);
  border-radius: 4px;
  opacity: 0.4;
}

.cls-conf-fill.top {
  opacity: 1;
}

.cls-conf-score {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-dim);
  width: 40px;
  flex-shrink: 0;
}

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

.hidden {
  display: none !important;
}
