@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&family=JetBrains+Mono:wght@400;500&display=swap');

/* ── TOKENS ─────────────────────────────────────────────────────────── */
:root {
  --bg:           #0d0d0d;
  --surface:      #161616;
  --card:         #1c1c1c;
  --card-hover:   #232323;
  --border:       #282828;
  --border-mid:   #333;
  --text:         #f0ede8;
  --text-muted:   #888;
  --text-dim:     #444;
  --accent:       #CE422B;
  --accent-hover: #e05438;
  --accent-dim:   rgba(206,66,43,0.14);
  --success:      #3a9d6e;
  --success-dim:  rgba(58,157,110,0.14);
  --error:        #d94040;
  --error-dim:    rgba(217,64,64,0.14);
  --warning:      #e09820;
  --warning-dim:  rgba(224,152,32,0.14);
  --locked:       #2a2a2a;
  --locked-text:  #555;
  --radius:       12px;
  --radius-sm:    8px;
  --radius-pill:  999px;
  --font-sans:    'DM Sans', sans-serif;
  --font-display: 'Syne', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', monospace;
  --shadow:       0 4px 20px rgba(0,0,0,0.4);
  --shadow-sm:    0 2px 8px rgba(0,0,0,0.3);
  --transition:   200ms ease;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg:          #f5f2ed;
    --surface:     #ffffff;
    --card:        #faf8f4;
    --card-hover:  #f0ece5;
    --border:      #e0dbd2;
    --border-mid:  #ccc8c0;
    --text:        #1a1614;
    --text-muted:  #6a6460;
    --text-dim:    #bbb;
    --locked:      #ebe8e3;
    --locked-text: #aaa;
    --accent-dim:  rgba(206,66,43,0.10);
    --success-dim: rgba(58,157,110,0.10);
    --error-dim:   rgba(217,64,64,0.10);
    --warning-dim: rgba(224,152,32,0.10);
    --shadow:      0 4px 20px rgba(0,0,0,0.10);
    --shadow-sm:   0 2px 8px rgba(0,0,0,0.08);
  }
}

/* ── RESET ───────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; font-size: 16px; }
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { cursor: pointer; font-family: inherit; border: none; background: none; }
a { color: inherit; text-decoration: none; }

/* ── APP WRAPPER ─────────────────────────────────────────────────────── */
#app {
  position: fixed;
  inset: 0;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ── SCREENS ─────────────────────────────────────────────────────────── */
.screen {
  display: none;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.screen.active {
  display: flex;
  flex-direction: column;
  animation: screenIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── HOME SCREEN ─────────────────────────────────────────────────────── */
.home-header {
  padding: 32px 20px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}
.home-brand svg { flex-shrink: 0; }
.home-brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.home-brand-text span {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
}
.home-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.stat-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}
.stat-chip .icon { font-size: 1rem; }
.stat-chip.accent { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.stat-chip.fire   { background: var(--warning-dim); border-color: var(--warning); color: var(--warning); }

.overall-progress { margin-bottom: 4px; }
.overall-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.progress-bar-track {
  height: 6px;
  background: var(--border-mid);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-pill);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.home-actions {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.topic-grid {
  padding: 16px 20px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.part-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 8px;
  margin-bottom: 2px;
}

.topic-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}
.topic-card:hover:not(.locked) { background: var(--card-hover); border-color: var(--border-mid); }
.topic-card:active:not(.locked) { transform: scale(0.98); }
.topic-card.locked { cursor: default; opacity: 0.55; }
.topic-card.complete { border-color: var(--success); }
.topic-card.complete .topic-card-icon { background: var(--success-dim); color: var(--success); }

.topic-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.topic-card.locked .topic-card-icon { background: var(--locked); color: var(--locked-text); }

.topic-card-body { flex: 1; min-width: 0; }
.topic-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topic-card.locked .topic-card-title { color: var(--locked-text); }
.topic-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.topic-card-progress {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.topic-card-dots {
  display: flex;
  gap: 3px;
}
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border-mid);
}
.dot.done { background: var(--success); }
.dot.current { background: var(--accent); }

/* ── TOPIC SCREEN ────────────────────────────────────────────────────── */
.screen-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 1rem;
  transition: background var(--transition);
  flex-shrink: 0;
}
.btn-back:hover { background: var(--card-hover); }
.screen-header-text { flex: 1; min-width: 0; }
.screen-header-text h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.screen-header-text p { font-size: 0.75rem; color: var(--text-muted); }

