@font-face { font-family: 'Bricolage'; src: url(/fonts/Bricolage-800.ttf) format('truetype'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/Figtree-500.ttf) format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url(/fonts/Figtree-700.ttf) format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JBM'; src: url(/fonts/JetBrainsMono-700.ttf) format('truetype'); font-weight: 700; font-display: swap; }
:root { --bg: #070a1a; --panel: rgba(10, 14, 36, 0.86); --panel2: rgba(18, 24, 58, 0.92); --ink: #f2f4ff; --ink2: #c3c8e8; --ink3: #7f86b3; --line: rgba(190, 200, 255, 0.14); --line2: rgba(190, 200, 255, 0.28);
  --acc: #ff3b3b; --acc2: #ff8a7a; --acc-ink: #fff; --olive: #8a9a3c; --good: #6fd08c; --bad: #ff5f57; --f-d: 'Bricolage', 'Arial Black', sans-serif; --f-t: 'Figtree', system-ui, sans-serif; --f-m: 'JBM', ui-monospace, monospace; --r: 14px; --ease: cubic-bezier(.2, .7, .2, 1); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--ink); font: 500 15px/1.45 var(--f-t); -webkit-font-smoothing: antialiased; }
a { color: inherit; } button, input { font: inherit; color: inherit; }
.is-hidden { display: none !important; }
.num { font-family: var(--f-m); font-variant-numeric: tabular-nums; }
.lab { font: 700 10.5px/1 var(--f-m); letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); }
.lab em { font-style: normal; text-transform: none; letter-spacing: 0; font-family: var(--f-t); color: var(--ink3); opacity: .8; }
kbd { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .25); background: rgba(0, 0, 0, .12); font: 700 11px/1 var(--f-m); }
#field { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }

.bar { position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: 62px; display: flex; align-items: center; gap: 26px; padding: 0 24px; background: linear-gradient(to bottom, rgba(10, 6, 4, .7), rgba(10, 6, 4, 0)); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px/1 var(--f-d); }
.brand-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--line2); }
.nav { display: flex; gap: 20px; font-weight: 700; font-size: 14px; color: var(--ink2); } .nav a { text-decoration: none; } .nav a:hover { color: var(--ink); }
.bar-r { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink2); margin-right: 6px; } .live b { color: var(--ink); font-family: var(--f-m); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--acc); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255, 59, 59, .7); } 70% { box-shadow: 0 0 0 9px rgba(255, 59, 59, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 59, 59, 0); } }
.tick { height: 34px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--acc); color: var(--acc-ink); font: 700 13px/1 var(--f-m); }
.ca-pill { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 5px 0 12px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line2); min-width: 0; }
.ca-lab { font: 700 11px/1 var(--f-m); letter-spacing: .1em; color: var(--ink3); }
.ca-addr { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink2); font: 700 12px/1 var(--f-m); padding: 0; cursor: pointer; max-width: 330px; min-width: 0; }
.ca-addr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ca-addr:disabled { cursor: default; color: var(--ink3); }
.ca-copy { font-style: normal; font: 700 11px/1 var(--f-m); color: var(--acc-ink); background: var(--acc); padding: 6px 9px; border-radius: 999px; }
.ca-link { font: 700 12px/1 var(--f-t); color: var(--ink2); padding: 0 6px; text-decoration: none; }
.hx { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border-radius: 999px; background: var(--ink); color: #000; font: 700 13px/1 var(--f-t); text-decoration: none; }

/* ---------------- the title: the match behind it is live */
.title { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; padding: 0 40px 40px; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: end; pointer-events: none;
  background: linear-gradient(to top, rgba(5, 7, 20, .92) 0%, rgba(5, 7, 20, .6) 46%, rgba(5, 7, 20, 0) 100%); padding-top: 160px; }
.title > * { pointer-events: auto; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 14px; font: 700 12px/1 var(--f-m); letter-spacing: .16em; text-transform: uppercase; color: var(--acc2); }
h1 { margin: 0; font: 800 clamp(46px, 6.2vw, 96px)/.92 var(--f-d); letter-spacing: -.035em; text-shadow: 0 6px 40px rgba(0, 0, 0, .5); }
h1 em { font-style: normal; color: var(--acc); }
.lede { max-width: 62ch; margin: 16px 0 0; font-size: 18px; color: var(--ink2); }
.play { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; margin-top: 24px; max-width: 920px; background: var(--panel2); border-radius: 18px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line2), 0 20px 50px -18px rgba(0, 0, 0, .8); }
.play .cell { display: flex; flex-direction: column; gap: 8px; padding: 14px 18px; border-right: 1px solid var(--line); }
.play input, .sheet input { border: 0; background: none; outline: none; font: 700 17px/1.2 var(--f-t); padding: 0; width: 100%; }
.play .cell-addr input { font: 700 14px/1.2 var(--f-m); }
.go { border: 0; cursor: pointer; background: var(--acc); color: var(--acc-ink); font: 800 22px/1 var(--f-d); padding: 0 30px; display: inline-flex; align-items: center; gap: 12px; letter-spacing: -.01em; }
.go:hover { background: var(--acc2); }
.fine { margin: 12px 0 0; font-size: 13px; color: var(--ink3); } .fine a { color: var(--ink2); }
.board { background: var(--panel); border-radius: 20px; padding: 20px; box-shadow: inset 0 0 0 1px var(--line), 0 30px 70px -20px rgba(0, 0, 0, .8); }
.b-row { display: flex; flex-direction: column; gap: 7px; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.b-row:first-child { border-top: 0; padding-top: 0; }
.b-row b { font-size: 22px; } .b-row b em { font-style: normal; font-size: .5em; color: var(--ink3); }
.b-row i { font-style: normal; font-size: 12.5px; color: var(--ink3); }
.b-big b { font-size: 42px; letter-spacing: -.02em; }
.b-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }

