/*
 * Shared styles for the public site: landing page (index.php) and hero pages
 * (heroes_page.php). Served as a file because the production CSP allows only
 * same-origin scripts, and keeping styles alongside lets browsers cache both.
 */

@font-face {
  font-family: 'Silkscreen';
  src: url('/assets/fonts/silkscreen-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Silkscreen';
  src: url('/assets/fonts/silkscreen-700.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #0c1517;
  --ink-2: #0a1113;
  --panel: #122124;
  --panel-2: #111d1f;
  --line: #22403f;
  --line-soft: #1f3534;
  --gold: #ffc72c;
  --gold-dark: #b3860f;
  --green: #1f9e6e;
  --green-light: #1fbf85;
  --text: #e9e3cf;
  --text-soft: #b6c3be;
  --text-muted: #8aa7a0;
  --text-faint: #6f8781;
  --cream: #fff4d6;
  --pixel: 'Silkscreen', ui-monospace, monospace;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); line-height: 1.55; color: var(--text); background: var(--ink); }
img.px, .px img { image-rendering: pixelated; }
a { color: var(--gold); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 28px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ── Nav ── */
.site-nav { position: sticky; top: 0; z-index: 100; background: rgba(12, 21, 23, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(255, 199, 44, 0.12); }
.site-nav .wrap { display: flex; align-items: center; gap: 24px; height: 60px; }
.site-logo { display: flex; align-items: center; gap: 10px; font: 700 14px var(--pixel); color: var(--gold); text-decoration: none; white-space: nowrap; }
.site-logo img { width: 28px; height: 28px; }
.site-nav .links { display: flex; gap: 22px; }
.site-nav .links a { color: #9fb1ab; font-size: 14.5px; text-decoration: none; }
.site-nav .links a:hover, .site-nav .links a[aria-current="page"] { color: var(--cream); }
.site-nav .spacer { flex: 1; }
.btn-gold { display: inline-block; background: var(--gold); color: #1d1402; font-weight: 800; text-decoration: none; border-radius: 8px; }
.btn-gold:hover { background: #ffd35a; }
.site-nav .btn-gold { padding: 8px 16px; font-size: 14.5px; white-space: nowrap; }

/* ── Footer ── */
.site-foot { border-top: 1px solid #16292a; color: #58807a; font-size: 13.5px; }
.site-foot .wrap { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.site-foot .spacer { flex: 1; }
.site-foot a { color: #8aa7a0; text-decoration: none; }
.site-foot a:hover { color: var(--gold); }

/* ═════════ Landing: hero + sandbox ═════════ */
.hero { padding: 56px 0 48px;
  background: radial-gradient(900px 500px at 78% 40%, rgba(31, 158, 110, 0.16), transparent 60%); }
.hero .wrap { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 44px; align-items: center; }
/* Grid children default to min-width: auto, which lets the sandbox push the page wider than a phone. */
.hero .wrap > *, .pulse > *, .codex-body > * { min-width: 0; }
.eyebrow { font: 400 12px var(--pixel); color: var(--green-light); letter-spacing: 0.08em; }
.hero h1 { font: 800 clamp(34px, 4.6vw, 52px)/1.03 var(--sans); letter-spacing: -0.035em; margin: 12px 0 16px; color: var(--cream); }
.hero h1 em { font-style: normal; color: var(--gold); }
.lede { font-size: 18px; color: var(--text-soft); max-width: 480px; margin: 0 0 26px; }
/* Browser play and the direct download sit side by side as equals. */
.ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 500px; }
.ctas .btn-play, .ctas .btn-try { padding: 14px 18px; font-size: 16px; }
.btn-play { padding: 15px 26px; font-size: 17px; box-shadow: 0 4px 0 var(--gold-dark); }
.btn-play small { display: block; font-weight: 500; font-size: 12.5px; opacity: 0.75; }
/* Secondary: the browser build, offered as the way to try the game. */
.btn-try { display: inline-block; padding: 15px 26px; font-size: 17px; font-weight: 800; color: var(--cream); background: transparent; border: 2px solid #3b5c58; border-radius: 8px; text-decoration: none; }
.btn-try:hover { border-color: var(--gold); }
.btn-try small { display: block; font-weight: 500; font-size: 12.5px; color: var(--text-muted); }
.icon { width: 1.25em; height: 1.25em; flex: none; }
/* Steam gets its own button, styled like Steam, spanning under the two direct options. */
.btn-steam { grid-column: 1 / -1; display: flex; align-items: center; justify-content: center; gap: 9px; padding: 11px 18px; border-radius: 8px; background: #1b2838; border: 1px solid #2a475e; color: #c7d5e0; font-weight: 700; font-size: 15px; text-decoration: none; }
.btn-steam:hover { background: #2a475e; color: #fff; }
.btn-steam .icon { color: #66c0f4; }
.sync-note { display: flex; gap: 12px; align-items: flex-start; max-width: 500px; margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(31, 158, 110, 0.1); border: 1px solid rgba(31, 191, 133, 0.35); color: var(--text-soft); font-size: 14.5px; line-height: 1.45; }
.sync-note b { color: var(--cream); }
.sync-note .icon { color: var(--green-light); width: 22px; height: 22px; margin-top: 1px; }
.facts { margin: 24px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text-faint); display: flex; gap: 16px; flex-wrap: wrap; }
.facts li::before { content: '\25A0\00a0'; color: var(--green); font-size: 9px; vertical-align: 2px; }

.sbx { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; padding: 18px; position: relative; box-shadow: inset 0 0 0 4px var(--ink), 0 20px 50px rgba(0, 0, 0, 0.4); }
.sbx-challenges { display: flex; gap: 6px; margin-bottom: 10px; }
.sbx-challenge { flex: 1; min-width: 0; border: 1px solid #3b5c58; border-radius: 6px; background: var(--ink); color: var(--text-soft); padding: 7px; cursor: pointer; }
.sbx-challenge.current { border-color: var(--gold); color: var(--gold); }
.sbx-challenge.done::after { content: ' ✓'; color: var(--green); }
.sbx-title { font: 700 18px var(--pixel); color: var(--gold); margin: 0 0 6px; }
.sbx-objective, .sbx-progress { font-size: 13px; color: var(--text-soft); margin: 0 0 8px; }
.sbx-progress { color: var(--green); }
.sbx-restart { margin-top: 10px; }
.sbx-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.sbx-dps small { display: block; font: 400 11px var(--pixel); color: #7fa39a; letter-spacing: 0.06em; }
.sbx-carry-formula { display: block; font-size: 11px; color: var(--text-soft); margin-top: 5px; }
.sbx-dps b { font: 700 36px var(--pixel); color: var(--gold); line-height: 1; }
.sbx-best { min-width: 0; flex: 1; text-align: right; font-size: 13px; color: var(--text-muted); }
.sbx-bar { height: 8px; background: #0b1617; border-radius: 4px; margin: 6px 0 0 auto; width: 190px; max-width: 100%; overflow: hidden; }
.sbx-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width 0.35s; }
.sbx-field { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 10px; }
.sbx-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sbx-cell { aspect-ratio: 1; background: #0e1a1c; border: 2px dashed #24403f; border-radius: 8px; display: grid; place-items: center; padding: 0; position: relative; cursor: pointer; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.sbx-cell[hidden] { visibility: hidden; pointer-events: none; }
.sbx-target { width: 100%; height: 100%; background: transparent; border: 0; cursor: pointer; }
.sbx-target[hidden], .sbx-win button[hidden] { display: none; }
.sbx-cell.over { border-color: var(--gold); background: #1b2a22; }
.sbx-cell.hit { border-style: solid; border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold) inset, 0 0 18px rgba(255, 199, 44, 0.35); }
.sbx-cell.hit-all { box-shadow: 0 0 0 2px rgba(255, 199, 44, 0.45) inset; }
.sbx-wall { background: repeating-linear-gradient(0deg, #5e5647 0 14px, #494235 14px 16px); border-radius: 6px; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; font: 400 10px var(--pixel); color: #ded2b4; letter-spacing: 0.2em; }
.sbx-axis { display: flex; justify-content: space-between; font: 400 10px var(--pixel); color: #58807a; margin: 6px 66px 0 2px; }
.sbx-tray { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed #24403f; }
.sbx-slot { aspect-ratio: 1; border-radius: 8px; background: rgba(14, 26, 28, 0.6); }
.chip { width: 100%; height: 100%; background: #3a2412; border: 2px solid #6b4520; border-radius: 6px; display: flex; align-items: center; justify-content: center; cursor: grab; position: relative; padding: 0; user-select: none; }
.sbx-cell .chip { width: 88%; height: 88%; }
/* Keep image pointer events: Firefox starts native image drags, but not button drags.
   Height and object-fit let the 48px fallback dimensions scale with the chip. */
.chip img { width: 80%; height: 80%; object-fit: contain; image-rendering: pixelated; }
.chip.sbx-carry { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255, 199, 44, 0.45); }
.chip .carry-badge { position: absolute; bottom: -6px; left: -5px; z-index: 1; background: var(--gold); color: #201604; font: 700 9px var(--sans); padding: 1px 3px; border-radius: 3px; line-height: 1.2; }
.chip .carry-badge[hidden] { display: none; }
.chip.sel { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 199, 44, 0.35); }
.chip .mult { position: absolute; top: -8px; right: -8px; background: var(--green); color: #fff; font: 700 10.5px var(--sans); padding: 1px 5px; border-radius: 8px; display: none; }
.chip .mult.show { display: block; }
.sbx-tip { min-height: 42px; margin-top: 12px; font-size: 13.5px; color: var(--text-soft); background: var(--ink); border-radius: 8px; padding: 9px 12px; }
.sbx-tip b { color: var(--gold); }
.sbx-note { font-size: 11.5px; color: #58807a; margin-top: 8px; }
.sbx-win { position: absolute; inset: 0; background: rgba(8, 16, 16, 0.97); border-radius: 12px; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; z-index: 2; overflow-y: auto; }
.sbx-win.show { display: flex; animation: sbx-pop 0.35s ease-out; }
@keyframes sbx-pop { from { transform: scale(0.94); opacity: 0; } }
.sbx-win h2 { font: 700 24px var(--pixel); color: var(--gold); margin: 0 0 8px; }
.sbx-win p { color: var(--text-soft); max-width: 380px; }
.sbx-win .row { display: flex; gap: 12px; margin-top: 10px; flex-wrap: wrap; justify-content: center; }
.btn-ghost { background: transparent; border: 1px solid #3b5c58; color: var(--text-soft); padding: 11px 16px; border-radius: 8px; font: 600 14px var(--sans); cursor: pointer; }
.btn-ghost:hover { border-color: var(--gold); color: var(--cream); }

/* ═════════ Landing: sections ═════════ */
.band { padding: 56px 0; border-top: 1px solid rgba(255, 199, 44, 0.08); }
.band-dark { background: var(--ink-2); }
.band h2 { font: 800 30px var(--sans); letter-spacing: -0.02em; margin: 0 0 6px; color: var(--cream); }
.band .sub { color: var(--text-muted); margin: 0 0 26px; max-width: 640px; }
.kicker { font: 400 12px var(--pixel); color: var(--green-light); letter-spacing: 0.08em; }

/* Latest update */
.pulse { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 32px; align-items: start; }
.fresh { display: inline-flex; align-items: center; gap: 8px; font: 13px var(--mono); color: #6ee7a8; background: rgba(110, 231, 168, 0.08); border: 1px solid rgba(110, 231, 168, 0.25); padding: 4px 11px; border-radius: 20px; margin: 12px 0 4px; }
.fresh i { width: 7px; height: 7px; background: #6ee7a8; border-radius: 50%; }
.kpis { display: flex; gap: 30px; margin: 20px 0 26px; flex-wrap: wrap; }
.kpis b { display: block; font: 600 26px var(--mono); color: #fff; }
.kpis span { font-size: 13px; color: var(--text-faint); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px; background: var(--line-soft); }
.timeline a { display: flex; gap: 10px; align-items: baseline; position: relative; padding: 5px 0 5px 24px; text-decoration: none; color: #c7d0cc; font-size: 14px; }
.timeline a::before { content: ''; position: absolute; left: 0; top: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-2); border: 2px solid #3a5552; }
.timeline a:hover span, .timeline a[aria-current="true"] span { color: var(--gold); }
.timeline a[aria-current="true"]::before { background: var(--gold); border-color: var(--gold); }
.timeline code { font: 12.5px var(--mono); color: var(--text-faint); min-width: 44px; }
.timeline span { flex: 1; }
.timeline em { font-style: normal; font: 12px var(--mono); color: #4f6a65; white-space: nowrap; }
.patch { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; }
.patch[hidden] { display: none; }
.patch-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.patch-h .v { font: 600 13px var(--mono); background: var(--gold); color: #1d1402; padding: 2px 8px; border-radius: 4px; }
.patch-h h3 { margin: 0; color: #fff; font-size: 17px; }
.patch-h time { margin-left: auto; color: var(--text-faint); font: 12.5px var(--mono); }
.patch-b { padding: 4px 18px 14px; }
.patch-b h4 { font: 700 11px var(--sans); letter-spacing: 0.12em; text-transform: uppercase; margin: 14px 0 6px; color: #6ee7a8; }
.patch-b h4.fix { color: #7fb4ff; }
.patch-b ul { margin: 0; padding-left: 18px; }
.patch-b li { font-size: 14px; color: #aebbb6; margin-bottom: 5px; }
.patch-b .more { list-style: none; margin-left: -18px; color: var(--text-faint); font-size: 13px; }
.patch-f { padding: 10px 18px; border-top: 1px solid var(--line-soft); font-size: 13.5px; display: flex; justify-content: space-between; color: var(--text-faint); }
.patch-f a { text-decoration: none; }

/* Systems */
.layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.layer { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.layer a { display: block; cursor: zoom-in; }
.layer img { width: 100%; height: auto; display: block; aspect-ratio: 16 / 9; object-fit: cover; }
.layer div { padding: 12px 14px 14px; }
.layer h3 { margin: 0; color: var(--gold); font-size: 16px; display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.layer h3 span { font: 400 10px var(--pixel); color: var(--green-light); white-space: nowrap; }
.layer p { color: var(--text-muted); font-size: 13.5px; margin: 4px 0 0; }

/* The native dialog sits above the sticky header and phone download bar. */
html.screenshot-open { overflow: hidden; }
.screenshot-viewer { width: min(96vw, 1600px); max-width: none; max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.screenshot-viewer::backdrop { background: rgba(0, 0, 0, 0.85); }
.screenshot-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.screenshot-toolbar h2 { margin: 0; font-size: 18px; }
.screenshot-toolbar button { min-width: 64px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--gold); border-radius: 8px; background: var(--gold); color: var(--ink); font: 700 16px var(--sans); cursor: pointer; }
.screenshot-viewer img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 180px); object-fit: contain; }
.screenshot-viewer [hidden] { display: none; }
.screenshot-viewer p { margin: 12px 0 0; font-size: 14px; color: var(--text-soft); }
.also { margin: 20px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.also li { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 20px; padding: 6px 14px; font-size: 13.5px; color: var(--text-soft); }
.also b { color: var(--gold); }

/* Roster teaser */
.roster-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.roster-strip a { display: block; width: 46px; height: 46px; background: #3a2412; border: 2px solid #6b4520; border-radius: 5px; transition: transform 0.12s, border-color 0.12s; }
.roster-strip a:hover { transform: translateY(-2px); border-color: var(--gold); }
.roster-strip img { width: 100%; height: 100%; }

/* Play anywhere */
.platforms { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; position: relative; }
.platform { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 16px 14px 14px; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; }
/* Stub from each tile down to the shared account line. */
.platform::after { content: ''; position: absolute; left: 50%; bottom: -19px; width: 2px; height: 18px; background: var(--line); }
.platform .icon { width: 30px; height: 30px; color: var(--text-muted); }
.platform h3 { margin: 8px 0 2px; font-size: 16px; color: var(--cream); }
.platform p { margin: 0 0 12px; font-size: 12.5px; color: var(--text-faint); min-height: 2.6em; }
.platform-go { margin-top: auto; display: block; width: 100%; background: var(--green); color: #fff; font-weight: 700; font-size: 14px; padding: 9px 8px; border-radius: 7px; text-decoration: none; }
.platform-go:hover { background: #23b37d; }
.platform[data-platform="browser"] .platform-go { background: transparent; border: 1px solid #3b5c58; color: var(--cream); }
.platform[data-platform="browser"] .platform-go:hover { border-color: var(--gold); }
.platform-steam .platform-go { background: #1b2838; border: 1px solid #2a475e; color: #c7d5e0; }
.platform-steam .platform-go:hover { background: #2a475e; color: #fff; }
.platform-steam .icon { color: #66c0f4; }
.platform-alt { font-size: 12px; color: var(--text-faint); margin-top: 6px; }
.platform-alt + .platform-alt { margin-top: 2px; }
.platform.mine { border-color: var(--green-light); box-shadow: 0 0 0 1px var(--green-light), 0 8px 24px rgba(31, 191, 133, 0.15); }
.platform.mine::before { content: 'Your system'; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--green-light); color: #06231a; font: 700 10.5px var(--sans); letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.hub { position: relative; margin: 18px 0 0; padding-top: 16px; text-align: center; }
.hub::before { content: ''; position: absolute; top: 0; left: 8.33%; right: 8.33%; height: 2px; background: var(--line); }
.hub span { position: relative; display: inline-flex; align-items: center; gap: 9px; margin-top: -1px; background: var(--ink-2); border: 1.5px solid var(--green-light); color: var(--cream); font-weight: 700; font-size: 15px; padding: 9px 18px; border-radius: 30px; }
.hub span::before { content: ''; position: absolute; left: 50%; top: -18px; width: 2px; height: 17px; background: var(--line); }
.hub .icon { color: var(--green-light); }
.carry { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; margin-top: 36px; align-items: start; }
.carry > * { min-width: 0; }
.carry h3 { margin: 0 0 10px; color: var(--cream); font-size: 19px; }
.steps { margin: 0; padding-left: 22px; color: var(--text-soft); font-size: 15px; }
.steps li { margin-bottom: 8px; padding-left: 4px; }
.steps b { color: var(--cream); }
.dl-note { font-size: 13px; color: var(--text-faint); margin: 14px 0 0; }
.discord-card { background: linear-gradient(160deg, #262c63, #181c3d); border: 1px solid #353c80; border-radius: 12px; padding: 22px; }
.discord-card h3 { margin: 0 0 6px; color: #fff; font-size: 20px; }
.discord-card p { color: #c5c9ee; font-size: 14.5px; margin: 0 0 16px; }
.btn-discord { display: inline-block; background: #5865f2; color: #fff; font-weight: 700; padding: 11px 18px; border-radius: 8px; text-decoration: none; }
.btn-discord:hover { background: #6d78f5; }

/* Phone bar: the two actions that make sense on a phone */
.phone-bar { display: none; }

/* ═════════ Hero codex page ═════════ */
.codex { background: var(--ink); color: var(--text); min-height: 70vh; }
.codex a { color: inherit; }
.codex-head { padding: 30px 0 8px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.codex-head h1 { font: 800 36px var(--serif); margin: 0; letter-spacing: -0.01em; }
.codex-head p { margin: 0; color: var(--text-soft); font-size: 15px; }
.codex-body { display: grid; grid-template-columns: 1fr 390px; gap: 24px; padding: 12px 0 44px; }
.notice { background: var(--panel); border: 1.5px solid var(--gold-dark); color: var(--text); border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 14.5px; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tools[hidden], .chips[hidden] { display: none; }
.search { background: var(--panel); border: 1.5px solid var(--line); border-radius: 8px; padding: 8px 12px; font: 14.5px var(--sans); width: 260px; max-width: 100%; color: var(--text); }
.search::placeholder { color: var(--text-muted); opacity: 1; }
.count { font-size: 13.5px; color: var(--text-soft); margin-left: auto; }
.btn-clear { background: none; border: 0; color: var(--gold); font: 600 13px var(--sans); cursor: pointer; text-decoration: underline; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 16px; }
.chips .lbl { font: 700 10.5px var(--sans); text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin: 0 2px 0 8px; }
.chips .lbl:first-child { margin-left: 0; }
.chips button { background: var(--panel); border: 1.5px solid var(--line); color: var(--text-soft); padding: 3px 10px; border-radius: 20px; font: 600 12.5px var(--sans); cursor: pointer; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--gold); border-color: var(--gold); }
.roster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.roster li[hidden] { display: none; }
.card { display: block; background: var(--panel); border: 1.5px solid var(--line); border-radius: 10px; padding: 10px 6px 8px; text-align: center; text-decoration: none; transition: transform 0.12s, box-shadow 0.12s; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(80, 50, 20, 0.15); }
.card[aria-current="page"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold); }
.card img { width: 56px; height: 56px; }
.card .nm { display: block; font: 600 13px var(--sans); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .dots { display: flex; gap: 3px; justify-content: center; margin-top: 5px; }
.card .dots i { width: 7px; height: 7px; border-radius: 2px; }
.empty { display: none; color: var(--text-soft); padding: 20px 0; }
.empty.show { display: block; }
.dossier { background: var(--panel); border: 1.5px solid var(--line); border-radius: 14px; padding: 20px; position: sticky; top: 76px; align-self: start; box-shadow: 0 10px 30px rgba(80, 50, 20, 0.12); }
.dossier .top { display: flex; gap: 14px; align-items: center; }
.dossier .portrait { width: 96px; height: 96px; background: #3a2412; border: 3px solid #6b4520; border-radius: 8px; flex: none; }
.dossier h2 { font: 800 30px var(--serif); margin: 0; line-height: 1.05; }
.dossier .num { font: 12px var(--mono); color: var(--text-muted); }
.pills { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; padding: 0; list-style: none; }
.pill { font: 600 11.5px var(--sans); padding: 2px 8px; border-radius: 4px; color: #fff; }
.ability { margin: 16px 0 14px; font: 500 15.5px/1.5 var(--serif); color: var(--text); border-left: 3px solid var(--gold); padding-left: 12px; }
.dossier h3 { font: 700 10.5px var(--sans); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin: 16px 0 6px; }
.shape-wrap { display: flex; gap: 14px; align-items: center; }
.shape { display: grid; grid-template-columns: repeat(4, 26px); gap: 4px; padding: 8px; background: #2c1f14; border-radius: 8px; position: relative; flex: none; }
.shape i { width: 26px; height: 26px; border-radius: 4px; background: #45331f; display: block; }
.shape i.self { background: var(--gold); }
.shape i.target { background: var(--green); }
.shape i.reads { outline: 2px dashed #6fc9ff; outline-offset: -3px; }
.shape-note { font: 700 12px var(--pixel); color: var(--gold); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(44, 31, 20, 0.84); border-radius: 8px; text-align: center; padding: 6px; }
.legend { font-size: 12.5px; color: var(--text-soft); line-height: 1.75; margin: 0; padding: 0; list-style: none; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
.legend .l-self { background: var(--gold); }
.legend .l-target { background: var(--green); }
.legend .l-reads { outline: 2px dashed #6fc9ff; outline-offset: -2px; }
.legend .dir { color: var(--text-muted); }
.why { font-size: 13px; color: var(--text-soft); margin: 0 0 5px; }
.faces { display: flex; flex-wrap: wrap; gap: 4px; }
.faces a { display: block; width: 36px; height: 36px; background: #3a2412; border-radius: 4px; border: 2px solid #6b4520; }
.faces a:hover { border-color: var(--gold); }
.faces img { width: 100%; height: 100%; }
.dossier-intro p { color: var(--text-soft); font-size: 14.5px; }
.dossier-intro h2 { font-size: 26px; margin-bottom: 8px; }
.codex-cta { margin-top: 16px; font-size: 14px; color: var(--text-soft); }
.codex-cta a { color: var(--gold); font-weight: 700; }

/* Trait colours, shared by roster dots and dossier pills */
.t-male { background: #5577aa; } .t-female { background: #b0507a; } .t-support { background: #6d7a3a; }
.t-gold { background: #b3860f; } .t-dps { background: #b0402f; } .t-healer { background: #2f9a6a; }
.t-magic { background: #7043b0; } .t-melee { background: #8a5a2b; } .t-mythical { background: #1f7f8f; }
.t-speed { background: #c26a12; } .t-animal { background: #6b6b2b; } .t-flora { background: #3f8a3a; }
.t-human { background: #8c6f5a; } .t-construct { background: #5b6470; } .t-orc { background: #4f7a30; }
.t-dwarf { background: #8a4a3a; } .t-miner { background: #6a5a4a; }
.pill:not([class*=" t-"]), .dots i:not([class*="t-"]) { background: #7a6a58; }

/* ═════════ Responsive ═════════ */
@media (max-width: 980px) {
  .hero .wrap, .pulse, .carry { grid-template-columns: 1fr; }
  .platforms { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 22px; }
  .platform::after, .hub::before, .hub span::before { display: none; }
  .layers { grid-template-columns: repeat(2, 1fr); }
  .codex-body { grid-template-columns: 1fr; }
  .dossier { position: static; order: -1; }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .site-nav .links { display: none; }
  .site-nav .wrap { gap: 12px; }
  .site-logo { font-size: 11px; }
  .hero { padding-top: 32px; }
  .layers { grid-template-columns: 1fr; }
  .sbx { padding: 12px; }
  .ctas { grid-template-columns: 1fr; }
  .sbx-grid { gap: 6px; }
  .sbx-field { grid-template-columns: minmax(0, 1fr) 34px; }
  .sbx-axis { margin-right: 44px; }
  .sbx-tray { gap: 6px; }
  .sbx-top { flex-wrap: wrap; }
  .sbx-best { flex-basis: 100%; text-align: left; overflow-wrap: anywhere; }
  .sbx-bar { margin-left: 0; }
  .sbx-dps b { font-size: 28px; }
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-bar { display: flex; gap: 8px; position: fixed; bottom: 0; left: 0; right: 0; z-index: 90; background: rgba(9, 17, 18, 0.97); border-top: 1px solid var(--line); padding: 10px 12px 14px; }
  .phone-bar a { flex: 1; text-align: center; padding: 12px 6px; border-radius: 8px; font: 700 14.5px var(--sans); text-decoration: none; }
  .phone-bar .try { border: 1px solid #3b5c58; color: var(--cream); }
  body.has-phone-bar { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
