/* Holdup. The site is one game screen, not a page: a title screen, the board with a HUD in its
   four corners, and menus that replace the screen. Drawn like the cards: three inks, 2px
   outlines, square corners, hard shadows, stepped motion. See DESIGN.md.
   Two layouts: "wide" (min 900 x 640) puts panels in the corners around the board;
   everything else stacks them under a board you drag sideways. */

:root {
  --ink: #17131C; --paper: #FFFFFF; --mag: #E81E88; --mag-deep: #B8136A;
  --bg: #F4F1F5; --bg-2: #E9E4EC; --fg: var(--ink); --fg-2: #4A4352; --muted: #6E6578;
  --panel: var(--paper); --rule: rgba(23, 19, 28, .22); --ok: #17895A; --mag-text: var(--mag-deep);
  --hard: 4px 4px 0 var(--fg);
  --pixel: "Jersey 20", ui-monospace, monospace;
  --font: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px; --bar: 48px; --tab: 56px; --step: steps(6, end); --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
:root[data-theme="dark"] { --bg: #121016; --bg-2: #1D1922; --fg: #FFFFFF; --fg-2: #C9BFCF; --muted: #93899C; --panel: #1A161F; --rule: rgba(255, 255, 255, .24); --ok: #4CC38A; --mag-text: #FF7FC2; color-scheme: dark; }
@media (min-width: 900px) and (min-height: 640px) { :root { --gutter: 32px; --bar: 56px; --tab: 0px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 16px; line-height: 1.5; font-synthesis: none; }
/* with the script running there is no page to scroll: one screen, the height of the window */
html[data-screen], html[data-screen] body { height: 100%; overflow: hidden; overscroll-behavior: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; touch-action: manipulation; }
a { color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--mag); outline-offset: 2px; }
h2:focus { outline: none; }
::selection { background: var(--mag); color: #fff; }
.tint { color: var(--mag); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* the pixel face: one weight, never faux-bolded */
h1, h2, h3, .brand, .wordmark, .btn, .tabs, .tool, .purse, .state, .kicker, .num, .aside, .legend, .tip, .hud-a > p,
.tc-top, .tc-name, .tc-pw, .tr, .mini .pw, .face .pw, .crew, .tfacts dt, .tfacts dd, .feed-head, #feed,
.list-head, .li, .steps .n, .steps b, .fact b, .row b, .row em, .odds, .addr, .title-c,
.vs-tag, .vs-pw, .vs-mid, .vs-stamp, .vs-name, .vs-draw p, .skip { font-family: var(--pixel); font-weight: 400; letter-spacing: .01em; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(46px, 7vw, 104px); line-height: .86; }
h2 { font-size: clamp(34px, 3.6vw, 52px); line-height: .95; }
h3 { font-size: 26px; line-height: 1; }
.ln { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; } .ln > span { display: block; }

.skip { position: fixed; z-index: 70; left: 12px; top: -70px; background: var(--fg); color: var(--bg); padding: 8px 14px; font-size: 20px; text-decoration: none; }
.skip:focus { top: 12px; }

/* ── buttons ────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 44px; padding: 0 16px; border: 2px solid var(--fg); background: var(--panel); color: var(--fg); font-size: 22px; line-height: 1; text-decoration: none; white-space: nowrap; cursor: pointer; box-shadow: var(--hard); transition: transform .08s var(--step), box-shadow .08s var(--step); }
.btn:hover { background: var(--fg); color: var(--bg); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--fg); }
.btn-ink { background: var(--mag); color: #fff; font-size: 24px; }
.btn-ink:hover { background: var(--mag-deep); color: #fff; }
.btn-xl { height: 52px; padding: 0 16px; font-size: 26px; }
.btn-sm { height: 34px; padding: 0 10px; font-size: 19px; box-shadow: 3px 3px 0 var(--fg); }
.btn-sm:active { transform: translate(3px, 3px); }
.btn.wide { width: 100%; justify-content: space-between; } .btn.wide span { font-size: 19px; } .btn-ink.wide:not(:disabled) span { font-size: 24px; }
.btn-ink:disabled { font-size: 20px; }
.btn:disabled { background: var(--bg-2); color: var(--muted); border-color: var(--muted); box-shadow: none; cursor: default; transform: none; justify-content: center; }
.caret { width: 12px; height: 22px; background: currentColor; }
.motion .caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tool { display: inline-flex; align-items: center; height: 34px; padding: 0 10px; border: 2px solid transparent; background: none; font-size: 19px; color: var(--fg-2); cursor: pointer; white-space: nowrap; }
.tool:hover, .tool.is-on { border-color: currentColor; color: var(--fg); }
html:not(.motion) [data-act="pause"] { display: none; }

/* ── the bar and the four screens' tabs ─────────────────────────────── */
.top { position: fixed; z-index: 30; inset: 0 0 auto 0; height: var(--bar); display: flex; align-items: center; gap: 16px; padding: 0 var(--gutter); background: var(--bg); border-bottom: 2px solid var(--fg); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 32px; line-height: 1; text-decoration: none; }
.mark { width: 24px; height: 24px; fill: var(--fg); flex: none; } .mark .tk { fill: var(--mag); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.state { display: none; align-items: center; gap: 8px; margin-right: 10px; font-size: 18px; color: var(--fg-2); white-space: nowrap; } .state i { width: 10px; height: 10px; background: var(--mag); }
.top .tool { display: none; } .top .tool[data-act="pause"] { display: inline-flex; }
@media (max-width: 379.98px) { .purse small { display: none; } }
.purse { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; margin-left: 6px; border: 2px solid var(--fg); background: var(--panel); font-size: 22px; white-space: nowrap; } .purse b { font-weight: 400; font-variant-numeric: tabular-nums; } .purse small { font-size: 16px; color: var(--muted); }
.tabs { position: fixed; z-index: 31; inset: auto 0 0 0; height: calc(var(--tab) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(4, 1fr); background: var(--bg); border-top: 2px solid var(--fg); font-size: 21px; }
.tabs a { display: flex; align-items: center; justify-content: center; text-decoration: none; color: var(--fg-2); white-space: nowrap; }
.tabs a + a { border-left: 2px dotted var(--rule); }
.tabs a[aria-current] { background: var(--fg); color: var(--bg); }
.tabs a:focus-visible { outline-offset: -5px; }
html[data-screen="title"] .top { transform: translateY(-110%); }
html[data-screen="title"] .tabs { transform: translateY(110%); }
.motion .top, .motion .tabs { transition: transform .24s var(--step); }
@media (min-width: 900px) and (min-height: 640px) {
  .top .tool { display: inline-flex; }
  .tabs { inset: 0 auto auto 196px; height: var(--bar); padding: 0; display: flex; align-items: center; gap: 4px; background: none; border: 0; }
  .tabs a { height: 36px; padding: 0 12px; border: 2px solid transparent; }
  .tabs a + a { border-left: 2px solid transparent; }
  .tabs a:hover { border-color: var(--fg); color: var(--fg); }
  .tabs a[aria-current] { border-color: var(--fg); } .tabs a[aria-current]:hover { color: var(--bg); }
  .tabs a:focus-visible { outline-offset: 2px; }
  html[data-screen="title"] .tabs { transform: translateY(-140%); }
}

/* ── screens ────────────────────────────────────────────────────────── */
.screen { position: relative; }
html[data-screen] .screen { display: none; height: 100vh; height: 100dvh; }
html[data-screen="title"] #s-city, html[data-screen="city"] #s-city, html[data-screen="cards"] #s-cards, html[data-screen="rules"] #s-rules, html[data-screen="print"] #s-print { display: block; }
.screen.doc { padding: calc(var(--bar) + 22px) var(--gutter) calc(var(--tab) + env(safe-area-inset-bottom) + 28px); overflow-y: auto; }
.inner { max-width: 1280px; margin: 0 auto; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px 28px; flex-wrap: wrap; margin-bottom: 18px; }
.aside { font-size: 18px; color: var(--muted); }
.note { max-width: 72ch; margin-top: 14px; font-size: 13px; color: var(--muted); }
.panel { background: var(--panel); border: 2px solid var(--fg); box-shadow: var(--hard); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 18px; }
.wipe { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-columns: repeat(10, 1fr); pointer-events: none; }
.wipe i { background: var(--fg); transform: scaleY(0); transform-origin: 50% 0; } .wipe i:nth-child(even) { transform-origin: 50% 100%; background: var(--mag); }
@keyframes in-u { from { opacity: 0; transform: translateY(20px); } }
@keyframes in-l { from { opacity: 0; transform: translateX(-28px); } }
@keyframes in-r { from { opacity: 0; transform: translateX(28px); } }
.motion .screen.doc .inner > *, .motion .sel-side > * { animation: in-u .3s steps(5) both; }
.motion .screen.doc .inner > :nth-child(2), .motion .sel-side > :nth-child(2) { animation-delay: .06s; }
.motion .screen.doc .inner > :nth-child(3), .motion .sel-side > :nth-child(3) { animation-delay: .12s; }
.motion .screen.doc .inner > :nth-child(n+4), .motion .sel-side > :nth-child(n+4) { animation-delay: .18s; }
.motion .screen.doc .inner.sel > .sel-side { animation: none; }

/* ── the stage: title screen and City screen, one board ─────────────── */
.stage { position: relative; height: 100%; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.high { grid-row: 1; min-width: 0; } .low { grid-row: 3; min-width: 0; }
.pan { grid-row: 2; position: relative; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; } .pan::-webkit-scrollbar { display: none; }
.board { height: 100%; aspect-ratio: 1784 / 1000; margin: 0 auto; }
.board svg { width: 100%; height: 100%; overflow: visible; }
html[data-screen="title"] .hud, html[data-screen="city"] .ttl { display: none; }

/* the title screen has a story played by the scroll: the stage stays put, an empty track
   scrolls under it, and its position drives one scene (see scene() in site.js) */
html[data-screen="title"] #s-city { overflow-y: auto; scrollbar-width: none; overscroll-behavior: none; cursor: pointer; }
html[data-screen="title"] #s-city::-webkit-scrollbar { display: none; }
html[data-screen="title"] .stage { position: sticky; top: 0; }
.track { display: none; height: 700vh; height: 700dvh; } html[data-screen="title"] .track { display: block; }
html[data-screen="title"] .ttl { opacity: calc(1 - var(--out, 0)); } .stage.storying .ttl { visibility: hidden; }
.cine { display: none; } html[data-screen="title"] .cine { display: block; position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; --cw: clamp(100px, 15vw, 180px); perspective: 1200px; }
/* the words: a dialogue box, as in a game */
.cap { position: absolute; left: 50%; top: clamp(14px, 5vh, 44px); width: min(calc(100% - 28px), 860px); padding: 14px 20px 18px; text-align: center; visibility: hidden; background: var(--panel); border: 2px solid var(--fg); box-shadow: 6px 6px 0 var(--fg); transform: translate(-50%, 0); }
.cap.on { visibility: visible; } .motion .cap.on { animation: capin .2s steps(3); }
@keyframes capin { from { opacity: 0; transform: translate(-50%, 10px); } }
.cap-n { display: inline-block; margin-bottom: 8px; padding: 2px 10px 3px; font-family: var(--pixel); font-size: 20px; line-height: 1; background: var(--fg); color: var(--bg); }
.cap h2 { font-size: clamp(34px, 5.4vw, 76px); line-height: .9; }
.cap p { margin-top: 8px; font-size: clamp(15px, 1.5vw, 20px); color: var(--fg-2); }
#cap-n50 { display: inline-block; min-width: 1.1em; font-variant-numeric: tabular-nums; }
/* the pack and the three cards, in the middle of the screen */
.pack { display: grid; justify-items: center; align-content: center; gap: 8px; background: var(--mag); color: #fff; border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); font-family: var(--pixel); font-size: clamp(24px, 3vw, 38px); line-height: 1; }
.pack .mark { width: 44%; height: auto; fill: #fff; } .pack .mark .tk { fill: var(--ink); } .pack small { font-size: 18px; }
.cine-pack, .cine-card { position: absolute; left: 50%; top: 50%; width: var(--cw); opacity: 0; will-change: transform, opacity; }
.cine-pack { aspect-ratio: 3 / 5.1; }
.art-card .tc-top { height: 26px; font-size: 16px; padding: 0 7px; } .art-card .tc figcaption { padding: 6px 7px 8px; gap: 5px 6px; } .art-card .tc-name { font-size: clamp(15px, 1.8vw, 22px); } .art-card .tc-pw { font-size: clamp(28px, 3.6vw, 44px); } .art-card .tc-role { display: none; } .art-card .tr { font-size: 12px; } .art-card .tr b { display: none; }
.cine-sum { position: absolute; left: 50%; top: calc(50% + var(--cw) * .9 + 34px); translate: -50% 0; width: max-content; max-width: 96%; opacity: 0; display: flex; align-items: baseline; gap: 12px; padding: 6px 16px 8px; background: var(--panel); border: 2px solid var(--fg); box-shadow: 4px 4px 0 var(--fg); font-family: var(--pixel); font-size: clamp(22px, 2.6vw, 32px); line-height: 1; }
.cine-sum b { font-weight: 400; font-size: clamp(48px, 6.4vw, 84px); line-height: .8; color: var(--mag); font-variant-numeric: tabular-nums; } .cine-sum small { font-size: 18px; color: var(--fg-2); }
.cine-odds { position: absolute; left: 50%; top: calc(50% + 150px); translate: -50% 0; width: min(calc(100% - 28px), 520px); padding: 12px 14px 12px; opacity: 0; text-align: center; }
.odds-bar { position: relative; height: 24px; border: 2px solid var(--fg); background: var(--bg); }
.odds-bar span { position: absolute; inset: 0; background: var(--mag); transform-origin: 0 50%; transform: scaleX(0); }
#cine-lab { margin-top: 8px; font-family: var(--pixel); font-size: clamp(20px, 2.4vw, 28px); line-height: 1.05; }
.cine-start { position: absolute; left: 50%; bottom: clamp(70px, 14vh, 120px); translate: -50% 0; opacity: 0; visibility: hidden; pointer-events: auto; }
/* the board during the story: blocks come up one by one, other players' tags step aside */
.blk.hid { opacity: 0; transform: translateY(18px); pointer-events: none; }
.motion .board.story .blk { transition: opacity .15s steps(2), transform .2s steps(3); }
.board.story .fx > g:not(.demo) { opacity: 0; }
.board.story .blk { pointer-events: none; }
.board { will-change: transform; }
/* stacked layout: during the story the board leaves its strip and takes the whole screen, fitted to its width */
@media (max-width: 899.98px), (max-height: 639.98px) {
  .stage.storying .pan { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
  .stage.storying .board { width: 100%; height: auto; margin: 0; }
  .art-card .tc-top span:first-child { display: none; }
}

.scroll-cue { display: inline-flex; align-items: center; gap: 12px; height: 40px; margin-top: 14px; padding: 0 14px; border: 2px solid var(--fg); background: var(--panel); color: var(--fg); font-family: var(--pixel); font-size: 22px; line-height: 1; box-shadow: 3px 3px 0 var(--fg); cursor: pointer; }
.scroll-cue i { width: 10px; height: 10px; border: solid var(--mag); border-width: 0 3px 3px 0; rotate: 45deg; translate: 0 -3px; }
.motion .scroll-cue i { animation: bob 1s steps(2) infinite; } .paused .scroll-cue i { animation-play-state: paused; }
@media (min-width: 900px) and (min-height: 640px) { .scroll-cue { left: 50%; bottom: 22px; translate: -50% 0; margin: 0; } }
.story-skip { position: fixed; z-index: 20; right: 20px; bottom: 20px; display: none; }
html.in-story[data-screen="title"] .story-skip { display: inline-flex; }

.wipe-word { position: fixed; z-index: 55; left: 50%; top: 46%; translate: -50% -50%; rotate: -6deg; white-space: nowrap; font-family: var(--pixel); font-size: clamp(56px, 13vw, 170px); line-height: .9; padding: 0 28px 8px; background: #fff; color: var(--mag); border: 6px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); pointer-events: none; }

/* the title screen */
.kicker { display: flex; align-items: center; gap: 10px; font-size: 20px; color: var(--fg-2); margin-bottom: 8px; }
.px { display: inline-flex; gap: 3px; } .px i { width: 10px; height: 10px; background: var(--fg); } .px i:last-child { background: var(--mag); translate: 2px -2px; }
.title-a .brand { margin-bottom: 12px; }
.wordmark { display: none; }
.lead { font-size: 16px; color: var(--fg-2); max-width: 44ch; }
.title-c { margin-top: 14px; font-size: 16px; line-height: 1.15; color: var(--muted); }
.title-c p { display: flex; gap: 8px; } .title-c p i { flex: none; width: 10px; height: 10px; margin-top: 4px; background: var(--mag); }
.title-c .tool { height: 28px; margin: 6px 0 0 8px; font-size: 16px; }
.motion[data-screen="title"] .ln > span { animation: lineup .5s steps(6) both; }
.motion[data-screen="title"] .ln:nth-child(2) > span { animation-delay: .1s; } .motion[data-screen="title"] .ln:nth-child(3) > span { animation-delay: .2s; }
@keyframes lineup { from { transform: translateY(105%); } }
.motion[data-screen="title"] .title-b, .motion[data-screen="title"] .title-c { animation: in-u .35s steps(5) .3s both; }

/* the HUD of the City screen */
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 16px; color: var(--fg-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.legend i { width: 11px; height: 11px; border: 2px solid var(--fg); }
.k-city { background: var(--paper); } .k-them { background: var(--ink); } .k-you { background: var(--mag); }
.pane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-width: 0; }
.pane-head h3 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.num { font-size: 18px; color: var(--muted); white-space: nowrap; }
.hint { font-size: 13px; line-height: 1.4; color: var(--muted); margin-top: 10px; }

.tfacts { display: grid; grid-template-columns: 1.25fr .8fr 1fr; margin: 0 0 10px; border-top: 2px solid var(--fg); border-bottom: 2px solid var(--fg); }
.tfacts div { padding: 6px 8px 6px 0; min-width: 0; } .tfacts div + div { padding-left: 12px; border-left: 2px dotted var(--rule); }
.tfacts dt { font-size: 16px; color: var(--muted); white-space: nowrap; }
.tfacts dd { margin: 0; font-size: 24px; line-height: 1.05; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
#t-odds { overflow: visible; color: var(--mag-text); }
.bar { position: relative; height: 14px; border: 2px solid var(--fg); background: var(--panel); margin-bottom: 12px; }
.bar span { position: absolute; inset: 0; background: var(--mag); transform-origin: 0 50%; transform: scaleX(0); }
.motion .bar span { transition: transform .3s var(--step); }
.pin { position: absolute; inset: -6px 0; pointer-events: none; opacity: 0; }
.pin::after { content: ""; position: absolute; left: -3px; top: 0; bottom: 0; width: 6px; background: var(--fg); outline: 2px solid var(--panel); }
.target.empty .tfacts, .target.empty .bar { display: none; }
.motion .swap { animation: swap .22s steps(4); }
@keyframes swap { from { opacity: 0; transform: translateX(10px); } }

.dock { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 10px; }
.dock .pane-head { grid-column: 1 / -1; align-items: center; }
.crew { display: inline-flex; align-items: baseline; gap: 8px; font-size: 18px; color: var(--fg-2); white-space: nowrap; } .crew b { font-size: 36px; line-height: .8; color: var(--mag); font-weight: 400; font-variant-numeric: tabular-nums; }
.minis { display: flex; gap: 10px; min-width: 0; min-height: 88px; padding: 3px 6px 6px 3px; overflow-x: auto; scrollbar-width: none; } .minis::-webkit-scrollbar { display: none; }
.slot { flex: none; width: 56px; aspect-ratio: 3 / 4; border: 2px dashed var(--muted); background: var(--bg); }
.mini { position: relative; flex: none; width: 56px; padding: 0; border: 2px solid var(--fg); background: #fff; cursor: pointer; overflow: hidden; opacity: .55; transition: transform .08s var(--step), box-shadow .08s var(--step), opacity .1s; }
.mini img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; image-rendering: pixelated; }
.mini .pw { position: absolute; right: 0; bottom: 0; background: var(--ink); color: #fff; font-size: 18px; line-height: 1; padding: 2px 4px; }
.mini:hover { opacity: .85; }
.mini.on { opacity: 1; transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--mag); }

.feed-head { display: flex; align-items: center; gap: 8px; font-size: 22px; line-height: 1; margin-bottom: 8px; } .feed-head i { width: 10px; height: 10px; background: var(--mag); } .feed-head span { margin-left: auto; font-size: 17px; color: var(--muted); }
#feed { list-style: none; margin: 0; padding: 0; font-size: 18px; min-width: 0; flex: 1; }
#feed li { display: flex; gap: 8px; align-items: center; height: 30px; white-space: nowrap; overflow: hidden; border-top: 2px dotted var(--rule); }
#feed b { font-weight: 400; } #feed span { overflow: hidden; text-overflow: ellipsis; color: var(--fg-2); } #feed em { font-style: normal; color: var(--mag-text); }
#feed .v { margin-left: auto; flex: none; color: var(--muted); }
#feed li.lost b, #feed li.lost em { color: var(--muted); } #feed li.you b { color: var(--mag-text); }
#feed li:nth-child(n+5) { display: none; }
.motion #feed li:first-child { animation: swap .22s steps(4); }

/* stacked layout: phone, tablet, short windows */
@media (max-width: 899.98px), (max-height: 639.98px) {
  html[data-screen="title"] .high { padding: 18px var(--gutter) 2px; }
  html[data-screen="title"] .low { padding: 2px var(--gutter) calc(16px + env(safe-area-inset-bottom)); }
  html[data-screen="city"] .stage { padding-top: var(--bar); padding-bottom: calc(var(--tab) + env(safe-area-inset-bottom)); }
  html[data-screen="city"] .high { position: absolute; z-index: 4; inset: 0 0 auto 0; padding: 8px var(--gutter); } /* its containing block is its grid row, already under the bar */
  .hud-a { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .hud-a .legend { flex-wrap: nowrap; min-width: 0; overflow: hidden; padding: 4px 8px; background: var(--bg); border: 2px solid var(--fg); }
  #list-open { flex: none; }
  .hud-a h2, .hud-a > p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .low .hud { border-width: 2px 0 0; box-shadow: none; padding: 10px var(--gutter); }
  .log { height: 32px; padding-block: 0 !important; display: flex; align-items: center; background: var(--bg); }
  .log .feed-head, #feed li:not(:first-child) { display: none; }
  #feed li { border: 0; }
  .target { min-height: 178px; }
  .target .tfacts div { padding-block: 4px; } .target .tfacts dd { font-size: 22px; }
  .target:not(.empty) .hint { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  /* the pack is a card back at the left of your hand */
  #open { width: 76px; height: 79px; margin: 3px 0; padding: 0 6px; flex-direction: column; justify-content: center; gap: 4px; white-space: normal; text-align: center; font-size: 18px; line-height: .95; box-shadow: 3px 3px 0 var(--fg); }
  #open span { font-size: 16px; }
  #open:not(:disabled) { background: var(--ink); color: #fff; box-shadow: 3px 3px 0 var(--mag); }
  #open:not(:disabled):hover { background: var(--mag-deep); }
  /* short windows (a phone on its side): the screen scrolls rather than squeezing the board to nothing */
  .stage { overflow-y: auto; grid-template-rows: auto minmax(200px, 1fr) auto; } .vs { position: fixed; }
  #hand-hint { display: none; }
  .motion[data-screen="city"] .low { animation: in-u .3s steps(5) both; }
}

/* wide layout: the board is a diagonal, the HUD lives in its four empty corners */
@media (min-width: 900px) and (min-height: 640px) {
  .stage { display: block; }
  .high, .low { display: contents; }
  .pan { position: absolute; inset: calc(var(--bar) + 30px) 60px 40px; overflow: visible; }
  .board { width: 100%; height: 100%; aspect-ratio: auto; }
  .ttl, .hud { position: absolute; z-index: 5; }

  .title-a { top: 40px; right: 44px; text-align: right; }
  .title-a .brand { display: none; }
  .kicker { justify-content: flex-end; font-size: 22px; }
  .title-b { left: 44px; bottom: 40px; max-width: min(450px, 35vw); }
  .wordmark { display: flex; align-items: center; gap: 18px; font-size: clamp(56px, 6.6vw, 100px); line-height: .9; margin-bottom: 12px; }
  .wordmark .mark { width: .62em; height: .62em; }
  .lead { font-size: 17px; }
  .btn-xl { height: 60px; padding: 0 24px; font-size: 32px; }
  .title-c { right: 44px; bottom: 40px; width: min(290px, 26vw); margin: 0; text-align: right; }
  .title-c p { flex-direction: row-reverse; }
  .title-c .tool { margin: 8px -10px 0 0; }

  .hud-a { left: 24px; top: calc(var(--bar) + 20px); }
  .hud-a h2 { font-size: 44px; }
  .hud-a > p { font-size: 19px; line-height: 1.1; color: var(--fg-2); margin: 2px 0 8px; }
  .hud-a .legend { margin-bottom: 12px; }
  .hud-b { right: 24px; top: calc(var(--bar) + 22px); width: clamp(264px, 24vw, 320px); padding: 16px; box-shadow: 6px 6px 0 var(--fg); }
  .hud-c { left: 24px; bottom: 26px; width: clamp(320px, 31vw, 420px); padding: 14px 16px 16px; box-shadow: 6px 6px 0 var(--fg); }
  .hud-d { right: 24px; bottom: 26px; width: clamp(250px, 22vw, 300px); padding: 12px 16px 6px; }
  .dock { display: flex; flex-direction: column; }
  .dock #open { order: 3; margin-top: 10px; }
  .dock .hint { margin-top: 4px; }
  .mini, .slot { width: 62px; } .minis { min-height: 98px; }
  .motion[data-screen="city"] .hud-a, .motion[data-screen="city"] .hud-c { animation: in-l .3s steps(5) both; }
  .motion[data-screen="city"] .hud-b, .motion[data-screen="city"] .hud-d { animation: in-r .3s steps(5) .06s both; }
  .motion[data-screen="title"] .title-a .kicker { animation: in-r .3s steps(5) both; }
}

/* ── the board ──────────────────────────────────────────────────────── */
.board .grid line { stroke: var(--fg); stroke-width: 1; stroke-dasharray: 2 5; opacity: .35; }
.blk { transform-box: fill-box; transform-origin: 50% 100%; cursor: pointer; }
.blk polygon { stroke: var(--ink); stroke-width: 1.6; stroke-linejoin: miter; }
:root[data-theme="dark"] .blk polygon:not(.d) { stroke: #fff; }
.blk .t { fill: var(--paper); } .blk .l { fill: var(--ink); }
.blk .d { stroke: none; pointer-events: none; }
.blk.held .t { fill: var(--ink); } .blk.held .d { opacity: 0; }
.blk.mine .t { fill: var(--mag); }
.blk:hover .t, .blk:focus-visible .t { fill: #FFC2E2; }
.blk.held:hover .t, .blk.held:focus-visible .t { fill: #4A4352; }
.blk.mine:hover .t, .blk.mine:focus-visible .t { fill: var(--mag); }
.blk.sel polygon:not(.d), .blk:focus-visible polygon:not(.d) { stroke: var(--mag); stroke-width: 3; }
.blk:focus { outline: none; }
.fly { fill: #fff; stroke: var(--ink); stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.tag rect { fill: var(--ink); stroke: #fff; stroke-width: 1.5; } .tag text { fill: #fff; font-family: var(--pixel); font-size: 12px; }
.tag.you rect { fill: var(--mag-deep); }
.tag { transform-box: fill-box; transform-origin: 50% 100%; pointer-events: none; }
.motion .board.rise .blk { animation: rise .5s steps(6) both; animation-delay: calc(var(--i) * 55ms + 150ms); }
.motion .board.rise .tag { animation: rise .3s steps(4) 1.2s both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
.motion .blk.win { animation: bump .65s steps(8); }
@keyframes bump { 30% { transform: translateY(-16px); } 62% { transform: translateY(4px); } }
.motion .blk.miss { animation: shake .5s steps(8); }
@keyframes shake { 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
.motion .tag { animation: tagin .3s steps(4) both; }
@keyframes tagin { from { opacity: 0; transform: translateY(8px) scale(.6); } }
.tip { position: absolute; z-index: 8; pointer-events: none; translate: -50% -125%; white-space: nowrap; background: var(--ink); color: #fff; font-size: 18px; line-height: 1.1; padding: 6px 10px; box-shadow: 3px 3px 0 var(--mag); }
.tip b { color: #FF7FC2; font-weight: 400; }
.reveal { position: absolute; z-index: 9; left: 50%; top: 50%; width: min(240px, 60%); translate: -50% -50%; pointer-events: none; perspective: 1000px; }
.bit { position: absolute; z-index: 60; pointer-events: none; }

/* ── a card: outline, title bar, portrait, plate, three meters ──────── */
.tc { position: relative; overflow: hidden; margin: 0; background: var(--paper); color: var(--ink); border: 2px solid var(--ink); display: flex; flex-direction: column; box-shadow: 6px 6px 0 var(--ink); --meter: var(--mag); }
.tc[data-rarity="1"] { background: var(--ink); color: #fff; --meter: #fff; box-shadow: 6px 6px 0 var(--mag); }
.tc[data-rarity="2"] { background: var(--mag); color: #fff; --meter: #fff; }
:root[data-theme="dark"] .tc { border-color: #fff; box-shadow: 6px 6px 0 #fff; }
:root[data-theme="dark"] .tc[data-rarity="1"] { box-shadow: 6px 6px 0 var(--mag); }
.tc-top { display: flex; justify-content: space-between; align-items: center; height: 36px; padding: 0 10px; font-size: 21px; border-bottom: 2px solid currentColor; }
.tc-art { aspect-ratio: 3 / 4; overflow: hidden; background: #fff; }
.tc-art img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.tc figcaption { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: center; padding: 9px 10px 11px; border-top: 2px solid currentColor; }
.tc[data-rarity="0"] .tc-top, .tc[data-rarity="0"] figcaption { border-color: var(--ink); }
.tc-name { display: block; font-size: 31px; line-height: .95; }
.tc-role { display: block; font-size: 13px; line-height: 1.3; opacity: .75; margin-top: 3px; }
.tc-pw { font-size: 64px; line-height: .8; }
.tc-traits { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tr { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 17px; text-transform: uppercase; line-height: 1; }
.tr b { opacity: .7; font-weight: 400; }
.tr i { flex: 1; height: 7px; min-width: 0; background: linear-gradient(90deg, var(--meter) calc(var(--v) * 10%), color-mix(in srgb, currentColor 20%, transparent) 0);
  -webkit-mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 4.5px); mask-image: repeating-linear-gradient(90deg, #000 0 3px, transparent 3px 4.5px); }

/* ── versus: an attack cuts the screen in two ───────────────────────── */
.vs { position: absolute; inset: 0; z-index: 20; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr) auto; overflow: hidden; cursor: pointer; color: #fff; }
.vs-you, .vs-them { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 16px; min-height: 0; }
.vs-you { background: var(--mag); padding-top: calc(var(--bar) + 8px); } .vs-them { background: var(--ink); }
.vs-tag { font-size: 26px; line-height: 1; padding: 3px 10px; background: var(--ink); } .vs-them .vs-tag { background: #fff; color: var(--ink); }
.vs-crew { display: flex; gap: 12px; }
.vs-crew img { width: clamp(64px, 9vw, 128px); height: auto; border: 3px solid var(--ink); background: #fff; image-rendering: pixelated; box-shadow: 5px 5px 0 var(--ink); }
.vs-block svg { width: clamp(96px, 13vw, 190px); height: auto; overflow: visible; } .vs .blk polygon:not(.d) { stroke: #fff; } .vs .blk { cursor: inherit; }
.vs-pw { font-size: clamp(64px, 10vw, 140px); line-height: .78; font-variant-numeric: tabular-nums; }
.vs-name { font-size: 24px; line-height: 1; color: #C9BFCF; }
.vs-mid { position: absolute; left: 50%; top: 44%; translate: -50% -50%; rotate: -5deg; font-size: clamp(64px, 9vw, 120px); line-height: .9; padding: 0 16px 4px; background: #fff; color: var(--ink); border: 4px solid var(--ink); box-shadow: 8px 8px 0 var(--ink); }
.vs-draw { background: var(--paper); color: var(--ink); border-top: 4px solid var(--ink); padding: 22px var(--gutter) calc(var(--tab) + env(safe-area-inset-bottom) + 18px); }
.vs-draw .bar { height: 22px; border-color: var(--ink); background: #fff; margin-bottom: 10px; } .vs-draw .pin::after { width: 8px; left: -4px; background: var(--ink); outline-color: #fff; }
.vs-draw p { font-size: 22px; line-height: 1.1; text-align: center; }
.vs-stamp { position: absolute; left: 50%; top: 44%; translate: -50% -50%; rotate: -6deg; font-size: clamp(72px, 15vw, 210px); line-height: .9; padding: 0 28px 8px; white-space: nowrap; border: 6px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.vs-stamp.win { background: #fff; color: var(--mag); } .vs-stamp.loss { background: var(--ink); color: #fff; border-color: #fff; box-shadow: 10px 10px 0 var(--mag); }
@media (min-width: 900px) and (min-height: 640px) {
  .vs { grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .vs-you, .vs-them { gap: 20px; padding-top: var(--bar); }
  .vs-draw { grid-column: 1 / -1; padding: 26px 15vw 30px; }
}

/* ── Cards: the select screen ───────────────────────────────────────── */
.sel { display: grid; gap: 18px; }
.sel-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.face { position: relative; padding: 0; border: 2px solid var(--fg); background: #fff; aspect-ratio: 3 / 4; overflow: hidden; cursor: pointer; transition: transform .08s var(--step), box-shadow .08s var(--step); }
.face img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.face .pw { position: absolute; right: 0; bottom: 0; background: var(--ink); color: #fff; font-size: 18px; line-height: 1; padding: 2px 4px; }
.face[aria-selected="true"] { z-index: 1; transform: translate(-3px, -3px); box-shadow: 0 0 0 3px var(--mag), 6px 6px 0 3px var(--fg); }
.face:focus-visible { outline-offset: 5px; }
.odds { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.odds div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; padding: 8px 12px; } .odds div + div { border-left: 2px dotted var(--rule); }
.odds b { font-size: 34px; line-height: 1; font-weight: 400; } .odds span { font-size: 20px; color: var(--fg-2); }
.odds div.on { background: var(--mag); color: #fff; } .odds div.on span { color: inherit; font-size: 24px; }
/* on a phone the big card lies on its side: portrait left, plate right */
.sel-big .tc { display: grid; grid-template-columns: 124px minmax(0, 1fr); grid-template-rows: auto 1fr; }
.sel-big .tc-top { grid-column: 1 / -1; height: 30px; font-size: 19px; }
.sel-big .tc figcaption { border-top: 0; border-left: 2px solid currentColor; align-content: center; grid-template-columns: minmax(0, 1fr); }
.sel-big .tc[data-rarity="0"] figcaption { border-color: var(--ink); }
.sel-big .tc-pw { font-size: 56px; } .sel-big .tc-traits { grid-template-columns: 1fr; gap: 5px; } .sel-big .tr b { width: 34px; }
@media (min-width: 900px) and (min-height: 640px) {
  .sel { max-width: 1400px; grid-template-columns: min(400px, 30vw, calc((100dvh - 250px) / 1.34)) minmax(0, 1fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
  .sel-grid { grid-template-columns: repeat(10, minmax(0, 1fr)); }
  .sel-big .tc { display: flex; }
  .sel-big .tc-top { height: 36px; font-size: 21px; }
  .sel-big .tc figcaption { border-left: 0; border-top: 2px solid currentColor; grid-template-columns: minmax(0, 1fr) auto; }
  .sel-big .tc-pw { font-size: 64px; } .sel-big .tc-traits { grid-template-columns: repeat(3, 1fr); gap: 8px; } .sel-big .tr b { width: auto; }
}

/* ── Rules ──────────────────────────────────────────────────────────── */
.explain { display: grid; gap: 18px; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 13px 16px; } .steps li + li { border-top: 2px dotted var(--rule); }
.steps .n { width: 44px; height: 44px; display: grid; place-items: center; background: var(--mag); color: #fff; border: 2px solid var(--fg); font-size: 38px; line-height: 1; }
.steps b { display: block; font-size: 28px; line-height: 1; } .steps div span { display: block; font-size: 14px; color: var(--fg-2); margin-top: 4px; }
.fact { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 16px; font-size: 14px; } .fact + .fact { border-top: 2px dotted var(--rule); }
.fact span { color: var(--fg-2); } .fact b { font-size: 21px; white-space: nowrap; }
@media (min-width: 900px) and (min-height: 640px) { .explain { grid-template-columns: 1.25fr 1fr; align-items: start; } }

/* ── Fine print ─────────────────────────────────────────────────────── */
.three { display: grid; gap: 14px; margin-bottom: 18px; }
.pad3 { padding: 14px 18px 16px; } .pad3 h3 { margin-bottom: 8px; } .pad3 p { font-size: 14px; color: var(--fg-2); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; align-items: center; padding: 8px 16px; } .row + .row { border-top: 2px dotted var(--rule); }
.row b { font-size: 23px; line-height: 1.1; } .row span { grid-column: 1; font-size: 13px; color: var(--muted); }
.row em { grid-column: 2; grid-row: 1 / span 2; font-style: normal; font-size: 19px; line-height: 1.2; padding: 2px 8px; border: 2px solid currentColor; white-space: nowrap; }
.row em.ok { color: var(--ok); } .row em.no { color: var(--mag-text); }
.foot { display: grid; gap: 12px 24px; margin-top: 22px; padding: 16px 18px; background: var(--ink); color: #fff; border: 2px solid var(--fg); }
.addr { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; text-align: left; background: transparent; border: 2px solid #fff; padding: 8px 12px; cursor: pointer; color: #fff; font-size: 17px; line-height: 1.1; word-break: break-all; } .addr .c { color: #FF7FC2; }
.small { font-size: 13px; color: #B9AEC0; line-height: 1.5; }
.tools { display: flex; gap: 8px; } .foot .tool { color: #fff; border-color: #fff; } .foot .tool:hover { background: #fff; color: var(--ink); }
@media (min-width: 900px) and (min-height: 640px) {
  .three { grid-template-columns: repeat(3, 1fr); }
  .row { grid-template-columns: 230px minmax(0, 1fr) auto; } .row span { grid-column: 2; } .row em { grid-column: 3; grid-row: 1; }
  .foot { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
}

/* ── the sheet of the fifty blocks ──────────────────────────────────── */
.sheet { width: min(1180px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 2px solid var(--fg); background: var(--bg); color: var(--fg); box-shadow: 8px 8px 0 var(--fg); overflow: auto; }
.sheet::backdrop { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='2' height='2' fill='%2317131C'/%3E%3Crect x='2' y='2' width='2' height='2' fill='%2317131C'/%3E%3C/svg%3E"); }
.sheet-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; padding: 12px 18px; background: var(--bg); border-bottom: 2px solid var(--fg); } .sheet-head .btn { margin-left: auto; }
.sheet-body { padding: 18px; }
.lists { display: grid; gap: 14px; }
@media (min-width: 640px) { .lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .lists { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.list { box-shadow: 3px 3px 0 var(--fg); }
.list-head { display: flex; justify-content: space-between; font-size: 22px; line-height: 1; padding: 8px 12px; background: var(--ink); color: #fff; }
.li { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 12px; font-size: 20px; text-align: left; background: none; border: 0; border-top: 2px dotted var(--rule); cursor: pointer; min-width: 0; }
.li i { flex: none; width: 8px; height: 8px; background: var(--mag); } .li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .li .val { color: var(--muted); }
.li:hover, .li:focus-visible { background: var(--mag-deep); color: #fff; outline: 0; } .li:hover i, .li:focus-visible i { background: #fff; } .li:hover .val, .li:focus-visible .val { color: #fff; }
.motion .sheet[open] { animation: in-u .22s steps(4); }

/* the next thing to do blinks, in two steps, until it is done */
.motion .cue { animation: cue 1s steps(1) infinite; }
@keyframes cue { 50% { outline: 3px solid var(--fg); outline-offset: 3px; } }
.tag.easy rect { fill: var(--mag-deep); }
.motion .tag.easy { animation: bob 1s steps(2) infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }
.fail { margin: 0; padding: 14px var(--gutter); font-family: var(--pixel); font-size: 22px; line-height: 1.1; background: var(--ink); color: #fff; } .fail a { color: #FF7FC2; }
#board .fail { position: absolute; left: 50%; top: 50%; translate: -50% -50%; white-space: nowrap; }
/* everything that moves by itself stops with the Pause motion button */
.paused .caret, .paused .cue, .paused .tag.easy { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* between a small window and a full desktop: lighter bar, a shorter log */
@media (min-width: 1250px) and (min-height: 640px) { .state { display: inline-flex; } }
@media (min-width: 900px) and (max-width: 1249.98px) and (min-height: 640px) {
  .pan { inset: calc(var(--bar) + 24px) 11vw 40px; }
  #feed li:nth-child(n+4) { display: none; }
  .hud-b .hint { font-size: 12px; }
  .lead { font-size: 15px; }
  .wordmark { font-size: 56px; margin-bottom: 8px; }
  .btn-xl { height: 52px; padding: 0 16px; font-size: 26px; }
  .title-b .actions { flex-wrap: nowrap; margin-top: 14px; }
}

/* a finger does not hover: no colour left stuck on a button after a tap */
@media (hover: none) { .btn:not(:disabled):hover { background: var(--panel); color: var(--fg); } .btn-ink:not(:disabled):hover { background: var(--mag); color: #fff; } }
@media (hover: none) and (max-width: 899.98px), (hover: none) and (max-height: 639.98px) { #open:not(:disabled):hover { background: var(--ink); color: #fff; } }

/* ── Demo | Mainnet | Devnet ────────────────────────────────────────────
   One switch in the bar (Mainnet only once it is live, config.js). A network adds a strip under
   the bar that never goes away ("Devnet · test SOL, no value", "Mainnet · real SOL"), a wallet
   chip in place of the demo purse, and nothing else new: the board, the hand, the target and the
   versus are the same screens fed by the chain. */
:root { --strip: 0px; }
:root[data-net] { --strip: 28px; --bar: 76px; }
@media (min-width: 900px) and (min-height: 640px) { :root[data-net] { --bar: 84px; } }
.top { padding-bottom: var(--strip); }
@media (min-width: 900px) and (min-height: 640px) { .tabs { height: calc(var(--bar) - var(--strip)); } }
.net { display: inline-flex; height: 34px; border: 2px solid var(--fg); background: var(--panel); flex: none; }
.net-opt { height: 100%; padding: 0 9px; border: 0; background: none; color: var(--fg-2); font-family: var(--pixel); font-size: 19px; line-height: 1; letter-spacing: .01em; cursor: pointer; }
.net-opt + .net-opt { border-left: 2px solid var(--fg); }
.net-opt[aria-pressed="true"] { background: var(--fg); color: var(--bg); cursor: default; }
.net-opt[aria-pressed="false"]:hover { background: var(--bg-2); color: var(--fg); }
.net-opt:focus-visible { outline-offset: -5px; }
.netbar { position: absolute; inset: auto 0 0 0; height: var(--strip); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gutter); background: var(--ink); color: #fff; font-family: var(--pixel); font-size: 17px; line-height: 1; letter-spacing: .01em; white-space: nowrap; }
.nb-tag { display: inline-flex; align-items: center; gap: 8px; flex: none; } .nb-tag i { width: 10px; height: 10px; background: var(--mag); }
.nb-status { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: #D9D2DE; }
.nb-status a { color: #fff; }
.nb-status .ns-short { display: none; }
@media (max-width: 599.98px) { .nb-status .ns-short { display: inline; } .nb-status .ns-long { display: none; } }
/* three games in the switch: on a phone the bar keeps the mark and drops the word */
@media (max-width: 479.98px) { .top:has(.net-opt:nth-child(3)) .brand-word { display: none; } }
/* the brand word (sized for eight letters, "Holdup" has six): on a phone the bar tightens so brand, switch and purse fit in one row,
   and below 390 px the mark stands alone (the link keeps the name in its aria-label) */
@media (max-width: 479.98px) {
  .top { gap: 8px; } .top .brand-word { font-size: 24px; }
  .net-opt { padding: 0 7px; } .top .purse { margin-left: 0; padding: 0 8px; }
}
@media (max-width: 389.98px) { .top .brand-word { display: none; } }
/* a narrow desktop window: the tabs sit after the wordmark, so the bar drops Dark mode (it stays in Fine print) */
@media (min-width: 900px) and (max-width: 1099.98px) and (min-height: 640px) { .top .tool[data-act="theme"] { display: none; } .tabs a { padding: 0 8px; } }
button.purse { font-family: var(--pixel); color: var(--fg); cursor: pointer; box-shadow: 3px 3px 0 var(--fg); transition: transform .08s var(--step), box-shadow .08s var(--step); }
button.purse:hover { background: var(--fg); color: var(--bg); } button.purse:hover small { color: inherit; }
button.purse:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--fg); }
.wallet .w-short { display: none; }
#crew-set span { font-size: 19px; color: var(--muted); } #crew-set:hover span { color: inherit; }
.tag.raid rect { fill: var(--mag); }
.hint a, #feed a.v { color: inherit; text-underline-offset: 3px; }
#feed a.v:hover { color: var(--fg); }
.hint.err { color: var(--mag-text); }
/* phone and tablet: brand, switch, purse; Pause stays on the title screen and in Fine print */
@media (max-width: 899.98px), (max-height: 639.98px) {
  .top { gap: 10px; }
  .top .tool[data-act="pause"] { display: none; }
  .purse small { display: none; }
  .dock #crew-set { grid-column: 1 / -1; margin-top: 8px; height: 40px; }
  .target .hint.say, #hand-hint.say { position: static; width: auto; height: auto; overflow: visible; clip-path: none; display: block; margin-top: 6px; }
  .netbar { font-size: 16px; gap: 10px; }
}
@media (min-width: 520px) and (max-width: 899.98px) { .top .tool[data-act="pause"] { display: inline-flex; } }
@media (min-width: 480px) { .purse small { display: inline; } }
@media (max-width: 479.98px) { .wallet .w-long { display: none; } .wallet .w-short { display: inline; } .wallet small { display: none; } }
@media (min-width: 900px) and (min-height: 640px) { .dock #crew-set { order: 4; margin-top: 10px; } }

/* ── before the first payment on mainnet: the price, what can be lost, Cancel first ── */
.sheet.pay { width: min(500px, calc(100vw - 24px)); }
.pay .sheet-body { display: grid; gap: 12px; }
.pay-price { display: flex; align-items: baseline; gap: 12px; font-family: var(--pixel); line-height: 1; }
.pay-price b { font-weight: 400; font-size: 44px; color: var(--mag-text); font-variant-numeric: tabular-nums; }
.pay-price span { font-size: 22px; color: var(--fg-2); }
#pay-what { color: var(--fg-2); }
.pay-risk { padding: 10px 12px; border: 2px solid var(--fg); background: var(--panel); font-family: var(--pixel); font-size: 21px; line-height: 1.15; }
.pay .note { margin-top: 0; }
.pay-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 14px; margin-top: 6px; }
