/* ════════════════════════════════════════════════════════════════
   ГЛУБИНА — Terminal PDA stylesheet
   Brutalist CRT aesthetic. Phosphor-green palette, scanlines, bolted panels.
   ════════════════════════════════════════════════════════════════ */

/* ── Design tokens (Material-3 dark, phosphor-tinted) ─────────── */
:root {
  --bg: #121416;
  --surface: #121416;
  --surface-dim: #121416;
  --surface-lowest: #0c0e10;
  --surface-low: #1a1c1e;
  --surface-cont: #1e2022;
  --surface-high: #282a2c;
  --surface-highest: #333537;
  --surface-bright: #37393b;

  --primary: #c1c9b7;          /* phosphor green */
  --primary-fixed-dim: #c1c9b7;
  --primary-container: #2d3528;
  --on-primary: #2b3326;
  --on-primary-container: #959e8d;

  --tertiary: #3adccc;         /* cyan accent */
  --tertiary-container: #003a35;
  --on-tertiary: #003732;
  --on-tertiary-container: #00aea0;

  --error: #ffb4ab;
  --error-container: #93000a;
  --on-error: #690005;

  --secondary: #ffb4a3;        /* peach warning */
  --secondary-container: #7c3120;
  --on-secondary: #5c190a;

  --on-surface: #e2e2e5;
  --on-surface-variant: #c5c7bf;
  --outline: #8f928a;
  --outline-variant: #454841;

  --margin: 16px;
  --gutter: 12px;
  --unit: 4px;
  --container-max: 480px;
}

/* ── Reset / base ──────────────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-font-smoothing: none; }

body {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 50% 50%, rgba(26,28,30,0.8) 0%, rgba(12,14,16,1) 100%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  color: var(--on-surface);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

#app {
  width: 100%;
  max-width: var(--container-max);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  border-left: 1px solid rgba(69,72,65,0.3);
  border-right: 1px solid rgba(69,72,65,0.3);
}

/* ── CRT global overlays ───────────────────────────────────────── */
.crt-scanlines {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 90;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 50%, rgba(0,0,0,0.12) 50%);
  background-size: 100% 4px;
  opacity: 0.55;
}
.crt-vignette {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 91;
  background: radial-gradient(circle at center, transparent 55%, rgba(0,0,0,0.55) 100%);
}
.crt-flicker { animation: flicker 4s infinite; }
@keyframes flicker {
  0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% { opacity: 0.99; }
  20%, 21.999%, 63%, 63.999%, 65%, 69.999% { opacity: 0.93; }
}

/* ── Screens ───────────────────────────────────────────────────── */
.screen { display: none; flex-direction: column; flex: 1; }
.screen.active { display: flex; }

/* ── TopAppBar ─────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center;
  height: 56px; padding: 0 var(--margin);
  background: var(--surface-low);
  border-bottom: 2px solid var(--outline-variant);
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.topbar .brand {
  display: flex; align-items: center; gap: var(--gutter);
}
.topbar .brand .ms {
  color: var(--primary);
  font-family: 'Material Symbols Outlined';
  font-size: 22px;
  font-variation-settings: 'FILL' 1;
}
.topbar .brand .title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700; font-size: 18px;
  color: var(--primary);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.topbar .status {
  display: flex; align-items: center; gap: var(--gutter);
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--on-surface-variant);
  text-transform: uppercase;
}
.topbar .status .err { color: var(--error); }
.topbar .status .blink { animation: blink 1.5s linear infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── Stats row (vitals bar) ────────────────────────────────────── */
.stats-row {
  display: flex; gap: var(--unit);
  padding: var(--gutter) var(--margin);
  background: var(--surface-low);
  border-bottom: 1px solid var(--outline-variant);
  overflow-x: auto;
  scrollbar-width: none;
}
.stats-row::-webkit-scrollbar { display: none; }
.stat-chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 10px;
  background: var(--surface-cont);
  border: 1px solid var(--outline-variant);
  flex-shrink: 0;
  min-width: 0;
}
.stat-chip .label {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--outline);
}
.stat-chip .value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700;
  color: var(--primary);
}
.stat-chip.danger .value { color: var(--error); }
.stat-chip.warn .value { color: var(--secondary); }
.stat-chip.ok .value { color: var(--tertiary); }

