/* Retake. Sand paper, ink, and one orange that only ever means the fuse. */

@font-face { font-family: 'Big Shoulders Stencil'; font-style: normal; font-weight: 700 900; font-display: swap; src: url(../fonts/big-shoulders-stencil.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/schibsted-grotesk.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: italic; font-weight: 400; font-display: swap; src: url(../fonts/schibsted-grotesk-italic.woff2) format('woff2'); }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/courier-prime-400.woff2) format('woff2'); }
@font-face { font-family: 'Courier Prime'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/courier-prime-700.woff2) format('woff2'); }

:root {
  --paper: #E8DEC8;
  --paper-2: #DFD3BA;
  --paper-3: #D3C5A7;
  --ink: #1D1E18;
  --ink-2: #44443A;
  --muted: #6B6858;
  --rule: rgba(29, 30, 24, .2);
  --fuse: #D9541E;
  --display: 'Big Shoulders Stencil', 'Arial Narrow', Impact, sans-serif;
  --text: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --type: 'Courier Prime', 'Courier New', monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1280px;
  --top: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
}
/* paper grain: a fixed noise layer, multiplied */
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .26 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
a { color: inherit; }
img, svg { display: block; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 50; }
.skip:focus { top: 8px; }
main { flex: 1; }
main:focus, main:focus-visible { outline: none; } /* focused by the router for screen readers, not a control */
.noscript { padding: 24px var(--gutter); }

