[hidden] { display: none !important; }
:root {
  --dusk: oklch(0.24 0.045 300);
  --dusk-2: oklch(0.30 0.05 305);
  --dusk-3: oklch(0.37 0.05 310);
  --night-text: oklch(0.95 0.02 85);
  --night-mute: oklch(0.80 0.03 300);
  --plaster: oklch(0.93 0.025 88);
  --plaster-2: oklch(0.88 0.035 85);
  --plaster-shade: oklch(0.52 0.03 60);
  --ink: oklch(0.24 0.03 35);
  --ink-soft: oklch(0.40 0.035 40);
  --red: oklch(0.50 0.16 28);
  --red-deep: oklch(0.38 0.13 27);
  --red-light: oklch(0.72 0.12 30);
  --ochre: oklch(0.80 0.13 82);
  --ochre-deep: oklch(0.62 0.12 72);
  --verd: oklch(0.60 0.085 178);
  --verd-deep: oklch(0.42 0.07 180);
  --splat: oklch(0.55 0.2 27);
  --display: 'Cinzel', 'Alegreya Sans', serif;
  --text: 'Alegreya Sans', system-ui, sans-serif;
  --pixel: 'Chakra Petch', 'Alegreya Sans', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --tab-h: 0px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--dusk); color: var(--night-text);
  font: 400 17px/1.5 var(--text); font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-wrap: balance; margin: 0; line-height: 1.05; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; border-radius: 3px; }
.num, .pix { font-family: var(--pixel); font-variant-numeric: tabular-nums; }

/* ---------- buttons ---------- */
.btn {
  --face: var(--red); --edge: var(--red-deep); --fg: var(--plaster);
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 5px; cursor: pointer;
  background: var(--face); color: var(--fg); font-weight: 800; letter-spacing: .01em;
  box-shadow: inset 0 -4px 0 var(--edge), inset 0 1px 0 oklch(1 0 0 / .18), 0 2px 0 oklch(0.15 0.03 30 / .5);
  transition: transform .15s var(--ease), filter .15s, box-shadow .15s; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 -1px 0 var(--edge), 0 0 0 transparent; }
.btn[disabled], .btn[aria-disabled="true"] { cursor: not-allowed; filter: saturate(.3) brightness(.9); transform: none; }
.btn-bronze { --face: var(--ochre); --edge: var(--ochre-deep); --fg: var(--ink); }
.btn-ghost { --face: oklch(0.2 0.04 300 / .62); --edge: oklch(0.12 0.03 300 / .7); --fg: var(--night-text); backdrop-filter: none; }
.btn-verd { --face: var(--verd); --edge: var(--verd-deep); --fg: oklch(0.99 0.01 90); }
.btn-icon { width: 44px; padding: 0; }
.btn-big { min-height: 54px; font-size: 1.1rem; width: 100%; }
.btn .spin { width: 16px; height: 16px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- stage ---------- */
.stage { position: relative; height: 100vh; height: 100svh; min-height: 660px; overflow: hidden; background: linear-gradient(var(--dusk-2), var(--dusk)); isolation: isolate; }
#arena-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; cursor: grab; z-index: 0; }
#arena-canvas.dragging { cursor: grabbing; }
.fallback { position: absolute; inset: 0; z-index: -1; }
.fallback svg { width: 100%; height: 100%; display: block; }
.labels { position: absolute; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }

.tag {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; white-space: nowrap; border: 0; background: none; padding: 0;
  transition: opacity .3s;
}
.tag-name { font: 800 14px/1 var(--text); color: oklch(0.93 0.14 95); text-shadow: 1px 1px 0 oklch(0.1 0.02 30), -1px 0 0 oklch(0.1 0.02 30 / .6); letter-spacing: .02em; }
.tag-sub { font: 700 13px/1 var(--text); color: var(--night-text); text-shadow: 1px 1px 0 oklch(0.1 0.02 30); }
.tag-hp { position: relative; display: block; width: 76px; height: 15px; margin-top: 3px; border-radius: 2px; overflow: hidden; background: oklch(0.2 0.04 30 / .85); box-shadow: 0 0 0 1.5px oklch(0.12 0.02 30), inset 0 0 0 1px oklch(1 0 0 / .08); }
.tag-hp i { position: absolute; inset: 0; transform-origin: left center; background: linear-gradient(oklch(0.72 0.14 150), oklch(0.56 0.13 150)); transition: transform .35s var(--ease), background .3s; }
.tag-hp.low i { background: linear-gradient(oklch(0.66 0.19 28), oklch(0.5 0.17 27)); }
.tag-hp.unknown i { background: repeating-linear-gradient(135deg, oklch(0.45 0.03 300) 0 5px, oklch(0.36 0.03 300) 5px 10px); }
.tag-hp em { position: relative; display: block; font: 800 11px/15px var(--text); font-style: normal; color: oklch(0.98 0.01 90); text-align: center; text-shadow: 0 1px 0 oklch(0.1 0.02 30); letter-spacing: .03em; }
.tag.me .tag-name { color: oklch(0.86 0.12 178); }
.tag.open .tag-name { color: var(--plaster); opacity: .9; }
.tag.fallen { opacity: .45; }
.tag.won .tag-name { color: oklch(0.9 0.16 90); font-size: 15px; }
.hit {
  position: absolute; left: 0; top: 0; width: 42px; height: 42px; margin: -21px 0 0 -21px; display: grid; place-items: center;
  animation: hit 0.9s var(--ease) forwards; pointer-events: none;
}
.hit svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: var(--splat); filter: drop-shadow(1px 2px 0 oklch(0.15 0.05 28 / .7)); }
.hit.miss svg { fill: oklch(0.55 0.13 250); }
.hit b { position: relative; font: 700 16px/1 var(--pixel); color: oklch(0.98 0.01 90); text-shadow: 1px 1px 0 oklch(0.15 0.03 30); }
@keyframes hit { 0% { transform: scale(.3); opacity: 0; } 12% { transform: scale(1.15); opacity: 1; } 22% { transform: scale(1); } 75% { opacity: 1; transform: translateY(-6px); } 100% { opacity: 0; transform: translateY(-16px); } }