/* Segmented bar (PDA vitals) */
.segbar { display: flex; gap: 2px; }
.segbar .seg {
  width: 8px; height: 14px;
  background: var(--outline-variant);
}
.segbar .seg.on { background: var(--primary); box-shadow: 0 0 4px rgba(193,201,183,0.4); }
.segbar .seg.on.warn { background: var(--secondary); box-shadow: 0 0 4px rgba(255,180,163,0.4); }
.segbar .seg.on.crit { background: var(--error); box-shadow: 0 0 4px rgba(255,180,171,0.4); }

/* ── Content area ──────────────────────────────────────────────── */
.content {
  flex: 1;
  padding: var(--margin);
  padding-bottom: 90px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--gutter);
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface-cont);
  border: 2px solid var(--outline-variant);
  padding: var(--gutter);
  position: relative;
}
.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 600;
  color: var(--primary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 6px;
}
.card p {
  font-size: 12px; line-height: 1.5;
  color: var(--on-surface-variant);
}

/* Bolted card (industrial panel) */
.card-bolted {
  background: var(--surface-high);
  border: 2px solid var(--outline-variant);
  padding: var(--gutter);
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.7);
}
.card-bolted::before, .card-bolted::after,
.card-bolted .bolt-bl, .card-bolted .bolt-br {
  content: ''; position: absolute;
  width: 5px; height: 5px;
  background: var(--outline);
  border-radius: 50%;
}
.card-bolted::before { top: 3px; left: 3px; }
.card-bolted::after { top: 3px; right: 3px; }
.card-bolted .bolt-bl { bottom: 3px; left: 3px; }
.card-bolted .bolt-br { bottom: 3px; right: 3px; }

/* Tactical overlay / dirty glass panel */
.tactical {
  background: rgba(18,20,22,0.85);
  backdrop-filter: blur(4px);
  border: 1px solid var(--outline-variant);
  box-shadow: inset 0 0 10px rgba(0,0,0,0.8);
}

/* Section label (caps) */
.sec-label {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--outline);
  border-left: 3px solid var(--tertiary);
  padding-left: var(--unit);
  margin: var(--gutter) 0 var(--unit);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: flex; align-items: center; gap: var(--gutter);
  width: 100%;
  padding: 12px var(--gutter);
  background: var(--surface-cont);
  border: 2px solid var(--outline-variant);
  color: var(--on-surface);
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: inset 0 0 6px rgba(0,0,0,0.4);
}
.btn:hover { border-color: var(--primary); background: var(--surface-high); }
.btn:active { transform: scale(0.98) translateY(1px); box-shadow: inset 0 4px 8px rgba(0,0,0,0.8); }
.btn .icon {
  font-family: 'Material Symbols Outlined';
  font-size: 18px; color: var(--primary);
  width: 22px; text-align: center; flex-shrink: 0;
}
.btn .label-txt { flex: 1; }
.btn .cost {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 10px; color: var(--outline);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), #a8b09e);
  color: var(--on-primary);
  border-color: var(--primary);
  font-weight: 700;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.btn.primary .icon { color: var(--on-primary); }
.btn.primary:hover { background: linear-gradient(135deg, #d4dcc9, var(--primary)); }
.btn.danger { border-color: var(--error); color: var(--error); }
.btn.danger .icon { color: var(--error); }
.btn.small { padding: 6px 10px; font-size: 11px; width: auto; }
.btn:disabled, .btn.disabled { opacity: 0.4; pointer-events: none; }

/* Pulse (call to action) */
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.5} }