/* ---------------- in a match */
.hud { position: fixed; inset: 0; z-index: 6; pointer-events: none; }
.hud > * { pointer-events: auto; }
.roster { position: absolute; top: 78px; left: 20px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; width: 250px; }
.roster li { display: grid; grid-template-columns: 10px minmax(0, 1fr) 46px; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 14px; }
.roster li i { width: 10px; height: 10px; border-radius: 3px; }
.roster li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster li .hp { position: relative; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; } .roster li .hp b { position: absolute; inset: 0 auto 0 0; background: var(--good); }
.roster li.is-cur { box-shadow: inset 0 0 0 2px var(--acc); } .roster li.is-out { opacity: .4; text-decoration: line-through; } .roster li.is-me span::after { content: ' (you)'; color: var(--acc2); }
.turnbox { position: absolute; top: 74px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.turn { padding: 10px 18px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line2); font: 800 20px/1 var(--f-d); white-space: nowrap; }
.turn.is-me { background: var(--acc); color: var(--acc-ink); }
.wind { display: flex; align-items: center; gap: 9px; padding: 7px 14px; border-radius: 999px; background: var(--panel); font-family: var(--f-m); }
.wind i { font-style: normal; color: var(--acc2); letter-spacing: -2px; }
.clock { width: 180px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; } .clock i { display: block; height: 100%; width: 100%; background: var(--acc2); transform-origin: left; }
.prizebox { position: absolute; top: 78px; right: 20px; display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 14px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); min-width: 190px; }
.prizebox b { font-size: 24px; } .prizebox i { font-style: normal; font-size: 12px; color: var(--ink3); }
.dock { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: grid; grid-template-columns: auto auto auto; align-items: center; gap: 14px; padding: 12px; border-radius: 20px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line2), 0 20px 50px -18px rgba(0, 0, 0, .9); }
.dock.is-wait { opacity: .55; }
.weps { display: flex; gap: 6px; }
.wep { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 12px; border-radius: 12px; border: 0; cursor: pointer; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); text-align: left; min-width: 96px; }
.wep b { font: 800 15px/1 var(--f-d); } .wep span { font: 700 10.5px/1 var(--f-m); color: var(--ink3); }
.wep.is-on { box-shadow: inset 0 0 0 2px var(--acc); } .wep:disabled { opacity: .35; cursor: default; }
.dials { display: flex; gap: 18px; padding: 0 6px; } .dial { display: flex; flex-direction: column; gap: 6px; } .dial b { font-size: 26px; min-width: 64px; }
.fire { border: 0; cursor: pointer; height: 58px; padding: 0 26px; border-radius: 14px; background: var(--acc); color: var(--acc-ink); font: 800 24px/1 var(--f-d); display: inline-flex; align-items: center; gap: 12px; }
.fire:disabled { background: var(--panel2); color: var(--ink3); cursor: default; }
.hint { grid-column: 1 / -1; margin: 0; text-align: center; font-size: 12px; color: var(--ink3); }

