/* Hexology.Studio — site pages (home, world, connect, census, play header).
   Tokens from the Claude Design canvas: neutral dark, bone-white text, phosphor green. */
:root {
  --bg: #111013;
  --bg2: #17161a;
  --panel: #1a191d;
  --panel2: #211f24;
  --ink: #efe8d8;
  --muted: #a9a194;
  --dim: #8a8377;
  --green: #a6e36a;
  --green2: #c4f28f;
  --amber: #e8a33d;
  --red: #ef8b8b;
  --line: rgba(239, 232, 216, 0.12);
  --line2: rgba(239, 232, 216, 0.25);
  --display: Unbounded, 'Hanken Grotesk', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: clamp(20px, 5.5vw, 80px);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); }
body.hx { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 'Hanken Grotesk', system-ui, sans-serif; min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; }
.hx a { color: var(--green); }
.hx a:hover { color: var(--green2); }
.hx button { font-family: inherit; }
.hx input::placeholder, .hx textarea::placeholder { color: var(--dim); }
.hx :focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.hx [hidden] { display: none !important; }
.mono { font-family: var(--mono); }
.eyebrow { font: 600 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--green); }
.eyebrow.amber { color: var(--amber); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* header */
.hx-head { min-height: 76px; padding: 0 var(--pad); display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid rgba(239, 232, 216, 0.1); flex-wrap: wrap; }
.hx-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink) !important; font: 700 19px var(--display); letter-spacing: -0.01em; }
.hx-brand i { font-style: normal; color: var(--green); }
.hx-nav { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 32px); font-size: 15px; font-weight: 500; flex-wrap: wrap; }
.hx-nav a { color: var(--muted); text-decoration: none; }
.hx-nav a:hover { color: var(--ink); }
.hx-steps { margin: 0; padding: 0; list-style: none; display: flex; gap: 8px; font-size: 14px; font-weight: 600; }
.hx-steps a { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 36px; border-radius: 18px; color: var(--muted); text-decoration: none; }
.hx-steps b { font-family: var(--mono); color: var(--green); font-weight: 600; }
.hx-steps [aria-current] a { background: var(--ink); color: var(--bg); }
.hx-steps [aria-current] b { color: var(--bg); }
.hx-townname { font: 400 14px var(--mono); color: var(--muted); }

/* buttons */
.btn { height: 52px; padding: 0 24px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 12px; font: 700 16px 'Hanken Grotesk', sans-serif; text-decoration: none; cursor: pointer; border: 0; white-space: nowrap; }
.btn.primary { background: var(--green); color: var(--bg) !important; }
.btn.primary:hover { background: var(--green2); }
.btn.primary[disabled] { opacity: 0.55; cursor: default; }
.btn.line { background: transparent; border: 1.5px solid var(--line2); color: var(--ink) !important; font-weight: 600; }
.btn.line.green { border-color: var(--green); color: var(--green) !important; }
.btn.small { height: 44px; padding: 0 18px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--muted) !important; font-weight: 600; }
.btn svg { flex: none; }

/* layout */
main.hx-main { flex: 1; }
.sec { padding: 64px var(--pad); }
.sec.band { background: var(--bg2); border-top: 1px solid rgba(239, 232, 216, 0.08); border-bottom: 1px solid rgba(239, 232, 216, 0.08); }
h1.big { margin: 0; font: 700 clamp(38px, 5vw, 58px)/1.04 var(--display); letter-spacing: -0.025em; text-wrap: balance; }
h1.page { margin: 0; font: 700 clamp(32px, 4vw, 44px)/1.1 var(--display); letter-spacing: -0.02em; }
h2.sec-title { margin: 0; font: 500 28px var(--display); letter-spacing: -0.01em; }
.lede { margin: 0; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--muted); text-wrap: pretty; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; }

