/* Pack Battle v3: the arena split. One field (rhodamine magenta), one silver crimp seam down the middle of the page,
   side A orange / side B aqua. Flat colour, no glow, no blur; metal is the only 2-stop gradient. */
@font-face { font-family: "Anybody"; font-style: italic; font-weight: 700 900; font-stretch: 100% 150%; font-display: swap; src: url(/assets/fonts/anybody-it.woff2) format("woff2"); }
@font-face { font-family: "Anybody"; font-style: normal; font-weight: 700 800; font-stretch: 100% 125%; font-display: swap; src: url(/assets/fonts/anybody-up.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 800; font-display: swap; src: url(/assets/fonts/hanken-s.woff2) format("woff2"); }
@font-face { font-family: "Red Hat Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(/assets/fonts/mono-s.woff2) format("woff2"); }

:root {
  --field: #14202E; --field-lo: #0D1620; --field-hi: #1C2B3D; --ink: #0A0F16; --chalk: #F4F6FA; --volt-acc: #FFD23F;
  --flare: #FF7A1F; --flare-deep: #C2410C; --surf: #3B8BFF; --surf-deep: #1A4FA8; --volt: #FFD23F; --leaf: #3FC56B;
  --silver: #DCE1E8; --silver-d: #9BA5B3;
  --chalk-2: rgb(244 246 250 / .72); --chalk-3: rgb(244 246 250 / .45);
  --disp: "Anybody", "Hanken Grotesk", system-ui, sans-serif; --ui: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Red Hat Mono", ui-monospace, Menlo, Consolas, monospace;
  --gut: clamp(16px, 3.4vw, 48px); --max: 1240px; --seam: 28px;
  --e-out: cubic-bezier(.16, 1, .3, 1); --e-in-out: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ink); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--field); color: var(--chalk); font: 400 16px/1.5 var(--ui); font-variant-numeric: tabular-nums; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }
a, button, [role=button], [onclick], summary, label, .ca, .mach, .opt, .lot, .mm, .pc { cursor: pointer; }
.rail { cursor: grab; }
:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--chalk); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-weight: 500; overflow-wrap: anywhere; }
[hidden] { display: none !important; }

/* one continuous field: lightness drifts down the page, no bands */
.bgfield { position: fixed; inset: 0; background: var(--field); z-index: -1; }
.bgfield i { position: absolute; inset: 0; background: var(--field-lo); opacity: var(--p, 0); }

/* metal seam (the crimp): silver 2-stop + ridges, teeth on both long edges */
.seam, .pseam, .mseam {
  position: absolute; width: var(--seam); margin-left: calc(var(--seam) / -2);
  background: repeating-linear-gradient(0deg, rgb(10 15 22 / .16) 0 2px, transparent 2px 7px), linear-gradient(90deg, var(--silver), var(--silver-d));
  -webkit-mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 14px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 14px repeat-y;
          mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 14px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 14px repeat-y;
}