.display { font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .86; letter-spacing: .005em; margin: 0; }
.h2 { font: 900 clamp(30px, 4vw, 44px)/.95 var(--display); text-transform: uppercase; margin: 0; }
.lede { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; max-width: 34em; margin: 0; }
.small { font-size: 14px; color: var(--muted); margin: 0; }
.small a { color: var(--ink-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border: 1.5px solid var(--ink); border-radius: 2px;
  font: 600 16px/1.1 var(--text); text-decoration: none; cursor: pointer; background: transparent;
  transition: transform .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { box-shadow: 3px 3px 0 rgba(29, 30, 24, .35); }
.btn-line { background: transparent; color: var(--ink); }
.btn-lg { min-height: 52px; padding: 13px 24px; font-size: 17px; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
.btn-wide { width: 100%; }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-ghost { color: var(--paper); border-color: rgba(232, 222, 200, .55); }
.btn-ghost:hover { box-shadow: 3px 3px 0 rgba(232, 222, 200, .3); }

/* ---------- header ---------- */
.top {
  height: var(--top); display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 var(--gutter); border-bottom: 1.5px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark svg { width: 36px; height: 36px; }
.brand-word svg { height: 21px; width: auto; }
.nav { display: flex; gap: clamp(12px, 2.4vw, 30px); }
.nav a { font-weight: 600; font-size: 15px; text-decoration: none; padding: 6px 0; position: relative; }
.nav a::after { content: ''; position: absolute; left: -2px; right: -2px; bottom: 0; height: 3px; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; border-radius: 2px; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }

/* ---------- briefing ---------- */
.gate {
  max-width: var(--max); margin: 0 auto; padding: clamp(36px, 6vw, 76px) var(--gutter) clamp(40px, 6vw, 80px);
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: clamp(32px, 5vw, 72px); align-items: start;
}
.gate-copy { display: flex; flex-direction: column; gap: 22px; padding-top: 6px; }
.gate-h { font-size: clamp(46px, 5.7vw, 92px); }
.gate-h span { display: block; white-space: nowrap; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }

.ca { border: 1.5px solid var(--ink); background: var(--paper-2); padding: 14px 16px 12px; margin-top: 8px; max-width: 34em; }
.ca-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ca-label { font-weight: 600; font-size: 15px; }
.ca-soon { font: 700 13px var(--type); color: var(--fuse); }
.ca-addr { display: block; font: 400 14px/1.45 var(--type); margin: 6px 0 10px; overflow-wrap: anywhere; color: var(--ink-2); }
.ca.is-live .ca-addr { color: var(--ink); font-weight: 700; user-select: all; }
.ca-actions { display: flex; align-items: center; gap: 12px; }
.ca-status { font-size: 14px; color: var(--ink-2); }

.plan { margin: 0; position: relative; background: #EFE7D4; border: 1px solid rgba(29, 30, 24, .28); padding: 14px 14px 10px; transform: rotate(.6deg); box-shadow: 0 1px 0 rgba(29, 30, 24, .08), 0 18px 34px -24px rgba(29, 30, 24, .55); }
.plan figcaption { font: 400 13.5px/1.45 var(--type); color: var(--ink-2); padding: 10px 4px 2px; }
.plan figcaption p { margin: 10px 0 0; }
.plan-key { margin: 0; padding: 0; list-style: none; counter-reset: k; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; color: var(--ink); }
.plan-key li { counter-increment: k; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
.plan-key li::before { content: counter(k); width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 12px; line-height: 20px; text-align: center; margin-top: -1px; }
.plan-key li:nth-child(4)::before { background: var(--fuse); }
.pl-pin circle { fill: var(--ink); }
.pl-pin.is-fuse circle { fill: var(--fuse); }
.pl-pin text { font: 700 13px var(--type); fill: var(--paper); }
.pl-lead { stroke: currentColor; stroke-width: 1.2; }
.tape { position: absolute; top: -12px; width: 92px; height: 26px; background: rgba(214, 196, 150, .72); box-shadow: 0 1px 2px rgba(29, 30, 24, .12); z-index: 2; }
.tape-l { left: 28px; transform: rotate(-5deg); }
.tape-r { right: 34px; transform: rotate(4deg); }
.plan-svg { width: 100%; height: auto; color: var(--ink); }
.pl-contours path { fill: none; stroke: var(--ink); stroke-opacity: .12; stroke-width: 1; }
.pl-site { fill: rgba(29, 30, 24, .04); stroke: var(--ink); stroke-width: 1.2; stroke-dasharray: 5 4; }
.pl-bld { fill: url(#hatch); stroke: currentColor; stroke-width: 1.6; }
.pl-wall, .pl-solid { fill: currentColor; }
.pl-crate { fill: var(--paper-3); stroke: currentColor; stroke-width: 1.3; }
.pl-x { stroke: currentColor; stroke-width: .9; opacity: .55; }
.pl-cont { fill: #4F6A69; stroke: currentColor; stroke-width: 1.2; }
.pl-A { font: 900 150px var(--display); fill: currentColor; opacity: .13; }
.pl-routes { color: var(--ink); }
.pl-routes path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-dasharray: 7 5; stroke-linecap: round; }
.pl-holds circle { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-dasharray: 2.2 2.4; }
.pl-spawn circle { fill: none; stroke: currentColor; stroke-width: 1.8; }
.pl-spawn .pl-dot { fill: currentColor; stroke: none; }
.pl-alt { fill: none; stroke: var(--fuse); stroke-width: 1.5; stroke-dasharray: 3 3; }
.pl-fuse path { fill: currentColor; opacity: .16; transition: opacity .5s ease, fill .5s ease; }
.pl-fuse path.lit { fill: var(--fuse); opacity: 1; }
.pl-charge { fill: var(--fuse); }
.pl-note { font: 400 13.5px var(--type); fill: currentColor; }
.pl-n { font-weight: 700; }
.pl-stamp { opacity: .8; }
.pl-stamp rect { fill: none; stroke: currentColor; stroke-width: 2.6; }
.pl-stamp text { font: 900 36px var(--display); letter-spacing: .08em; fill: currentColor; }
.pl-scale path { fill: none; stroke: currentColor; stroke-width: 1.5; }
.pl-scale text, .pl-north text { font: 12px var(--type); fill: currentColor; }
.pl-north path { fill: currentColor; }

.manual { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter) clamp(48px, 7vw, 96px); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: 24px; }
.card { border-top: 2px solid var(--ink); padding-top: 14px; position: relative; }
.card-n { font: 700 14px var(--type); color: var(--ink-2); }
.card h3 { font: 900 32px/.95 var(--display); text-transform: uppercase; margin: 6px 0 10px; }
.card p { margin: 0; max-width: 30em; }

.coin { background: var(--ink); color: var(--paper); }
.coin > * { position: relative; }
.coin { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; padding: clamp(44px, 6vw, 80px) max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); }
.coin-mark svg { width: clamp(120px, 15vw, 200px); height: auto; color: var(--paper); }
.coin-copy { display: flex; flex-direction: column; gap: 16px; }
.coin-h { font-size: clamp(56px, 8vw, 104px); }
.coin-copy p { margin: 0; max-width: 40em; font-size: 18px; color: #D9CFB8; }
.links { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 6px; }
.lk { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--paper); border-radius: 2px; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
a.lk:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 rgba(232, 222, 200, .35); }
.lk.is-off { background: transparent; color: var(--paper); border-color: rgba(232, 222, 200, .35); }
.lk-logo { flex: none; width: 34px; height: 34px; display: grid; place-items: center; background: #fff; border-radius: 50%; overflow: hidden; }
.lk-logo img, .lk-logo svg { width: 20px; height: 20px; object-fit: contain; }
.lk-logo img[src*="pumpfun"] { width: 24px; height: 24px; }
.lk-logo img[src*="dexscreener"] { width: 34px; height: 34px; }
.lk-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lk-t { font-weight: 600; font-size: 15px; }
.lk-s { font: 400 13px var(--type); opacity: .7; }
.lk.is-off .lk-logo { filter: grayscale(.2); opacity: .9; }

/* ---------- footer ---------- */
.foot { padding: 28px var(--gutter) 22px; border-top: 1.5px solid var(--rule); }
.foot-row { max-width: var(--max); margin: 0 auto 14px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-brand svg { width: 30px; height: 30px; }
.foot-line { margin: 0; font-size: 15px; flex: 1; min-width: 220px; }
.foot-links { display: flex; gap: 8px; }
.lk-c { min-height: 0; padding: 0; background: none; border: none; }
.lk-c .lk-logo { width: 36px; height: 36px; border: 1.5px solid var(--rule); }
.lk-c.is-off { opacity: .55; }
.fine-print { max-width: var(--max); margin: 4px auto 0; font-size: 11px; line-height: 1.5; color: var(--muted); }
body.is-play .foot { display: none; }

/* ---------- loadout ---------- */
.lo { max-width: var(--max); margin: 0 auto; padding: clamp(32px, 5vw, 64px) var(--gutter) clamp(48px, 7vw, 96px); }
.lo-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: clamp(24px, 4vw, 44px); }
.page-h { font-size: clamp(60px, 8vw, 112px); }
.lo-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.lo-stage { margin: 0; position: sticky; top: 20px; }
.lo-canvas { aspect-ratio: 4 / 5; background: radial-gradient(ellipse 60% 22% at 50% 86%, rgba(29, 30, 24, .1), transparent 70%), var(--paper-2); border: 1px solid rgba(29, 30, 24, .25); position: relative; overflow: hidden; touch-action: pan-y; }
.lo-canvas canvas { width: 100%; height: 100%; display: block; cursor: grab; }
.lo-canvas canvas:active { cursor: grabbing; }
.lo-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font: 14px var(--type); color: var(--muted); padding: 24px; text-align: center; }
.lo-stage figcaption { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 12px; }
.tag { font: 700 15px var(--type); background: #B9B3A0; color: var(--ink); padding: 6px 14px 6px 22px; border-radius: 4px 14px 14px 4px; position: relative; box-shadow: inset 0 -2px 0 rgba(29, 30, 24, .15); }
.tag::before { content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(29, 30, 24, .45); }
.tag.is-empty { color: var(--ink-2); font-weight: 400; }
.lo-form { display: flex; flex-direction: column; gap: 26px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.field-t { font-weight: 700; font-size: 15px; padding: 0; }
.input { min-height: 48px; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 2px; background: #F2EBDA; font: 700 17px var(--type); max-width: 22em; }
.input::placeholder { color: var(--muted); font-weight: 400; }
.swatches { display: flex; flex-wrap: wrap; gap: 14px; }
.sw { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; }
.sw input, .seg input, .pick input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.sw-chip { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(29, 30, 24, .35); background: radial-gradient(circle at 30% 30%, var(--c) 0 18%, transparent 19%), radial-gradient(circle at 70% 62%, var(--b) 0 22%, transparent 23%), radial-gradient(circle at 34% 76%, var(--b) 0 14%, transparent 15%), var(--a); }
.sw input:checked + .sw-chip { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.sw input:focus-visible + .sw-chip { outline: 2px solid var(--ink); outline-offset: 6px; }
.seg { display: inline-flex; border: 1.5px solid var(--ink); border-radius: 2px; width: max-content; max-width: 100%; }
.seg label { cursor: pointer; }
.seg span { display: block; padding: 10px 18px; font-weight: 600; font-size: 15px; min-height: 44px; }
.seg label + label span { border-left: 1.5px solid var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.picks-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pick { cursor: pointer; display: block; }
.pick-in { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 14px; border: 1.5px solid rgba(29, 30, 24, .3); border-radius: 2px; background: rgba(255, 252, 244, .25); transition: border-color .12s ease, background-color .12s ease; }
.pick:hover .pick-in { border-color: var(--ink); }
.pick input:checked + .pick-in { border: 2px solid var(--ink); padding: 13.5px; background: var(--paper-2); box-shadow: inset 4px 0 0 var(--ink); }
.pick input:focus-visible + .pick-in { outline: 2px solid var(--ink); outline-offset: 3px; }
.pick-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pick-name { font: 900 27px/.9 var(--display); text-transform: uppercase; }
.pick-kind { font: 400 13px var(--type); color: var(--ink-2); }
.pick-line { font-size: 14.5px; line-height: 1.4; }
.pick-num { font: 400 12.5px var(--type); color: var(--ink-2); margin-top: auto; }
.bars { display: flex; flex-direction: column; gap: 5px; }
.bar { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.bar-t { height: 6px; background: rgba(29, 30, 24, .12); border-radius: 1px; overflow: hidden; }
.bar-f { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--ink); }
.lo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding-top: 4px; }
.record { margin-top: clamp(44px, 6vw, 80px); border-top: 2px solid var(--ink); padding-top: 18px; }
.record-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.rec { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.5px; background: var(--rule); border: 1.5px solid var(--rule); margin: 0 0 12px; }
.rec > div { background: var(--paper); padding: 12px 14px; }
.rec dt { font-size: 13.5px; color: var(--ink-2); }
.rec dd { margin: 2px 0 0; font: 900 32px/1 var(--display); }

/* ---------- the round ---------- */
body.is-play .top { position: relative; z-index: 3; }
body.in-round .top { display: none; }
.play { position: relative; height: calc(100svh - var(--top)); min-height: 420px; overflow: hidden; background: #2A2A24; }
body.in-round .play { height: 100svh; }
.stage { position: absolute; inset: 0; user-select: none; -webkit-user-select: none; }
.game-canvas { width: 100%; height: 100%; display: block; }
.stage-wait { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--paper); font: 15px var(--type); padding: 24px; text-align: center; }
.panel {
  position: absolute; z-index: 4; left: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(430px, calc(100% - var(--gutter) * 2)); max-height: calc(100% - 32px); overflow: auto;
  background: var(--paper); color: var(--ink); padding: 22px 22px 18px; border: 1px solid rgba(29, 30, 24, .35);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .6); display: flex; flex-direction: column; gap: 16px;
}
.panel-k { margin: 0; font: 400 14px var(--type); color: var(--ink-2); }
.panel-k b { color: var(--ink); }
.panel-h { font-size: clamp(48px, 6vw, 68px); }
.panel-h.is-loss { color: var(--ink-2); }
.panel-s { margin: 0; }
.panel-lo { margin: 0; display: flex; justify-content: space-between; gap: 12px; font-size: 15px; border-top: 1.5px solid var(--rule); border-bottom: 1.5px solid var(--rule); padding: 10px 0; }
.panel-lo a { font-weight: 600; }
.panel-b { display: flex; flex-wrap: wrap; gap: 10px; }
.panel-note { text-align: center; margin-top: -6px; }
.seg-3 { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg-3 span { text-align: center; padding: 10px 6px; }
.keys summary { cursor: pointer; font-weight: 700; font-size: 15px; }
.keys p { margin: 8px 0 0; font-size: 15px; }
.keylist { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; margin: 10px 0 0; }
.keylist div { display: flex; flex-direction: column; }
.keylist dt { font: 700 13.5px var(--type); }
.keylist dd { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.rec-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.rec-sm dd { font-size: 28px; }

/* HUD: drawn over the canvas, only its controls take clicks */
.hud { position: absolute; inset: 0; pointer-events: none; color: #F4ECDB; font-family: var(--text); z-index: 2; }
.hud.is-brief > :not(.hud-pause) { display: none; }
.hud.is-over > :not(.hud-white):not(.hud-hurt) { opacity: 0; transition: opacity .4s ease; }
.hud-fuse { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; padding: 6px 16px 4px; background: rgba(22, 22, 18, .62); border-radius: 2px; }
.hud-fuse b { font: 900 38px/1 var(--display); color: #FF8B52; letter-spacing: .02em; }
.hud-fuse-dot { width: 12px; height: 12px; border-radius: 50%; background: #FF8B52; box-shadow: 0 0 0 3px rgba(255, 139, 82, .25); }
.hud-fuse.low b { color: #FFB089; }
.hud-fuse.low .hud-fuse-dot { animation: blink .5s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.hud-foes { position: absolute; top: 20px; left: 20px; display: flex; gap: 6px; }
.hud-foes i { width: 14px; height: 26px; background: #F4ECDB; clip-path: polygon(30% 0, 70% 0, 70% 26%, 100% 30%, 100% 66%, 82% 66%, 82% 100%, 18% 100%, 18% 66%, 0 66%, 0 30%, 30% 26%); }
.hud-foes i.down { opacity: .25; }
.hud-cross { position: absolute; left: 50%; top: 50%; --gap: 6px; }
.hud-cross i { position: absolute; background: #F7F2E6; box-shadow: 0 0 0 1px rgba(20, 20, 16, .55); }
.hud-cross i:nth-child(1), .hud-cross i:nth-child(2) { width: 2px; height: 9px; left: -1px; }
.hud-cross i:nth-child(1) { bottom: var(--gap); }
.hud-cross i:nth-child(2) { top: var(--gap); }
.hud-cross i:nth-child(3), .hud-cross i:nth-child(4) { height: 2px; width: 9px; top: -1px; }
.hud-cross i:nth-child(3) { right: var(--gap); }
.hud-cross i:nth-child(4) { left: var(--gap); }
.hud-hit { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; opacity: 0; background: linear-gradient(45deg, transparent 46%, #fff 46% 54%, transparent 54%), linear-gradient(-45deg, transparent 46%, #fff 46% 54%, transparent 54%); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
.hud-hit.on { animation: hit .22s ease-out; }
.hud-hit.head { background: linear-gradient(45deg, transparent 44%, #FFB089 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #FFB089 44% 56%, transparent 56%); }
@keyframes hit { from { opacity: 1; transform: scale(1.25); } to { opacity: 0; transform: scale(1); } }
.hud-scope { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 50%, transparent 0 min(34vh, 34vw), rgba(8, 8, 6, .96) calc(min(34vh, 34vw) + 1px)), linear-gradient(#111 0 0) 50% 50% / 1px 100% no-repeat, linear-gradient(#111 0 0) 50% 50% / 100% 1px no-repeat; }
.hud-scope.on { opacity: 1; }
.hud-msg { position: absolute; left: 0; right: 0; top: 24%; text-align: center; font: 900 clamp(32px, 4.4vw, 52px)/1 var(--display); text-transform: uppercase; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); opacity: 0; transition: opacity .2s; }
.hud-msg.on { opacity: 1; }
.hud-msg span { display: block; margin-top: 10px; font: 700 20px var(--type); text-transform: none; color: #FF8B52; }
.hud-hint { position: absolute; left: 50%; bottom: 23%; transform: translateX(-50%); font-weight: 600; font-size: 16px; background: rgba(22, 22, 18, .62); padding: 6px 14px; border-radius: 2px; white-space: nowrap; }
.hud-hint:empty { display: none; }
.hud-defuse { position: absolute; left: 50%; top: calc(50% + 44px); width: 240px; height: 8px; margin-left: -120px; background: rgba(22, 22, 18, .55); opacity: 0; }
.hud-defuse.on { opacity: 1; }
.hud-defuse i { display: block; height: 100%; background: #FF8B52; transform: scaleX(0); transform-origin: left; }
.hud-hp, .hud-ammo { position: absolute; bottom: 18px; display: flex; align-items: baseline; gap: 8px; background: rgba(22, 22, 18, .5); padding: 6px 14px 4px; border-radius: 2px; }
.hud-hp { left: 18px; }
.hud-ammo { right: 18px; }
.hud-hp b, .hud-ammo b { font: 900 44px/1 var(--display); }
.hud-hp span, .hud-ammo span { font: 400 15px var(--type); opacity: .85; }
.hud-ammo em { font-style: normal; font-weight: 600; font-size: 14px; margin-left: 6px; opacity: .85; }
.hud-hp.low b { color: #FF9A7A; }
.hud-hurt { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 120px 30px rgba(170, 30, 20, .7); }
.hud-white { position: absolute; inset: 0; background: #FFF4E2; opacity: 0; }
.hud-white.on { animation: white 1.4s ease-out forwards; }
@keyframes white { 0% { opacity: 1; } 100% { opacity: .15; } }
.hud-pause { position: absolute; inset: 0; background: rgba(16, 16, 12, .62); display: grid; place-items: center; pointer-events: auto; z-index: 5; padding: 16px; }
.hud-pause-card { background: var(--ink); border: 1px solid rgba(232, 222, 200, .25); padding: 24px; width: min(360px, 100%); display: flex; flex-direction: column; gap: 14px; }
.hud-pause-t { margin: 0; font: 900 52px/.9 var(--display); text-transform: uppercase; }
.hud-pause-s { margin: 0; font-size: 15px; opacity: .8; }
.hud-pause-b { display: flex; flex-wrap: wrap; gap: 10px; }
.sens { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.sens input { accent-color: #FF8B52; }
.mute { display: flex; align-items: center; gap: 8px; font-size: 14px; }

/* touch controls */
.touch { position: absolute; inset: 0; pointer-events: none; }
.touch-move, .touch-look { position: absolute; bottom: 0; pointer-events: auto; touch-action: none; }
.touch-move { left: 0; width: 45%; height: 70%; }
.touch-look { right: 0; top: 0; width: 55%; height: 100%; }
.stick { position: absolute; width: 108px; height: 108px; margin: -54px 0 0 -54px; border-radius: 50%; border: 2px solid rgba(244, 236, 219, .5); opacity: 0; pointer-events: none; }
.stick.on { opacity: 1; }
.stick i { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: rgba(244, 236, 219, .55); }
.tb { position: absolute; pointer-events: auto; touch-action: none; border-radius: 50%; border: 2px solid rgba(244, 236, 219, .6); background: rgba(22, 22, 18, .38); color: #F4ECDB; font: 700 13px var(--text); -webkit-tap-highlight-color: transparent; }
.tb.on { background: rgba(244, 236, 219, .35); }
.tb-fire { right: 22px; bottom: 92px; width: 88px; height: 88px; font-size: 15px; }
.tb-reload { right: 122px; bottom: 54px; width: 60px; height: 60px; }
.tb-swap { right: 122px; bottom: 128px; width: 60px; height: 60px; }
.tb-scope { right: 34px; bottom: 196px; width: 60px; height: 60px; }
.tb-defuse { left: 50%; bottom: 96px; width: 190px; height: 54px; margin-left: -95px; border-radius: 2px; background: rgba(217, 84, 30, .55); border-color: #FF8B52; }
.tb-pause { right: 14px; top: 14px; width: 44px; height: 44px; font-size: 14px; }
@media (pointer: coarse) {
  .hud-hp { bottom: auto; top: 58px; left: 14px; }
  .hud-ammo { bottom: auto; top: 58px; right: 70px; }
  .hud-hp b, .hud-ammo b { font-size: 30px; }
  .hud-fuse b { font-size: 30px; }
  .hud-foes { top: 18px; left: 14px; }
  .hud-hint { bottom: 168px; white-space: normal; text-align: center; max-width: 80vw; }
}

/* ---------- not found ---------- */
.lost { max-width: var(--max); margin: 0 auto; padding: clamp(48px, 8vw, 120px) var(--gutter); display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.lost-mark svg { width: 120px; height: 120px; color: var(--ink); }

/* ---------- smaller screens ---------- */
@media (max-width: 960px) {
  .gate { grid-template-columns: minmax(0, 1fr); }
  .plan { transform: none; }
  .lo-grid { grid-template-columns: minmax(0, 1fr); }
  .lo-stage { position: static; max-width: 420px; }
  .links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
  .picks { grid-template-columns: minmax(0, 1fr); }
  .coin { grid-template-columns: minmax(0, 1fr); }
  .coin-mark svg { width: 110px; }
  .panel { left: 12px; right: 12px; width: auto; top: auto; bottom: 12px; transform: none; max-height: calc(100% - 24px); }
}
@media (max-width: 560px) {
  :root { --top: 58px; }
  .brand-word { display: none; }
  .nav a[data-nav="/"] { display: none; }
  .nav { gap: 18px; }
  .picks-2 { grid-template-columns: minmax(0, 1fr); }
  .links { grid-template-columns: minmax(0, 1fr); }
  .plan-key { grid-template-columns: minmax(0, 1fr); }
  .plan { padding: 10px 10px 8px; }
  .ca-row { flex-direction: column; gap: 2px; }
  .keylist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg span { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