/* ── Bottom navigation ─────────────────────────────────────────── */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: var(--container-max);
  z-index: 50;
  display: flex;
  height: 64px;
  background: var(--surface-highest);
  border-top: 2px solid var(--outline-variant);
  box-shadow: 0 -2px 10px rgba(0,0,0,0.6);
}
.tab {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  color: var(--outline);
  cursor: pointer;
  transition: all 0.1s ease;
  position: relative;
}
.tab .ms {
  font-family: 'Material Symbols Outlined';
  font-size: 22px;
  filter: grayscale(1);
}
.tab .tab-label {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.tab.active {
  background: var(--tertiary-container);
  color: var(--on-tertiary-container);
  border-left: 1px solid var(--outline-variant);
  border-right: 1px solid var(--outline-variant);
  transform: scale(0.92);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5);
}
.tab.active .ms { filter: none; font-variation-settings: 'FILL' 1; }
.tab.active::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.3) 50%);
  background-size: 100% 4px; opacity: 0.3; pointer-events: none;
}

/* ── Overlay modal ─────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  display: none; z-index: 100;
  justify-content: center; align-items: flex-end;
  padding: var(--margin);
  backdrop-filter: blur(2px);
}
.overlay.active { display: flex; }
.overlay-c {
  background: var(--surface-low);
  border: 2px solid var(--outline-variant);
  max-width: var(--container-max);
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: var(--margin);
  box-shadow: 0 -4px 30px rgba(0,0,0,0.8), inset 0 0 20px rgba(0,0,0,0.5);
  animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.overlay-c h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--gutter);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  border-bottom: 1px solid var(--outline-variant);
  padding-bottom: var(--unit);
}
.overlay-c p { font-size: 13px; color: var(--on-surface-variant); margin-bottom: var(--gutter); line-height: 1.5; }

/* ── Toast ─────────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  background: var(--surface-highest);
  border: 1px solid var(--tertiary);
  color: var(--on-surface);
  padding: 10px 20px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  z-index: 200;
  display: none;
  max-width: 90%;
  box-shadow: 0 0 15px rgba(58,220,204,0.2);
}
.toast.show { display: block; }

/* ── Prologue screen ───────────────────────────────────────────── */
.prologue {
  align-items: center; justify-content: center;
  text-align: center;
  padding: 40px var(--margin);
  background: radial-gradient(circle at 50% 30%, rgba(45,53,40,0.4) 0%, var(--bg) 70%);
}
.prologue .logo {
  font-size: 56px; margin-bottom: var(--gutter);
  filter: drop-shadow(0 0 20px rgba(193,201,183,0.3));
}
.prologue .game-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px; font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--unit);
  text-shadow: 0 0 12px rgba(193,201,183,0.4);
}
.prologue .subtitle {
  font-size: 12px; color: var(--on-surface-variant);
  max-width: 320px; margin-bottom: 24px;
  line-height: 1.6;
  font-style: italic;
}
.prologue .btn { max-width: 280px; margin: var(--unit) auto; }

/* ── Form inputs ───────────────────────────────────────────────── */
.input {
  background: var(--surface-lowest);
  border: 2px solid var(--outline-variant);
  padding: 12px 14px;
  color: var(--on-surface);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  width: 100%;
  margin-bottom: var(--gutter);
  outline: none;
  box-shadow: inset 0 0 8px rgba(0,0,0,0.6);
}
.input:focus { border-color: var(--primary); }

.gender-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--unit); margin-bottom: var(--gutter); max-width: 240px; }
.gender-btn {
  background: var(--surface-cont);
  border: 2px solid var(--outline-variant);
  padding: 12px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'JetBrains Mono', monospace;
}
.gender-btn.active {
  border-color: var(--primary);
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 700;
  box-shadow: inset 0 0 8px rgba(193,201,183,0.2);
}

/* ── Spec selection ────────────────────────────────────────────── */
.spec-card {
  background: var(--surface-cont);
  border: 2px solid var(--outline-variant);
  padding: var(--gutter);
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}
.spec-card:hover { border-color: var(--tertiary); background: var(--surface-high); }
.spec-card .spec-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px; font-weight: 600;
  color: var(--tertiary);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.spec-card .spec-desc { font-size: 12px; color: var(--on-surface-variant); margin-bottom: 6px; line-height: 1.4; }