/* ------------------------------------------------------------ header */
.bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 var(--gut); transition: background-color .25s; }
.bar.solid { background: var(--field-lo); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.mark img { width: 32px; height: 32px; border-radius: 50%; }
.mark span { font: 800 14px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.nav { display: flex; gap: 22px; }
.nav a { font: 800 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: 14px 0; color: var(--chalk-2); transition: color .2s; }
.nav a:hover { color: var(--chalk); }
.bar-act { margin-left: auto; display: flex; align-items: center; gap: 18px; min-width: 0; }
.tick { font: 800 13px/1 var(--ui); letter-spacing: .06em; }
.wallet { height: 40px; padding: 0 16px; background: var(--ink); color: var(--chalk); font: 800 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; border-radius: 2px; flex: none; transition: transform .15s; }
.wallet:hover { transform: translateY(-1px); }
.wallet.on { font: 500 13px/1 var(--mono); letter-spacing: 0; text-transform: none; }

/* secondary: chalk text, zigzag underline drawn on hover */
.ulink { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; min-height: 40px; position: relative; font: 800 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; padding: 14px 0; color: var(--chalk); white-space: nowrap; }
.ulink::after { content: ""; position: absolute; left: 0; right: 0; bottom: 8px; height: 5px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--e-out);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 8px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 0 0 / 8px 100%; }
.ulink:hover::after, .ulink:focus-visible::after { transform: scaleX(1); }
.ulink:disabled { color: var(--chalk-3); cursor: default; }
.ulink:disabled::after { display: none; }

/* CA: always full */
.ca { display: inline-flex; align-items: center; min-height: 40px; gap: 10px; min-width: 0; max-width: 100%; }
.ca .lab { font: 800 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-2); flex: none; }
.ca .addr { font: 500 14px/1.35 var(--mono); overflow-wrap: anywhere; }
.ca:not(.unset):hover .addr { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ca.copied .lab { color: var(--chalk); }
.bar-ca .addr { font-size: 13px; }

/* primary: the crimp button. Chalk body, serrated top + bottom; hover lifts the top strip (the tear starts) */
.crimp { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 58px; padding: 0 30px; color: var(--ink); text-decoration: none; isolation: isolate; transition: transform .12s; }
.crimp::before, .crimp::after { content: ""; position: absolute; left: 0; right: 0; z-index: -1; }
.crimp::after { top: 9px; bottom: 0; background: linear-gradient(var(--ink) 0 5px, var(--chalk) 5px);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 100% repeat-x; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 16px 100% repeat-x; }
.crimp::before { top: 0; height: 14px; background: var(--chalk); transform-origin: 0 100%; transition: transform .28s var(--e-out);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 100% repeat-x; mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 16px 100% repeat-x; }
.crimp span { position: relative; font: 900 italic 19px/1 var(--disp); font-stretch: 120%; letter-spacing: -.005em; text-transform: uppercase; padding-top: 6px; white-space: nowrap; }
.crimp:hover::before, .crimp:focus-visible::before { transform: translateY(-5px) rotate(-3deg); }
.crimp:active { transform: scaleY(.96); }
.crimp:disabled { cursor: default; opacity: .45; filter: grayscale(1); }
.crimp:disabled::before { transform: none; }
.crimp.wide { width: 100%; }
.crimp.side-a { --c: var(--flare); } .crimp.side-b { --c: var(--surf); } .crimp.side-c { --c: var(--volt); } .crimp.side-d { --c: var(--leaf); }
.crimp[class*=side-]::after { background: linear-gradient(var(--ink) 0 5px, var(--c) 5px); }
.crimp[class*=side-]::before { background: var(--c); }

/* ------------------------------------------------------------ arena (hero) */
.arena { position: relative; height: 100vh; height: 100svh; min-height: 640px; max-height: 1300px; display: grid; grid-template-rows: 64px auto minmax(0, 1fr) auto; overflow: hidden; isolation: isolate; }
.arena > * { grid-column: 1; min-width: 0; }
.rays { position: absolute; inset: 0; z-index: -2; background: repeating-conic-gradient(from 0deg at 50% 46%, rgb(244 246 250 / .04) 0 9deg, transparent 9deg 18deg); }
.cols { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); z-index: -1; }
.arena[data-n="3"] { --n: 3; } .arena[data-n="4"] { --n: 4; }
.col { position: relative; overflow: hidden; }
.col .flood, .hc .flood { position: absolute; inset: 0; background: linear-gradient(var(--dir, 270deg), color-mix(in srgb, var(--c) 46%, transparent), color-mix(in srgb, var(--c) 14%, transparent) 55%, transparent 92%); box-shadow: inset var(--edge, -4px) 0 0 var(--c); transform: scaleX(0); transition: transform .38s var(--e-out); }
.col:nth-child(2), .hc:nth-child(2) { --dir: 90deg; --edge: 4px; }
.col .dim, .hc .dim { position: absolute; inset: 0; background: #05080C; opacity: 0; transition: opacity .38s; }
.col:nth-child(1), .hc:nth-child(1) { --c: var(--flare); } .col:nth-child(2), .hc:nth-child(2) { --c: var(--surf); } .col:nth-child(3) { --c: var(--volt); } .col:nth-child(4) { --c: var(--leaf); }
.col .flood { transform-origin: 100% 50%; }
.arena[data-n="2"] .col:nth-child(2) .flood, .hc:nth-child(2) .flood { transform-origin: 0 50%; }
.arena[data-n="3"] .col:nth-child(2) .flood, .arena[data-n="4"] .col:nth-child(n+3) .flood { transform-origin: 50% 50%; }
.hc:nth-child(1) .flood { transform-origin: 100% 50%; }
.col.win .flood, .hc.win .flood { transform: scaleX(1); }
.col.split .flood, .hc.split .flood { transform: scaleX(.5); }
.col.lose .dim, .hc.lose .dim { opacity: .4; }
.stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
.arena > .stage { grid-row: 3; position: relative; height: 100%; z-index: 1; }
.seams { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.seams .seam { top: 0; bottom: 0; }
.name { grid-row: 2; position: relative; z-index: 3; margin: 6px 0 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(var(--seam) + 2.2vw); font: 900 italic min(7.2vw, 160px)/.9 var(--disp); font-stretch: 140%; letter-spacing: -.02em; text-transform: uppercase; pointer-events: none; padding: 0 var(--gut); }
.name .h-l, .split .h-l, .end-name .h-l { text-align: right; }
.name span, .split span { display: block; white-space: nowrap; }
.mid { position: absolute; z-index: 4; left: 50%; top: 52%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 12px; pointer-events: none; }
.vs { font: 900 italic 28px/1 var(--disp); font-stretch: 120%; color: var(--ink); background: repeating-linear-gradient(0deg, rgb(10 15 22 / .12) 0 2px, transparent 2px 7px), linear-gradient(90deg, var(--silver), var(--silver-d)); padding: 14px 16px 12px; -webkit-mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 10px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 10px repeat-y; mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 10px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 10px repeat-y; }
.pot { position: absolute; left: 50%; top: calc(100% + 12px); translate: -50% 0; margin: 0; background: var(--ink); color: var(--chalk); padding: 9px 14px 8px; display: grid; justify-items: center; gap: 3px; transition: transform .6s var(--e-in-out); min-width: 96px; }
.pot .lab { font: 800 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-2); }
.pot .num, .how-pot .num { color: var(--volt-acc); }
.pot .num { font: 800 clamp(22px, 2.4vw, 34px)/1 var(--disp); font-stretch: 100%; }
.arena[data-n="3"] .vs, .arena[data-n="4"] .vs { display: none; }
.vals { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); pointer-events: none; }
.arena > .vals { grid-row: 3; position: relative; align-self: end; }
.val { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 12px 2vh; opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .5s var(--e-out); }
.val.show { opacity: 1; transform: none; }
.val.win .odo { color: var(--c); }
.val:nth-child(1) { --c: var(--flare); } .val:nth-child(2) { --c: var(--surf); } .val:nth-child(3) { --c: var(--volt); } .val:nth-child(4) { --c: var(--leaf); }
.val .cap { margin: 4px 0 0; font: 600 14px/1.3 var(--ui); color: var(--chalk-2); max-width: 32ch; }
.val.lose .odo, .val.lose .cap { color: var(--chalk-3); }
.stamp { order: -1; display: block; margin-bottom: 10px; font: 900 italic clamp(22px, 2.4vw, 38px)/1 var(--disp); font-stretch: 120%; text-transform: uppercase; color: var(--ink); background: linear-gradient(90deg, var(--silver), var(--silver-d)); padding: 12px 18px 10px; -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 12px 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 51% repeat-x; mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 12px 51% repeat-x, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 51% repeat-x; transform: scale(1.15); opacity: 0; transition: transform .16s var(--e-out), opacity .1s; }
.val.win .stamp { opacity: 1; transform: none; }
.val.split .stamp { opacity: 1; transform: none; }
/* per-digit odometer: each digit its own fixed column */
.odo { margin: 0; display: flex; justify-content: center; font: 800 clamp(40px, 5.6vw, 104px)/1 var(--disp); font-stretch: 100%; height: 1em; overflow: hidden; }
.odo .d { display: block; width: .64em; height: 1em; overflow: hidden; }
.odo .d i { display: block; font-style: normal; transform: translateY(calc(var(--v, 0) * -1em)); transition: transform .9s cubic-bezier(.19, 1, .22, 1); transition-delay: var(--dl, 0ms); }
.odo .d i b { display: block; height: 1em; font-weight: inherit; text-align: center; }
.odo .s { display: block; width: .34em; text-align: center; }
.odo .s.sym { width: .62em; }
.arena-foot { grid-row: 4; position: relative; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px 24px; padding: 14px var(--gut) 22px; }
.arena-foot .line { margin: 0; max-width: 34ch; font: 600 16px/1.4 var(--ui); justify-self: start; }
.arena-foot .acts { display: flex; align-items: center; gap: 22px; justify-self: center; }
.demo { margin: 0; justify-self: end; text-align: right; font: 800 11px/1.45 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-2); max-width: 34ch; }
.foot-ca { display: none; }
.fallback { grid-row: 3; position: relative; z-index: 1; display: grid; grid-template-columns: repeat(var(--n, 2), 1fr); align-items: center; justify-items: center; padding: 1vh 0 22vh; }
.fallback img { height: min(40vh, 360px); width: auto; aspect-ratio: .6; object-fit: contain; transform: perspective(900px) rotateY(var(--ry, 0deg)); }
.fallback img:nth-child(1) { --ry: 8deg; } .fallback img:nth-child(2) { --ry: -8deg; }