/* home hero */
.hero { display: grid; grid-template-columns: minmax(0, 600px) minmax(0, 1fr); gap: clamp(32px, 4.5vw, 64px); align-items: start; padding-top: 72px; }
.hero-l { display: flex; flex-direction: column; gap: 28px; }
.found { margin-top: 8px; padding: 28px; display: flex; flex-direction: column; gap: 20px; }
.found-top { display: flex; align-items: baseline; justify-content: space-between; }
.found-top h2 { margin: 0; font: 500 20px var(--display); }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .legend { font-size: 14px; font-weight: 600; }
.field label span { font-weight: 400; color: var(--dim); }
.input { height: 48px; padding: 0 14px; background: var(--bg); border: 1.5px solid rgba(239, 232, 216, 0.18); border-radius: 10px; color: var(--ink); font: 500 16px 'Hanken Grotesk', sans-serif; width: 100%; }
.input.mono { font-family: var(--mono); }
.input:focus { border-color: var(--green); outline: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { height: 44px; padding: 0 16px; border-radius: 22px; font: 600 14px 'Hanken Grotesk', sans-serif; cursor: pointer; background: transparent; color: var(--ink); border: 1.5px solid var(--line2); }
.chip[aria-pressed='true'] { background: var(--green); color: var(--bg); border-color: var(--green); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--muted); cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--green); flex: none; }
.go-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.form-msg { font-size: 14px; color: var(--amber); }
.hero-r { display: flex; flex-direction: column; gap: 14px; padding-top: 8px; }
.hero-pic { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); aspect-ratio: 656 / 560; }
.hero-cap { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font: 400 12px var(--mono); color: var(--dim); }
.dio { display: block; width: 100%; height: 100%; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 36px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.hexnum { position: relative; width: 52px; height: 52px; }
.hexnum span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 17px var(--display); color: var(--green); }
.step h3 { margin: 0; font-size: 19px; font-weight: 700; }
.step p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }

/* census */
.census-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.census-head > div { display: flex; flex-direction: column; gap: 14px; max-width: 700px; }
.census-head h2 { margin: 0; font: 700 44px var(--display); letter-spacing: -0.02em; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; }
.tabs button { height: 44px; padding: 0 18px; border: 0; border-radius: 9px; cursor: pointer; font: 600 14px 'Hanken Grotesk', sans-serif; background: transparent; color: var(--muted); }
.tabs button[aria-selected='true'] { background: var(--ink); color: var(--bg); }
.board { margin-top: 32px; overflow: hidden; }
.board-scroll { overflow-x: auto; }
.brow { display: grid; grid-template-columns: 64px minmax(160px, 2.2fr) minmax(110px, 1.3fr) minmax(140px, 1.6fr) 80px 100px 120px 100px 40px; gap: 16px; padding: 0 28px; min-height: 64px; align-items: center; border-bottom: 1px solid rgba(239, 232, 216, 0.06); font-size: 16px; min-width: 940px; }
.brow.head { min-height: 0; padding-top: 14px; padding-bottom: 14px; font: 400 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); border-bottom-color: rgba(239, 232, 216, 0.1); }
.brow .rank { font: 700 17px var(--display); }
.brow .town { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brow .mayor { font: 400 14px var(--mono); color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.brow .world { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.brow .world i { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.brow .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.brow .num.soft { color: var(--muted); font-weight: 400; }
.badge { justify-self: start; padding: 3px 8px; border-radius: 7px; font: 600 12px var(--mono); background: rgba(232, 163, 61, 0.14); color: var(--amber); }
.badge.v { background: rgba(166, 227, 106, 0.14); color: var(--green); }
.badge.f { background: transparent; border: 1px solid rgba(239, 139, 139, 0.6); color: var(--red); }
.report { width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--dim); cursor: pointer; }
.report:hover { color: var(--red); background: rgba(239, 139, 139, 0.1); }
.board-foot { padding: 16px 28px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--dim); }
.empty { padding: 48px 28px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }
.postcards { margin-top: 32px; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.postcards figure { margin: 0; overflow: hidden; display: flex; flex-direction: column; }
.postcards img { width: 100%; aspect-ratio: 400 / 260; object-fit: cover; display: block; background: var(--bg); }
.postcards figcaption { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.postcards figcaption b { display: block; font-size: 16px; }
.postcards figcaption span { font: 400 13px var(--mono); color: var(--muted); }
.postcards figcaption em { display: block; font-style: normal; font-size: 14px; color: var(--muted); margin-top: 4px; }
.cheer { height: 36px; padding: 0 12px; border-radius: 10px; border: 1.5px solid var(--line2); background: transparent; color: var(--muted); font: 600 13px 'Hanken Grotesk', sans-serif; cursor: pointer; white-space: nowrap; }
.cheer[aria-pressed='true'] { color: var(--green); border-color: var(--green); }
.brag { margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding: 24px 28px; border: 1.5px dashed rgba(166, 227, 106, 0.4); border-radius: 18px; }
.brag b { font-size: 17px; }
.brag span { display: block; font-size: 15px; color: var(--muted); }

/* preset cards */
.presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; margin-top: 28px; }
.preset { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; text-decoration: none; color: var(--ink) !important; }
.preset .pic { aspect-ratio: 238 / 160; }
.preset .txt { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.preset .name { font-size: 22px; line-height: 1.1; }
.preset .recipe { font-size: 13px; color: var(--muted); }

/* style picker */
.picker { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 500px); gap: 56px; align-items: start; padding-top: 56px; }
.picker-l { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.picker section { display: flex; flex-direction: column; gap: 16px; }
.picker .sh { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.picker .sh h2 { margin: 0; font-size: 20px; font-weight: 700; }
.picker .sh span { font-size: 14px; color: var(--dim); }
.picker h2.cap { margin: 0; font: 600 13px var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.pgrid5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pset { padding: 0; border-radius: 14px; overflow: hidden; cursor: pointer; display: flex; flex-direction: column; background: var(--panel); border: 2px solid rgba(239, 232, 216, 0.1); text-align: left; color: var(--ink); }
.pset .pic { aspect-ratio: 150 / 96; }
.pset .name { padding: 10px 12px 12px; font-size: 17px; line-height: 1.1; }
.opt { min-height: 76px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; border-radius: 14px; cursor: pointer; background: var(--panel); border: 2px solid rgba(239, 232, 216, 0.1); color: var(--ink); text-align: left; font: inherit; }
.pset[aria-pressed='true'], .opt[aria-pressed='true'] { background: var(--panel2); border-color: var(--green); }
.opt .t { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.opt .t b { font-size: 15px; }
.opt .t small { font-size: 13px; color: var(--muted); }
.tag { align-self: flex-start; margin-top: 4px; padding: 2px 8px; border-radius: 6px; font: 600 12px var(--mono); background: rgba(166, 227, 106, 0.14); color: var(--green); }
.tag.new { background: rgba(232, 163, 61, 0.14); color: var(--amber); }
.glows { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.glows h2 { margin: 0; font-size: 20px; font-weight: 700; }
.glows .row { display: flex; gap: 12px; }
.glow { width: 44px; height: 44px; border-radius: 22px; cursor: pointer; border: 3px solid transparent; }
.glow[aria-checked='true'] { border-color: var(--ink); box-shadow: 0 0 0 3px var(--bg) inset; }
.aside { display: flex; flex-direction: column; gap: 20px; position: sticky; top: calc(24px + var(--hx-adminbar, 0px)); }
.aside .pic { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); aspect-ratio: 500 / 360; }
.aside .title { font: 700 26px var(--display); }
.vocab { overflow: hidden; }
.vocab .vh { padding: 14px 18px; font: 400 13px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); border-bottom: 1px solid rgba(239, 232, 216, 0.08); }
.vocab div.vr { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 11px 18px; border-bottom: 1px solid rgba(239, 232, 216, 0.06); font-size: 15px; }
.vocab .vr span { color: var(--muted); }
.acts { display: flex; gap: 12px; }
.acts .primary { flex: 1; }

/* connect */
.connect { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); gap: 56px; align-items: start; padding-top: 56px; }
.connect-l { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.note { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px; background: rgba(232, 163, 61, 0.1); border: 1px solid rgba(232, 163, 61, 0.35); font-size: 15px; line-height: 1.5; }
.note.bad { background: rgba(239, 139, 139, 0.08); border-color: rgba(239, 139, 139, 0.4); }
.agents { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.agent { padding: 22px; border-radius: 18px; display: flex; flex-direction: column; gap: 18px; background: var(--panel); border: 1.5px solid var(--line); }
.agent.on { background: #18201a; border-color: rgba(166, 227, 106, 0.45); }
.agent .ah { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.agent h2 { margin: 0; font-size: 19px; font-weight: 700; }
.agent .ah span.n { font-size: 14px; color: var(--muted); }
.folder { padding: 4px 10px; border-radius: 8px; background: var(--bg); font: 600 14px var(--mono); }
.pathbox { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 6px 0 14px; background: var(--bg); border-radius: 10px; }
.pathbox span { flex: 1; font: 400 14px var(--mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iconbtn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; background: transparent; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.iconbtn:hover { color: var(--ink); background: rgba(239, 232, 216, 0.06); }
.btn.bone { background: var(--ink); color: var(--bg) !important; height: 48px; font-size: 15px; width: 100%; }
.found-line { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: var(--green); }
.srcs { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.srcs div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.srcs code { font-family: var(--mono); color: var(--ink); }
.agent .err { font-size: 14px; color: var(--amber); }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.side { display: flex; flex-direction: column; gap: 18px; padding: 20px; }
.side .pic { border-radius: 14px; overflow: hidden; aspect-ratio: 380 / 250; }
.side .stats { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid rgba(239, 232, 216, 0.1); border-bottom: 1px solid rgba(239, 232, 216, 0.1); }
.side .stats div { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.side .stats span { color: var(--muted); }
kbd { padding: 1px 6px; border: 1px solid var(--line2); border-radius: 4px; font-family: var(--mono); color: var(--ink); }

/* census explainer */
.stages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px; margin-top: 48px; }
.stage { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--panel); border: 1.5px solid rgba(239, 232, 216, 0.14); border-radius: 18px; }
.stage.key { border-color: rgba(166, 227, 106, 0.5); }
.stage .sn { display: flex; align-items: center; gap: 12px; }
.stage .sn b { width: 36px; height: 36px; border-radius: 10px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font: 700 16px var(--display); }
.stage.key .sn b { background: var(--green); }
.stage .sn span { font: 600 12px var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.stage h2 { margin: 0; font-size: 21px; font-weight: 700; }
.stage p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.stage code { margin-top: auto; padding: 10px 12px; background: var(--bg); border-radius: 10px; font: 400 13px var(--mono); white-space: pre-line; }
.stage .arrow { position: absolute; right: -41px; top: 40px; }
.rules-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 40px; align-items: start; margin-top: 48px; }
.rules-grid h2 { margin: 0 0 16px; font: 500 24px var(--display); }
.rule { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 14px; padding: 16px 22px; border-bottom: 1px solid rgba(239, 232, 216, 0.07); }
.rule b { font-size: 16px; display: block; }
.rule span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.status { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; margin-bottom: 14px; }
.status .badge { flex: none; width: 96px; text-align: center; font-size: 13px; padding: 4px 0; }
.status span:last-child { font-size: 14px; line-height: 1.5; color: var(--muted); }
.cant { display: flex; flex-direction: column; gap: 10px; padding: 20px; border: 1.5px dashed rgba(232, 163, 61, 0.5); border-radius: 16px; margin-top: 10px; }
.cant b { color: var(--amber); }
.cant span { font-size: 14px; line-height: 1.55; color: var(--muted); }

/* footer */
.hx-foot { margin-top: auto; padding: 32px var(--pad); border-top: 1px solid rgba(239, 232, 216, 0.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--dim); }

/* play page */
body.hx-play { height: 100dvh; overflow: hidden; }
.play-bar { height: 60px; flex: none; padding: 0 16px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid rgba(239, 232, 216, 0.1); background: #151418; }
.play-bar .l, .play-bar .r { display: flex; align-items: center; gap: 12px; min-width: 0; }
.play-bar .town { font: 700 18px var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pill { padding: 4px 10px; border-radius: 8px; white-space: nowrap; }
.pill.world { font-size: 16px; letter-spacing: 0.04em; }
.pill.mode { font: 600 12px var(--mono); background: rgba(166, 227, 106, 0.14); color: var(--green); }
.pill.mode.hand { background: rgba(232, 163, 61, 0.14); color: var(--amber); }
.cstat { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.cstat i { width: 8px; height: 8px; border-radius: 4px; background: var(--dim); }
.cstat.ok i { background: var(--green); }
.cstat.err i { background: var(--amber); }
.bar-btn { height: 40px; padding: 0 14px; display: flex; align-items: center; gap: 8px; border: 1.5px solid rgba(239, 232, 216, 0.2); border-radius: 10px; color: var(--ink) !important; text-decoration: none; font: 600 14px 'Hanken Grotesk', sans-serif; background: transparent; cursor: pointer; white-space: nowrap; }
.bar-btn.ghost { border-color: transparent; color: var(--muted) !important; }
#za-install { height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: 600 14px 'Hanken Grotesk', sans-serif; cursor: pointer; }
.play-stage { height: calc(100dvh - 60px - var(--hx-adminbar, 0px)); position: relative; }
.play-stage [data-zombie-agent] { height: 100%; }
@media (display-mode: standalone) { .hide-in-app { display: none !important; } }

/* responsive */
@media (max-width: 1180px) {
  .presets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage .arrow { display: none; }
}
@media (max-width: 980px) {
  .hero, .picker, .connect, .rules-grid { grid-template-columns: minmax(0, 1fr); }
  .aside { position: static; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgrid5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pgrid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agents { grid-template-columns: minmax(0, 1fr); }
  .hx-steps a { padding: 0 10px; }
  .play-bar .cstat, .play-bar .pill.mode { display: none; }
}
@media (max-width: 640px) {
  .grid2, .steps, .presets, .pgrid3, .stages { grid-template-columns: minmax(0, 1fr); }
  .pgrid5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hx-steps { width: 100%; order: 3; justify-content: space-between; padding-bottom: 12px; }
  .hx-townname { display: none; }
  .census-head h2 { font-size: 34px; }
  .vocab div.vr { grid-template-columns: 130px minmax(0, 1fr); }
  .play-bar .pill.world, .bar-btn .lbl { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
