/* ARENA: one token sheet, then the pieces. Night stadium blues, one gold for money and the main action, green / red only for
   win and loss, type colours only for moves and fighters. Three faces: Lilita One (display), Rubik (text), Press Start 2P (pixel
   numbers and keys). Nothing moves because its content changed: every slot has a fixed size. */
@font-face { font-family: 'Display'; src: url('/fonts/display.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Text'; src: url('/fonts/text.woff2') format('woff2'); font-weight: 300 900; font-display: swap; }
@font-face { font-family: 'Pixel'; src: url('/fonts/pixel.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Press Start 2P'; src: url('/fonts/pixel.woff2') format('woff2'); font-display: block; }
:root {
  --bg: #080b17; --s1: #0e1325; --s2: #141a31; --s3: #1b2240; --s4: #242c50; --s5: #2f3863;
  --ink: #eef1ff; --ink2: #aab2d8; --ink3: #6c759f; --ink4: #4a5279;
  --line: rgba(170, 185, 255, 0.12); --line2: rgba(170, 185, 255, 0.22); --line3: rgba(170, 185, 255, 0.36);
  --gold: #ffcf3a; --gold2: #ffe58a; --gold3: #b8861a; --win: #4be38a; --loss: #ff4f5e; --me: #7fd6ff; --foe: #ff7a6a;
  --f-d: 'Display', 'Text', system-ui, sans-serif; --f-t: 'Text', system-ui, -apple-system, 'Segoe UI', sans-serif; --f-p: 'Pixel', ui-monospace, monospace;
  --r: 12px; --r2: 8px; --r3: 5px; --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --glass: linear-gradient(180deg, rgba(31, 39, 72, 0.86), rgba(14, 19, 37, 0.92));
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 50px rgba(0, 0, 0, 0.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: radial-gradient(1200px 700px at 50% 20%, #131a33, var(--bg)); color: var(--ink); font: 400 15px/1.45 var(--f-t); overflow: hidden; -webkit-font-smoothing: antialiased; }
body { user-select: none; -webkit-user-select: none; touch-action: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(255, 207, 58, 0.35); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.is-hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
#cv { position: fixed; image-rendering: auto; z-index: 0; background: #0b0e1a; opacity: 0; transition: opacity 0.35s ease; }
/* the title's veil over the live fight behind it */
#veil { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(900px 600px at 64% 52%, rgba(8, 11, 23, 0.0), rgba(8, 11, 23, 0.55) 70%), linear-gradient(90deg, rgba(8, 11, 23, 0.92) 0%, rgba(8, 11, 23, 0.55) 34%, rgba(8, 11, 23, 0.12) 60%, rgba(8, 11, 23, 0.5) 100%); transition: opacity 0.4s var(--ease); }
body.fighting #veil { opacity: 0; }

/* ---------------------------------------------------------------- header */
#bar { position: fixed; z-index: 20; left: 0; right: 0; top: 0; height: 58px; display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 18px; padding: 0 18px; background: linear-gradient(180deg, rgba(8, 11, 23, 0.92), rgba(8, 11, 23, 0.55)); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform 0.35s var(--ease), opacity 0.35s; }
body.fighting #bar { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(160deg, #ffe58a, #ffb21a 55%, #e0780c); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset, 0 6px 18px rgba(255, 170, 30, 0.25); }
.brand .mark svg { width: 24px; height: 24px; }
.brand .mark .mark-img { width: 100%; height: 100%; object-fit: cover; }
.brand b { font: 400 25px/1 var(--f-d); letter-spacing: 0.02em; padding-top: 0.1em; margin-top: -0.1em; background: linear-gradient(180deg, #fff, #ffe58a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.navl { display: flex; gap: 4px; }
.navl a { padding: 8px 12px; border-radius: 8px; color: var(--ink2); font-weight: 500; font-size: 14px; }
.navl a:hover { color: var(--ink); background: rgba(255, 255, 255, 0.05); }
.hstats { display: grid; grid-template-columns: repeat(3, 118px); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.hstat { background: rgba(14, 19, 37, 0.9); padding: 5px 11px; min-width: 0; }
.hstat i { display: block; font: 600 9.5px/1.3 var(--f-t); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; }
.hstat b { display: block; font: 600 14px/1.3 var(--f-t); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hstat.gold b { color: var(--gold); }
/* the coin address (the launch kit's slot) */
.ca-pill { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; border-radius: 999px; background: rgba(20, 26, 49, 0.9); border: 1px solid var(--line2); width: 330px; }
.ca-pill.is-live { border-color: rgba(255, 207, 58, 0.6); box-shadow: 0 0 0 3px rgba(255, 207, 58, 0.08); }
.ca-lab { font: 600 11px/1 var(--f-t); letter-spacing: 0.08em; color: var(--gold); white-space: nowrap; }
.ca-addr { display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1; height: 28px; padding: 0 2px; border-radius: 999px; font: 500 12px/1 ui-monospace, 'SF Mono', Menlo, monospace; color: var(--ink); cursor: copy; }
.ca-addr:disabled { cursor: default; color: var(--ink3); font: 500 12px/1 var(--f-t); }
.ca-addr > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-copy { flex: none; font: 700 11px/1 var(--f-t); font-style: normal; padding: 6px 10px; border-radius: 999px; background: var(--gold); color: #1a1405; }
.ca-link { flex: none; font: 600 11px/1 var(--f-t); padding: 7px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--ink2); white-space: nowrap; }
.ca-link:hover { background: rgba(255, 255, 255, 0.14); color: var(--ink); }
.xbtn { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line2); }
.xbtn:hover { background: rgba(255, 255, 255, 0.12); }
.xbtn svg { width: 17px; height: 17px; fill: var(--ink); }

/* ---------------------------------------------------------------- the title screen */
#menu { position: fixed; z-index: 10; inset: 58px 0 0 0; pointer-events: none; display: grid; grid-template-columns: 470px 1fr 330px; gap: 28px; padding: 26px 30px 24px; }
body.fighting #menu, body.sheet-up #menu { opacity: 0; pointer-events: none; visibility: hidden; }
#menu > * { pointer-events: auto; }
.left { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.left > * { flex-shrink: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 11px/1 var(--f-t); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--win); box-shadow: 0 0 0 4px rgba(75, 227, 138, 0.15); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(75, 227, 138, 0.05); } }
@media (prefers-reduced-motion: reduce) { .dot { animation: none; } }
/* the padding gives an accent over a capital (the É of POKÉMON) room inside the box, where the clipped gradient paints */
.title { font: 400 104px/0.86 var(--f-d); letter-spacing: 0.01em; margin: calc(6px - 0.16em) 0 0; padding-top: 0.16em; background: linear-gradient(180deg, #ffffff 10%, #ffe58a 55%, #ffb21a 95%); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 0 #7a4a08) drop-shadow(0 10px 24px rgba(255, 170, 30, 0.3)); font-size: var(--tmax, 104px); }
.tag { font: 400 17px/1.45 var(--f-t); color: var(--ink2); max-width: 430px; margin: 0; }
.tag b { color: var(--ink); font-weight: 600; }
.panel { background: var(--glass); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: var(--shadow); }
/* your streak (fixed height: present or not, nothing below it moves) */
.streak { height: 96px; padding: 14px 16px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.streak .s-l i { display: block; font: 600 10.5px/1 var(--f-t); font-style: normal; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); }
.streak .s-wins { font: 400 30px/1.05 var(--f-d); margin-top: 6px; white-space: nowrap; }
.streak .s-wins em { font-style: normal; color: var(--gold); }
.streak .s-worth { font: 500 13px/1.3 var(--f-t); color: var(--ink2); margin-top: 3px; white-space: nowrap; }
.streak .s-worth b { color: var(--gold2); font-weight: 600; }
.streak.empty .s-wins { color: var(--ink2); font-size: 22px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 20px; border-radius: 12px; font: 700 15px/1 var(--f-t); letter-spacing: 0.01em; transition: transform 0.12s var(--ease), filter 0.12s, background 0.12s; white-space: nowrap; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.gold { background: linear-gradient(180deg, #ffe58a, #ffc21f 50%, #f0a10e); color: #1c1404; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 -2px 0 rgba(150, 90, 0, 0.35) inset, 0 10px 26px rgba(255, 170, 30, 0.28); }
.btn.gold:hover { filter: brightness(1.06); }
.btn.ghost { background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line2); color: var(--ink); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line3); }
.btn.green { background: linear-gradient(180deg, #7ff0ac, #3fd47f); color: #062312; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 10px 26px rgba(75, 227, 138, 0.22); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn:disabled { filter: grayscale(0.7) brightness(0.7); cursor: default; }
.fight { height: 74px; width: 100%; border-radius: 16px; font: 400 30px/1 var(--f-d); letter-spacing: 0.03em; flex-direction: column; gap: 6px; }
.fight small { font: 600 12px/1 var(--f-t); letter-spacing: 0.06em; color: rgba(28, 20, 4, 0.72); }
.modes { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 10px; }
.mode { height: 58px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line2); display: grid; grid-template-rows: auto auto; place-content: center; text-align: center; gap: 3px; transition: background 0.12s, border-color 0.12s; position: relative; }
.mode:hover { background: rgba(255, 255, 255, 0.09); border-color: var(--line3); }
.mode b { font: 700 14.5px/1 var(--f-t); }
.mode i { font: 500 11.5px/1 var(--f-t); font-style: normal; color: var(--ink3); }
.lvls { display: flex; gap: 4px; justify-content: center; }
.lvls button { font: 600 10.5px/1 var(--f-t); padding: 3px 6px; border-radius: 6px; color: var(--ink3); }
.lvls button.on { background: rgba(255, 207, 58, 0.16); color: var(--gold); }
.fields { display: grid; grid-template-columns: 150px 1fr; gap: 10px; }
.field { position: relative; }
.field label { position: absolute; left: 12px; top: 7px; font: 600 9.5px/1 var(--f-t); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink3); pointer-events: none; }
.field input { width: 100%; height: 50px; padding: 18px 12px 6px; border-radius: 10px; background: rgba(8, 11, 23, 0.65); border: 1px solid var(--line2); outline: none; font: 500 14px/1 var(--f-t); user-select: text; -webkit-user-select: text; }
.field input:focus { border-color: rgba(255, 207, 58, 0.55); box-shadow: 0 0 0 3px rgba(255, 207, 58, 0.1); }
.field input.bad { border-color: rgba(255, 79, 94, 0.7); }
.field .hint { position: absolute; right: 10px; top: 7px; font: 600 9.5px/1 var(--f-t); letter-spacing: 0.08em; color: var(--ink4); text-transform: uppercase; }
.small { font: 500 12px/1.45 var(--f-t); color: var(--ink3); margin: 0; }
.small b { color: var(--ink2); font-weight: 600; }
/* your team, at the foot of the stage */
.center { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.team { display: grid; grid-template-columns: repeat(3, 150px) 120px; gap: 10px; padding: 12px; }
.tcard { height: 150px; border-radius: 12px; position: relative; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--tc, #5a6) 34%, #141a31), #0e1325 72%); border: 1px solid color-mix(in srgb, var(--tc, #5a6) 50%, transparent); display: flex; flex-direction: column; text-align: left; transition: transform 0.15s var(--ease), box-shadow 0.15s; min-width: 0; }
.tcard:hover { transform: translateY(-2px); box-shadow: 0 10px 30px color-mix(in srgb, var(--tc) 30%, transparent); }
.tcard canvas { flex: 1 1 auto; min-height: 0; width: 100%; height: 0; image-rendering: pixelated; }
.tcard .tn { flex: none; padding: 6px 10px 9px; background: rgba(6, 8, 18, 0.55); }
.tcard .tn b { display: block; font: 700 13px/1.15 var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tcard .tn b s { text-decoration: none; color: var(--ink3); font-weight: 500; }
.tcard .tn span { display: flex; gap: 4px; margin-top: 5px; }
.chip { display: inline-block; font: 700 9.5px/1 var(--f-t); letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 6px; border-radius: 5px; color: #0b0e1a; background: var(--c, #ccc); }
.tedit { height: 150px; border-radius: 12px; border: 1px dashed var(--line3); display: grid; place-content: center; text-align: center; gap: 8px; color: var(--ink2); font: 600 13px/1.2 var(--f-t); }
.tedit:hover { border-color: var(--gold); color: var(--gold); }
.tedit svg { width: 26px; height: 26px; margin: 0 auto; stroke: currentColor; }
/* the money card */
.right { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.money { padding: 16px; }
.money h3, .feed h3 { margin: 0 0 12px; font: 600 11px/1 var(--f-t); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); display: flex; justify-content: space-between; }
.money h3 a { color: var(--gold); letter-spacing: 0.06em; }
.mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.mcell { background: rgba(10, 14, 28, 0.9); padding: 10px 12px; min-width: 0; }
.mcell i { display: block; font: 600 9.5px/1.2 var(--f-t); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink3); white-space: nowrap; }
.mcell b { display: block; margin-top: 5px; font: 600 19px/1.1 var(--f-t); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcell.big { grid-column: 1 / -1; }
.mcell.big b { font: 400 30px/1.05 var(--f-d); color: var(--gold); }
.ladder { margin-top: 12px; display: grid; gap: 1px; background: var(--line); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.ladder div { display: grid; grid-template-columns: 1fr auto; background: rgba(10, 14, 28, 0.85); padding: 6px 12px; font: 500 12.5px/1.3 var(--f-t); color: var(--ink2); }
.ladder div b { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.feed { padding: 14px 16px; flex: 1; min-height: 0; overflow: hidden; }
.feed ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.feed li { display: grid; grid-template-columns: 1fr auto; gap: 8px; font: 500 12.5px/1.35 var(--f-t); color: var(--ink2); padding: 7px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.03); animation: rowin 0.5s var(--ease); }
.feed li b { color: var(--ink); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed li em { font-style: normal; color: var(--gold); font-variant-numeric: tabular-nums; }
.feed .none { color: var(--ink3); font-size: 12.5px; padding: 6px 2px; }
@keyframes rowin { from { opacity: 0; transform: translateY(-6px); background: rgba(255, 207, 58, 0.18); } }
/* the queue / waiting card (over the stage) */
#wait { position: fixed; z-index: 15; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 380px; padding: 22px 24px; text-align: center; display: grid; gap: 10px; }
#wait h2 { margin: 0; font: 400 28px/1 var(--f-d); }
#wait p { margin: 0; color: var(--ink2); font-size: 14px; }
#wait .clock { font: 400 14px/1 var(--f-p); color: var(--gold); }
.spin { width: 52px; height: 52px; margin: 2px auto 4px; border-radius: 50%; border: 4px solid rgba(255, 255, 255, 0.08); border-top-color: var(--gold); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- the fight HUD (over the arena; fixed slots) */
#hud { position: fixed; z-index: 12; inset: 0; pointer-events: none; display: none; }
body.fighting #hud { display: block; }
.tbar { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: min(1180px, calc(100vw - 20px)); display: grid; grid-template-columns: 1fr 190px 1fr; gap: 12px; align-items: start; }
.side { display: grid; grid-template-columns: minmax(0, 1fr) 58px 58px; gap: 6px; }
.side.foe { direction: rtl; }
.side.foe > * { direction: ltr; }
.mon { border-radius: 12px; background: rgba(10, 14, 28, 0.84); border: 1px solid var(--line2); position: relative; overflow: hidden; pointer-events: auto; cursor: pointer; transition: border-color 0.15s, opacity 0.2s; }
.mon.big { height: 62px; display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 9px; padding: 6px 10px 6px 6px; border-color: color-mix(in srgb, var(--sc) 75%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--sc) 40%, transparent) inset, 0 6px 22px color-mix(in srgb, var(--sc) 20%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 22%, rgba(10, 14, 28, 0.9)), rgba(10, 14, 28, 0.92)); cursor: default; }
.mon.small { height: 62px; padding: 4px; display: grid; grid-template-rows: 1fr 5px; gap: 3px; }
.mon.ko { opacity: 0.4; filter: grayscale(1); }
.mon .pt { border-radius: 9px; background: rgba(255, 255, 255, 0.05) center / cover no-repeat; image-rendering: pixelated; position: relative; }
.mon.big .pt { width: 50px; height: 50px; }
.mon .key { position: absolute; left: 2px; top: 2px; font: 400 7px/1 var(--f-p); padding: 2px 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.7); color: var(--ink2); }
.mon .mi { min-width: 0; display: grid; grid-template-rows: 17px 9px 14px; gap: 3px; align-content: center; }
.mon .nm { font: 700 14px/17px var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon .nm s { text-decoration: none; color: color-mix(in srgb, var(--sc) 70%, #fff); font-weight: 500; font-size: 9px; letter-spacing: 2px; margin-left: 6px; vertical-align: 2px; }
.mon .hp { height: 9px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset; }
.mon.small .hp { height: 5px; border-radius: 3px; }
.mon .hp i { display: block; height: 100%; width: 100%; transform-origin: left; background: linear-gradient(90deg, #3fd47f, #8ff0b0); transition: transform 0.18s linear; }
.mon .hp i.mid { background: linear-gradient(90deg, #f0b81a, #ffe066); }
.mon .hp i.low { background: linear-gradient(90deg, #e8323f, #ff7a6a); }
.mon .sub { display: grid; grid-template-columns: 34px minmax(0, 1fr) 62px; gap: 6px; align-items: center; }
.mon .st { font: 700 9px/14px var(--f-t); text-align: center; border-radius: 4px; color: #0b0e1a; visibility: hidden; }
.mon .evo { height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.mon .evo i { display: block; height: 100%; background: linear-gradient(90deg, #fff2a0, #ffcf3a); transform-origin: left; transform: scaleX(0); }
.mon .evo.full i { background: linear-gradient(90deg, #fff, #ffe58a); box-shadow: 0 0 8px #ffe58a; }
.mon .hpn { font: 600 10.5px/14px var(--f-t); text-align: right; font-variant-numeric: tabular-nums; color: var(--ink2); }
.mon .cd { position: absolute; inset: 0; background: rgba(6, 8, 18, 0.6); display: none; place-items: center; font: 400 11px/1 var(--f-p); color: var(--ink); }
.mon.cool .cd { display: grid; }
.mon .kox { position: absolute; inset: 0; display: none; place-items: center; font: 400 9px/1 var(--f-p); color: #ff8a8a; background: rgba(6, 8, 18, 0.35); }
.mon.ko .kox { display: grid; }
.tmid { text-align: center; padding-top: 2px; }
.clockbox { height: 46px; border-radius: 12px; background: rgba(10, 14, 28, 0.86); border: 1px solid var(--line2); display: grid; place-content: center; }
.clockbox b { font: 400 18px/1 var(--f-p); letter-spacing: 0.05em; }
.clockbox.sd { border-color: rgba(255, 79, 94, 0.7); background: rgba(60, 8, 20, 0.86); }
.clockbox.sd b { color: #ff8a8a; }
.stake { margin-top: 6px; height: 24px; border-radius: 999px; background: rgba(255, 207, 58, 0.12); border: 1px solid rgba(255, 207, 58, 0.35); font: 600 11.5px/22px var(--f-t); color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 10px; }
.modetag { margin-top: 6px; font: 600 10.5px/1 var(--f-t); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink3); }
/* the moves */
.bbar { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: grid; grid-template-columns: 96px repeat(4, 150px) 96px; gap: 8px; align-items: end; }
.move { height: 70px; border-radius: 12px; background: rgba(10, 14, 28, 0.86); border: 1px solid var(--line2); position: relative; overflow: hidden; padding: 9px 10px 8px 14px; display: grid; grid-template-rows: auto 1fr auto; text-align: left; }
.move::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--mc); }
.move .mn { font: 700 13.5px/1.1 var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.move .mt { font: 600 9.5px/1 var(--f-t); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mc); margin-top: 3px; }
.move .mp { display: flex; justify-content: space-between; align-items: end; font: 600 10.5px/1 var(--f-t); color: var(--ink3); font-variant-numeric: tabular-nums; }
.move .mk { font: 400 8px/1 var(--f-p); padding: 4px 5px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); color: var(--ink2); }
.move .sweep { position: absolute; inset: 0; background: conic-gradient(rgba(4, 6, 14, 0.72) var(--cd, 0%), transparent 0); pointer-events: none; }
.move .cdn { position: absolute; right: 9px; top: 8px; font: 400 10px/1 var(--f-p); color: var(--ink); visibility: hidden; }
.move.cool .cdn { visibility: visible; }
.move.ready { border-color: color-mix(in srgb, var(--mc) 55%, var(--line2)); }
.move.flash { animation: mflash 0.25s var(--ease); }
@keyframes mflash { from { box-shadow: 0 0 0 2px var(--mc), 0 0 24px var(--mc); } }
.move.out .mn, .move.out .mt { opacity: 0.4; }
.dodge, .evolve { height: 70px; border-radius: 12px; background: rgba(10, 14, 28, 0.86); border: 1px solid var(--line2); display: grid; place-content: center; text-align: center; gap: 4px; position: relative; overflow: hidden; }
.dodge b, .evolve b { font: 700 12.5px/1 var(--f-t); }
.dodge .mk, .evolve .mk { font: 400 8px/1 var(--f-p); color: var(--ink2); }
.dodge .sweep, .evolve .sweep { position: absolute; inset: 0; background: conic-gradient(rgba(4, 6, 14, 0.72) var(--cd, 0%), transparent 0); }
.evolve { --ev: 0%; }
.evolve .fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--ev); background: linear-gradient(0deg, rgba(255, 207, 58, 0.35), rgba(255, 207, 58, 0.05)); }
.evolve.ready { border-color: var(--gold); animation: evo 1.1s ease-in-out infinite; }
.evolve.ready b { color: var(--gold2); }
.evolve.none { opacity: 0.35; }
@keyframes evo { 50% { box-shadow: 0 0 0 2px rgba(255, 207, 58, 0.6), 0 0 28px rgba(255, 207, 58, 0.45); } }
/* banners in the middle of the fight */
#banner { position: fixed; z-index: 14; left: 50%; top: 38%; transform: translate(-50%, -50%); pointer-events: none; text-align: center; font: 400 64px/1 var(--f-d); letter-spacing: 0.03em; color: #fff; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.45), 0 0 30px rgba(255, 207, 58, 0.45); opacity: 0; }
#banner small { display: block; font: 600 15px/1.4 var(--f-t); letter-spacing: 0.06em; color: var(--gold2); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); margin-top: 8px; }
#banner.show { animation: bann 1.4s var(--ease) forwards; }
@keyframes bann { 0% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -54%) scale(0.98); } }
#banner.count { animation: cnt 0.9s var(--ease) forwards; font-size: 110px; }
@keyframes cnt { 0% { opacity: 0; transform: translate(-50%, -50%) scale(2); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.85); } }
#kofeed { position: absolute; right: 14px; top: 92px; width: 300px; display: grid; gap: 6px; justify-items: end; }
#kofeed div { font: 600 12.5px/1 var(--f-t); padding: 7px 10px; border-radius: 8px; background: rgba(10, 14, 28, 0.8); border: 1px solid var(--line); animation: rowin 0.4s var(--ease); white-space: nowrap; }
#kofeed div b { color: var(--gold2); }
#hint { position: absolute; left: 14px; bottom: 14px; font: 500 11.5px/1.6 var(--f-t); color: var(--ink3); text-shadow: 0 1px 0 #000; }
#hint kbd { font: 400 7.5px/1 var(--f-p); padding: 3px 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); color: var(--ink2); }
#leave { position: absolute; right: 14px; bottom: 14px; pointer-events: auto; }
/* ---------------------------------------------------------------- /watch: the stream (owner 10-20: "i will put the spectate mode live
   on stream and keep it there"). The arena fills the screen, the camera frames the fighters; across the top who fights (and their
   streak) over the teams and the clock; bottom left the game, bottom right the pot. Nothing to click, the pointer hides. */
.tname, .tlive, #watchbar { display: none; }
body.watch #bar, body.watch #menu, body.watch #veil, body.watch #wait, body.watch #sheets, body.watch #touch, body.watch #rotate, body.watch #reconnect, body.watch #picker, body.watch #toast { display: none !important; }
body.watch #hud { display: block; visibility: hidden; }
body.watch.has-match #hud { visibility: visible; }
body.watch #hud-moves, body.watch #hint, body.watch #leave { display: none; }
body.watch .mon { cursor: default; pointer-events: none; }
body.watch .tbar { top: 12px; row-gap: 7px; }
body.watch .tname { display: block; align-self: end; justify-self: start; max-width: 100%; min-width: 0; padding: 4px 14px 5px; border-radius: 10px; background: rgba(10, 14, 28, 0.84); border: 1px solid var(--line2); font: 400 22px/1.1 var(--f-d); letter-spacing: 0.02em; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.watch .tname.r { justify-self: end; text-align: right; }
body.watch .tname:empty { visibility: hidden; }
body.watch .tname em { font: 700 12.5px/1 var(--f-t); font-style: normal; letter-spacing: 0.04em; color: var(--gold2); margin: 0 0 0 10px; vertical-align: 3px; }
body.watch .tlive { display: flex; align-self: end; justify-self: center; justify-content: center; align-items: center; gap: 8px; height: 24px; padding: 0 12px 0 10px; border-radius: 999px; background: rgba(10, 14, 28, 0.86); border: 1px solid rgba(255, 59, 78, 0.45); font: 700 11.5px/1 var(--f-t); letter-spacing: 0.22em; color: #fff; }
body.watch .tlive i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b4e; box-shadow: 0 0 0 4px rgba(255, 59, 78, 0.2), 0 0 12px rgba(255, 59, 78, 0.7); }
body.watch #kofeed { top: 132px; }
body.watch .modetag { display: inline-block; margin-top: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(10, 14, 28, 0.78); color: var(--ink2); letter-spacing: 0.14em; }
body.watch #watchbar { display: flex; position: fixed; z-index: 13; left: 18px; right: 18px; bottom: 16px; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; }
.wb-brand { pointer-events: auto; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 9px 18px 9px 9px; border-radius: 16px; background: rgba(10, 14, 28, 0.84); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.wb-brand .mark { flex: none; width: 50px; height: 50px; border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(160deg, #ffe58a, #ffb21a 55%, #e0780c); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18) inset; }
.wb-brand .mark svg { width: 34px; height: 34px; }
.wb-brand .mark .mark-img { width: 100%; height: 100%; object-fit: cover; }
.wb-t { min-width: 0; }
.wb-t b { display: block; padding-top: 0.12em; margin-top: -0.12em; font: 400 26px/1 var(--f-d); letter-spacing: 0.02em; white-space: nowrap; background: linear-gradient(180deg, #fff, #ffe58a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.wb-t i { display: block; margin-top: 6px; font: 600 14px/1 var(--f-t); font-style: normal; letter-spacing: 0.02em; color: var(--gold2); white-space: nowrap; }
.wb-t i span:first-child { color: #fff; }
#wb-ca { color: var(--ink2); font-weight: 500; }
.wb-pot { text-align: right; padding: 11px 18px 12px; border-radius: 16px; background: rgba(10, 14, 28, 0.84); border: 1px solid rgba(255, 207, 58, 0.4); box-shadow: var(--shadow); }
.wb-pot i { display: block; font: 600 10.5px/1 var(--f-t); font-style: normal; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink3); }
.wb-pot b { display: block; margin-top: 5px; font: 400 32px/1 var(--f-d); color: var(--gold); }
#wb-max { display: block; margin-top: 6px; font: 600 12.5px/1 var(--f-t); color: var(--ink2); }
#wb-max:empty { display: none; }
body.watch.idle, body.watch.idle * { cursor: none !important; }
@media (max-width: 980px) {
  body.watch .tbar { top: 6px; row-gap: 4px; } body.watch .tname { padding: 2px 8px 3px; border-radius: 7px; } body.watch .modetag { display: none; } body.watch .tlive { height: 18px; padding: 0 8px; } body.watch .tname { font-size: 15px; } body.watch .tname em { display: none; } body.watch .tlive { font-size: 10px; line-height: 16px; letter-spacing: 0.16em; }
  body.watch #watchbar { left: 8px; right: 8px; bottom: 8px; } .wb-brand { padding: 6px 12px 6px 6px; gap: 8px; border-radius: 12px; } .wb-brand .mark { width: 34px; height: 34px; border-radius: 9px; }
  .wb-t b { font-size: 17px; } .wb-t i { font-size: 11px; margin-top: 4px; } .wb-pot { padding: 7px 12px 8px; border-radius: 12px; } .wb-pot b { font-size: 20px; } .wb-pot i, #wb-max { font-size: 9.5px; }
}
@media (max-width: 560px) { .wb-long, #wb-max { display: none; } .wb-t b { font-size: 15px; } .wb-t i { font-size: 10px; } .wb-pot b { font-size: 17px; margin-top: 3px; } body.watch #watchbar { gap: 8px; } }
#reconnect { position: fixed; z-index: 30; left: 50%; top: 74px; transform: translateX(-50%); padding: 10px 16px; border-radius: 10px; background: rgba(60, 8, 20, 0.9); border: 1px solid rgba(255, 79, 94, 0.6); font: 600 13px/1 var(--f-t); }

/* ---------------------------------------------------------------- sheets (results, cash-out, team picker, rooms) */
#sheets { position: fixed; z-index: 40; inset: 0; display: none; place-items: center; background: rgba(5, 7, 15, 0.62); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
body.sheet-up #sheets { display: grid; }
.sheet { width: 520px; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); overflow: auto; padding: 26px 26px 22px; display: none; animation: sheetin 0.35s var(--ease); }
.sheet.on { display: block; }
@keyframes sheetin { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.sheet h2 { margin: 0; font: 400 46px/1 var(--f-d); letter-spacing: 0.02em; text-align: center; }
.sheet h2.win { background: linear-gradient(180deg, #fff, #8ff0b0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sheet h2.loss { color: #ff8a94; }
.sheet h2.gold { background: linear-gradient(180deg, #fff, #ffe58a 60%, #ffb21a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sheet .sub { text-align: center; color: var(--ink2); margin: 10px 0 0; font-size: 15px; }
.sheet .big { text-align: center; font: 400 44px/1 var(--f-d); color: var(--gold); margin: 18px 0 4px; font-variant-numeric: tabular-nums; }
.sheet .bigsub { text-align: center; color: var(--ink3); font: 500 12.5px/1.4 var(--f-t); margin: 0; }
.rows { margin: 18px 0 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.rows div { display: grid; grid-template-columns: 1fr auto; padding: 9px 12px; background: rgba(10, 14, 28, 0.88); font: 500 13.5px/1.3 var(--f-t); color: var(--ink2); }
.rows div b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.rows div b.g { color: var(--gold); }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
.acts.one { grid-template-columns: 1fr; }
.acts .btn { height: 52px; }
.steps { margin: 18px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.steps div { border-radius: 10px; padding: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); text-align: center; font: 600 12px/1.3 var(--f-t); color: var(--ink3); }
.steps div.on { color: var(--ink); border-color: rgba(255, 207, 58, 0.5); background: rgba(255, 207, 58, 0.08); }
.steps div.done { color: var(--win); border-color: rgba(75, 227, 138, 0.45); }
.tx { display: block; text-align: center; margin-top: 12px; font: 500 12.5px/1.4 var(--f-t); color: var(--gold); }
.code { font: 400 30px/1 var(--f-p); letter-spacing: 0.15em; text-align: center; color: var(--gold); margin: 14px 0 6px; user-select: text; -webkit-user-select: text; }
.seats { display: grid; gap: 6px; margin-top: 14px; }
.seats div { padding: 9px 12px; border-radius: 9px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); font: 600 13px/1.2 var(--f-t); display: flex; justify-content: space-between; }
.seats div i { font-style: normal; color: var(--ink3); font-weight: 500; }
/* toasts */
#toast { position: fixed; z-index: 60; left: 50%; bottom: 110px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
#toast div { padding: 11px 16px; border-radius: 12px; background: rgba(14, 19, 37, 0.96); border: 1px solid var(--line2); font: 600 14px/1.3 var(--f-t); box-shadow: var(--shadow); animation: sheetin 0.25s var(--ease); max-width: 520px; text-align: center; }
#toast div.bad { border-color: rgba(255, 79, 94, 0.6); }
#toast div.good { border-color: rgba(75, 227, 138, 0.6); }

/* ---------------------------------------------------------------- touch: a stick on the left, the moves on the right */
#touch { position: fixed; z-index: 13; inset: 0; display: none; pointer-events: none; }
body.touch.fighting #touch { display: block; }
body.touch #hint { display: none; }
.stick { position: absolute; width: 120px; height: 120px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.18); background: rgba(10, 14, 28, 0.35); display: none; }
.stick i { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #c9d1ff 60%, #8e98c8); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.tmoves { position: absolute; right: max(14px, env(safe-area-inset-right)); bottom: max(14px, env(safe-area-inset-bottom)); width: 250px; height: 220px; pointer-events: none; }
.tbtn { position: absolute; width: 64px; height: 64px; border-radius: 50%; pointer-events: auto; background: radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--mc, #888) 70%, #fff 0%), color-mix(in srgb, var(--mc, #888) 60%, #0b0e1a)); border: 2px solid rgba(255, 255, 255, 0.35); display: grid; place-items: center; font: 700 10px/1.1 var(--f-t); text-align: center; color: #fff; text-shadow: 0 1px 2px #000; overflow: hidden; touch-action: none; }
.tbtn .sweep { position: absolute; inset: 0; background: conic-gradient(rgba(4, 6, 14, 0.7) var(--cd, 0%), transparent 0); }
.tbtn span { position: relative; padding: 0 4px; font-size: 9.5px; line-height: 1.05; word-break: break-word; hyphens: auto; max-width: 100%; }
.tbtn.big { width: 84px; height: 84px; background: radial-gradient(circle at 40% 30%, #e8ecff, #8e98c8); color: #0b0e1a; text-shadow: none; font-size: 12px; }
.tbtn.evo { width: 56px; height: 56px; background: radial-gradient(circle at 40% 30%, #fff6c0, #ffb21a); color: #1c1404; text-shadow: none; }
#rotate { position: fixed; z-index: 70; inset: 0; display: none; place-content: center; text-align: center; gap: 12px; background: rgba(8, 11, 23, 0.94); font: 600 16px/1.4 var(--f-t); color: var(--ink2); padding: 30px; }
#rotate b { font: 400 32px/1 var(--f-d); color: var(--ink); }
@media (orientation: portrait) and (pointer: coarse) { body.fighting #rotate { display: grid; } }

/* ---------------------------------------------------------------- smaller windows */
@media (max-width: 1500px) { #menu { grid-template-columns: 430px 1fr 300px; } .title { --tmax: 92px; } .team { grid-template-columns: repeat(3, 132px) 100px; } .tcard, .tedit { height: 136px; } .hstats { grid-template-columns: repeat(3, 104px); } .ca-pill { width: 280px; } }
@media (max-width: 1280px) { #menu { grid-template-columns: 410px 1fr; } .title { --tmax: 86px; } .right { display: none; } .navl { display: none; } .bbar { grid-template-columns: 84px repeat(4, 128px) 84px; } }
/* a short desktop window (a laptop with its browser bars): the same page a little tighter, the title sized to the height,
   so the two-line name and everything under it fit with nothing squeezed or cut */
@media (min-width: 981px) and (max-height: 820px) {
  #menu { padding-top: 16px; padding-bottom: 14px; } .left { gap: 11px; }
  .title { font-size: clamp(60px, calc((100vh - 530px) / 1.72), var(--tmax, 104px)); } .tag { font-size: 15.5px; line-height: 1.4; }
  .streak { height: 80px; padding: 8px 16px; } .streak .s-wins { font-size: 26px; margin-top: 5px; }
  .fight { height: 62px; font-size: 26px; gap: 5px; } .mode { height: 52px; } .field input { height: 46px; padding-top: 17px; }
}
@media (max-width: 980px), (max-height: 640px) {
  #bar { height: 50px; gap: 10px; padding: 0 10px; grid-template-columns: auto 1fr auto auto; } .hstats { display: none; } .navl { display: none; } .brand b { font-size: 21px; } .brand .mark { width: 30px; height: 30px; } .ca-pill { width: auto; max-width: 250px; min-width: 0; }
  #menu { inset: 50px 0 0 0; grid-template-columns: minmax(0, 1fr); grid-auto-rows: max-content; align-content: start; padding: 14px 14px 28px; overflow-y: auto; overflow-x: hidden; gap: 14px; touch-action: pan-y; -webkit-overflow-scrolling: touch; }
  #menu > * { min-width: 0; }
  .left { gap: 12px; } .center { order: 3; justify-content: flex-start; } .right { display: none; }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)) 76px; padding: 8px; width: 100%; gap: 8px; } .tcard, .tedit { height: 112px; } .tedit svg { width: 20px; height: 20px; }
  .title { font-size: 60px; } .tag { font-size: 14.5px; max-width: none; } .fight { height: 62px; font-size: 25px; } .streak { height: 84px; } .streak .s-wins { font-size: 24px; }
  .modes { grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr)); gap: 8px; } .mode { height: 54px; } .lvls { gap: 2px; } .lvls button { padding: 3px 4px; font-size: 10px; } .fight small { font-size: 10.5px; letter-spacing: 0.02em; } .mode i { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 4px; }
  .fields { grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr); gap: 8px; } .field .hint { display: none; }
  .tbar { grid-template-columns: 1fr 104px 1fr; top: 6px; gap: 6px; width: calc(100vw - 12px); } .side { grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 4px; } .mon.big { height: 44px; grid-template-columns: 34px minmax(0, 1fr); padding: 4px 8px 4px 4px; gap: 6px; } .mon.big .pt { width: 34px; height: 34px; } .mon.small { height: 44px; padding: 3px; } .mon .mi { grid-template-rows: 14px 7px; gap: 3px; } .mon .nm { font-size: 11.5px; line-height: 14px; } .mon .nm s { display: none; } .mon .sub { display: none; } .mon .key { display: none; }
  .side { gap: 4px; } .clockbox { height: 34px; } .clockbox b { font-size: 13px; } .stake { font-size: 10px; height: 20px; line-height: 18px; } .modetag { display: none; }
  #kofeed { top: 60px; width: 220px; } #kofeed div { font-size: 11px; }
  #leave { bottom: auto; top: 58px; right: 8px; height: 30px; font-size: 12px; }
  .sheet { padding: 20px 18px 16px; } .sheet h2 { font-size: 36px; } .sheet .big { font-size: 34px; margin-top: 12px; }
  }
/* a phone held sideways: the fight button and your team side by side, nothing to scroll for */
@media (max-height: 520px) and (min-width: 640px) {
  #menu { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); padding: 10px 14px 18px; gap: 14px; }
  .center { order: 0; } .eyebrow { display: none; } .title { font-size: 40px; margin: -0.16em 0 0; } .tag { display: none; } .small { display: none; }
  .streak { height: 62px; padding: 8px 12px; } .streak .s-wins { font-size: 18px; margin-top: 3px; } .streak .s-worth { font-size: 11.5px; }
  .fight { height: 52px; font-size: 21px; gap: 3px; } .fight small { font-size: 10px; }
  .modes { gap: 6px; } .mode { height: 44px; } .mode b { font-size: 12.5px; } .mode i { font-size: 10px; }
  .field input { height: 44px; padding-top: 16px; } .left { gap: 8px; }
  .team { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tedit { grid-column: 1 / -1; height: 38px; grid-auto-flow: column; } .tcard { height: 128px; }
}
body.touch .bbar { display: none; }

/* the page's own demo (GPU looks, trailer): the arena alone */
body.demo #menu, body.demo #veil, body.demo #bar, body.demo #wait { display: none !important; }

/* ---------------------------------------------------------------- the team picker: the whole roster on one screen, never a scroll.
   Faces in a grid that always fits the window; the one you point at glows in its type's colour and shows on the stage at the right. */
#picker { position: fixed; inset: 0; z-index: 50; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; padding: 18px 22px 20px; overflow: hidden;
  background: radial-gradient(1100px 620px at 22% -10%, rgba(52, 66, 140, 0.5), transparent 62%), radial-gradient(900px 600px at 100% 100%, rgba(255, 178, 26, 0.08), transparent 60%), linear-gradient(180deg, #0b1022, #060914); }
#picker::before { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(rgba(170, 185, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(170, 185, 255, 0.035) 1px, transparent 1px); background-size: 32px 32px; mask-image: linear-gradient(180deg, #000, transparent 85%); }
#picker > * { position: relative; }
body.picking #menu, body.picking #bar { visibility: hidden; }
.pk-top { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 20px; align-items: center; }
.pk-head h2 { margin: 0; font: 400 42px/1 var(--f-d); letter-spacing: 0.01em; background: linear-gradient(180deg, #fff 15%, #ffe58a 70%, #ffb21a); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 3px 0 #6a3e06); }
.pk-head p { margin: 7px 0 0; color: var(--ink2); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-slots { display: grid; grid-template-columns: repeat(3, 214px); gap: 10px; }
.pk-slot { position: relative; height: 92px; border-radius: 14px; display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 4px; padding-right: 12px; text-align: left; overflow: hidden; border: 1px dashed var(--line3); background: rgba(255, 255, 255, 0.025); transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.pk-slot.full { border-style: solid; border-color: color-mix(in srgb, var(--tc) 70%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 28%, #10152a), #0c1124 72%); }
.pk-slot.cur { box-shadow: 0 0 0 2px var(--gold), 0 0 28px rgba(255, 207, 58, 0.22); }
.pk-slot canvas { width: 96px; height: 80px; object-fit: contain; image-rendering: pixelated; }
.pk-num { position: absolute; left: 7px; top: 7px; font: 400 9px/1 var(--f-p); color: var(--ink3); }
.pk-slot.cur .pk-num { color: var(--gold); }
.pk-sn { min-width: 0; }
.pk-sn b { display: block; font: 700 15px/1.2 var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-slot:not(.full) .pk-sn b { color: var(--ink3); font-weight: 600; }
.pk-sn i { display: flex; gap: 4px; margin-top: 6px; font-style: normal; height: 16px; }
.pk-x { position: absolute; right: 7px; top: 5px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font: 600 15px/1 var(--f-t); color: var(--ink2); background: rgba(0, 0, 0, 0.35); visibility: hidden; }
.pk-slot.full:hover .pk-x { visibility: visible; }
.pk-x:hover { color: #fff; background: rgba(255, 79, 94, 0.6); }
.pk-acts { display: flex; gap: 10px; }
.pk-acts .btn { height: 46px; } .pk-acts #pk-done { min-width: 120px; }
.pk-body { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 18px; min-height: 0; }
.pk-main { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; }
.pk-filters { display: flex; flex-wrap: wrap; gap: 5px; }
.pk-filters button { flex: none; font: 600 11.5px/1 var(--f-t); padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line2); color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; }
.pk-filters button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #ffcf3a); }
.pk-filters button[data-f="all"]::before { display: none; }
.pk-filters button:hover { border-color: var(--line3); color: var(--ink); }
.pk-filters button.on { background: color-mix(in srgb, var(--c, #ffcf3a) 20%, transparent); border-color: var(--c, #ffcf3a); color: var(--ink); }
.pk-grid { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 8px; min-height: 0; }
.pk-tile { position: relative; min-width: 0; min-height: 0; border-radius: 12px; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 4px; padding: 8px 6px 8px; overflow: hidden;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 13%, #121a33), #0a0f1f 88%); border: 1px solid rgba(255, 255, 255, 0.07); transition: border-color 0.15s, box-shadow 0.15s, filter 0.2s, opacity 0.2s, background 0.15s; }
.pk-tile::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--tc); opacity: 0.55; }
.pk-tile .pf { width: auto; height: 100%; max-height: 104px; aspect-ratio: 1; border-radius: 10px; background: rgba(0, 0, 0, 0.25) center / contain no-repeat; image-rendering: pixelated; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset; }
.pk-tile b { max-width: 100%; font: 700 12.5px/1.2 var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.pk-tile:hover, .pk-tile.focus { border-color: color-mix(in srgb, var(--tc) 90%, transparent); background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 34%, #121a33), #0a0f1f 92%); box-shadow: 0 0 0 1px color-mix(in srgb, var(--tc) 60%, transparent) inset, 0 0 26px color-mix(in srgb, var(--tc) 42%, transparent); }
.pk-tile.sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset, 0 0 22px rgba(255, 207, 58, 0.28); }
.pk-tile .pk-badge { position: absolute; right: 6px; top: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #1c1404; font: 800 12px/1 var(--f-t); visibility: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }
.pk-tile.sel .pk-badge { visibility: visible; }
.pk-tile .pk-lg { position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 400 11px/1 var(--f-t); background: rgba(10, 14, 28, 0.85); color: var(--gold); box-shadow: 0 0 0 1px rgba(255, 207, 58, 0.55) inset; }
.pk-grid.dim .pk-tile:not(.match) { opacity: 0.2; filter: grayscale(0.9); }
.pk-info { min-height: 0; overflow: hidden; display: grid; grid-template-rows: minmax(140px, 1fr) auto auto auto auto; gap: 14px; padding: 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.pk-stage { position: relative; min-height: 0; border-radius: 12px; overflow: hidden; background: radial-gradient(70% 75% at 50% 62%, color-mix(in srgb, var(--tc, #445) 42%, transparent), transparent 70%), linear-gradient(180deg, #0d1328, #080c19); border: 1px solid rgba(255, 255, 255, 0.06); }
.pk-stage::after { content: ''; position: absolute; left: 16%; right: 16%; top: 71%; height: 12%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--tc, #445) 50%, transparent), transparent); }
.pk-stage canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; image-rendering: pixelated; }
.pk-lgb { position: absolute; z-index: 2; left: 10px; top: 10px; font: 700 10px/1 var(--f-t); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: rgba(255, 207, 58, 0.16); color: var(--gold); visibility: hidden; }
.pk-lgb.on { visibility: visible; }
.pk-role { position: absolute; z-index: 2; right: 10px; top: 10px; font: 700 10px/1 var(--f-t); letter-spacing: 0.1em; text-transform: uppercase; padding: 5px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.4); color: var(--ink2); }
.pk-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.pk-title b { font: 400 30px/1 var(--f-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-types { display: flex; gap: 5px; flex: none; }
.pk-chain { display: grid; grid-template-columns: 1fr 16px 1fr 16px 1fr; align-items: center; height: 64px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); padding: 0 6px; }
.pk-chain .st { display: grid; justify-items: center; gap: 2px; min-width: 0; }
.pk-chain canvas { width: 72px; height: 44px; object-fit: contain; image-rendering: pixelated; }
.pk-chain .st span { font: 600 10px/1 var(--f-t); color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pk-chain .ar { color: var(--ink4); font: 700 14px/1 var(--f-t); text-align: center; }
.pk-chain .off { visibility: hidden; }
.pk-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; }
.pk-stats div { display: grid; grid-template-columns: 50px minmax(0, 1fr) 28px; gap: 8px; align-items: center; font: 600 11px/1 var(--f-t); color: var(--ink3); }
.pk-stats i { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.pk-stats i u { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, color-mix(in srgb, var(--tc, #ffcf3a) 70%, #fff), var(--tc, #ffcf3a)); }
.pk-stats b { font-variant-numeric: tabular-nums; color: var(--ink2); text-align: right; }
.pk-moves { display: grid; gap: 6px; }
.pk-moves div { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 10px; align-items: center; height: 40px; padding: 0 10px 0 0; border-radius: 9px; background: rgba(255, 255, 255, 0.035); overflow: hidden; }
.pk-moves div::before { content: ''; align-self: stretch; background: var(--mc); }
.pk-moves b { display: block; font: 700 13.5px/1.15 var(--f-t); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-moves i { display: block; font: 500 11px/1.2 var(--f-t); font-style: normal; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pk-moves em { font: 600 11px/1 var(--f-t); font-style: normal; color: var(--ink2); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
@media (max-width: 1500px) { .pk-body { grid-template-columns: minmax(0, 1fr) 350px; } .pk-slots { grid-template-columns: repeat(3, 190px); } .pk-slot { grid-template-columns: 78px minmax(0, 1fr); } .pk-slot canvas { width: 78px; height: 66px; } .pk-sn b { font-size: 14px; } .pk-head h2 { font-size: 36px; } .pk-filters button { padding: 6px 8px; font-size: 11px; } }
@media (max-width: 1280px), (max-height: 760px) { #picker { padding: 12px 14px 14px; gap: 10px; } .pk-slot { height: 74px; grid-template-columns: 74px minmax(0, 1fr); } .pk-slot canvas { width: 74px; height: 62px; } .pk-head p { display: none; } .pk-info { gap: 9px; padding: 12px; } .pk-chain { height: 52px; } .pk-chain canvas { height: 34px; } .pk-moves div { height: 34px; } .pk-tile b { font-size: 11px; } .pk-stats { gap: 4px 12px; } }
/* phones and small windows: the faces only, the stage and the stats give way, the grid still never scrolls */
@media (max-width: 980px), (max-height: 560px) {
  #picker { padding: 8px 10px 10px; gap: 8px; grid-template-rows: auto minmax(0, 1fr); }
  .pk-top { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; } .pk-head { display: none; } .pk-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .pk-slot { height: 52px; grid-template-columns: 50px minmax(0, 1fr); padding-right: 6px; } .pk-slot canvas { width: 50px; height: 44px; } .pk-sn b { font-size: 12px; } .pk-sn i { display: none; } .pk-num { display: none; }
  .pk-acts { gap: 6px; } .pk-acts .btn { height: 40px; padding: 0 12px; font-size: 13px; } #pk-rand { display: none; }
  .pk-body { grid-template-columns: minmax(0, 1fr); } .pk-info { display: none; } .pk-filters { display: none; } .pk-main { grid-template-rows: minmax(0, 1fr); }
  .pk-grid { gap: 5px; } .pk-tile { padding: 4px 3px 5px; border-radius: 9px; gap: 2px; } .pk-tile b { font-size: 9.5px; } .pk-tile .pk-lg { display: none; } .pk-tile .pk-badge { width: 16px; height: 16px; font-size: 10px; right: 3px; top: 3px; }
}
@media (max-width: 980px) and (orientation: portrait) { .pk-top { grid-template-columns: minmax(0, 1fr); } .pk-acts { justify-content: flex-end; } .pk-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