/* ------------------------------------------------------------ the page under the arena: one seam all the way down */
.page { position: relative; }
.pseam { left: 50%; top: 0; bottom: 120px; z-index: 0; }
.page > section { position: relative; z-index: 1; }
.split { margin: 0 0 clamp(26px, 4vw, 52px); display: grid; grid-template-columns: 1fr 1fr; column-gap: calc(var(--seam) + 2vw); font: 800 clamp(34px, 6.4vw, 92px)/.92 var(--disp); font-stretch: 125%; letter-spacing: -.015em; text-transform: uppercase; }
.sub { margin: 0; max-width: 46ch; font: 400 16px/1.5 var(--ui); color: var(--chalk-2); }
h3 { margin: 0; font: 800 12px/1.2 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.empty { margin: 0; padding: 26px; font: 600 16px/1.45 var(--ui); color: var(--chalk-2); text-align: center; }

/* lobby */
.lobby { padding: clamp(80px, 11vw, 150px) var(--gut) clamp(60px, 8vw, 110px); }
.lobby-top { max-width: var(--max); margin: 0 auto 26px; display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px 30px; }
.lots { max-width: var(--max); margin: 0 auto; display: grid; gap: 12px; }
.lots .empty { background: var(--field-hi); background-image: radial-gradient(rgb(244 246 250 / .05) 1.2px, transparent 1.4px); background-size: 9px 9px; }
.lot { display: grid; grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) minmax(140px, 180px); align-items: stretch; background: var(--field-hi); background-image: radial-gradient(rgb(244 246 250 / .045) 1.2px, transparent 1.4px); background-size: 9px 9px; text-decoration: none; transition: transform .2s var(--e-out); }
.lot:hover { transform: translateY(-2px); }
.lot .lm { display: flex; align-items: center; gap: 12px; padding: 14px; }
.lot .lm img { width: 64px; height: 64px; object-fit: contain; flex: none; }
.lot .lm b { display: block; font: 800 15px/1.2 var(--ui); }
.lot .lm .px { font: 800 22px/1.1 var(--disp); font-stretch: 100%; }
.lot .ls { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; }
.lot .seat { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 18px; min-width: 0; }
.lot .seat + .seat::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 10px; margin-left: -5px; background: linear-gradient(90deg, var(--silver), var(--silver-d));
  -webkit-mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 8px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 8px repeat-y; mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 8px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 8px repeat-y; }