.spec-card .spec-bonus {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--secondary);
  text-transform: uppercase;
}

/* ── Inventory grid ────────────────────────────────────────────── */
.inv-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; background: var(--outline-variant); padding: 2px; border: 2px solid var(--outline); box-shadow: 0 4px 20px rgba(0,0,0,0.6); }
.inv-slot {
  aspect-ratio: 1;
  background: var(--surface-low);
  position: relative;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4px;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.8);
  transition: all 0.15s;
}
.inv-slot:hover { background: var(--surface-cont); }
.inv-slot.active { border: 2px solid var(--tertiary); box-shadow: inset 0 0 8px rgba(58,220,204,0.2); }
.inv-slot .slot-icon { font-size: 22px; margin-bottom: 2px; filter: grayscale(0.5) contrast(1.1); }
.inv-slot .slot-name { font-size: 8px; color: var(--on-surface-variant); text-align: center; line-height: 1.1; }
.inv-slot .slot-count {
  position: absolute; bottom: 2px; right: 2px;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 9px; font-weight: 700;
  background: var(--surface-highest); color: var(--primary);
  padding: 1px 3px;
}
.inv-slot.empty .slot-icon { color: var(--outline-variant); opacity: 0.3; }
.inv-detail {
  background: var(--surface-low);
  border: 2px solid var(--outline);
  padding: var(--gutter);
  margin-bottom: var(--gutter);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.9);
  position: relative;
}
.inv-detail .corner { position: absolute; width: 8px; height: 8px; border: 2px solid var(--outline); }
.inv-detail .corner.tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.inv-detail .corner.tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.inv-detail .corner.bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.inv-detail .corner.br { bottom: 0; right: 0; border-left: none; border-top: none; }