.topic-hero {
  padding: 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.part-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}
.topic-description { font-size: 0.9rem; color: var(--text-muted); }

.activity-list {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.activity-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}
.activity-list-item.done { border-color: var(--success); opacity: 0.7; }
.activity-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  flex-shrink: 0;
  color: var(--text-muted);
}
.activity-dot.done { background: var(--success); border-color: var(--success); color: #fff; font-size: 0.7rem; }
.activity-dot.current { border-color: var(--accent); color: var(--accent); }
.activity-type-badge {
  margin-left: auto;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  white-space: nowrap;
}
.topic-footer {
  padding: 16px 20px 32px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

/* ── ACTIVITY SCREEN ─────────────────────────────────────────────────── */
.activity-progress-bar {
  height: 3px;
  background: var(--border);
  flex-shrink: 0;
}
.activity-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}
.activity-step {
  padding: 6px 16px 6px 12px;
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.activity-step-count { flex: 1; }
.activity-step-type {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}
.btn-back-activity {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.btn-back-activity:hover { background: var(--card-hover); color: var(--text); }

.activity-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.activity-question {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5;
}

/* ── CODE BLOCK ─────────────────────────────────────────────────────── */
.code-block {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.code-block pre[class*="language-"] {
  margin: 0;
  padding: 16px;
  background: transparent !important;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.6;
  tab-size: 4;
  overflow-x: auto;
}
.code-block-plain {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 1.8;
  color: #d4d0c8;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}

/* ── MULTIPLE CHOICE ─────────────────────────────────────────────────── */
.mc-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mc-option {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--text);
  transition: background var(--transition), border-color var(--transition);
  width: 100%;
}
.mc-option:hover:not(:disabled) { background: var(--card-hover); border-color: var(--border-mid); }
.mc-option:disabled { cursor: default; }
.mc-option.selected { background: var(--accent-dim); border-color: var(--accent); }
.mc-option.correct  { background: var(--success-dim); border-color: var(--success); }
.mc-option.wrong    { background: var(--error-dim); border-color: var(--error); animation: shake 0.4s ease; }

.mc-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--border-mid);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  font-family: var(--font-display);
  transition: all var(--transition);
}
.mc-option.selected .mc-letter { background: var(--accent); border-color: var(--accent); color: #fff; }
.mc-option.correct .mc-letter  { background: var(--success); border-color: var(--success); color: #fff; }
.mc-option.wrong .mc-letter    { background: var(--error); border-color: var(--error); color: #fff; }

/* ── TRUE/FALSE ──────────────────────────────────────────────────────── */
.tf-statement {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  line-height: 1.5;
}
.tf-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.btn-tf {
  padding: 16px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font-display);
  border: 1.5px solid var(--border-mid);
  background: var(--card);
  color: var(--text);
  transition: all var(--transition);
}
.btn-tf:hover:not(:disabled) { background: var(--card-hover); }
.btn-tf.selected { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }
.btn-tf.correct  { background: var(--success-dim); border-color: var(--success); color: var(--success); }
.btn-tf.wrong    { background: var(--error-dim); border-color: var(--error); color: var(--error); animation: shake 0.4s ease; }

/* ── DRAG-TO-FILL ────────────────────────────────────────────────────── */
.drag-fill-code {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  line-height: 2;
  color: #d4d0c8;
  white-space: pre-wrap;
  word-break: break-word;
}
.blank-slot {
  display: inline-block;
  min-width: 56px;
  height: 26px;
  line-height: 26px;
  padding: 0 10px;
  background: #1e1e2e;
  border: 1.5px dashed #555;
  border-radius: 6px;
  cursor: pointer;
  text-align: center;
  vertical-align: middle;
  font-size: 0.75rem;
  color: #777;
  transition: all var(--transition);
  position: relative;
}
.blank-slot.has-value {
  background: #1a2a1a;
  border-color: var(--success);
  border-style: solid;
  color: #a0d0a0;
}
.blank-slot.drag-over {
  background: #2a1a0a;
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}
.blank-slot.correct { background: var(--success-dim); border-color: var(--success); border-style: solid; color: #6fcf97; }
.blank-slot.wrong   { background: var(--error-dim); border-color: var(--error); border-style: solid; color: #eb5757; }

.tokens-area {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 52px;
}
.token {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: grab;
  user-select: none;
  transition: all var(--transition);
  touch-action: none;
}
.token:hover { background: var(--card-hover); border-color: var(--accent); color: var(--accent); }
.token.being-dragged { opacity: 0.3; }
.token.used { opacity: 0.3; pointer-events: none; }
.token.selected-mobile {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}
#touch-drag-clone {
  pointer-events: none;
  z-index: 9999;
  position: fixed;
  transform-origin: center center;
}

/* ── CODE ORDERING ───────────────────────────────────────────────────── */
.code-lines-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius-sm);
}
.code-line-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: background var(--transition), border-color var(--transition);
}
.code-line-item:hover { background: #222; border-color: #444; }
.code-line-item.dragging-line { opacity: 0.3; }
.code-line-item.drop-target { border-color: var(--accent); background: #1a100a; }
.code-line-item.correct-line { border-color: var(--success); background: #0a1a0e; }
.code-line-item.wrong-line   { border-color: var(--error); background: #1a0a0a; }
.drag-handle {
  color: #444;
  font-size: 0.85rem;
  cursor: grab;
  flex-shrink: 0;
}
.code-line-text {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #d4d0c8;
  flex: 1;
  white-space: pre;
}

/* ── SPOT THE BUG ────────────────────────────────────────────────────── */
.bug-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--error);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}
.fixed-code-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--success);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  margin-top: 12px;
}

/* ── RESULT PANEL ────────────────────────────────────────────────────── */
.result-panel {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: slideUp 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
  flex-shrink: 0;
}
@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.result-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.result-icon.correct { background: var(--success-dim); }
.result-icon.wrong   { background: var(--error-dim); }

.result-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}
.result-title.correct { color: var(--success); }
.result-title.wrong   { color: var(--error); }

.result-xp {
  font-size: 0.8rem;
  color: var(--text-muted);
}
.xp-earned {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--warning-dim);
  color: var(--warning);
  border: 1px solid var(--warning);
  border-radius: var(--radius-pill);
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-left: 4px;
}
.result-explanation {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.result-explanation code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--bg);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--accent);
}