.lot .seat svg { width: 30px; height: 46px; flex: none; }
.lot .seat .w { font: 500 13px/1.35 var(--mono); overflow-wrap: anywhere; min-width: 0; }
.lot .seat.open .w { font: 900 italic 20px/1 var(--disp); font-stretch: 120%; text-transform: uppercase; }
.lot .lr { display: grid; align-content: center; justify-items: end; gap: 4px; padding: 14px 18px; text-align: right; }
.lot .lr b { font: 800 22px/1 var(--disp); font-stretch: 100%; }
.lot .lr span { font: 800 11px/1.3 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-2); }
.mach-wrap { max-width: var(--max); margin: clamp(46px, 6vw, 80px) auto 0; }
.mach-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; margin-bottom: 16px; }
.mach-head p { margin: 0; font: 400 15px/1.45 var(--ui); color: var(--chalk-2); }
.rail-wrap { position: relative; }
.rail { display: flex; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--chalk-3) transparent; padding: 0 0 14px; margin: 0; list-style: none; scroll-snap-type: x proximity; }
.rail.drag { scroll-snap-type: none; cursor: grabbing; }
.rail > * { flex: none; scroll-snap-align: start; }
.machines { min-height: 290px; }
.machines li { display: flex; }
.mach { width: 196px; display: grid; grid-template-rows: auto auto; text-align: left; background: var(--field-hi); padding: 12px 14px 14px; transition: transform .2s var(--e-out); }
.mach:hover { transform: translateY(-3px); }
.mach .mi { height: 150px; display: grid; place-items: center; }
.mach .mi img { width: 140px; height: 140px; object-fit: contain; }
.mach .mn { display: block; margin-top: 8px; font: 800 15px/1.2 var(--ui); }
.mach .mp { display: block; font: 800 26px/1.1 var(--disp); font-stretch: 100%; }
.mach .mm2 { display: block; margin-top: 4px; font: 600 12px/1.35 var(--ui); color: var(--chalk-2); }
.mach.closed { opacity: .55; }
.m-wait { padding: 26px; font: 600 15px/1.4 var(--ui); color: var(--chalk-2); }

/* how */
.how { height: 420vh; }
.how-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; padding: 78px var(--gut) 26px; overflow: hidden; }
.how .split { margin-bottom: 8px; }
.how-stage { position: relative; min-height: 0; }
.how-cols { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--seam); z-index: -1; }
.hc { position: relative; overflow: hidden; }
.hc .ring { position: absolute; left: 50%; top: 50%; width: min(44vh, 80%); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 3px solid var(--chalk); opacity: 0; clip-path: inset(0 0 0 0); }
.hc .chip { position: absolute; left: 50%; top: 8%; transform: translateX(-50%); background: var(--ink); color: var(--chalk); font: 800 20px/1 var(--disp); font-stretch: 100%; padding: 8px 12px 6px; }
.hc .hv { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); font: 800 clamp(30px, 4vw, 64px)/1 var(--disp); font-stretch: 100%; opacity: 0; }
.hc.lose .hv { color: var(--chalk-3); }
.how-pot { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); margin: 0; background: var(--ink); padding: 9px 14px 8px; display: grid; justify-items: center; gap: 3px; z-index: 3; }
.how-pot .lab { font: 800 11px/1 var(--ui); letter-spacing: .12em; text-transform: uppercase; color: var(--chalk-2); }
.how-pot .num { font: 800 clamp(22px, 2.4vw, 34px)/1 var(--disp); font-stretch: 100%; }
.how-steps { position: relative; list-style: none; margin: 14px auto 0; padding: 0; width: 100%; max-width: 760px; height: 4.6em; font: 600 clamp(17px, 1.6vw, 22px)/1.35 var(--ui); }
.how-steps li { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; gap: 16px; text-align: left; opacity: 0; transform: translateY(14px); transition: opacity .3s, transform .45s var(--e-out); }
.how-steps li.on { opacity: 1; transform: none; }
.how-steps b { flex: none; display: grid; place-items: center; width: 40px; height: 40px; background: var(--chalk); color: var(--ink); font: 900 italic 22px/1 var(--disp); font-stretch: 120%; }
.how-note { margin: 4px auto 0; font: 400 13px/1.4 var(--ui); color: var(--chalk-2); text-align: center; }