/* ── Map ───────────────────────────────────────────────────────── */
.map-wrap {
  position: relative;
  width: 100%; height: 380px;
  background: var(--surface-lowest);
  border: 2px solid var(--outline-variant);
  overflow: hidden;
  box-shadow: inset 0 0 30px rgba(0,0,0,1);
}
.map-grid {
  position: absolute; inset: 0;
  background:
    linear-gradient(rgba(193,201,183,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(193,201,183,0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.map-line { stroke: var(--outline); stroke-width: 1.5; fill: none; opacity: 0.5; }
.map-line.avail { stroke: var(--primary); stroke-width: 2.5; opacity: 1; stroke-dasharray: 6,4; animation: dash 1.5s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -10; } }
.map-line.cur { stroke: var(--outline); stroke-width: 1.5; opacity: 0.7; }
.map-dot {
  width: 16px; height: 16px; border-radius: 50%;
  margin: 4px auto 1px;
  border: 2px solid var(--outline);
  transition: all 0.2s;
}
.map-dot.cur { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 12px rgba(193,201,183,0.7); }
.map-dot.avail { border-color: var(--primary); cursor: pointer; }
.map-dot.avail:hover { transform: scale(1.2); box-shadow: 0 0 10px rgba(193,201,183,0.5); }
.map-marker-label {
  text-align: center; font-size: 8px;
  color: var(--outline); white-space: nowrap;
  text-shadow: 0 0 4px #000; line-height: 1.15;
  pointer-events: none;
  font-family: 'Archivo Narrow', sans-serif; font-weight: 700;
}
.map-marker-label.cur { color: var(--on-surface); font-size: 9px; }
.map-marker-label.avail { color: var(--primary); }
.map-legend {
  display: flex; gap: var(--gutter); justify-content: center;
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 10px; color: var(--outline);
  margin: var(--unit) 0 var(--gutter);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.map-legend .dot { display: inline-block; width: 10px; height: 10px; margin-right: 4px; vertical-align: middle; }

/* ── Quest / dialogue / log ────────────────────────────────────── */
.quest-node {
  background: var(--surface-lowest);
  border-left: 3px solid var(--tertiary);
  padding: var(--gutter);
  margin: var(--gutter) 0;
  font-size: 12px;
  color: var(--on-surface-variant);
  line-height: 1.5;
}
.quest-node.done { border-left-color: var(--outline); opacity: 0.6; }

.dialogue-box {
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  padding: var(--gutter);
  position: relative;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
  margin-bottom: var(--gutter);
}
.dialogue-box .speaker {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 13px; font-weight: 600;
  color: var(--tertiary);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.dialogue-box .text { font-size: 13px; color: var(--on-surface); line-height: 1.6; }

/* ── Perks tree ────────────────────────────────────────────────── */
.perk-node {
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  padding: 8px var(--gutter);
  margin-bottom: var(--unit);
  font-size: 12px;
  display: flex; align-items: center; gap: var(--gutter);
}
.perk-node.locked { opacity: 0.5; }
.perk-node .tier {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 10px; font-weight: 700;
  color: var(--tertiary);
  background: var(--tertiary-container);
  padding: 2px 6px;
  letter-spacing: 0.1em;
}

/* ── Badge grid ────────────────────────────────────────────────── */
.badge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.badge-card {
  background: var(--surface-cont);
  border: 2px solid var(--outline-variant);
  padding: var(--gutter);
  text-align: center;
}
.badge-card.earned { border-color: var(--tertiary); box-shadow: 0 0 10px rgba(58,220,204,0.15); }
.badge-card.locked { opacity: 0.5; }
.badge-card .b-icon { font-size: 28px; margin-bottom: 4px; }
.badge-card .b-name { font-family: 'Space Grotesk', sans-serif; font-size: 12px; font-weight: 600; color: var(--on-surface); margin-bottom: 2px; }
.badge-card .b-desc { font-size: 10px; color: var(--outline); line-height: 1.3; }
.badge-card .b-status { font-family: 'Archivo Narrow', sans-serif; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; margin-top: 4px; text-transform: uppercase; }
.badge-card.earned .b-status { color: var(--tertiary); }
.badge-card.locked .b-status { color: var(--outline); }

/* ── Archive documents ─────────────────────────────────────────── */
.doc-cat {
  font-family: 'Archivo Narrow', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tertiary);
  border-left: 3px solid var(--tertiary);
  padding-left: var(--unit);
  margin: var(--gutter) 0 var(--unit);
}
.doc-card {
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  padding: var(--gutter);
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: var(--unit);
  position: relative;
}
.doc-card:hover { border-color: var(--primary); background: var(--surface-cont); }
.doc-card .d-title { font-family: 'Space Grotesk', sans-serif; font-size: 13px; font-weight: 600; color: var(--primary); margin-bottom: 2px; }
.doc-card .d-day { font-family: 'Archivo Narrow', sans-serif; font-size: 10px; color: var(--outline); letter-spacing: 0.1em; }

/* ── Shop ──────────────────────────────────────────────────────── */
.shop-item {
  background: var(--surface-cont);
  border: 2px solid var(--outline-variant);
  padding: var(--gutter);
  margin-bottom: var(--gutter);
}
.shop-item .s-name { font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; color: var(--on-surface); margin-bottom: 4px; }
.shop-item .s-desc { font-size: 12px; color: var(--on-surface-variant); margin-bottom: var(--gutter); line-height: 1.4; }
.shop-item .s-price { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--secondary); margin-bottom: var(--gutter); }

/* ── Stat rows (profile) ───────────────────────────────────────── */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--surface-bright);
  font-size: 13px;
}
.stat-row .sr-label { font-family: 'Archivo Narrow', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--outline); text-transform: uppercase; }
.stat-row .sr-value { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--primary); }

/* ── Utility ───────────────────────────────────────────────────── */
.hide { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gutter); }
.text-err { color: var(--error); }
.text-ok { color: var(--tertiary); }
.text-warn { color: var(--secondary); }
.text-dim { color: var(--outline); }
.mono { font-family: 'JetBrains Mono', monospace; }
.caps { font-family: 'Archivo Narrow', sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface-lowest); border-left: 1px solid var(--outline-variant); }
::-webkit-scrollbar-thumb { background: var(--outline-variant); }