/* HUD top */
.hud-top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr) auto; align-items: start; gap: 8px 24px; padding: 18px 24px 0; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; grid-column: 1; grid-row: 1; flex-shrink: 0; min-width: max-content; overflow: visible; white-space: nowrap; }
.mark img { flex-shrink: 0; width: 52px; height: 52px; filter: drop-shadow(0 3px 0 oklch(0.15 0.04 300 / .55)); }
.mark-word { flex-shrink: 0; font: 800 42px/1 var(--display); color: var(--plaster); text-shadow: 0 3px 0 var(--red-deep), 0 6px 14px oklch(0.15 0.05 300 / .6); letter-spacing: .02em; }
.rule {
  grid-column: 1 / 3; grid-row: 2; justify-self: start; margin: 0; max-width: 34ch; padding: 5px 10px; border-radius: 4px; background: oklch(0.18 0.04 300 / .72);
  font-size: .9rem; line-height: 1.35; color: var(--night-text); text-shadow: 0 1px 2px oklch(0.15 0.04 300 / .9);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.rule b { color: oklch(0.88 0.13 88); font-weight: 800; }
.hud-right { grid-column: 3; grid-row: 1; display: flex; gap: 10px; align-items: center; justify-self: end; min-width: 0; }
#coin-chip-slot { display: flex; min-width: 0; flex: 0 1 auto; }
#connect { flex-shrink: 0; }

/* coin chip */
.chip {
  display: inline-flex; align-items: center; gap: 7px; min-height: 38px; min-width: 0; max-width: 100%; padding: 3px 10px 3px 4px; border-radius: 5px; border: 0; cursor: pointer;
  background: var(--plaster); color: var(--ink); box-shadow: inset 0 -3px 0 var(--plaster-2), 0 0 0 2px var(--red-deep), 0 3px 0 oklch(0.15 0.03 30 / .5);
  font-weight: 700; font-size: .88rem; white-space: nowrap; overflow: hidden;
}
.chip > * { flex-shrink: 0; }
.chip img, .chip .chip-coin { width: 28px; height: 28px; border-radius: 3px; object-fit: cover; background: var(--red); }
.chip .chip-sym { font-family: var(--display); font-size: .92rem; }
.chip .chip-price { font-family: var(--pixel); font-size: .84rem; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.chip .chip-chg { font-size: .8rem; }
.chip .up { color: var(--verd-deep); } .chip .down { color: var(--red); }
.chip-soon { font-size: .76rem; font-weight: 700; color: var(--ink-soft); flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* proof notices: bounded left and right between the mark and the top-right controls, free to wrap */
.proof { position: absolute; z-index: 4; top: 20px; left: 260px; right: 400px; display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 10px; }
.proof-note { flex: 0 0 100%; display: flex; justify-content: center; margin: 2px 0 0; min-width: 0; }
.proof-note span { padding: 4px 10px; border-radius: 4px; background: oklch(0.18 0.04 300 / .78); color: var(--night-text); font-size: .8rem; line-height: 1.35; text-align: center; text-shadow: 0 1px 2px oklch(0.15 0.04 300 / .9); }
.proof-cell {
  display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: 10px; align-items: baseline;
  padding: 8px 14px 9px; text-decoration: none; color: var(--ink); min-width: 150px;
  background: var(--plaster); border-radius: 3px; position: relative;
  box-shadow: 0 0 0 3px var(--red), 0 0 0 5px var(--plaster), 0 0 0 6px var(--red-deep), 0 8px 18px oklch(0.12 0.04 300 / .45);
}
.proof-k { grid-column: 1 / -1; font: 700 .72rem/1.1 var(--text); color: var(--red); letter-spacing: .08em; text-transform: uppercase; }
.proof-v { font: 700 1.2rem/1.2 var(--pixel); white-space: nowrap; }
.proof-t { font-size: .82rem; color: var(--ink-soft); white-space: nowrap; }
.proof-last .proof-v { font: 700 .95rem/1.3 var(--text); }

/* tablet */
.tablet { position: absolute; z-index: 4; right: 24px; top: 112px; bottom: 128px; width: 352px; display: flex; flex-direction: column; animation: slideIn .7s var(--ease) .12s both; }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0; } }
.tablet-frame {
  position: relative; flex: 1; min-height: 0; overflow: auto; color: var(--ink); padding: 22px 22px 18px; display: flex; flex-direction: column; gap: 14px;
  background:
    radial-gradient(120% 80% at 20% 0%, oklch(0.96 0.02 90), transparent 60%),
    linear-gradient(170deg, var(--plaster), var(--plaster-2));
  border: 7px solid var(--red); outline: 2px solid var(--ochre); outline-offset: -13px; border-radius: 4px;
  box-shadow: 0 0 0 2px var(--red-deep), 0 18px 40px oklch(0.12 0.05 300 / .55);
  scrollbar-width: thin;
}
.tablet-frame::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .9; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .35 0 0 0 0 .22 0 0 0 .13 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E"); mix-blend-mode: multiply; }
.tablet-frame > * { position: relative; }
.tablet-head { padding: 4px 6px 0; }
.pit-name { font-size: 2.3rem; color: var(--red-deep); }
.pit-theme { margin: 2px 0 0; font: 700 .95rem/1.2 var(--display); color: var(--red); }
.pit-sub { margin: 4px 0 0; color: var(--ink-soft); font-size: .95rem; }
.pit-stake { display: flex; align-items: baseline; gap: 8px; padding: 0 6px; }
.pit-stake .big { font: 700 2rem/1 var(--pixel); color: var(--ink); }
.pit-stake .unit { font-weight: 800; color: var(--ink-soft); }
.pit-stake .odds { margin-left: auto; font-size: .9rem; color: var(--ink-soft); text-align: right; }
.pit-hp { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 8px 6px; border-top: 1.5px dashed oklch(0.62 0.09 150); border-bottom: 1.5px dashed oklch(0.62 0.09 150); }
.hp-live { margin: 0; font-size: .88rem; color: oklch(0.38 0.1 150); font-weight: 700; min-height: 1.2em; }
.pit-hp b { font: 700 1.15rem/1 var(--pixel); color: oklch(0.38 0.1 150); white-space: nowrap; }
.pit-hp span { font-size: .84rem; line-height: 1.3; color: var(--ink-soft); }
.seats { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.seat { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; min-height: 46px; padding: 5px 10px 5px 6px; border-radius: 4px; background: oklch(0.97 0.015 88 / .8); box-shadow: inset 0 0 0 1.5px oklch(0.75 0.04 70); }
.seat.filled { background: oklch(0.99 0.01 90); box-shadow: inset 0 0 0 2px var(--ink-soft); }
.seat.me { box-shadow: inset 0 0 0 2.5px var(--verd); }
.seat.won { box-shadow: inset 0 0 0 2.5px var(--ochre-deep); background: oklch(0.95 0.06 88); }
.seat.fell { opacity: .55; }
.seat-shield { width: 34px; height: 34px; }
.seat-who { min-width: 0; }
.seat-who b { display: block; font-size: .98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat-who span { font-size: .8rem; color: var(--ink-soft); }
.seat-amt { font: 600 .95rem/1 var(--pixel); }
.seat.empty .seat-who b { color: var(--ink-soft); font-weight: 500; }
.pit-status { padding: 10px 12px; border-radius: 4px; background: var(--ink); color: var(--plaster); display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; }
.pit-status .k { font-size: .8rem; color: oklch(0.82 0.03 70); display: block; }
.pit-status .v { font: 700 1.25rem/1.1 var(--pixel); }
.pit-status .v.warn { color: var(--ochre); }
.stake-form { display: grid; gap: 8px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 700; font-size: .9rem; }
.amount { display: flex; align-items: stretch; border-radius: 5px; overflow: hidden; box-shadow: inset 0 0 0 2px var(--ink-soft); background: oklch(0.99 0.01 90); }
.amount input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; height: 48px; font: 700 1.3rem var(--pixel); color: var(--ink); }
.amount input:focus { outline: none; }
.amount:focus-within { box-shadow: inset 0 0 0 3px var(--red); }
.amount span { display: grid; place-items: center; padding: 0 12px; font-weight: 800; color: var(--ink-soft); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.quick button { min-height: 32px; padding: 0 10px; border-radius: 4px; border: 0; background: oklch(0.85 0.04 80); color: var(--ink); font-weight: 700; cursor: pointer; font-size: .88rem; }
.quick button:hover { background: var(--ochre); }
.field-err { color: var(--red-deep); font-size: .88rem; font-weight: 700; min-height: 1.2em; margin: 0; }
.tablet-note { margin: 0; font-size: .86rem; color: var(--ink-soft); line-height: 1.4; }
.tablet-note a { color: var(--red-deep); font-weight: 700; }

/* pit strip */
.pits { position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; padding: 12px 24px 18px; overflow-x: auto; scrollbar-width: none; background: linear-gradient(transparent, oklch(0.16 0.04 300 / .72) 40%); }
.pits::-webkit-scrollbar { display: none; }
.pit {
  flex: 1 0 104px; min-width: 104px; display: grid; gap: 3px; padding: 9px 10px 8px; text-align: left; cursor: pointer; border: 0; border-radius: 4px;
  background: var(--plaster); color: var(--ink); box-shadow: inset 0 -4px 0 var(--plaster-2), 0 0 0 2px oklch(0.4 0.04 40), 0 4px 0 oklch(0.1 0.03 300 / .5);
  transition: transform .18s var(--ease), background .18s; text-decoration: none;
}
.pit:hover { transform: translateY(-3px); }
.pit[aria-current="true"] { background: var(--red); color: var(--plaster); box-shadow: inset 0 -4px 0 var(--red-deep), 0 0 0 2px var(--ochre), 0 4px 0 oklch(0.1 0.03 300 / .5); transform: translateY(-5px); }
.pit-n { font: 800 .95rem/1.1 var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pit-s { font: 700 .9rem/1 var(--pixel); }
.pips { display: flex; gap: 3px; margin-top: 2px; }
.pips i { width: 14px; height: 6px; border-radius: 1px; background: oklch(0.72 0.03 70 / .6); }
.pips i.on { background: var(--verd); }
.pit[aria-current="true"] .pips i { background: oklch(1 0 0 / .3); }
.pit[aria-current="true"] .pips i.on { background: var(--ochre); }
.pit.veiled { background: var(--dusk-3); color: var(--night-text); box-shadow: inset 0 -4px 0 var(--dusk-2), 0 0 0 2px var(--ochre-deep), 0 4px 0 oklch(0.1 0.03 300 / .5); }
.pit.veiled[aria-current="true"] { background: var(--ink); box-shadow: inset 0 -4px 0 oklch(0.15 0.03 35), 0 0 0 2px var(--ochre), 0 4px 0 oklch(0.1 0.03 300 / .5); }

.stage-tools { position: absolute; z-index: 4; left: 24px; bottom: 112px; display: flex; gap: 8px; }
.banner {
  position: absolute; z-index: 6; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; pointer-events: none;
  font: 800 clamp(2.2rem, 5vw, 4.4rem)/1 var(--display); color: var(--plaster); text-shadow: 0 4px 0 var(--red-deep), 0 10px 30px oklch(0.1 0.05 300 / .8);
  animation: banner 2.6s var(--ease) forwards;
}
.banner small { display: block; font: 700 1.1rem/1.4 var(--pixel); color: oklch(0.92 0.14 92); text-shadow: 1px 2px 0 oklch(0.1 0.02 30); margin-top: 10px; }
@keyframes banner { 0% { opacity: 0; transform: translate(-50%, -40%) scale(.9); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }

/* gold claim */
.btn-gold {
  --face: oklch(0.82 0.14 86); --edge: oklch(0.56 0.12 68); --fg: oklch(0.22 0.04 50);
  background: linear-gradient(180deg, oklch(0.92 0.11 95) 0%, oklch(0.83 0.15 86) 45%, oklch(0.72 0.15 76) 100%);
  box-shadow: inset 0 -5px 0 var(--edge), inset 0 2px 0 oklch(0.97 0.06 95 / .8), 0 0 0 2px oklch(0.42 0.09 60), 0 4px 0 oklch(0.15 0.03 30 / .55);
  text-shadow: 0 1px 0 oklch(0.95 0.07 95 / .7);
}
.btn-claim { min-height: 58px; width: 100%; font-size: 1.15rem; padding: 0 20px; white-space: normal; text-align: center; line-height: 1.15; }
.btn-gold[disabled] { filter: none; opacity: .85; }
.stamp-gold { color: oklch(0.5 0.12 70); border-color: oklch(0.6 0.13 75); margin-right: 10px; }
.claimed { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; }
.claimed a, .victor a { color: var(--red-deep); font-weight: 700; }
.claim-err { margin: 0 0 6px; color: var(--red-deep); font-weight: 700; font-size: .9rem; }
.claim-auto { margin: 0; font-weight: 700; color: var(--ink-soft); font-size: .92rem; }

.victor {
  position: absolute; z-index: 7; left: 24px; right: 400px; top: 56%; max-width: 440px; margin: 0 auto;
  padding: 14px 16px; border-radius: 4px; color: var(--ink); display: grid; gap: 8px;
  background: linear-gradient(170deg, var(--plaster), var(--plaster-2));
  box-shadow: 0 0 0 3px var(--red), 0 0 0 5px var(--plaster), 0 0 0 6px var(--red-deep), 0 14px 30px oklch(0.12 0.04 300 / .55);
  animation: victorIn .4s var(--ease);
}
.victor.mine { box-shadow: 0 0 0 3px oklch(0.72 0.15 78), 0 0 0 5px var(--plaster), 0 0 0 6px oklch(0.5 0.11 65), 0 14px 34px oklch(0.12 0.04 300 / .6); }
@keyframes victorIn { from { opacity: 0; transform: translateY(12px); } }
.victor-k { margin: 0; font: 800 1.2rem/1.1 var(--display); color: oklch(0.45 0.1 65); }
.victor-line { margin: 0; padding-right: 30px; font: 700 1.15rem/1.3 var(--text); }
.victor-line a { font-family: var(--pixel); color: var(--ink); }
.victor-sub { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--ink-soft); font-size: .92rem; }
.victor-x { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; border-radius: 4px; }
.victor-later { justify-self: center; min-height: 32px; border: 0; background: none; color: var(--ink-soft); font-weight: 700; text-decoration: underline; cursor: pointer; }

.unclaimed { padding: 10px 12px; border-radius: 4px; background: linear-gradient(170deg, oklch(0.94 0.08 92), oklch(0.87 0.11 86)); box-shadow: inset 0 0 0 2px oklch(0.62 0.12 72); }
.unclaimed h3 { font-size: 1.05rem; color: oklch(0.4 0.09 62); margin-bottom: 6px; }
.unclaimed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.unclaimed li { display: grid; gap: 6px; }
.uc-what { font-size: .88rem; font-weight: 700; color: var(--ink); }
.unclaimed .btn-claim { min-height: 48px; font-size: 1rem; }

/* ---------- bands ---------- */
.wrap { width: min(1320px, 100% - 48px); margin: 0 auto; }
.band { padding: clamp(64px, 8vw, 120px) 0; position: relative; }
.band h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); }
.lede { max-width: 62ch; font-size: 1.1rem; margin: 14px 0 0; }

.band-glory { background: linear-gradient(175deg, var(--plaster), var(--plaster-2)); color: var(--ink); }
.band-glory::before { content: ""; position: absolute; inset: 18px; border: 8px solid var(--red); outline: 2px solid var(--ochre-deep); outline-offset: -16px; pointer-events: none; }
.band-glory h2 { color: var(--red-deep); }
.glory-head { display: grid; grid-template-columns: 1fr auto; gap: 8px 40px; align-items: end; }
.glory-head .lede { grid-column: 1; color: var(--ink-soft); }
.seg { grid-column: 2; grid-row: 1 / 3; display: inline-flex; padding: 4px; border-radius: 6px; background: var(--ink); gap: 4px; }
.seg button { min-height: 44px; padding: 0 18px; border: 0; border-radius: 4px; background: transparent; color: var(--plaster); font-weight: 800; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--ochre); color: var(--ink); }
.glory-pot { margin: 36px 0 26px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
.glory-pot .pot-big { font: 700 clamp(2.4rem, 5vw, 4rem)/1 var(--pixel); color: var(--ink); }
.glory-pot .pot-lbl { font-weight: 800; color: var(--red-deep); }
.glory-pot .pot-t { color: var(--ink-soft); }
.boards { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.board h3 { font-size: 1.7rem; color: var(--ink); margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.board h3 small { font: 500 .95rem var(--text); color: var(--ink-soft); }
.board-losers h3 { color: var(--verd-deep); }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.rank { display: grid; grid-template-columns: 36px 1fr auto 86px; gap: 12px; align-items: center; min-height: 44px; padding: 4px 12px; border-radius: 4px; background: oklch(0.97 0.015 88); box-shadow: inset 0 0 0 1px oklch(0.8 0.03 75); }
.rank .rn { font: 700 1.1rem var(--pixel); color: var(--red-deep); text-align: center; }
.board-losers .rank .rn { color: var(--verd-deep); }
.rank .rw { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.rank .rw a { text-decoration: none; }
.rank .rw a:hover { text-decoration: underline; }
.rank .rnet { font: 600 .95rem var(--pixel); }
.rank .rprize { text-align: right; font-size: .9rem; color: var(--ink-soft); }
.rank .rprize b { display: block; font: 700 .95rem var(--pixel); color: var(--ink); }
.rank.ghost { background: transparent; box-shadow: inset 0 0 0 1.5px oklch(0.78 0.03 75); box-shadow: none; border: 1.5px dashed oklch(0.72 0.04 70); }
.rank.ghost .rw { color: var(--ink-soft); font-weight: 500; }
.rank.mine { box-shadow: inset 0 0 0 2.5px var(--verd); }
.me-row { margin-top: 24px; padding: 14px 18px; border-radius: 4px; background: var(--ink); color: var(--plaster); display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: center; }
.me-row b { font-family: var(--pixel); }
.last-pay { margin-top: 22px; color: var(--ink-soft); font-size: .95rem; }
.last-pay a { color: var(--red-deep); font-weight: 700; }

.band-scrolls { background: radial-gradient(90% 60% at 80% 0%, var(--dusk-3), transparent 70%), var(--dusk); }
.band-scrolls h2 { color: var(--plaster); }
.band-scrolls .lede { color: var(--night-mute); }
.scroll-list { margin-top: 36px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; }
.scroll {
  position: relative; padding: 18px 20px 16px; color: var(--ink); border-radius: 3px;
  background: linear-gradient(90deg, oklch(0.84 0.05 80), var(--plaster) 6%, var(--plaster) 94%, oklch(0.84 0.05 80));
  box-shadow: 0 10px 24px oklch(0.1 0.04 300 / .45); display: grid; gap: 10px;
}
.scroll-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.scroll-top h3 { font-size: 1.3rem; color: var(--red-deep); }
.scroll-top time { font-size: .85rem; color: var(--ink-soft); }
.scroll-fighters { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.scroll-fighters li { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; font-size: .95rem; }
.scroll-fighters li.w { font-weight: 800; }
.scroll-fighters li.l { color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 1px; }
.scroll-fighters svg { width: 24px; height: 24px; }
.scroll-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .88rem; color: var(--ink-soft); border-top: 1px dashed oklch(0.7 0.04 70); padding-top: 8px; }
.scroll-foot a { color: var(--red-deep); font-weight: 700; }
.scroll-foot button { background: none; border: 0; padding: 0; color: var(--red-deep); font-weight: 700; cursor: pointer; text-decoration: underline; min-height: 24px; }
.empty-scroll { grid-column: 1 / -1; padding: 40px; border: 2px dashed var(--dusk-3); border-radius: 4px; text-align: center; color: var(--night-mute); }
.empty-scroll b { display: block; font: 700 1.6rem var(--display); color: var(--plaster); margin-bottom: 6px; }

.band-treasury { background: var(--red); color: var(--plaster); }
.band-treasury h2 { color: var(--plaster); text-shadow: 0 3px 0 var(--red-deep); }
.band-treasury .lede { color: oklch(0.92 0.03 60); }
.aqueduct { margin-top: 40px; }
.aqueduct svg { width: 100%; height: auto; display: block; }
.aq-label { font: 700 15px var(--text); fill: var(--plaster); }
.aq-pct { font: 700 22px var(--pixel); fill: var(--ochre); }
.aq-small { font: 500 13px var(--text); fill: oklch(0.9 0.03 60); }
.flow { stroke-dasharray: 6 10; animation: flow 1.6s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
@media (prefers-reduced-motion: reduce) { .flow { animation: none; } }
.basins { margin-top: 28px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.basin { background: var(--plaster); color: var(--ink); border-radius: 3px; padding: 18px; display: grid; gap: 10px; align-content: start; box-shadow: 0 0 0 3px var(--red-deep), 0 12px 26px oklch(0.2 0.1 27 / .5); min-width: 0; }
.basin h3 { font-size: 1.35rem; color: var(--red-deep); }
.basin .bal { font: 700 1.7rem/1 var(--pixel); }
.basin .bal small { font: 700 .9rem var(--text); color: var(--ink-soft); }
.basin p { margin: 0; font-size: .93rem; color: var(--ink-soft); }
.spends { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: .88rem; }
.spends li { display: flex; justify-content: space-between; gap: 8px; border-top: 1px dashed oklch(0.75 0.04 70); padding-top: 4px; }
.spends a { color: var(--red-deep); font-weight: 700; }
.spends .none { color: var(--ink-soft); border: 0; }
.cut { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-radius: 4px; overflow: hidden; box-shadow: 0 0 0 3px var(--red-deep); }
.cut div { padding: 14px 16px; background: var(--ink); color: var(--plaster); min-width: 0; }
.cut div:first-child { background: var(--ochre); color: var(--ink); }
.cut b { display: block; font: 700 1.5rem var(--pixel); }
.cut span { font-size: .9rem; }

.band-rules { background: linear-gradient(180deg, var(--dusk-2), var(--dusk)); }
.band-rules h2 { color: var(--plaster); }
.steps { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { margin: 0; padding: 22px; background: var(--plaster); color: var(--ink); border-radius: 3px; box-shadow: 0 0 0 4px var(--red), 0 0 0 6px var(--ochre-deep); display: grid; gap: 12px; align-content: start; }
.step svg { width: 120px; height: 90px; }
.step b { color: var(--red-deep); font-family: var(--display); font-weight: 700; font-size: 1.2rem; display: block; margin-bottom: 4px; }
.faq { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.faq details { border-bottom: 1px solid var(--dusk-3); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 800; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 12px; min-height: 32px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font: 700 1.3rem var(--pixel); color: var(--ochre); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 8px 0 4px; color: var(--night-mute); max-width: 62ch; }

.foot { background: oklch(0.17 0.035 300); color: var(--night-mute); padding: 56px 0 calc(40px + var(--tab-h)); }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.2fr; gap: 28px; }
.foot-grid > * { min-width: 0; }
.foot h4 { margin: 0 0 10px; font: 700 1.2rem var(--display); color: var(--plaster); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: var(--night-text); }
.ca { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ca code { font: 600 .9rem var(--pixel); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--night-text); }
.copy { flex: none; min-height: 32px; padding: 0 10px; border-radius: 4px; border: 0; background: var(--dusk-3); color: var(--night-text); font-weight: 700; cursor: pointer; font-size: .85rem; }
.copy:hover { background: var(--ochre); color: var(--ink); }
.foot small { display: block; margin-top: 30px; font-size: .85rem; }

/* sheet */
.sheet-scrim { position: fixed; inset: 0; z-index: 40; background: oklch(0.12 0.04 300 / .6); }
.sheet { position: fixed; z-index: 41; right: 24px; top: 80px; width: min(420px, calc(100% - 32px)); max-height: calc(100svh - 110px); overflow: auto; background: var(--plaster); color: var(--ink); border-radius: 4px; padding: 24px; border: 6px solid var(--red); box-shadow: 0 0 0 2px var(--red-deep), 0 24px 60px oklch(0.1 0.05 300 / .6); animation: sheetIn .25s var(--ease); }
@keyframes sheetIn { from { transform: translateY(-10px); opacity: 0; } }
.sheet-close { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--ink); border-radius: 4px; }
.sheet h2 { font-size: 2rem; color: var(--red-deep); padding-right: 36px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0; }
.kv div { background: oklch(0.97 0.015 88); padding: 10px 12px; border-radius: 4px; box-shadow: inset 0 0 0 1px oklch(0.8 0.03 75); }
.kv span { display: block; font-size: .8rem; color: var(--ink-soft); font-weight: 700; }
.kv b { font: 700 1.1rem var(--pixel); }
.spark { width: 100%; height: 70px; display: block; margin: 8px 0; }
.sheet .ca code { color: var(--ink); }
.sheet .copy { background: oklch(0.85 0.04 80); color: var(--ink); }
.sheet p { color: var(--ink-soft); }
.buy-row { display: flex; gap: 8px; margin-top: 14px; }
.buy-row .amount { flex: 1; }

.card-pin { position: absolute; z-index: 30; width: 260px; background: var(--plaster); color: var(--ink); border-radius: 4px; padding: 14px 16px; border: 4px solid var(--red); box-shadow: 0 16px 40px oklch(0.1 0.05 300 / .6); }
.card-pin h3 { font-size: 1.2rem; color: var(--red-deep); overflow: hidden; text-overflow: ellipsis; }
.card-pin dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 10px 0 0; font-size: .9rem; }
.card-pin dt { color: var(--ink-soft); } .card-pin dd { margin: 0; font-weight: 700; text-align: right; }

.toasts { position: fixed; z-index: 60; left: 50%; bottom: calc(24px + var(--tab-h)); transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); }
.toast { background: var(--ink); color: var(--plaster); padding: 12px 16px; border-radius: 4px; box-shadow: 0 0 0 2px var(--ochre-deep), 0 12px 30px oklch(0.1 0.04 300 / .6); animation: toast .3s var(--ease); font-weight: 600; }
.toast.err { box-shadow: 0 0 0 2px var(--red-light), 0 12px 30px oklch(0.1 0.04 300 / .6); }
.toast.ok { box-shadow: 0 0 0 2px var(--verd), 0 12px 30px oklch(0.1 0.04 300 / .6); }
.toast a { color: var(--ochre); }
@keyframes toast { from { transform: translateY(10px); opacity: 0; } }

.stamp { display: inline-block; font: 800 1.1rem var(--display); color: var(--red); border: 3px solid var(--red); padding: 2px 10px; border-radius: 4px; transform: rotate(-4deg); animation: stamp .45s var(--ease); }
@keyframes stamp { from { transform: rotate(-4deg) scale(1.8); opacity: 0; } }

.skel { background: linear-gradient(90deg, oklch(0.88 0.03 80), oklch(0.93 0.02 85), oklch(0.88 0.03 80)); background-size: 200% 100%; animation: skel 1.4s linear infinite; border-radius: 4px; min-height: 44px; }
@keyframes skel { to { background-position: -200% 0; } }

.tabbar { display: none; }

/* ---------- wide ---------- */
@media (min-width: 1700px) {
  .tablet { width: 400px; right: 40px; top: 128px; }
  .hud-top { padding: 24px 40px 0; }
  .pits { padding: 14px 40px 22px; }
  .stage-tools { left: 40px; }
  .pit { flex-basis: 130px; }
  .mark-word { font-size: 52px; }
  .proof { left: 300px; right: 470px; top: 26px; }
  .victor { left: 40px; right: 464px; }
}
@media (max-width: 1500px) { .proof-last { display: none; } }
/* ---------- tablet widths ---------- */
@media (max-width: 1180px) {
  .proof-last { display: none; }
  /* between the mark and the tablet: never pushed off the left edge */
  .proof { left: 24px; right: 400px; transform: none; top: 84px; justify-content: flex-end; flex-wrap: wrap; }
  .proof-cell { min-width: 0; grid-template-columns: auto; }
  .proof-note { justify-content: flex-end; }
  .proof-note span { text-align: right; }
  .basins { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
/* ---------- phones ---------- */
@media (max-width: 760px) {
  :root { --tab-h: 64px; }
  body { font-size: 16px; }
  .stage { height: auto; min-height: 0; overflow: visible; padding-top: 58vh; padding-top: 58svh; }
  #arena-canvas, .fallback, .labels { height: 58svh; bottom: auto; }
  .hud-top { padding: 12px 14px 0; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 10px; }
  .mark { gap: 8px; }
  .mark-word { font-size: 26px; }
  .chip .chip-price { font-size: .8rem; }
  .chip img, .chip .chip-coin { width: 24px; height: 24px; }
  .band-glory .wrap { width: calc(100% - 64px); }
  .mark img { width: 38px; height: 38px; }

  .hud-right { grid-column: 2; justify-self: end; gap: 6px; }
  .rule { grid-column: 1 / -1; font-size: .88rem; max-width: 36ch; }
  .chip { padding-right: 8px; gap: 5px; min-height: 36px; }
  #connect { padding: 0 12px; }
  .proof { top: auto; bottom: auto; position: absolute; left: 12px; right: 12px; transform: none; top: calc(58svh - 72px); gap: 6px; flex-wrap: wrap; justify-content: stretch; }
  .proof-cell { min-width: 0; flex: 1 1 0; padding: 6px 10px; grid-template-columns: auto; box-shadow: 0 0 0 2px var(--red), 0 6px 14px oklch(0.12 0.04 300 / .45); }
  .proof-note { justify-content: flex-start; margin: 0; }
  .proof-note span { font-size: .76rem; text-align: left; padding: 3px 8px; }
  .stage.has-pot-note .proof { top: calc(58svh - 112px); }
  .stage.has-pot-note .stage-tools { top: calc(58svh - 166px); }
  .victor { position: fixed; z-index: 36; left: 12px; right: 12px; top: auto; bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); max-width: none; }
  .proof-v { font-size: 1rem; }
  .proof-t { font-size: .8rem; line-height: 1.3; }
  .stage-tools { top: calc(58svh - 124px); bottom: auto; left: 12px; }
  .stage-tools .btn { min-height: 40px; font-size: .9rem; }
  .pits { position: relative; padding: 14px 12px 12px; background: oklch(0.17 0.04 300); }
  .pit { flex: 0 0 104px; }
  .tablet { position: relative; inset: auto; width: auto; margin: 0; animation: none; }
  .tablet-frame { border-width: 5px; outline-offset: -10px; padding: 18px 16px 16px; overflow: visible; border-radius: 0; }
  .pit-name { font-size: 1.9rem; }
  .banner { top: 28svh; }
  .wrap { width: calc(100% - 28px); }
  .band-glory::before { inset: 8px; border-width: 5px; outline-offset: -11px; }
  .band { padding: 64px 0; }
  .glory-head { grid-template-columns: 1fr; }
  .seg { grid-column: 1; grid-row: auto; justify-self: start; }
  .boards { grid-template-columns: 1fr; }
  .rank { grid-template-columns: 30px 1fr 74px; }
  .rank .rnet { display: none; }
  .steps, .faq, .basins { grid-template-columns: 1fr; }
  .cut { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .sheet { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 86svh; border-width: 5px 0 0; border-radius: 10px 10px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheetUp .3s var(--ease); }
  @keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } }
  .card-pin { left: 12px !important; right: 12px; width: auto; top: 70px !important; position: fixed; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: oklch(0.17 0.04 300); box-shadow: 0 -2px 0 var(--red); }
  .tabbar a { display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; font-size: .78rem; font-weight: 700; color: var(--night-mute); }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a[aria-current="page"] { color: var(--ochre); }
}
/* narrow top bar: ticker and price only, rule hidden so the mark keeps its width */
@media (min-width: 761px) and (max-width: 1180px) { .rule { display: none; } }
@media (max-width: 600px) {
  .hud-top { column-gap: 12px; }
  .rule { display: none; }
  .chip { min-height: 34px; padding: 3px 8px; gap: 5px; font-size: .78rem; }
  .chip img, .chip .chip-coin, .chip .chip-chg { display: none; }
  .chip .chip-sym { font-size: .78rem; }
  .chip .chip-price { font-size: .76rem; }
  #connect { padding: 0 10px; min-height: 38px; font-size: .9rem; }
}
@media (max-width: 360px) {
  .mark-word { font-size: 22px; }
  .mark img { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