/* results */
.results { padding: clamp(80px, 10vw, 140px) var(--gut) clamp(40px, 6vw, 80px); }
.results > .rail-wrap, .tops, .pulls { max-width: var(--max); margin-left: auto; margin-right: auto; }
.settled .empty, .board .empty { width: 100%; background: var(--field-hi); }
.mm { width: 320px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto auto; text-decoration: none; background: var(--field-hi); transition: transform .2s var(--e-out); position: relative; }
.mm:hover { transform: translateY(-3px); }
.mm .h { position: relative; padding: 12px 10px 10px; display: grid; justify-items: center; gap: 8px; }
.mm .h.win { background: linear-gradient(0deg, color-mix(in srgb, var(--c) 40%, transparent), transparent); box-shadow: inset 0 -3px 0 var(--c); }
.mm .h.win b { color: var(--c); }
.mm .h:nth-child(1) { --c: var(--flare); } .mm .h:nth-child(2) { --c: var(--surf); }
.mm .h.lose img { filter: saturate(.35); }
.mm .h img { width: 112px; height: 186px; object-fit: contain; }
.mm .h b { font: 800 22px/1 var(--disp); font-stretch: 100%; }
.mm .h.lose b { color: var(--chalk-3); }
.mm .h + .h::before { content: ""; position: absolute; left: -5px; top: 0; bottom: 0; width: 10px; background: linear-gradient(90deg, var(--silver), var(--silver-d)); z-index: 1;
  -webkit-mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 8px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 8px repeat-y; mask: conic-gradient(from 45deg at left, #0000, #000 1deg 89deg, #0000 90deg) left / 51% 8px repeat-y, conic-gradient(from -135deg at right, #0000, #000 1deg 89deg, #0000 90deg) right / 51% 8px repeat-y; }
.mm .f { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px 12px; font: 600 13px/1.35 var(--ui); color: var(--chalk-2); }
.mm .f a { color: var(--chalk); display: inline-block; padding: 8px 4px; margin: -8px 0; }
.tops { margin-top: clamp(50px, 6vw, 80px); }
.tops h3 { margin-bottom: 14px; }
.board { background: var(--chalk); color: var(--ink); }
.board table { width: 100%; border-collapse: collapse; }
.board th { font: 800 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; text-align: left; padding: 16px 16px 12px; color: rgb(10 15 22 / .6); }
.board td { padding: 12px 16px; border-top: 1px solid rgb(10 15 22 / .12); font: 600 15px/1.3 var(--ui); vertical-align: middle; }
.board td.w { font: 500 14px/1.35 var(--mono); overflow-wrap: anywhere; }
.board td.w span { display: flex; align-items: center; gap: 12px; }
.board td.w img { width: 34px; height: 56px; object-fit: contain; flex: none; }
.board td.n, .board th.n { text-align: right; white-space: nowrap; }
.board .rk { font: 900 italic 18px/1 var(--disp); font-stretch: 120%; width: 1%; }
.pulls { margin-top: clamp(50px, 6vw, 80px); }
.pc { width: 150px; display: grid; gap: 4px; text-decoration: none; padding: 10px; background: var(--field-hi); transition: transform .2s var(--e-out); }
.pc:hover { transform: translateY(-3px); }
.pc .im img { width: 130px; height: 200px; object-fit: contain; margin: 0 auto 4px; }
.pc .v { font: 800 20px/1 var(--disp); font-stretch: 100%; }
.pc .n { font: 600 13px/1.3 var(--ui); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc .m { font: 600 12px/1.3 var(--ui); color: var(--chalk-2); }

/* ending: the seam zips shut */
.end { position: relative; overflow: clip; padding: clamp(100px, 14vw, 200px) var(--gut) 90px; display: grid; justify-items: center; gap: 26px; text-align: center; }
.end-name { overflow: clip; margin: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: .18em; width: 100%; font: 900 italic min(6.6vw, 150px)/.86 var(--disp); font-stretch: 140%; letter-spacing: -.02em; text-transform: uppercase; }
.end-name span { display: block; white-space: nowrap; }
.end-name .h-l { transform: translateX(calc(var(--z, 0) * -1px)); text-align: right; }
.end-name .h-r { transform: translateX(calc(var(--z, 0) * 1px)); text-align: left; }
.end-ca { justify-content: center; max-width: 560px; }
.end-acts { display: flex; gap: 26px; justify-content: center; }
.fine { margin: 10px 0 0; max-width: 60ch; font: 400 13px/1.5 var(--ui); color: var(--chalk-2); }
.end::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 14px; background: var(--ink);
  -webkit-mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 22px 100% repeat-x; mask: conic-gradient(from 135deg at top, #0000, #000 1deg 89deg, #0000 90deg) top / 22px 100% repeat-x; }

/* ------------------------------------------------------------ sheet */
.sheet { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; }
.sheet-bg { position: absolute; inset: 0; background: rgb(10 15 22 / .72); }
.sheet-in { position: relative; width: min(680px, 100%); max-height: calc(100svh - 32px); overflow: auto; background: var(--field-hi); padding: 30px clamp(18px, 4vw, 34px) 26px; overscroll-behavior: contain; }
.sheet-in h2 { margin: 0 0 18px; font: 900 italic clamp(30px, 4vw, 44px)/1 var(--disp); font-stretch: 125%; text-transform: uppercase; }
.x { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; display: grid; place-items: center; font: 400 30px/1 var(--ui); }
.x:hover { color: var(--ink); }
.f-lab { display: block; margin: 16px 0 8px; font: 800 12px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-2); }
.pick { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; overscroll-behavior-x: contain; }
.opt { flex: none; width: 128px; display: grid; justify-items: start; gap: 2px; padding: 8px 10px 10px; background: var(--field); text-align: left; transition: transform .15s; position: relative; }
.opt img { width: 104px; height: 90px; object-fit: contain; justify-self: center; }
.opt .on { font: 800 13px/1.2 var(--ui); }
.opt .op { font: 800 18px/1 var(--disp); font-stretch: 100%; }
.opt[aria-selected=true] { background: var(--chalk); color: var(--ink); }
.opt:hover { transform: translateY(-2px); }
.f-row { display: grid; grid-template-columns: auto 1fr; gap: 0 34px; align-items: start; }
.seats { display: flex; gap: 8px; }
.seats button { height: 56px; padding: 0 12px; display: flex; align-items: center; gap: 3px; background: var(--field); }
.seats button i { width: 12px; height: 22px; border: 2px solid var(--chalk-3); border-radius: 1px; }
.seats button span { margin-left: 8px; font: 800 20px/1 var(--disp); font-stretch: 100%; }
.seats button[aria-checked=true] { background: var(--ink); }
.seats button[aria-checked=true] i { border: 0; }
.seats button[aria-checked=true] i:nth-child(1) { background: var(--flare); } .seats button[aria-checked=true] i:nth-child(2) { background: var(--surf); }
.seats button[aria-checked=true] i:nth-child(3) { background: var(--volt); } .seats button[aria-checked=true] i:nth-child(4) { background: var(--leaf); }
.stake { margin: 0; font: 800 44px/1.1 var(--disp); font-stretch: 100%; }
.f-in { width: 100%; height: 50px; padding: 0 14px 6px; background: var(--field); color: var(--chalk); border: 0; font: 500 14px/1 var(--mono); outline: none;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 100% repeat-x; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 12px 100% repeat-x; }
.f-in::placeholder { color: var(--chalk-3); }
.f-in:focus { background: var(--field-lo); }
.f-note { margin: 14px 0 18px; font: 400 14px/1.45 var(--ui); color: var(--chalk-2); min-height: 1.45em; }
.f-err { margin: 12px 0 0; min-height: 1.4em; font: 600 14px/1.4 var(--ui); overflow-wrap: anywhere; }

/* wallet picker (kit) */
dialog.wpick { background: var(--field-hi) !important; color: var(--chalk) !important; border: 0 !important; border-radius: 0 !important; }
dialog.wpick::backdrop { background: rgb(10 15 22 / .72); }

/* ------------------------------------------------------------ battle room (/b/<id>) */
body.is-room .arena-foot, body.is-room #replay { display: none; }
body.is-room .arena { height: auto; max-height: none; grid-template-rows: 64px auto minmax(560px, 72svh) auto; }
body.is-room .name { font-size: min(5.4vw, 92px); }
.room { display: contents; }
.room > * { grid-column: 1; position: relative; z-index: 5; min-width: 0; }
.r-top { grid-row: 3; align-self: start; display: grid; justify-items: center; gap: 4px; padding: 6px var(--gut) 0; text-align: center; pointer-events: none; }
.r-title { margin: 0; font: 800 12px/1.2 var(--ui); letter-spacing: .12em; text-transform: uppercase; }
.r-title, .r-phase { background: var(--ink); padding: 5px 9px 4px; }
.r-phase { margin: 0; font: 600 14px/1.35 var(--ui); color: var(--chalk); max-width: 46ch; }
.r-seats { grid-row: 3; align-self: stretch; list-style: none; margin: 0; padding: 70px 0 0; display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); min-height: 0; pointer-events: none; }
.r-seat { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center; text-align: center; padding: 10px 14px 8px; min-width: 0; }
.r-seat .rw { display: inline-block; font: 500 13px/1.35 var(--mono); overflow-wrap: anywhere; max-width: 30ch; background: var(--ink); padding: 4px 8px 3px; }
.r-seat .rt { display: flex; gap: 8px; justify-content: center; margin-top: 4px; }
.r-seat .tag { font: 800 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; background: var(--ink); color: var(--chalk); padding: 5px 7px 4px; }
.r-seat .tag.ok { background: var(--chalk); color: var(--ink); }
.r-seat .rb { display: grid; justify-items: center; gap: 2px; }
body:not(.no-gl) .r-seat .rb { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.r-seat [data-card] { font: 600 14px/1.3 var(--ui); color: var(--chalk-2); }
.r-seat [data-card] img { display: none; }
body.no-gl .r-seat [data-card] img { display: block; width: min(180px, 70%); height: auto; aspect-ratio: .6; object-fit: contain; margin: 0 auto 8px; }
.r-seat [data-value] { font: 800 clamp(34px, 4.6vw, 80px)/1 var(--disp); font-stretch: 100%; opacity: 0; transition: opacity .3s; }
body.rv-done .r-seat [data-value], body.no-gl .r-seat [data-value] { opacity: 1; }
.r-seat.lose [data-value] { color: var(--chalk-3); }
.r-seat.empty-seat .rw { font: 900 italic 22px/1 var(--disp); font-stretch: 120%; text-transform: uppercase; }
.r-bar { grid-row: 4; display: grid; justify-items: center; gap: 10px; padding: 8px var(--gut) 18px; text-align: center; }
.r-bar .r-pot { margin: 0; font: 600 14px/1.4 var(--ui); color: var(--chalk-2); }
.r-bar .f-err { margin: 0; min-height: 1.4em; max-width: 60ch; }
.r-bar .r-small { margin: 0; font: 600 12px/1.45 var(--ui); color: var(--chalk-2); max-width: 90ch; overflow-wrap: anywhere; }
.r-bar .r-small a { color: var(--chalk); }
.r-hold { position: relative; }
.r-hold .rg { position: absolute; left: -6px; top: -6px; width: calc(100% + 12px); height: calc(100% + 12px); pointer-events: none; overflow: visible; }
.r-hold .rg rect { fill: none; stroke: var(--chalk); stroke-width: 3; stroke-dasharray: var(--len) var(--len); stroke-dashoffset: var(--len); }
.r-hold.holding .rg rect { stroke-dashoffset: 0; transition: stroke-dashoffset .8s linear; }
.room-gone { grid-row: 3 / 5; grid-column: 1; position: relative; z-index: 5; display: grid; place-content: center; justify-items: center; gap: 12px; text-align: center; padding: 0 var(--gut); }
.room-gone p { margin: 0; }

/* ------------------------------------------------------------ cursor ring: silver serrated */
.cur { position: fixed; left: 0; top: 0; z-index: 80; width: 22px; height: 22px; margin: -11px 0 0 -11px; pointer-events: none; display: none; place-items: center; transition: width .2s, height .2s, margin .2s; }
.cur::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: repeating-conic-gradient(var(--silver) 0 10deg, var(--silver-d) 10deg 20deg);
  -webkit-mask: radial-gradient(closest-side, #0000 calc(100% - 4px), #000 calc(100% - 3.5px)); mask: radial-gradient(closest-side, #0000 calc(100% - 4px), #000 calc(100% - 3.5px)); }
.cur span { font: 900 italic 11px/1 var(--disp); font-stretch: 120%; color: var(--ink); opacity: 0; }
.cur.on { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cur.on::before { background: var(--chalk); -webkit-mask: none; mask: none; }
.cur.on span { opacity: 1; }
@media (hover: hover) and (pointer: fine) { .cur { display: grid; } }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--ink); color: var(--chalk); padding: 12px 18px; font: 600 14px/1.3 var(--ui); max-width: calc(100% - 32px); }

/* line mask reveal (once) */
.rv { clip-path: inset(0 0 100% 0); transform: translateY(18px); transition: clip-path .5s var(--e-out), transform .5s var(--e-out); }
.rv.in { clip-path: inset(0 0 -10% 0); transform: none; }

/* ------------------------------------------------------------ docs + 404 */
body.docs .bar { background: var(--field-lo); }
.doc { max-width: 820px; margin: 0 auto; padding: 120px var(--gut) 100px; position: relative; z-index: 1; }
.doc h1 { margin: 0 0 18px; font: 900 italic clamp(48px, 8vw, 110px)/.9 var(--disp); font-stretch: 140%; text-transform: uppercase; }
.doc .lead { font: 600 19px/1.5 var(--ui); margin: 0 0 40px; max-width: 52ch; }
.doc h2 { margin: 52px 0 16px; font: 800 clamp(26px, 3.4vw, 40px)/1 var(--disp); font-stretch: 125%; text-transform: uppercase; }
.doc ol, .doc ul { padding-left: 1.2em; margin: 0; display: grid; gap: 12px; font: 400 16px/1.55 var(--ui); }
.doc li b { font-weight: 800; }
.params { width: 100%; border-collapse: collapse; background: var(--chalk); color: var(--ink); }
.params th, .params td { text-align: left; vertical-align: top; padding: 13px 16px; border-top: 1px solid rgb(10 15 22 / .12); font: 400 15px/1.45 var(--ui); }
.params tr:first-child th, .params tr:first-child td { border-top: 0; }
.params th { width: 34%; font-weight: 800; }
.params td.mono { font: 500 14px/1.4 var(--mono); overflow-wrap: anywhere; }
.doc .end-ca { margin: 50px 0 26px; justify-content: flex-start; }
.lost { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 22px; padding: 80px var(--gut); text-align: center; position: relative; overflow: hidden; }
.lost .rays { position: absolute; }
.lost h1 { margin: 0; font: 900 italic clamp(34px, 5.4vw, 72px)/1 var(--disp); font-stretch: 130%; text-transform: uppercase; }
.lost svg { width: min(210px, 46vw); height: auto; }
.lost-mark { position: absolute; top: 16px; left: var(--gut); }
.lost .code { margin: 0; font: 800 12px/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-2); }

/* ------------------------------------------------------------ narrow */
@media (max-width: 980px) {
  .nav { display: none; }
  .bar-ca { display: none; }
  .arena-foot { grid-template-columns: 1fr; justify-items: center; text-align: center; padding-bottom: 18px; }
  .arena-foot .line, .demo { justify-self: center; text-align: center; }
  .foot-ca { display: inline-flex; justify-content: center; }
  .lot { grid-template-columns: 1fr auto; }
  .lot .lm { grid-column: 1; }
  .lot .lr { grid-column: 2; grid-row: 1; }
  .lot .ls { grid-column: 1 / -1; border-top: 1px solid rgb(244 246 250 / .12); }
}
@media (max-width: 640px) {
  :root { --seam: 18px; }
  .bar { gap: 12px; }
  .mark span { display: none; }
  .bar-act { gap: 14px; }
  .arena { min-height: 600px; }
  .name { font-stretch: 100%; font-size: min(9.4vw, 60px); margin-top: 8px; column-gap: calc(var(--seam) + 12px); padding: 0 12px; }
  .demo { font-size: 10px; }
  .arena-foot .line { max-width: 30ch; }
  .arena-foot { gap: 10px; padding-top: 6px; }
  .arena-foot .line { font-size: 14px; }
  .arena-foot .acts { gap: 16px; }
  .crimp { min-height: 54px; padding: 0 22px; }
  .crimp span { font-size: 17px; }
  .val { padding: 0 6px 1.4vh; }
  .val .cap { font-size: 12px; }
  .odo { font-size: 34px; }
  .stamp { font-size: 20px; padding: 10px 12px 8px; margin-bottom: 8px; }
  .vs { font-size: 22px; }
  .pot { min-width: 74px; padding: 7px 10px 6px; }
  .split { font-stretch: 100%; font-size: min(8.4vw, 48px); column-gap: calc(var(--seam) + 12px); }
  .lot .seat { padding: 12px 12px; }
  .lot .seat svg { width: 22px; height: 34px; }
  .lot .seat .w { font-size: 12px; }
  .how { height: 380vh; }
  .how-pin { padding-top: 72px; }
  .how-steps { height: 6.4em; font-size: 16px; }
  .how-steps b { width: 32px; height: 32px; font-size: 18px; }
  .hc .chip { font-size: 16px; }
  .mm { width: 280px; }
  .mm .h img { width: 96px; height: 160px; }
  .board th, .board td { padding: 10px 8px; }
  .board td.w { font-size: 12px; }
  .board td.w img { display: none; }
  .board .hide-s { display: none; }
  .end-name { font-stretch: 100%; font-size: min(9.4vw, 60px); }
  .f-row { grid-template-columns: 1fr; }
  .stake { font-size: 36px; }
  .r-seat { padding: 8px 6px; }
  .r-seat .rw { font-size: 11px; }
  body.is-room .name { font-size: min(9vw, 44px); }
}
@media (max-width: 360px) {
  .wallet { padding: 0 10px; }
  .bar-act .ulink[data-pump] { display: none; }
}
@media (min-width: 2000px) {
  .arena { max-height: 1300px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .how { height: auto; }
  .how-pin { position: relative; height: auto; min-height: 100svh; }
  .how-steps { height: auto; display: grid; gap: 10px; }
  .how-steps li { position: static; opacity: 1; transform: none; justify-content: flex-start; }
  .rv { clip-path: none; transform: none; }
}
