/* ============================================================
   StarCraft: Brood War — Unit Codex & Combat Lab
   Dependency-free design system
   ============================================================ */

:root {
  --bg: #060912;
  --bg-2: #0b1020;
  --panel: #111a2e;
  --panel-2: #16223c;
  --panel-3: #1d2c4d;
  --line: #243556;
  --line-soft: #1a2740;
  --text: #e7eefb;
  --text-dim: #9fb0cc;
  --text-faint: #6c7e9e;
  --accent: #43d6ff;
  --accent-2: #7af0c8;
  --gold: #ffce5a;
  --danger: #ff5a6e;
  --warn: #ffb454;

  /* race colors */
  --protoss: #ffcf52;
  --protoss-2: #5ed0ff;
  --terran: #4a9bf5;
  --terran-2: #e8503a;
  --zerg: #c45cff;
  --zerg-2: #8a3bd1;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 18px 50px -18px rgba(0,0,0,.75);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(67,214,255,.10), transparent 60%),
    radial-gradient(900px 500px at 0% 0%, rgba(196,92,255,.10), transparent 55%),
    var(--bg);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* animated starfield */
#starfield {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 20px 30px, rgba(255,255,255,.55), transparent),
    radial-gradient(1.2px 1.2px at 130px 80px, rgba(255,255,255,.4), transparent),
    radial-gradient(1.6px 1.6px at 220px 160px, rgba(122,240,200,.5), transparent),
    radial-gradient(1.2px 1.2px at 320px 60px, rgba(255,255,255,.35), transparent),
    radial-gradient(1.3px 1.3px at 400px 200px, rgba(94,208,255,.45), transparent);
  background-size: 480px 280px;
  opacity: .5;
  animation: drift 120s linear infinite;
}
@keyframes drift { to { background-position: 480px 280px; } }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 4vw, 38px);
  background: rgba(8,12,24,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  font-size: 26px; color: var(--accent);
  filter: drop-shadow(0 0 10px rgba(67,214,255,.6));
}
.brand-text strong { display: block; letter-spacing: .22em; font-size: 15px; }
.brand-text small { color: var(--text-faint); font-size: 11px; letter-spacing: .12em; }

.mainnav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.navbtn {
  appearance: none; border: 1px solid transparent; background: transparent;
  color: var(--text-dim); font: inherit; font-size: 13.5px; font-weight: 600;
  padding: 9px 15px; border-radius: 10px; cursor: pointer;
  transition: .16s ease;
}
.navbtn:hover { color: var(--text); background: var(--panel-2); }
.navbtn.active {
  color: #04121b; background: linear-gradient(120deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -6px rgba(67,214,255,.7);
}
.nav-toggle { display: none; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-size: 20px; border-radius: 10px; padding: 4px 12px; cursor: pointer; }

/* ---------- layout ---------- */
.app { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: clamp(18px, 3vw, 34px); min-height: 60vh; }
.view { animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } }

.section-head { margin: 6px 0 18px; }
.section-head h1 { font-size: clamp(22px, 3.4vw, 34px); margin: 0 0 6px; letter-spacing: .01em; }
.section-head p { color: var(--text-dim); margin: 0; max-width: 70ch; }
.eyebrow { color: var(--accent); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 700; }