/* ── BUTTONS ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-sans);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  width: 100%;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
  background: var(--border-mid);
  color: var(--text-dim);
  cursor: not-allowed;
}
.btn-secondary {
  background: var(--card);
  color: var(--text);
  border: 1.5px solid var(--border-mid);
}
.btn-secondary:hover { background: var(--card-hover); border-color: var(--text-muted); }

.activity-footer {
  padding: 12px 20px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── TOPIC COMPLETE OVERLAY ──────────────────────────────────────────── */
.topic-complete {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
  flex: 1;
}
.topic-complete-ferris { animation: bounce 1s ease infinite alternate; }
@keyframes bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-10px); }
}
.topic-complete h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
}
.topic-complete p { color: var(--text-muted); max-width: 320px; }
.xp-big {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--warning);
  animation: popIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes popIn {
  0%   { transform: scale(0.5); opacity: 0; }
  80%  { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}

/* ── FERRIS ──────────────────────────────────────────────────────────── */
.ferris-home {
  display: block;
  margin: 0 auto 4px;
}

/* ── ANIMATIONS ──────────────────────────────────────────────────────── */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
@keyframes popCorrect {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}
.pop-correct { animation: popCorrect 0.3s ease; }

/* ── UTILITIES ───────────────────────────────────────────────────────── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.text-muted { color: var(--text-muted); font-size: 0.85rem; }
.text-center { text-align: center; }

/* ── PRISM OVERRIDE (always dark code blocks) ────────────────────────── */
code[class*="language-"],
pre[class*="language-"] {
  font-family: var(--font-mono) !important;
  font-size: 0.82rem !important;
}
.token.keyword   { color: #ff7b72 !important; }
.token.string    { color: #a5d6ff !important; }
.token.comment   { color: #8b949e !important; font-style: italic; }
.token.number    { color: #79c0ff !important; }
.token.operator  { color: #ff7b72 !important; }
.token.function  { color: #d2a8ff !important; }
.token.punctuation { color: #c9d1d9 !important; }
.token.macro     { color: #e3b341 !important; }

/* ── SCROLLBAR ───────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-mid); border-radius: 4px; }

/* ── INSTALL BANNER ──────────────────────────────────────────────────── */
#install-banner {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--accent-dim);
  border-bottom: 1px solid var(--accent);
  font-size: 0.82rem;
  flex-shrink: 0;
}
#install-banner.visible { display: flex; }
#install-banner button {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}