.sheet-wrap { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(8, 5, 3, .62); padding: 20px; }
.sheet { width: min(520px, 100%); max-height: calc(100vh - 40px); overflow: auto; display: flex; flex-direction: column; gap: 14px; padding: 26px; border-radius: 22px; background: #10153a; box-shadow: inset 0 0 0 1px var(--line2), 0 40px 90px -20px #000; }
.sheet h2 { margin: 0; font: 800 34px/1 var(--f-d); letter-spacing: -.02em; }
.sheet .cell { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); }
.sheet .go, .sheet .ghost { height: 54px; justify-content: center; border-radius: 14px; }
.ghost { border: 0; cursor: pointer; background: var(--panel2); color: var(--ink); font: 700 16px/1 var(--f-t); box-shadow: inset 0 0 0 1px var(--line2); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.err { margin: 0; min-height: 18px; color: var(--bad); font-size: 13px; }
.howl { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--ink2); } .howl b { color: var(--ink); }
.places { display: flex; flex-direction: column; gap: 6px; margin: 4px 0; }
.place { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--panel2); box-shadow: inset 0 0 0 1px var(--line); }
.place b { font: 800 20px/1 var(--f-d); } .place span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; } .place em { font-style: normal; font: 700 14px/1 var(--f-m); color: var(--acc2); }
.place.is-me { box-shadow: inset 0 0 0 2px var(--acc); }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 120px; transform: translateX(-50%); padding: 12px 18px; border-radius: 14px; background: rgba(0, 0, 0, .82); font-weight: 700; box-shadow: inset 0 0 0 1px var(--line2); }

@media (max-width: 1100px) { .title { grid-template-columns: 1fr; padding: 120px 20px 20px; } .board { display: none; } .nav, .live { display: none; } .roster { width: 200px; } .prizebox { display: none; } }
@media (max-width: 700px) {
  .bar { gap: 10px; padding: 0 12px; } .brand b, .tick, .ca-link { display: none; } .ca-addr { max-width: 110px; } .hx span { display: none; }
  .play { grid-template-columns: 1fr; } .play .cell { border-right: 0; border-bottom: 1px solid var(--line); } .go { height: 56px; justify-content: center; }
  h1 { font-size: 42px; } .lede { font-size: 15px; }
  .roster { top: 70px; left: 8px; width: 150px; } .roster li { padding: 6px 8px; font-size: 12px; grid-template-columns: 8px minmax(0, 1fr) 30px; gap: 6px; }
  .turnbox { top: 66px; } .turn { font-size: 15px; padding: 8px 12px; }
  .dock { grid-template-columns: 1fr auto; left: 8px; right: 8px; transform: none; bottom: 8px; gap: 8px; padding: 8px; } .weps { grid-column: 1 / -1; overflow-x: auto; } .wep { min-width: 80px; padding: 7px 9px; } .hint { display: none; } .dial b { font-size: 20px; } .fire { height: 50px; font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }

/* ---------------- flap's own HUD */
.score { position: absolute; top: 78px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; }
.score b { font: 800 84px/1 var(--f-d); color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, .25), 0 10px 30px rgba(0, 0, 0, .35); }
.score .lab { color: #fff; background: rgba(0, 0, 0, .3); padding: 6px 10px; border-radius: 999px; }
.count { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font: 800 160px/1 var(--f-d); color: #fff; text-shadow: 0 8px 0 rgba(0, 0, 0, .25); pointer-events: none; }
.tapzone-unused { position: absolute; left: 0; right: 0; bottom: 0; top: 62px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 24px; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.tapzone span { font: 700 13px/1 var(--f-t); color: rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .25); padding: 8px 12px; border-radius: 999px; }
.tapzone.is-dead span { display: none; }
.prizebox { z-index: 2; }

.hint { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); font: 700 13px/1 var(--f-t); color: rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .35); padding: 8px 12px; border-radius: 999px; pointer-events: none; }
.tparry { display: none; position: absolute; right: 22px; bottom: 26px; width: 110px; height: 110px; border-radius: 50%; border: 0; background: rgba(255, 59, 59, .85); color: #fff; font: 800 20px/1 var(--f-d); box-shadow: 0 0 0 6px rgba(255, 59, 59, .25); }
@media (pointer: coarse) { .tparry { display: block; } .hint { display: none; } }
/* the arena fills the middle: the count sits on the left */
.score { left: 28px; top: 84px; transform: none; align-items: flex-start; }
.score b { font-size: 64px; }
@media (max-width: 700px) { .score { left: 12px; top: 70px; } .score b { font-size: 42px; } }