/* ---------- loading ---------- */
.loading { display: grid; place-items: center; gap: 16px; padding: 90px 0; color: var(--text-dim); }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- race filter chips ---------- */
.race-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.race-chip {
  --c: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--text-dim); font-weight: 600; font-size: 13.5px;
  padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: .16s;
}
.race-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 8px var(--c); }
.race-chip:hover { color: var(--text); border-color: var(--c); }
.race-chip.active { color: #fff; border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--panel)); box-shadow: inset 0 0 0 1px var(--c); }
.race-chip[data-race="Protoss"] { --c: var(--protoss); }
.race-chip[data-race="Terran"]  { --c: var(--terran); }
.race-chip[data-race="Zerg"]    { --c: var(--zerg); }
.race-chip[data-race="All"]     { --c: var(--accent); }

/* ---------- generic panel ---------- */
.panel { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: clamp(16px, 2.4vw, 26px); }

/* ---------- overview / hero ---------- */
.hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: stretch; }
.hero-main { padding: clamp(22px, 3vw, 40px); position: relative; overflow: hidden; }
.hero-main::after { content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px; background: radial-gradient(circle, rgba(67,214,255,.18), transparent 65%); }
.hero-main h1 { font-size: clamp(28px, 5vw, 50px); line-height: 1.04; margin: 10px 0 14px; }
.hero-main h1 .hl { background: linear-gradient(120deg, var(--protoss), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-main p { color: var(--text-dim); max-width: 56ch; font-size: 15.5px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn { appearance: none; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; padding: 12px 20px; border-radius: 11px; cursor: pointer; transition: .16s; }
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { border-color: transparent; background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #04121b; }
.btn.primary:hover { box-shadow: 0 10px 24px -8px rgba(67,214,255,.7); }

.hero-side { display: grid; gap: 14px; }
.stat-card { padding: 18px 20px; }
.stat-card .big { font-size: 30px; font-weight: 800; }
.stat-card .lbl { color: var(--text-faint); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 24px; }
.feature { padding: 20px; cursor: pointer; transition: .18s; }
.feature:hover { transform: translateY(-3px); border-color: var(--accent); }
.feature .ico { font-size: 26px; }
.feature h3 { margin: 10px 0 6px; font-size: 16px; }
.feature p { color: var(--text-dim); font-size: 13.5px; margin: 0; }

.race-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.race-card { padding: 22px; border-top: 3px solid var(--c); cursor: pointer; transition: .18s; }
.race-card:hover { transform: translateY(-3px); }
.race-card[data-race="Protoss"] { --c: var(--protoss); }
.race-card[data-race="Terran"]  { --c: var(--terran); }
.race-card[data-race="Zerg"]    { --c: var(--zerg); }
.race-card h3 { margin: 4px 0 6px; color: var(--c); font-size: 20px; }
.race-card p { color: var(--text-dim); font-size: 13.5px; margin: 0 0 12px; }
.race-card .mini { display: flex; gap: 16px; font-size: 12px; color: var(--text-faint); }

/* ---------- units grid ---------- */
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.search { flex: 1; min-width: 200px; position: relative; }
.search input { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px 11px 38px; color: var(--text); font: inherit; }
.search input:focus { outline: none; border-color: var(--accent); }
.search::before { content: "⌕"; position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 17px; }
.select { background: var(--panel); border: 1px solid var(--line); border-radius: 11px; padding: 11px 14px; color: var(--text); font: inherit; }
.select:focus { outline: none; border-color: var(--accent); }

.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.unit-card {
  --c: var(--accent);
  position: relative; padding: 16px; cursor: pointer; transition: .18s;
  border-left: 3px solid var(--c); overflow: hidden;
}
.unit-card:hover { transform: translateY(-3px); border-color: var(--c); box-shadow: 0 16px 36px -16px color-mix(in srgb, var(--c) 60%, transparent); }
.unit-card .uc-head { display: flex; align-items: center; gap: 12px; }
.unit-icon { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 18%, var(--panel-2)); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); box-shadow: inset 0 0 14px -6px var(--c); }
.unit-icon svg { width: 32px; height: 32px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.uimg { display: block; object-fit: contain; image-rendering: auto; }
.unit-icon .uimg { width: 92%; height: 92%; border-radius: 8px; }
.tbl-ico .uimg { width: 100%; height: 100%; border-radius: 4px; }

/* attack-target markers */
.atk-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.uc-head .atk-badges { margin-left: auto; flex-direction: column; align-items: flex-end; }
.atk-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .03em; padding: 3px 8px; border-radius: 7px; display: inline-flex; gap: 5px; align-items: center; line-height: 1; white-space: nowrap; }
.atk-badge svg { width: 12px; height: 12px; }
.atk-badge.gnd { color: #93f0b6; background: rgba(38,120,80,.22); border: 1px solid #2c6a48; }
.atk-badge.air { color: #9ad8ff; background: rgba(40,92,140,.22); border: 1px solid #2c5e80; }
.atk-badge.both { color: #ffd98a; background: rgba(120,95,40,.2); border: 1px solid #6a542a; }
.atk-badge.none { color: #c8a6ff; background: rgba(92,62,140,.18); border: 1px solid #4a3a6a; }
.uc-head h3 { margin: 0; font-size: 16px; }
.uc-head .role { color: var(--text-faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.uc-stats { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.uc-stat { font-size: 12px; color: var(--text-dim); }
.uc-stat b { color: var(--text); font-size: 14px; display: block; }
.uc-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.tag { font-size: 10.5px; letter-spacing: .04em; padding: 3px 8px; border-radius: 999px; background: var(--panel-3); color: var(--text-dim); border: 1px solid var(--line-soft); }
.tag.dmg-Normal { color: #ffe39a; border-color: #6a5a2a; }
.tag.dmg-Explosive { color: #ff9d7a; border-color: #6a3a2a; }
.tag.dmg-Concussive { color: #9ad0ff; border-color: #2a4a6a; }
.tag.dmg-Spell, .tag.dmg-None { color: #c8a6ff; border-color: #4a2a6a; }

/* SC2 attribute tags */
.tag.attr-Light { color: #bfe3ff; border-color: #2c5e80; }
.tag.attr-Armored { color: #ffce9a; border-color: #7a5a2c; }
.tag.attr-Biological { color: #9af0b8; border-color: #2c6a48; }
.tag.attr-Mechanical { color: #b8c4d8; border-color: #45546e; }
.tag.attr-Massive { color: #d6a6ff; border-color: #5a3a8a; }
.tag.attr-Psionic { color: #ff9ee0; border-color: #7a2c66; }
.tag.attr-Heroic { color: #ffe08a; border-color: #7a6a2c; }
.tag.attr-Structure { color: #c8b08a; border-color: #5a4a2c; }

[data-race-color="Protoss"] { --c: var(--protoss); }
[data-race-color="Terran"]  { --c: var(--terran); }
[data-race-color="Zerg"]    { --c: var(--zerg); }

/* ---------- modal (unit detail) ---------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(3,6,14,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 18px; animation: fade .2s ease; }
.modal { --c: var(--accent); width: min(860px, 100%); max-height: 90vh; overflow: auto; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel-2), var(--bg-2)); box-shadow: var(--shadow); }
.modal-head { position: sticky; top: 0; display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--panel-2)), var(--panel-2)); border-bottom: 1px solid var(--line); z-index: 2; }
.modal-head .unit-icon { width: 58px; height: 58px; }
.modal-head .unit-icon svg { width: 38px; height: 38px; }
.modal-head h2 { margin: 0; font-size: 22px; }
.modal-head .sub { color: var(--text-dim); font-size: 13px; }
.modal-close { margin-left: auto; background: var(--panel-3); border: 1px solid var(--line); color: var(--text); width: 36px; height: 36px; border-radius: 9px; cursor: pointer; font-size: 18px; }
.modal-close:hover { border-color: var(--danger); color: var(--danger); }
.modal-body { padding: 22px 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; margin-bottom: 18px; }
.dstat { background: var(--panel); border: 1px solid var(--line-soft); border-radius: 11px; padding: 12px 14px; }
.dstat .v { font-size: 19px; font-weight: 800; }
.dstat .k { color: var(--text-faint); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.dstat .v.shield { color: var(--protoss-2); }
.dstat .v.hp { color: var(--accent-2); }

.detail-section { margin-top: 18px; }
.detail-section h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { color: var(--text-faint); }
.kv dd { margin: 0; }

.eff-bars { display: grid; gap: 8px; }
.eff-row { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; }
.eff-track { height: 12px; border-radius: 6px; background: var(--panel-3); overflow: hidden; }
.eff-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--danger), var(--warn) 50%, var(--accent-2)); }

.matchup-list { display: grid; gap: 8px; }
.matchup { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line-soft); font-size: 13px; }
.matchup .verdict { margin-left: auto; font-weight: 700; font-size: 12px; padding: 2px 9px; border-radius: 999px; }
.verdict.good { color: #79f0bf; background: rgba(40,120,90,.25); }
.verdict.bad  { color: #ff9aa6; background: rgba(120,40,55,.25); }
.verdict.even { color: #ffd98a; background: rgba(120,95,40,.22); }

/* ---------- tech tree ---------- */
.tree-wrap { position: relative; overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); background:
   linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 30px 30px,
   linear-gradient(90deg, var(--line-soft) 1px, transparent 1px) 0 0 / 30px 30px,
   var(--bg-2);
  min-height: 560px; }
.tree-svg { display: block; }
.tree-node {
  cursor: pointer;
  transition: filter .15s;
}
.tree-node rect { transition: .18s; }
.tree-node:hover rect { filter: brightness(1.25); }
.tree-node text { pointer-events: none; }
.tree-node.dim { opacity: .22; }
.tree-node.hl rect { stroke-width: 2.5px; }
.tree-edge { transition: .18s; }
.tree-edge.dim { opacity: .08; }
.tree-edge.hl { opacity: 1; }
.tree-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 14px 2px 0; font-size: 12.5px; color: var(--text-dim); }
.tree-legend .li { display: inline-flex; gap: 7px; align-items: center; }
.tree-legend .sw { width: 22px; height: 12px; border-radius: 3px; }
.tree-hint { color: var(--text-faint); font-size: 12.5px; margin-top: 10px; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); }
table.grid { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 520px; }
table.grid th, table.grid td { padding: 9px 12px; text-align: center; border-bottom: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); white-space: nowrap; }
table.grid thead th { position: sticky; top: 0; background: var(--panel-2); z-index: 1; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
table.grid tbody tr:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
table.grid td.label, table.grid th.label { text-align: left; font-weight: 600; position: sticky; left: 0; background: var(--panel); z-index: 1; }
table.grid td.num { font-family: var(--mono); }

/* inline icons inside tables / matrix */
.tbl-ico { display: inline-flex; align-items: center; justify-content: center; color: var(--c); vertical-align: middle; flex: none; }
.tbl-ico svg { width: 100%; height: 100%; filter: drop-shadow(0 1px 1px rgba(0,0,0,.4)); }
td.label .lbl-wrap { display: flex; align-items: center; gap: 8px; }
th .th-wrap { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.lab-matchup { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 2px; }
.lab-matchup .who { display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.lab-matchup .unit-icon { width: 52px; height: 52px; }
.lab-matchup .vs { color: var(--danger); font-weight: 800; letter-spacing: .14em; }
[data-open-unit] { cursor: pointer; }
.lab-matchup .who[data-open-unit]:hover { color: var(--accent); }
.lab-matchup .who[data-open-unit]:hover .unit-icon { box-shadow: inset 0 0 0 1px var(--c), 0 0 14px -4px var(--c); }
table.grid td.label[data-open-unit]:hover, table.grid th[data-open-unit]:hover { color: var(--accent); text-decoration: underline; }
table.grid td.kmcell { cursor: pointer; }
table.grid td.kmcell:hover { outline: 2px solid var(--accent); outline-offset: -2px; filter: brightness(1.18); }
.cell-heat { font-family: var(--mono); font-weight: 700; border-radius: 4px; }

/* damage-type matrix mini */
.dt-matrix { display: inline-grid; grid-template-columns: auto repeat(3, 64px); gap: 4px; align-items: center; }
.dt-matrix .h { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.dt-cell { font-family: var(--mono); font-weight: 700; text-align: center; padding: 9px 6px; border-radius: 8px; }

/* ---------- charts ---------- */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.chart-box { padding: 18px 18px 8px; }
.chart-box h4 { margin: 0 0 4px; font-size: 15px; }
.chart-box .cap { color: var(--text-faint); font-size: 12px; margin-bottom: 10px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.chart-legend .li { display: inline-flex; gap: 6px; align-items: center; }
.chart-legend .sw { width: 14px; height: 3px; border-radius: 2px; }

/* ---------- combat lab ---------- */
.lab-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.lab-controls { padding: 20px; position: sticky; top: 84px; display: grid; gap: 16px; }
.ctrl label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px; }
.ctrl select, .ctrl input[type="number"] { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; }
.slider-row { display: grid; gap: 6px; }
.slider-row .top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-dim); }
.slider-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.vs-badge { text-align: center; color: var(--accent); font-weight: 800; letter-spacing: .2em; font-size: 13px; }

.lab-result { display: grid; gap: 16px; }
.result-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.rc { padding: 18px; text-align: center; }
.rc .v { font-size: 32px; font-weight: 800; line-height: 1; }
.rc .v.accent { color: var(--accent); }
.rc .v.gold { color: var(--gold); }
.rc .k { color: var(--text-faint); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; margin-top: 8px; }
.rc .sub { color: var(--text-dim); font-size: 12px; margin-top: 4px; }
.breakdown { font-size: 13px; color: var(--text-dim); }
.breakdown code { font-family: var(--mono); color: var(--accent-2); background: var(--panel); padding: 1px 6px; border-radius: 5px; }

.matrix-controls { display: flex; gap: 14px; flex-wrap: wrap; align-items: end; margin-bottom: 14px; }

/* heat colors helper classes injected inline via style */

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; }
  .race-cards { grid-template-columns: 1fr; }
  .lab-grid { grid-template-columns: 1fr; }
  .lab-controls { position: static; }
}
@media (max-width: 720px) {
  .mainnav { position: fixed; inset: 56px 10px auto auto; flex-direction: column; background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px; box-shadow: var(--shadow); display: none; z-index: 50; }
  .mainnav.open { display: flex; }
  .nav-toggle { display: block; margin-left: auto; }
}

.tiny { font-size: 12px; color: var(--text-faint); }
.center { text-align: center; }
.mt { margin-top: 18px; }
.muted { color: var(--text-dim); }
.pill-note { display: inline-block; font-size: 12px; color: var(--text-dim); background: var(--panel); border: 1px solid var(--line-soft); padding: 5px 12px; border-radius: 999px; }
