/* Jetpaint menus in the house style (Ninja Kickoff / Absolute Units): big logo + pixel tagline, mode cards with
   pixel icons, chunky dark panels, yellow primary, Press Start 2P for titles/buttons, Rubik for body text, the live
   game behind the menu. Phone-first: 667x375 and 844x390 landscape fit without scrolling. Used by src/ui.js
   (main menu, setup, results, how to play, settings, credits, pause) and src/net/online-main.js (online screens). */
:root{
  --bg:#0d1017;--panel:#151a25;--panel2:#1f2635;--panel3:#283044;--ink:#000;--txt:#eef2f8;--mut:#9aa6bd;
  --yel:#ffd84a;--yel-d:#9a7410;--teal:#2ee6d6;--orange:#ff8a2a;--red:#ff5d6c;--green:#8be04e;
  --px:'Press Start 2P',ui-monospace,monospace;--body:Rubik,system-ui,-apple-system,sans-serif;
}
html,body{font-family:var(--body);font-weight:500}

/* ---------- layer ---------- */
#menu,#pause{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;justify-content:safe center;box-sizing:border-box;overflow:auto;
  padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));-webkit-user-select:none;user-select:none}
#menu{z-index:5;background:linear-gradient(180deg,#0d1017c4,#0d101770 38%,#0d101770 62%,#0d1017d8)}
#menu.dim{background:#0a0d14d0}
#pause{z-index:8;background:#0a0d14c8}
#menu.hidden,#pause.hidden{display:none}
html.touch #menu,html.touch #pause{touch-action:pan-y}
.scr{display:flex;flex-direction:column;align-items:center;gap:12px;width:100%;max-width:980px}
#menu img,#pause img{-webkit-user-drag:none;pointer-events:none;image-rendering:pixelated}

/* ---------- type ---------- */
.logo{font-family:var(--px);font-weight:400;font-size:72px;line-height:1;letter-spacing:3px;margin:0;white-space:nowrap;text-align:center}
.logo .a{color:var(--teal);text-shadow:4px 4px 0 #0a5f58,8px 8px 0 #000}
.logo .b{color:var(--orange);text-shadow:4px 4px 0 #8a3d05,8px 8px 0 #000}
.logo img{display:block;height:clamp(64px,30vh,240px);width:auto;max-width:80vw;margin:0 auto;filter:drop-shadow(0 6px 0 #0008)}
.logo.sm{font-size:22px;letter-spacing:1px}.logo.sm .a,.logo.sm .b{text-shadow:2px 2px 0 #000,3px 3px 0 #000}
.logo.sm img{height:34px}
.tagline{font-family:var(--px);font-size:12px;letter-spacing:1px;color:#c8d2ff;text-shadow:2px 2px 0 #000;text-align:center;line-height:1.5;margin-top:16px}
#menu h2,#pause h2,.h2{font-family:var(--px);font-weight:400;font-size:18px;line-height:1.3;color:var(--yel);text-shadow:3px 3px 0 #000;margin:0;text-align:center;opacity:1}
.lbl{font-family:var(--px);font-size:9px;color:var(--mut);letter-spacing:1px;text-transform:uppercase;line-height:1.4}
.muted{color:var(--mut);font-size:13px}
.err{color:#ff8a96;font-weight:700;margin:2px 0 8px}
.status{margin:0 0 8px;font-weight:700}
kbd{font-family:var(--px);font-size:9px;background:var(--panel3);border:2px solid #000;border-bottom-width:3px;border-radius:5px;padding:2px 5px;color:#fff}

/* ---------- panels ---------- */
.panel,#menu .card{box-sizing:border-box;background:#141925ec;border:3px solid var(--ink);border-radius:12px;box-shadow:0 5px 0 #000;padding:12px 14px;color:var(--txt)}

/* ---------- buttons ---------- */
#menu button,#pause button,.btn{font-family:var(--px);font-weight:400;font-size:11px;line-height:1.3;color:#fff;background:var(--panel2);border:3px solid var(--ink);border-radius:8px;box-shadow:0 4px 0 #000;
  min-height:44px;min-width:44px;padding:0 16px;cursor:pointer;text-shadow:2px 2px 0 #000;text-transform:uppercase;white-space:nowrap;touch-action:manipulation;transition:transform .08s,background-color .1s;-webkit-tap-highlight-color:transparent}
#menu button:active:not(:disabled),#pause button:active:not(:disabled){transform:translateY(2px);box-shadow:0 2px 0 #000}
#menu button:focus-visible,#pause button:focus-visible,#sound:focus-visible,#pausebtn:focus-visible,#menu input:focus-visible,#pause input:focus-visible,
html.kbnav #menu button:focus,html.kbnav #pause button:focus,html.kbnav #menu input:focus,html.kbnav #pause input:focus{outline:3px solid var(--yel);outline-offset:3px}
#menu button:focus:not(:focus-visible),#pause button:focus:not(:focus-visible){outline:none}
html.kbnav #menu button:focus,html.kbnav #pause button:focus{outline:3px solid var(--yel)}
#menu button:disabled,#pause button:disabled{opacity:.38;cursor:default}
#menu button.on,#pause button.on{background:#3a3214;color:var(--yel);border-color:var(--yel);box-shadow:0 4px 0 #000,0 0 0 1px #000}
#menu .go.on,#ready.on{background:var(--green)!important;color:#0d1a05!important;border-color:#000!important}
#menu .big,#pause .big{min-height:52px;font-size:15px;padding:0 28px}
.row{display:flex;gap:10px;align-items:center;justify-content:center;flex-wrap:wrap}
.seg{display:flex;gap:6px}.seg.feel{flex-wrap:wrap}.seg button{flex:1 1 auto;padding:0 10px!important}

/* ---------- main menu ---------- */
.home{gap:14px}
.mcards{display:flex;gap:14px;justify-content:center;width:100%}
#menu .mcard{flex:0 1 230px;min-width:0;display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 10px 14px;border-radius:12px;background:#151a25e8;box-shadow:0 5px 0 #000;text-shadow:none}
#menu .mcard img{width:80px;height:80px}
#menu .mcard b{font-family:var(--px);font-weight:400;font-size:15px;color:var(--yel);text-shadow:3px 3px 0 #000;white-space:nowrap}
#menu .mcard small{white-space:normal;text-transform:none;font-family:var(--body);font-size:13px;font-weight:600;line-height:1.3;color:#d7deeb;max-width:200px}
.subrow{display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
#menu .subrow button{min-width:150px}

/* ---------- setup (vs bots) ---------- */
.setup .panel{width:100%;max-width:780px;display:flex;flex-direction:column;gap:10px}
.grp{display:flex;flex-direction:column;gap:6px;min-width:0}
#menu .map{flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:5px;padding:5px;border-radius:10px;background:#0f131c;text-shadow:2px 2px 0 #000}
#menu .map img{width:100%;aspect-ratio:2/1;object-fit:cover;border-radius:6px;background:#161b26;display:block}
#menu .map.on{background:#3a3214;border-color:var(--yel);box-shadow:0 4px 0 #000,0 0 14px #ffd84a55}
.mname{font-family:var(--px);font-size:10px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map.on .mname{color:var(--yel)}
.dots{min-height:12px;display:flex;gap:4px;justify-content:center}.dots i{width:12px;height:12px;border-radius:50%;display:inline-block;border:2px solid #000}

/* ---------- how to play / credits / settings ---------- */
.info .panel{width:100%;max-width:820px}
.how{display:grid;grid-template-columns:1.15fr 1fr;gap:6px 22px;font-size:15px;line-height:1.45}
.how h3,.creds h3,.sets h3{font-family:var(--px);font-weight:400;font-size:10px;color:var(--yel);margin:4px 0 6px;letter-spacing:1px}
.how ul{margin:0;padding-left:18px}.how li{margin-bottom:4px}.how b{color:var(--yel)}
.how .keys{display:grid;grid-template-columns:auto 1fr;gap:6px 10px;align-items:center;font-size:14px}
.how .k-touch{display:none}html.touch .how .k-touch{display:grid}html.touch .how .k-desk{display:none}
.creds{font-size:14px;line-height:1.5;display:grid;grid-template-columns:1fr 1fr;gap:0 26px}
.creds .cfiles{max-height:52vh;overflow:auto;padding-right:6px}
.creds .cr{margin:0 0 10px;break-inside:avoid}.creds a{color:#7dd3ff;word-break:break-all}.creds .url{color:#c9d2e3;word-break:break-all;-webkit-user-select:text;user-select:text}
body.adBusy #menu button{pointer-events:none}
.creds pre{font-family:var(--body);font-size:12px;white-space:pre-wrap;margin:0;color:#c9d2e3}
input[type=range]{-webkit-appearance:none;appearance:none;width:170px;height:44px;background:transparent;cursor:pointer;margin:0;touch-action:pan-x}
input[type=range]::-webkit-slider-runnable-track{height:10px;border-radius:6px;border:2px solid #000;background:linear-gradient(90deg,var(--yel) var(--v,50%),#2a3142 var(--v,50%))}
input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:26px;margin-top:-10px;border-radius:5px;border:3px solid #000;background:#fff;box-shadow:0 3px 0 #000}
input[type=range]::-moz-range-track{height:10px;border-radius:6px;border:2px solid #000;background:#2a3142}
input[type=range]::-moz-range-progress{height:10px;border-radius:6px;background:var(--yel)}
input[type=range]::-moz-range-thumb{width:18px;height:22px;border-radius:5px;border:3px solid #000;background:#fff}
input[type=range]:disabled{opacity:.4}

/* ---------- results ---------- */
.res .panel{min-width:min(560px,100%);max-width:760px;text-align:center}
.result{font-family:var(--px);font-size:30px;line-height:1.2;color:var(--yel);text-shadow:4px 4px 0 #000;margin-bottom:8px}
.result.lose{color:#ff8a96}.result.draw{color:#cfd6e4}
.standings{font-family:var(--px);font-size:12px;line-height:1.6;margin-bottom:6px;text-shadow:2px 2px 0 #000}
.standings > span{white-space:nowrap} /* a name and its % never split over two lines */
.series{font-size:14px;margin:2px 0 8px}
.stats{border-collapse:collapse;margin:4px auto 0;font-size:15px;font-weight:700}
.stats td,.stats th{padding:3px 12px;text-align:right}.stats td:first-child{text-align:left;white-space:nowrap}
.stats th{font-family:var(--px);font-weight:400;font-size:8px;color:var(--mut);padding-bottom:6px}
.stats tr+tr td{border-top:1px solid #ffffff12}
.stats .muted{font-size:11px}
.mvp{font-family:var(--px);font-size:8px;background:var(--yel);color:#1a1408;border:2px solid #000;border-radius:4px;padding:2px 4px;vertical-align:2px;text-shadow:none}

/* ---------- pause ---------- */
.pause{gap:10px}
/* groups without labels: RESUME / RESTART + NEW ARENA / SETTINGS + sound / QUIT, more air between groups than inside */
.pbtns{display:flex;flex-direction:column;gap:20px;width:280px;max-width:100%}
.pbtns .pgrp{display:flex;flex-direction:column;gap:8px}
.pbtns button{width:100%}
/* Music / Sounds look like the sound panel's pair (body font, yellow frame when on, dim + struck through when off) */
.pbtns .psnd{display:flex;gap:8px}
#pause .pbtns .psnd button{flex:1 1 0;min-width:0;font-family:var(--body);font-weight:700;font-size:14px;letter-spacing:0;text-transform:none;color:#fff;background:var(--panel2);border:3px solid #000;border-radius:9px;box-shadow:0 3px 0 #000;min-height:44px;padding:0 10px;text-shadow:1px 1px 0 #000}
#pause .pbtns .psnd button:not(.sel){color:var(--mut);text-decoration:line-through;background:#10141d}
#pause .pbtns .psnd button.sel{border-color:var(--yel)}
.pnote{font-size:14px;color:#d7deeb;text-align:center;max-width:420px;line-height:1.4}

/* ---------- corner buttons ---------- */
#sound,#pausebtn{position:fixed;z-index:11;top:max(8px,env(safe-area-inset-top));width:46px;height:46px;padding:0;display:flex;align-items:center;justify-content:center;
  background:#151a25e0;border:3px solid #000;border-radius:10px;box-shadow:0 4px 0 #000;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
#sound{right:max(8px,env(safe-area-inset-right))}
#sound img,#pausebtn img{width:28px;height:28px;image-rendering:pixelated;pointer-events:none}
#sound.hidden,#pausebtn.hidden{display:none}
/* pause (touch): under the minimap, left of the speaker (src/hud.js sets --mmr / --mmb from the minimap's rect) */
#pausebtn{right:calc(var(--mmr,10px) + 50px);top:var(--mmb,80px);width:44px;height:44px;opacity:.85;background:#000a;box-shadow:none;border-width:2px}
#pausebtn i{display:block;width:5px;height:16px;background:#fff;margin:0 3px;border-radius:1px;box-shadow:1px 1px 0 #000}
#toast{position:fixed;left:50%;top:max(10px,env(safe-area-inset-top));transform:translate(-50%,-160%);z-index:12;font-family:var(--px);font-size:10px;line-height:1.5;color:#fff;background:#151a25f0;border:3px solid #000;border-radius:10px;box-shadow:0 4px 0 #000;padding:8px 14px;pointer-events:none;transition:transform .25s cubic-bezier(.2,1.4,.4,1);white-space:nowrap}
#toast.show{transform:translate(-50%,0)}#toast b{color:var(--yel);font-weight:400}

/* ---------- online screens (src/net/online-main.js) ---------- */
#menu .card{width:100%;max-width:560px;margin:auto}
.h1sub{font-family:var(--px);font-size:10px;color:var(--mut);letter-spacing:1px;text-shadow:2px 2px 0 #000}
#menu .card h2{font-size:11px;text-align:left;margin:8px 0 8px}
.card .row{justify-content:flex-start;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.card .row .lbl{min-width:52px}
#menu .card .row button{padding:0 9px;font-size:9px}
.row.end{justify-content:flex-end!important;margin-top:6px}
#menu input[type=text]{min-height:44px;box-sizing:border-box;background:#0b0e15;color:var(--yel);border:3px solid #000;border-radius:8px;padding:0 12px;font-family:var(--px);font-size:13px;width:180px;-webkit-user-select:text;user-select:text}
#menu input#code{width:140px;text-transform:uppercase;letter-spacing:3px;text-align:center}
#menu input::placeholder{color:#5d677c}
#menu .card.on2{max-width:900px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 24px;align-items:start}
.hico{display:flex;align-items:center;gap:8px}.hico img{width:28px;height:28px}
.rooms{max-height:170px;overflow:auto;background:#0b0e15;border:3px solid #000;border-radius:8px;padding:4px 8px}
.rrow{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 0;font-size:14px}
.rrow b{font-family:var(--px);font-weight:400;font-size:11px;color:var(--yel)}
#menu .rrow button{min-width:72px;font-size:9px;padding:0 10px}
.live{color:var(--yel);font-weight:700}
.codebox{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:4px}
#menu .codebox button{display:flex;align-items:center;gap:8px;font-size:10px}
.codebox button img{width:20px;height:20px}
.code{font-family:var(--px);font-size:28px;letter-spacing:5px;color:var(--yel);line-height:1.2;text-shadow:3px 3px 0 #000}
.link{font-size:12px;margin-bottom:8px;word-break:break-all}
.sides{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:8px}
.side{flex:1 1 0;min-width:120px;border:3px solid #000;border-left:6px solid;background:#0b0e15;border-radius:8px;padding:4px 10px}
.seat{font-weight:700;padding:3px 0;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.seat.bot{opacity:.6;font-weight:600}
.tag{font-family:var(--px);font-size:7px;background:#ffffff1f;color:#fff;border-radius:4px;padding:2px 4px;vertical-align:2px}
#menu .card.res{max-width:820px;display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:0 22px;align-items:center;text-align:center}
.choices{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:center}
#ready.big{min-height:56px;min-width:200px;font-size:18px;letter-spacing:2px}
#netinfo{position:fixed;left:10px;bottom:8px;font:12px ui-monospace,monospace;opacity:.55;pointer-events:none;z-index:4}
@media (max-width:700px) and (min-height:521px){#menu .card.on2,#menu .card.res{grid-template-columns:1fr}}

/* ---------- phone landscape ---------- */
@media (max-height:520px){
  #menu,#pause{padding-top:max(6px,env(safe-area-inset-top));padding-bottom:max(6px,env(safe-area-inset-bottom));padding-left:max(58px,env(safe-area-inset-left));padding-right:max(58px,env(safe-area-inset-right))}
  .scr{gap:8px}
  .logo{font-size:34px;letter-spacing:2px}.logo .a{text-shadow:3px 3px 0 #0a5f58,5px 5px 0 #000}.logo .b{text-shadow:3px 3px 0 #8a3d05,5px 5px 0 #000}
  .logo img{height:clamp(48px,22vh,90px)}
  .tagline{font-size:8px;margin-top:9px}
  #menu h2,#pause h2{font-size:14px}
  .home{gap:9px}
  .mcards{gap:10px}
  #menu .mcard{padding:9px 8px 9px;gap:5px;flex-basis:200px}
  #menu .mcard img{width:48px;height:48px}
  #menu .mcard b{font-size:12px}
  #menu .mcard small{font-size:11.5px}
  #menu .subrow button{min-width:0;font-size:9px;padding:0 12px}
  #menu button,#pause button{font-size:10px}
  #menu .big,#pause .big{min-height:48px;font-size:13px}
  .panel{padding:8px 12px}
  .setup .panel{gap:6px}
  .mname{font-size:8px}
  .how{font-size:13px;line-height:1.35;gap:2px 16px}.how .keys{font-size:12.5px;gap:4px 8px}
  .creds{font-size:12.5px;line-height:1.4}.creds .cfiles{max-height:56vh}.creds .cr{margin-bottom:6px}
  input[type=range]{width:130px}
  .pbtns{gap:12px}.pbtns .pgrp{gap:6px}.pnote{font-size:12px}
  #pause .pbtns .psnd button{min-height:36px}
  .result{font-size:22px;margin-bottom:4px}.standings{font-size:10px;margin-bottom:2px}
  .stats{font-size:13px}.stats td,.stats th{padding:1px 9px}
  #menu .card{padding:8px 12px;max-width:none}

  #menu .card.on2{gap:0 16px}
  #menu .card h1{margin-bottom:4px}
  .logo.sm{font-size:16px}
  #menu .card h2{margin:4px 0 6px;font-size:9px}
  .card .row{margin-bottom:6px;gap:6px}
  .card .row .lbl{min-width:0;font-size:8px}
  #menu .card .row button{padding:0 8px;font-size:8px}
  .card.on2 .row .lbl:not([for]){display:none}
  #menu .card.res{grid-template-columns:1fr;gap:4px}
  .card.res .stats{font-size:12.5px}
  #menu .card .codebox button{font-size:9px;padding:0 10px}
  #menu input[type=text]{font-size:11px;width:150px}
  #menu input#code{width:118px}
  .rooms{max-height:110px}
  .link{display:none}
  .code{font-size:20px;letter-spacing:3px}
  .seat{font-size:13px;padding:1px 0}
  #menu .card.room{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
  .card.room .opts2 .lbl{display:none}
  #ready.big{min-height:50px;min-width:160px;font-size:14px}
  .series{margin:2px 0 4px;font-size:12px}
  .card.res .result{font-size:20px}
}
@media (max-height:520px) and (max-width:700px){
  #menu,#pause{padding-left:max(54px,env(safe-area-inset-left));padding-right:max(54px,env(safe-area-inset-right))}
  .logo{font-size:30px}
  #menu .mcard small{font-size:11px}
}
@media (prefers-reduced-motion:reduce){#menu .mcard,#menu button,#toast{transition:none}#menu button.ask,#pause button.ask{animation:none}}

/* ---------- rotate (portrait on touch) ---------- */
#rotate{display:none;position:fixed;inset:0;z-index:20;background:var(--bg);color:var(--txt);flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;box-sizing:border-box;gap:10px}
#rotate .ph{width:54px;height:92px;border:4px solid var(--teal);border-radius:12px;margin-bottom:14px;animation:rot 2.4s ease-in-out infinite;box-shadow:4px 4px 0 #000}
#rotate b{font-family:var(--px);font-weight:400;font-size:16px;color:var(--yel);text-shadow:3px 3px 0 #000;line-height:1.4}#rotate span{color:var(--mut);font-size:16px}
@keyframes rot{0%,20%{transform:rotate(0)}50%,80%{transform:rotate(-90deg)}100%{transform:rotate(0)}}
@media (orientation:portrait){html.touch #rotate{display:flex}}
/* online title + small icon buttons */
.ttl{display:flex;align-items:center;gap:12px;margin-bottom:8px;flex-wrap:wrap}.ttl .logo{margin:0}
#menu h2.hico{display:flex;align-items:center;gap:8px}
#menu button.ico{min-width:44px;min-height:44px;width:44px;height:44px;padding:0;display:inline-flex;align-items:center;justify-content:center;margin-left:auto;box-shadow:0 3px 0 #000;border-width:2px}
#menu button.ico img{width:22px;height:22px}
@media (max-height:520px){.ttl{margin-bottom:4px;gap:8px}#menu h2.hico img{width:22px;height:22px}}

@media (max-height:520px){
  body:not([data-on="menu"]) #menu{padding-left:max(10px,env(safe-area-inset-left));padding-right:max(10px,env(safe-area-inset-right))}
  .code{font-size:18px}
}

/* results: paint share bar + final paint map */
.pbar{display:flex;height:28px;max-width:540px;margin:6px auto 6px;border:3px solid #000;border-radius:9px;overflow:hidden;background:#2a3044;box-shadow:0 4px 0 #000}
.pbar span{display:flex;align-items:center;justify-content:center;min-width:0;overflow:hidden;container-type:inline-size;transform-origin:left;animation:pgrow .7s cubic-bezier(.2,.9,.3,1.15) both}
/* a segment too narrow for its "12%" shows no label (labels never run into each other) */
@container (max-width:38px){.pbar span b:not(.w2){display:none}}
@container (max-width:28px){.pbar span b.w2{display:none}}
@media (max-height:520px){
  @container (min-width:31px){.pbar span b:not(.w2){display:block}}
  @container (min-width:23px){.pbar span b.w2{display:block}}
}
.pbar span b{font-family:var(--px);font-size:11px;color:#0d1017;text-shadow:none;white-space:nowrap;overflow:hidden}
.pbar .rest{background:repeating-linear-gradient(45deg,#2a3044 0 6px,#232838 6px 12px);animation:none}
@keyframes pgrow{from{transform:scaleX(0)}to{transform:scaleX(1)}}
.pmap{display:block;width:auto;max-width:min(540px,100%);max-height:26vh;margin:6px auto 8px;border:3px solid #000;border-radius:8px;image-rendering:pixelated;box-shadow:0 4px 0 #000;animation:pfade .6s .3s both}
@keyframes pfade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (max-height:520px){.pbar{height:20px;margin:3px auto}.pbar span b{font-size:9px}
  /* the replay box stays clear of the fullscreen + speaker corner: a narrower replay column, bottom-aligned with the
     results panel, so its top sits below the corner buttons */
  .res.rp .rpwrap{align-items:flex-end}
  .res.rp .rpside{flex:0 0 auto;width:min(190px,32vw)}
  .pmap{max-height:24vh;margin:3px auto 4px}
}
@media (prefers-reduced-motion:reduce){.pbar span,.pmap{animation:none}}

/* ---------- results with the best-moment replay (src/replay.js) ----------
   The replay is drawn on the game canvas under #menu: dimmed full screen, and sharp inside #rpslot (an empty, transparent
   box whose rectangle the replay reads every frame). So #menu and the boxes around the slot stay transparent. */
#menu.rp{background:transparent}
.scr.res.rp{max-width:1120px;gap:12px}
.rpwrap{display:flex;gap:16px;align-items:center;justify-content:center;width:100%}
.res.rp .rpwrap .panel{flex:1.15 1 0;min-width:0;max-width:600px}
.rpside{flex:1 1 0;min-width:0;max-width:600px;display:flex;flex-direction:column;gap:9px}
.rpslot{width:100%;aspect-ratio:16/9;box-sizing:border-box;border:3px solid #000;border-radius:11px;box-shadow:0 5px 0 #000;background:transparent}
.rpbtns{display:flex;gap:8px;justify-content:center}
#menu .rpbtns button{flex:1 1 0;min-width:0;padding:0 10px;font-size:10px}
#menu .card.res.rp{max-width:1080px;background:transparent;border:0;box-shadow:none;padding:0;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:0 16px;align-items:center}
.card.res.rp .col.info{box-sizing:border-box;background:#141925ec;border:3px solid #000;border-radius:12px;box-shadow:0 5px 0 #000;padding:12px 14px}
.card.res.rp .col.opts{display:flex;flex-direction:column;gap:9px}
.card.res.rp .col.opts .status{margin:0;text-shadow:2px 2px 0 #000}
@media (max-height:520px){
  .scr.res.rp{gap:8px}
  .rpwrap{gap:10px}
  .rp .pmap{display:none}
  .rp .stats{font-size:12px}.rp .stats td,.rp .stats th{padding:1px 5px}
  .rp .result{font-size:18px}.rp .standings{font-size:9px}
  .rpside,.card.res.rp .col.opts{gap:6px}
  #menu .rpbtns button{min-height:44px;font-size:9px}
  #menu .card.res.rp{grid-template-columns:minmax(0,1.05fr) minmax(0,1fr);gap:0 10px;padding-right:calc(var(--corner) - 10px)} /* online: the replay box clear of the corner */
  .card.res.rp .col.info{padding:6px 10px}
  .card.res.rp .series{margin:0 0 2px}
  .card.res.rp .choices{gap:8px}
  #menu .card.res.rp .choices .big{min-height:44px;font-size:11px;padding:0 14px}
}
@media (max-width:700px) and (min-height:521px){.rpwrap{flex-direction:column}#menu .card.res.rp{grid-template-columns:1fr}}

.hint{display:block;font-size:12px;color:var(--mut);margin-top:4px}

/* main menu: VS BOTS is the primary action (yellow), How to play is a plain secondary button */
.mcard.hot{border-color:var(--yel);box-shadow:0 0 0 2px var(--yel) inset,0 6px 0 #000}
.mcard.hot b{color:var(--yel)}

/* ---------- heroes (src/ui.js: HERO step, setup chip; src/net/online-main.js: room strip, seat portraits; NEXT ROUND tiles below) ---------- */
img.hp{image-rendering:pixelated;display:block}
.heroes{gap:10px}
.hcards{display:flex;gap:10px;justify-content:center;width:100%;max-width:900px}
#menu .hcard{flex:1 1 0;min-width:0;max-width:190px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:8px 6px 9px;border-radius:12px;background:#151a25e8;box-shadow:0 5px 0 #000;text-shadow:none;white-space:normal}
#menu .hcard img.hp{width:100%;max-width:156px;height:auto;aspect-ratio:1;border:3px solid #000;border-radius:8px;background:radial-gradient(circle at 50% 60%,#26304a,#0b0e15 70%)}
#menu .hcard b{font-family:var(--px);font-weight:400;font-size:12px;color:#fff;text-shadow:2px 2px 0 #000}
#menu .hcard small{font-family:var(--body);text-transform:none;font-size:12px;font-weight:600;color:#c7cfdf;line-height:1.2;min-height:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
@media (hover:hover){#menu .hcard:hover{background:#1d2433}}
#menu .hcard.on{background:#3a3214;border-color:var(--yel);box-shadow:0 5px 0 #000,0 0 16px #ffd84a55;transform:translateY(-3px)}
#menu .hcard.on b{color:var(--yel)}
.hbars{display:flex;flex-direction:column;gap:3px;width:100%;padding:0 2px;box-sizing:border-box}
.hbar{display:flex;align-items:center;gap:5px}
.hbar i{font-style:normal;font-family:var(--px);font-size:7px;color:var(--mut);width:30px;text-align:left;text-shadow:none;flex:none}
.hbar em{flex:1;height:8px;border:2px solid #000;border-radius:3px;
  background:repeating-linear-gradient(90deg,transparent 0 calc(20% - 2px),#000 calc(20% - 2px) 20%),linear-gradient(90deg,var(--bc) calc(var(--n) * 20%),#2a3142 0)}
.s-speed{--bc:var(--teal)}.s-paint{--bc:var(--orange)}.s-power{--bc:var(--red)}.s-fuel{--bc:var(--yel)}
.hdesc{max-width:640px;min-height:60px;text-align:center;font-size:14px;line-height:1.4;color:#e3e8f1;text-shadow:1px 1px 0 #000}
.hdesc b{font-family:var(--px);font-weight:400;font-size:10px;color:var(--yel)}.hdesc .muted{font-size:13px}
/* setup: the hero chip between BACK and PLAY */
#menu .hbtn{display:inline-flex;align-items:center;gap:8px;padding:0 12px 0 6px}
#menu .hbtn img.hp{width:32px;height:32px;border:2px solid #000;border-radius:5px}
/* compact strip of five portraits */
.hstrip{display:flex;gap:5px}
#menu .hchip{width:44px;height:44px;min-width:44px;padding:0;display:flex;align-items:center;justify-content:center;border-width:2px;border-radius:7px;box-shadow:0 3px 0 #000;background:#0f131c}
#menu .hchip img.hp{width:36px;height:36px;border-radius:4px}
#menu .hchip.on{border-color:var(--yel);background:#3a3214}
/* results rows + room seats */
.stats img.hp.rh{display:inline-block;width:22px;height:22px;vertical-align:-6px;margin-right:6px;border:2px solid #000;border-radius:4px;background:#0b0e15}
.hname{font-family:var(--px);font-size:7px;color:var(--mut);font-weight:400;vertical-align:1px}
.seat{display:flex;align-items:center;gap:6px}
.seat img.hp{width:24px;height:24px;flex:none;border:2px solid #000;border-radius:4px;background:#0b0e15}
.seat .sn{overflow:hidden;text-overflow:ellipsis}
.card .hrow{flex-wrap:nowrap}
@media (max-height:520px){
  .heroes{gap:6px}
  .hcards{gap:7px}
  #menu .hcard{padding:6px 4px 7px;gap:3px}
  #menu .hcard img.hp{width:auto;height:68px;max-width:100%}
  #menu .hcard b{font-size:10px}
  #menu .hcard small{font-size:10.5px;min-height:13px}
  .hbars{gap:2px}.hbar i{font-size:6px;width:24px}.hbar em{height:6px}
  .hdesc{font-size:12px;min-height:49px;line-height:1.35}.hdesc b{font-size:9px}
  #menu .hbtn img.hp{width:28px;height:28px}
  .seat img.hp{width:20px;height:20px}
  .stats img.hp.rh{width:18px;height:18px;vertical-align:-5px;margin-right:4px}
}
@media (max-height:520px){.stats .hname{display:none}.rp .stats img.hp.rh{width:16px;height:16px;margin-right:3px;border-width:1px}}
@media (max-height:520px) and (max-width:700px){.rp .stats td,.rp .stats th{padding:1px 3px}.rp .stats td:first-child{padding-left:0}}
.seat .sn{flex:0 1 auto;min-width:2.2em;white-space:nowrap}
.seat .tag{flex:none}
@media (max-height:520px){
  .sides{display:grid;grid-template-columns:1fr 1fr;gap:6px}
  .side{min-width:0;padding:2px 6px;border-left-width:5px}
  .seat{gap:4px}
  .seat .tag.ht{display:none}
  .card .hrow{margin-bottom:4px}
  .card .hrow .hnow{display:none}
}
@media (max-height:520px) and (max-width:700px){.seat .tag.th{display:none}.card.room .opts2 .hint{display:none}}

/* ---------- map size tags (src/maps.js `size`; src/ui.js sizeBadge): always NEXT TO the name, never on the art ---------- */
#menu .map{position:relative}
.msize{font-family:var(--px);font-size:8px;line-height:1;padding:3px 4px 2px;border-radius:4px;border:2px solid #000;white-space:nowrap;text-shadow:none;pointer-events:none;box-shadow:0 2px 0 #000;flex:none}
.msize em{font-style:normal}
.msize.sm{background:#ff5fa2;color:#1c0711}
.msize.lg{background:#c9d3ea;color:#121826}
#menu .card h2 .msize.inh{font-size:7px;padding:2px 3px 1px;vertical-align:2px;margin-left:4px;box-shadow:none}
@media (max-height:520px){.msize{font-size:7px;padding:2px 3px 1px}}

/* ---------- ARENA (src/ui.js arenaCardHtml / arenaPickerHtml; house style of Ninja Kickoff / Absolute Units arena tiles) ----------
   Setup: options left, one big ARENA card right (cover art 16:9, NAME + size tag, desc) that opens the picker.
   Picker: LARGE | SMALL sections side by side, 2x2 big tiles each; art fills the tile, the name under it, picked = yellow. */
.setup .panel{max-width:1040px;flex-direction:row;align-items:flex-start;gap:18px}
.sopts{flex:1 1 300px;min-width:260px;display:flex;flex-direction:column;gap:10px}
.sarena{flex:0 1 auto;width:min(560px,calc((100vh - 200px) * 16 / 9 + 16px));min-width:0}
#menu .acard{display:flex;flex-direction:column;align-items:stretch;gap:8px;width:100%;padding:5px 5px 9px;border-radius:10px;background:#0f131c;text-align:left;white-space:normal;text-transform:none;text-shadow:none;min-width:0}
@media (hover:hover){#menu .acard:hover{background:#1d2433}}
.acard .aart{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:6px;background:#161b26;border:2px solid #000;box-sizing:border-box}
.ainfo{display:flex;flex-direction:column;gap:6px;min-width:0;padding:0 4px}
.arow{display:flex;align-items:center;gap:8px;min-width:0}
.aname{font-family:var(--px);font-weight:400;font-size:13px;line-height:1.2;color:var(--yel);text-shadow:2px 2px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.achg{margin-left:auto;flex:none;font-family:var(--px);font-size:8px;color:var(--mut);text-shadow:1px 1px 0 #000}
@media (hover:hover){#menu .acard:hover .achg,html.kbnav #menu .acard:focus .achg{color:#fff}}
.adesc{font-family:var(--body);font-size:13px;font-weight:600;line-height:1.3;color:#c7cfdf;text-shadow:1px 1px 0 #000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
/* compact card (online create form / host room): art left, text right */
.row.arow2{flex-wrap:nowrap;justify-content:flex-start;align-items:center}
#menu .acard.cmp{flex-direction:row;align-items:center;gap:10px;padding:4px 10px 4px 4px;flex:1 1 auto}
#menu .acard.cmp .aart{width:128px;flex:none}
#menu .acard.cmp .aname{font-size:10px}
#menu .acard.cmp .adesc{font-size:12px;-webkit-line-clamp:2}
.acard.cmp .ainfo{flex:1;padding:0;gap:4px}
@media (max-width:700px) and (min-height:521px){.setup .panel{flex-direction:column}.sarena{width:100%}}
@media (max-height:520px){
  .setup .panel{gap:12px}
  .sopts{gap:6px;min-width:250px}
  .sarena{width:min(480px,calc((100vh - 214px) * 16 / 9 + 14px))}
  #menu .acard{gap:5px;padding:4px 4px 6px;border-width:2px}
  .aname{font-size:10px}
  .adesc{font-size:11.5px;line-height:1.25}
  .achg{font-size:7px}
  .ainfo{gap:4px;padding:0 2px}
  #menu .acard.cmp{padding:3px 8px 3px 3px;gap:8px}
  #menu .acard.cmp .aart{width:96px}
  #menu .acard.cmp .aname{font-size:8px}
  #menu .acard.cmp .adesc{font-size:11px;-webkit-line-clamp:1}
  #menu .acard.cmp .achg{display:none}
}

/* ---------- NEXT ROUND (src/ui.js nextRoundHtml; local vs bots and online, between matches) ----------
   Title + timer bar + seconds; left CHANGE HERO (RANDOM + 5 tiles), right PICK THE ARENA (3 cards as a list), bottom a
   small Menu link and the big yellow READY. Phones (667x375, 844x390) fit without scrolling; every target >= 44 px. */
#menu:has(> .nround){padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.scr.nround{max-width:1040px}
.nrpanel{width:100%;display:flex;flex-direction:column;gap:12px;padding:14px 18px 14px}
.nrtop{display:flex;align-items:center;gap:16px}
#menu .nrtop h2{font-size:24px;white-space:nowrap;text-align:left}
.nrbar{flex:1;height:14px;border:3px solid #000;border-radius:8px;background:#0b0e15;overflow:hidden;box-shadow:0 3px 0 #000}
.nrbar i{display:block;height:100%;width:100%;background:linear-gradient(90deg,var(--yel),var(--orange));transition:width .25s linear}
.nrsec{font-family:var(--px);font-weight:400;font-size:22px;color:#fff;text-shadow:3px 3px 0 #000;min-width:2em;text-align:right;font-variant-numeric:tabular-nums}
.nrgrid{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:20px;align-items:start}
.nrcol{min-width:0;display:flex;flex-direction:column;gap:8px}
.nrcol h3.lbl{margin:0;font-weight:400;font-size:10px;color:#dfe5f0}
.nrheroes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#menu .nrh{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;min-width:0;padding:7px 4px 8px;border-radius:10px;background:#0f131c;text-shadow:none}
#menu .nrh img.hp,.nrq{width:72px;height:72px;border:3px solid #000;border-radius:8px;background:#0b0e15;box-sizing:border-box}
.nrq{display:flex;align-items:center;justify-content:center;font-family:var(--px);font-size:30px;color:var(--yel);text-shadow:3px 3px 0 #000;
  background:repeating-linear-gradient(45deg,#1b2131 0 6px,#151a26 6px 12px)}
#menu .nrh b{font-family:var(--px);font-weight:400;font-size:9px;color:#dfe5f0;text-shadow:2px 2px 0 #000;max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media (hover:hover){#menu .nrh:hover{background:#1d2433}}
#menu .nrh.on{background:#3a3214;border-color:var(--yel);box-shadow:0 4px 0 #000,0 0 14px #ffd84a55}
#menu .nrh.on b{color:var(--yel)}
.nrhd{font-size:13px;line-height:1.3;color:#e3e8f1;text-shadow:1px 1px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nrhd b{font-family:var(--px);font-weight:400;font-size:9px;color:var(--yel);margin-right:4px}
.nropts{display:flex;flex-direction:column;gap:8px}
#menu .nround .map{flex:none;display:grid;grid-template-columns:136px minmax(0,1fr) auto;align-items:center;gap:12px;padding:6px 10px 6px 6px;text-align:left;white-space:normal;text-transform:none}
#menu .nround .map img{width:136px;height:77px;aspect-ratio:auto} /* 16:9 cover art, uncovered: the size tag sits next to the name */
.nrt{display:flex;flex-direction:column;gap:6px;min-width:0}
.nrn{display:flex;align-items:center;gap:8px;min-width:0}
.nrn .mname{font-size:12px;text-transform:uppercase}
#menu .nround .map .msize{position:static;flex:none}
.nrt small{font-family:var(--body);font-size:13px;font-weight:600;line-height:1.3;color:#c7cfdf;text-shadow:1px 1px 0 #000;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nrv{display:flex;flex-direction:column;align-items:flex-end;gap:4px;min-width:52px;max-width:150px}
.nrv b{font-family:var(--px);font-weight:400;font-size:16px;color:#fff;text-shadow:2px 2px 0 #000}
.nround .map.lead .nrv b,.nround .map.on .nrv b{color:var(--yel)}
.nrv .dots{justify-content:flex-end;flex-wrap:wrap;min-height:12px}
.nrv .dots i{box-shadow:0 2px 0 #000}
.nrv .vn{font-family:var(--body);font-size:11px;font-weight:600;color:#ffe9a8;text-shadow:1px 1px 0 #000;max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nround .map.lead:not(.on){border-color:#9a7410}
.nrbot{display:flex;align-items:center;gap:14px}
#menu .nrmenu{background:none;border:0;box-shadow:none;font-family:var(--body);font-size:14px;font-weight:600;text-transform:none;text-decoration:underline;text-underline-offset:3px;color:var(--mut);text-shadow:none;padding:0 10px;margin-left:-10px}
@media (hover:hover){#menu .nrmenu:hover{background:none;color:#fff}}
.nrinfo{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;font-weight:700;color:#d7deeb}
.nrinfo .series{margin:0;font-size:13px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#menu .nrbot #ready{margin-left:auto;min-width:220px}
@media (max-height:520px){
  #menu:has(> .nround){padding-top:max(4px,env(safe-area-inset-top));padding-bottom:max(4px,env(safe-area-inset-bottom))}
  .nrpanel{gap:6px;padding:6px 10px 8px}
  .nrtop{gap:10px;min-height:44px}
  #menu .nrtop h2{font-size:14px}
  .nrbar{height:10px;border-width:2px}
  .nrsec{font-size:14px}
  .nrgrid{gap:10px}
  .nrcol{gap:4px}
  .nrcol h3.lbl{font-size:8px}
  .nrheroes{gap:5px}
  #menu .nrh{padding:4px 2px 5px;gap:3px;border-width:2px}
  #menu .nrh img.hp,.nrq{width:min(52px,9.5vh + 16px);height:min(52px,9.5vh + 16px);border-width:2px}
  .nrq{font-size:20px}
  #menu .nrh b{font-size:7px}
  .nrhd{font-size:11px}.nrhd b{font-size:8px}
  .nropts{gap:5px}
  #menu .nround .map{grid-template-columns:104px minmax(0,1fr) auto;gap:8px;padding:4px 8px 4px 4px;border-width:2px}
  #menu .nround .map img{width:104px;height:59px}
  .nrt{gap:3px}
  .nrn{gap:6px}.nrn .mname{font-size:9px}
  .nrt small{font-size:11px;line-height:1.2}
  .nrv{min-width:34px;gap:3px}
  .nrv b{font-size:12px}
  .nrv .dots i{width:10px;height:10px}
  .nrv .vn{font-size:10px;max-width:96px}
  .nrbot{gap:10px}
  #menu .nrmenu{font-size:13px}
  .nrinfo{font-size:12px}.nrinfo .series{font-size:11px}
  #menu .nrbot #ready{min-width:150px;min-height:44px;font-size:13px}
}
@media (max-height:520px) and (max-width:700px){
  .nrgrid{grid-template-columns:minmax(0,.78fr) minmax(0,1.22fr)}
  #menu .nround .map{grid-template-columns:84px minmax(0,1fr) auto}
  #menu .nround .map img{width:84px;height:47px}
  .nround .map .msize em{display:none}
  .nrv .vn{display:none}
}

/* =====================================================================================================================
   MENUS 2 (docs/ui.md "Menus 2"): HOME = your hero + one big PLAY; SETUP = hero zone + a narrow column of chips; the
   online room uses the same SETUP layout; NEXT ROUND has a roulette. Phone-first: 667x375 and 844x390 fit without scroll.
   ===================================================================================================================== */
/* first PLAY ever */
.first .fpanel{max-width:520px;font-size:15px;line-height:1.45;text-align:center}
@media (max-height:520px){.first .fpanel{font-size:13px}}

/* ---------- SETUP layout (local SETUP, hero picker, online room) ---------- */
#menu:has(> .su){padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.scr.su{max-width:1140px;gap:10px}
.sutop{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;width:100%;gap:10px;box-sizing:border-box}
.sutop > :first-child{justify-self:start}.sutop > :last-child{justify-self:end}
.subody{display:flex;gap:14px;width:100%;align-items:stretch}
.sumain{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:10px;justify-content:center}
.suside{flex:0 0 280px;display:flex;flex-direction:column;gap:8px;min-width:0}
.suside > .go{margin-top:auto}
.su.hpick .suside{flex-basis:200px;justify-content:flex-end}
.su.hpick .suside > .go{margin-top:0}
/* hero zone: big preview over the tile row */
.hz{display:flex;flex-direction:column;gap:12px}
.hzp{display:flex;gap:16px;align-items:center}
.hzimg{width:clamp(96px,calc(100vh - 400px),260px);height:auto;aspect-ratio:1;flex:none;border:3px solid #000;border-radius:10px;background:radial-gradient(circle at 50% 60%,#26304a,#0b0e15 70%);box-sizing:border-box;display:block}
.hzq{display:flex;align-items:center;justify-content:center;font-family:var(--px);font-size:clamp(34px,9vh,72px);color:var(--yel);text-shadow:4px 4px 0 #000;background:repeating-linear-gradient(45deg,#1b2131 0 8px,#151a26 8px 16px)}
.hzt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:7px}
.hzn{font-family:var(--px);font-weight:400;font-size:22px;color:var(--yel);text-shadow:3px 3px 0 #000}
.hztag{font-size:14px;font-weight:700;color:#dfe5f0}
.hzt .hbars{max-width:300px;padding:0}
.hzd{font-size:14px;line-height:1.4;color:#e3e8f1;text-shadow:1px 1px 0 #000}
.hzrow{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px}
#menu .htile{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0;padding:6px 3px 7px;border-radius:10px;background:#0f131c;text-shadow:none}
#menu .htile img.hp,#menu .htile .nrq{width:100%;max-width:84px;height:auto;aspect-ratio:1;border:3px solid #000;border-radius:8px;background:#0b0e15;box-sizing:border-box}
#menu .htile .nrq{font-size:clamp(16px,4vh,30px)}
#menu .htile b{font-family:var(--px);font-weight:400;font-size:8px;color:#dfe5f0;text-shadow:2px 2px 0 #000;max-width:100%;overflow:hidden;text-overflow:ellipsis}
@media (hover:hover){#menu .htile:hover{background:#1d2433}}
#menu .htile.on{background:#3a3214;border-color:var(--yel);box-shadow:0 4px 0 #000,0 0 14px #ffd84a55}
#menu .htile.on b{color:var(--yel)}
#menu .htile:disabled{opacity:.5}
/* chips: label, value, "›"; FORMAT / CHAOS / BOTS show pips for the place in their list */
.chips{display:flex;flex-direction:column;gap:8px}
#menu .chip{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto auto;align-items:center;gap:4px 8px;padding:7px 12px 8px;min-height:58px;border-radius:10px;background:#0f131c;text-align:left;text-shadow:none;white-space:nowrap}
@media (hover:hover){#menu .chip:hover{background:#1d2433}}
.chip .clbl{grid-column:1;grid-row:1;font-family:var(--px);font-size:8px;color:var(--mut);display:flex;align-items:center;gap:7px}
.chip .cval{grid-column:1;grid-row:2;display:flex;align-items:center;gap:8px;min-width:0}
.chip .cval b{font-family:var(--px);font-weight:400;font-size:12px;color:#fff;text-shadow:2px 2px 0 #000;overflow:hidden;text-overflow:ellipsis;min-width:0}
.chip .cgo{grid-column:2;grid-row:1/3;font-style:normal;font-family:var(--px);font-size:16px;color:var(--yel);text-shadow:2px 2px 0 #000}
.cth{width:44px;height:25px;object-fit:cover;border:2px solid #000;border-radius:4px;flex:none;box-sizing:border-box;background:#161b26}
.cq{display:inline-flex;align-items:center;justify-content:center;font-family:var(--px);font-size:11px;color:var(--yel);background:repeating-linear-gradient(45deg,#1b2131 0 4px,#151a26 4px 8px)}
.cpips{display:inline-flex;gap:3px}.cpips i{width:6px;height:6px;border-radius:50%;background:#2f3850;border:1px solid #000}.cpips i.on{background:var(--yel)}
#menu .chip.ro:disabled{opacity:1;cursor:default;background:#0f131c8c;box-shadow:0 2px 0 #000}
.chip.ro .cgo,.chip.ro .cpips{display:none}
.hpk{margin:-2px 0 0;text-align:center;font-family:var(--px);font-size:8px}
.suside .status{margin:0;text-align:center;font-size:14px}
/* online room: top row (leave, code + invite, privacy), the line-up of heroes */
.su.room .codebox{display:flex;align-items:center;gap:10px;margin:0}
.su.room .codebox .lbl{font-size:8px}
.su.room .code{font-size:22px;letter-spacing:4px}
#menu .su.room .codebox button{display:flex;align-items:center;gap:8px;font-size:10px}
.lineup{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.lineup.n2{grid-template-columns:repeat(2,minmax(0,210px));justify-content:center}
.pcard{position:relative;display:flex;flex-direction:column;align-items:center;gap:4px;padding:8px 6px 7px;border:3px solid #000;border-top:7px solid var(--tc);border-radius:10px;background:#0b0e15;min-width:0;box-shadow:0 4px 0 #000}
.pcard img.hp{width:clamp(56px,calc(100vh - 560px),150px);height:auto;aspect-ratio:1;border:3px solid #000;border-radius:8px;background:radial-gradient(circle at 50% 60%,#26304a,#0b0e15 70%);box-sizing:border-box}
.pcard.me{border-color:var(--yel);border-top-color:var(--tc);box-shadow:0 4px 0 #000,0 0 16px #ffd84a55}
.pcard.bot{opacity:.72}
.pn{font-weight:700;font-size:15px;color:var(--tc);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;text-shadow:1px 1px 0 #000}
.ph{font-family:var(--px);font-size:8px;color:#dfe5f0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.ptags{position:absolute;top:3px;right:3px;display:flex;flex-direction:column;align-items:flex-end;gap:2px}
.hzl{margin:0;font-weight:400;font-size:9px;color:#dfe5f0}
.rinfo .series{margin:0}
.rinfo:empty{display:none}
/* lobby: CREATE ROOM is the big yellow button */
#menu .card .row button.big{font-size:13px;padding:0 22px}
.cnote{margin:0;font-size:12px}
@media (max-height:520px){
  .scr.su{gap:6px}
  .subody{gap:10px}
  .sumain{gap:8px}
  .suside{flex-basis:208px;gap:6px}
  .su.hpick .suside{flex-basis:160px}
  .hz{gap:8px}
  .hzp{gap:12px}
  .hzimg{width:clamp(84px,calc(100vh - 252px),150px)}
  .hzn{font-size:15px}.hztag{font-size:12px}.hzt{gap:5px}.hzd{font-size:12px;line-height:1.3}
  .hzrow{gap:5px}
  #menu .htile{padding:4px 2px 5px;gap:3px;border-width:2px}
  #menu .htile img.hp,#menu .htile .nrq{max-width:56px;border-width:2px}
  #menu .htile b{font-size:6.5px}
  .chips{gap:6px}
  #menu .chip{min-height:48px;padding:4px 10px 5px;gap:3px 6px;border-width:2px}
  .chip .clbl{font-size:7px}
  .chip .cval b{font-size:10px}
  .cth{width:36px;height:20px}
  .su.room .code{font-size:16px;letter-spacing:2px}
  #menu .su.room .codebox button{font-size:9px;padding:0 10px}
  .lineup{gap:6px}
  .pcard{padding:4px 4px 4px;gap:2px;border-top-width:5px;border-width:2px}
  .pcard img.hp{width:clamp(48px,calc(100vh - 318px),66px);border-width:2px}
  .pn{font-size:12px}.ph{font-size:6.5px}
  .ptags .tag{font-size:6px;padding:1px 3px}
  .hzl{font-size:7px}
  .suside .status{font-size:12px}
  .rinfo .series{font-size:11px}
}
@media (max-height:520px) and (max-width:700px){
  .suside{flex-basis:186px}
  .su.room .codebox .lbl{display:none}
  .hzd{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
}
@media (max-width:700px) and (min-height:521px){.subody{flex-direction:column}.suside{flex-basis:auto}}

/* ---------- NEXT ROUND: the roulette + voter avatars ---------- */
.nrrl{font-family:var(--body);font-size:11px;font-weight:600;color:#7d8799;letter-spacing:0;text-transform:none}
#menu .nround.spinning .map:disabled{opacity:.5}
#menu .nround.spinning .map.on{background:#0f131c;border-color:#000;box-shadow:0 4px 0 #000}
#menu .nround .map.spin:disabled,#menu .nround .map.spin{opacity:1;border-color:#fff;background:#2b3550;box-shadow:0 4px 0 #000,0 0 0 3px var(--yel),0 0 22px #ffd84acc;transform:scale(1.02)}
#menu .nround .map.win:disabled,#menu .nround .map.win{opacity:1;border-color:var(--green);background:#1d3512;box-shadow:0 4px 0 #000,0 0 24px #8be04eaa;animation:winp .3s ease-in-out infinite alternate}
#menu .nround .map.win .mname{color:var(--green)}
@keyframes winp{to{transform:scale(1.025)}}
#menu .nround.spinning #ready:disabled{opacity:.55}
.nrv .dots i{width:26px;height:26px;border-radius:6px;border:2px solid #000;overflow:hidden;box-sizing:border-box;box-shadow:0 2px 0 #000}
.nrv .dots i .vav{display:block;width:100%;height:100%;background:#0b0e15 50% 18%/190% no-repeat;image-rendering:pixelated}
@media (max-height:520px){.nrrl{display:none}.nrv .dots i{width:21px;height:21px;border-radius:5px}}
@media (prefers-reduced-motion:reduce){.hhq i,#menu .nround .map.win{animation:none}}


/* =====================================================================================================================
   MENUS 3: the house menu kit (docs/ui.md "Menus 3"; playbook references/menu-ui.md). HOME = one centred column over the
   live match (vignette, no plate): logo, tagline, the PLAY strip, CUSTOM + ONLINE, four small buttons, the keys line.
   Inner screens: no logo, the title centred on the top row level with the back arrow. Corner: fullscreen + the speaker
   (its panel is the only sound control). Buttons: yellow primary with hover (hover devices only); confirms on the button.
   Must fit without scrolling at 1280x720, 844x390 and 667x375.
   ===================================================================================================================== */
:root{--corner:110px}
@media (max-height:520px){:root{--corner:104px}}

/* ---------- buttons ---------- */
#menu .go,#pause .go{background:var(--yel);color:#1a1408;text-shadow:none;border:3px solid #000;box-shadow:0 6px 0 var(--yel-d),0 9px 0 #000;transition:transform .12s,box-shadow .12s,filter .12s,background-color .1s}
#menu .go:active:not(:disabled),#pause .go:active:not(:disabled){transform:translateY(4px);box-shadow:0 2px 0 var(--yel-d),0 4px 0 #000}
#menu button,#pause button{transition:transform .12s,box-shadow .12s,filter .12s,background-color .1s,border-color .1s,color .1s}
@media (hover:hover){
  #menu .go:hover:not(:disabled),#pause .go:hover:not(:disabled){transform:translateY(-3px);filter:brightness(1.07);box-shadow:0 9px 0 var(--yel-d),0 12px 0 #000,0 0 26px rgba(255,216,74,.6)}
  /* secondary (dark) buttons: the same rise, a lilac glow */
  #menu button:not(.go):not(.htile):not(.nrh):not(.atile):not(.map):not(.chip):not(.plink):not(.nrmenu):not(.ask):not(:disabled):hover,
  #pause button:not(.go):not(.ask):not(:disabled):hover{transform:translateY(-3px);background:var(--panel3);box-shadow:0 7px 0 #000,0 0 18px rgba(170,140,255,.45)}
  #menu .mcard:hover{background:#1b2131}
}
/* armed (confirm on the button): red fill, darker red edge, white text, a slow brightness pulse */
#menu button.ask,#pause button.ask{background:#d23a4a!important;color:#fff!important;text-shadow:2px 2px 0 #000;border-color:#000!important;box-shadow:0 6px 0 #7a1420,0 9px 0 #000!important;animation:askp 1.1s ease-in-out infinite alternate;text-decoration:none!important}
@keyframes askp{from{filter:brightness(1)}to{filter:brightness(1.22)}}
@media (prefers-reduced-motion:reduce){#menu button.ask,#pause button.ask{animation:none}}

/* ---------- corner: fullscreen + the speaker; in a match the speaker sits left of the minimap (and of II on touch) ---------- */
#sound,#fsbtn{position:fixed;z-index:11;top:max(8px,env(safe-area-inset-top));width:46px;height:46px;padding:0;display:flex;align-items:center;justify-content:center;color:#fff;
  background:#151a25e0;border:3px solid #000;border-radius:10px;box-shadow:0 4px 0 #000;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;box-sizing:border-box}
#sound{right:max(8px,env(safe-area-inset-right))}
#fsbtn{right:calc(max(8px,env(safe-area-inset-right)) + 54px)}
#fsbtn svg{width:20px;height:20px;pointer-events:none}
#fsbtn.hidden{display:none}
#sound[aria-expanded="true"]{border-color:var(--yel);background:#3a3214}
@media (hover:hover){#sound:hover,#fsbtn:hover{background:var(--panel3)}}
#sound:focus-visible,#fsbtn:focus-visible{outline:3px solid var(--yel);outline-offset:2px}
body[data-on="play"] #sound{right:var(--mmr,10px);top:var(--mmb,80px);width:44px;height:44px;opacity:.9;background:#000a;box-shadow:none;border-width:2px}
/* in a match fullscreen joins the row under the minimap: left of the speaker (desktop), left of II (touch) */
body[data-on="play"] #fsbtn{right:calc(var(--mmr,10px) + 50px);top:var(--mmb,80px);width:44px;height:44px;opacity:.85;background:#000a;box-shadow:none;border-width:2px}
html.touch body[data-on="play"] #fsbtn{right:calc(var(--mmr,10px) + 100px)}
/* emotes: keys 1-4 only (no touch button, 2026-10-20) */
@media (prefers-reduced-motion:reduce){#emorow{animation:none}}
@media (max-height:520px){#sound,#fsbtn{width:44px;height:44px;top:max(6px,env(safe-area-inset-top))}body:not([data-on="play"]) #fsbtn{right:calc(max(8px,env(safe-area-inset-right)) + 50px)}#sound img{width:24px;height:24px}}
/* the sound panel: right under the speaker */
#sndpop{position:fixed;z-index:12;top:calc(max(8px,env(safe-area-inset-top)) + 56px);right:max(8px,env(safe-area-inset-right));width:240px;box-sizing:border-box;padding:10px;display:flex;flex-direction:column;gap:8px;
  background:#151a25f8;border:3px solid #000;border-radius:12px;box-shadow:0 5px 0 #000,0 14px 36px #0009;font-family:var(--body);color:var(--txt);-webkit-user-select:none;user-select:none}
#sndpop.hidden{display:none}
body[data-on="play"] #sndpop{right:var(--mmr,10px);top:calc(var(--mmb,80px) + 50px)}
#sndpop button{font-family:var(--body);font-weight:700;font-size:14px;color:#fff;background:var(--panel2);border:3px solid #000;border-radius:9px;box-shadow:0 3px 0 #000;min-height:44px;padding:0 10px;display:flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;text-shadow:1px 1px 0 #000}
#sndpop button img{width:22px;height:22px;image-rendering:pixelated;pointer-events:none}
#snd-all{min-height:48px!important;font-size:15px!important;background:#283044!important}
#snd-all.on{border-color:var(--red)!important;color:#ffb3bb!important;background:#3a1820!important}
.sndrow{display:flex;gap:8px}.sndrow button{flex:1 1 0}
#sndpop .sndrow button:not(.sel){color:var(--mut);text-decoration:line-through;background:#10141d}
#sndpop .sndrow button.sel{border-color:var(--yel)}
.sndvol{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--mut)}
.sndvol input[type=range]{flex:1;width:auto;min-width:0}
#snd-hint{font-size:12px;color:var(--mut);text-align:center}#snd-hint kbd{font-size:8px}
html.touch #snd-hint{display:none}
#sndpop button:focus-visible,#sndpop input:focus-visible{outline:3px solid var(--yel);outline-offset:2px}
@media (hover:hover){#sndpop button:hover{filter:brightness(1.15)}}
@media (max-height:520px){#sndpop{top:calc(max(6px,env(safe-area-inset-top)) + 50px);gap:6px;padding:8px}}

/* ---------- inner screens: the top row (back arrow, title centred, the right side kept clear of the corner) ---------- */
.itop{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;width:100%;min-height:46px;box-sizing:border-box}
.itop > :first-child{justify-self:start}.itop > :last-child{justify-self:end}
.itop h2{white-space:nowrap}
.atsp{display:block;min-width:1px;width:var(--corner)}
.sutop > .itop{grid-column:1/-1}
#menu button.bk{min-width:46px;width:46px;height:46px;padding:0;display:inline-flex;align-items:center;justify-content:center}
#menu button.bk .arr{width:18px;height:18px;pointer-events:none;filter:drop-shadow(2px 2px 0 #000)}
#menu button.bk.ask{width:auto;padding:0 12px;font-size:10px}
.sutop > :last-child{margin-right:var(--corner)}
.sutop > .itop:last-child,.sutop > .atsp{margin-right:0}
@media (max-height:520px){#menu button.bk{min-width:44px;width:44px;height:44px}.itop{min-height:44px}}

/* ---------- HOME ---------- */
#menu[data-scr="home"]{background:radial-gradient(ellipse 72% 72% at 50% 50%,rgba(10,13,20,.3),rgba(10,13,20,.7))}
.scr.home{gap:10px;max-width:820px}
.home .hlogo{display:flex;flex-direction:column;align-items:center}
.home .logo img{width:min(540px,75vw);height:auto;max-height:34vh;object-fit:contain}
.home .tagline{margin-top:6px;font-size:11px;color:#d9ccff;text-shadow:2px 2px 0 #000}
.hcol{display:flex;flex-direction:column;gap:10px;width:100%;max-width:820px}
/* the PLAY strip: the first and loudest, warm, a touch wider than the cards row */
.pstrip{display:flex;align-items:center;gap:16px;box-sizing:border-box;padding:8px 12px 8px 8px;border:3px solid var(--yel);border-radius:16px;
  background:radial-gradient(ellipse at 11% 50%,#ffd84a40,transparent 42%),rgba(46,36,14,.93);box-shadow:0 6px 0 #000,0 0 30px #ffd84a2a}
@media (min-width:900px){.pstrip{margin:0 -18px}}
.pport{position:relative;flex:none;width:clamp(110px,18vh,140px);aspect-ratio:1;display:flex;align-items:center;justify-content:center;animation:breathe 2.6s ease-in-out infinite;transform-origin:50% 85%}
@keyframes breathe{0%,100%{transform:scale(1,1)}50%{transform:scale(1.025,1.045)}}
.pport img.hp{width:100%;height:100%;filter:drop-shadow(0 4px 0 #0008)}
.pport.rnd{overflow:hidden}
.pport.rnd img.sil{position:absolute;inset:0;width:100%;height:100%;filter:brightness(0) drop-shadow(0 0 2px #ffd84aaa) drop-shadow(0 0 10px #ffb02e66);opacity:.95;transition:transform .25s}
.pport.rnd img.pdice{position:relative;width:46%;height:auto;filter:drop-shadow(2px 3px 0 #000) drop-shadow(0 0 10px #ffd84acc) drop-shadow(0 0 22px #ffb02e88);animation:qpulse 1.1s ease-in-out infinite alternate}
@keyframes qpulse{from{transform:scale(.92);filter:brightness(.9)}to{transform:scale(1.12);filter:brightness(1.25)}}
.ptxt{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.ptxt .lbl{font-size:9px;color:#e8d79a}
.ptxt b{font-family:var(--px);font-weight:400;font-size:20px;line-height:1.2;color:var(--yel);text-shadow:3px 3px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
#menu .plink{background:none;border:0;box-shadow:none;min-height:44px;min-width:0;margin:-8px 0 -10px;padding:0 2px;font-family:var(--body);font-size:15px;font-weight:700;text-transform:none;text-decoration:underline;text-underline-offset:3px;color:#f4e6b0;text-shadow:1px 1px 0 #000;letter-spacing:0}
@media (hover:hover){#menu .plink:hover{color:#fff}}
#menu .go.huge{flex:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:84px;padding:0 38px;font-size:30px;letter-spacing:3px;border-radius:14px}
.go.huge .pl{display:inline-flex;align-items:center}
.go.huge .pl::after{content:'';display:inline-block;margin-left:14px;border-left:22px solid currentColor;border-top:14px solid transparent;border-bottom:14px solid transparent}
#menu .go.huge small{font-size:8px;letter-spacing:1px;color:#5a4508}
/* two equal mode cards, together the width of the row */
.hcards{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:10px;width:100%;max-width:none}
#menu .hcards .mcard{display:flex;flex-direction:row;align-items:center;gap:12px;min-width:0;padding:10px 14px;text-align:left;border-radius:12px;background:#121722e0;border:3px solid #000;box-shadow:0 5px 0 #000;white-space:normal;text-transform:none}
#menu .hcards .mcard img{width:60px;height:60px;flex:none}
.hcards .mcard span{display:flex;flex-direction:column;gap:5px;min-width:0}
#menu .hcards .mcard b{font-size:15px}
#menu .hcards .mcard small{font-size:13px;max-width:none}
/* HOW TO PLAY · SETTINGS · ACHIEVEMENTS N/M · CREDITS */
.subrow{display:grid;grid-template-columns:repeat(4,minmax(0,200px));justify-content:center;gap:10px}
#menu .subrow button{min-width:0;font-size:10px;padding:0 8px;background:#141925e8}
#menu .subrow button.open,#pause .pbtns button.open{border-color:var(--yel);color:var(--yel)}
@media (hover:hover){#menu .subrow button:hover:not(.ask){border-color:var(--yel);color:var(--yel)}}
/* SETTINGS: one extra row (shake, feel, touch hints); the pause shows the same row */
.setrow{display:flex;gap:8px;justify-content:center;flex-wrap:wrap}
#menu .setrow button,#pause .setrow button{font-size:9px;padding:0 12px;background:#141925e8}
#menu .setrow button.on,#pause .setrow button.on{background:#3a3214}
html:not(.touch) .setrow .tonly{display:none}
.khint{font-size:12px;font-weight:600;color:#cbd3e6;text-align:center;text-shadow:1px 1px 0 #000;line-height:1.7}
.khint kbd{font-size:8px;padding:1px 4px}
html.touch .khint{display:none}
@media (max-height:520px){
  .scr.home{gap:6px}
  .home .logo img{height:16vh;width:auto;max-height:none;max-width:60vw}
  .home .tagline{font-size:8px;margin-top:4px}
  .hcol{gap:7px}
  .pstrip{padding:4px 10px 4px 4px;gap:10px;border-radius:12px}
  .pport{width:clamp(62px,19vh,84px)}
  .ptxt{gap:2px}.ptxt .lbl{font-size:7px}.ptxt b{font-size:13px}
  #menu .plink{font-size:12px;margin:-10px 0 -12px}
  #menu .go.huge{min-height:56px;font-size:19px;padding:0 22px;gap:5px;letter-spacing:2px}
  .go.huge .pl::after{border-left-width:14px;border-top-width:9px;border-bottom-width:9px;margin-left:10px}
  #menu .go.huge small{font-size:6.5px}
  .hcards{gap:8px}
  #menu .hcards .mcard{padding:5px 10px;gap:8px;border-radius:10px}
  #menu .hcards .mcard img{width:44px;height:44px}
  #menu .hcards .mcard b{font-size:11px}
  #menu .hcards .mcard small{font-size:10.5px}
  .subrow{gap:8px}
  #menu .subrow button{font-size:9px}
  .khint{display:none}
}
@media (orientation:portrait) and (max-width:600px){
  .home .logo img{width:100%;max-width:360px;max-height:none}
  .pstrip{flex-wrap:wrap;justify-content:center}#menu .go.huge{width:100%}
  .hcards{grid-template-columns:1fr}
  #menu .subrow button{font-size:9px}
}

/* ---------- first visit, how to play, credits ---------- */
.scr.first,.scr.info{max-width:900px}
.first .fpanel{max-width:520px}

/* ---------- SETUP: the hero grid is the hero; the chips in the side column; PLAY bottom centre, sticky ---------- */
.sugo{position:sticky;bottom:0;z-index:2;display:flex;justify-content:center;width:100%;padding:2px 0 8px}
#menu .sugo .go{min-width:min(300px,60vw)}
@media (max-height:520px){
  .sugo{padding:0 0 6px}
  #menu .sugo .big{min-height:44px}
  .su .hzimg{width:clamp(62px,calc(100vh - 300px),120px)}
}

/* ---------- ARENA picker: the panel fills the screen under a thin strip of the live game ---------- */
#menu[data-scr="arena"],#menu:has(> .scr.arena){background:linear-gradient(#0a0d1426,#0a0d1426 14vh,#0a0d14b0 14vh);padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
.scr.arena{max-width:1180px;height:100%;padding-top:calc(14vh - 10px);box-sizing:border-box;gap:0;justify-content:flex-start}
.apanel{flex:1 1 auto;min-height:0;width:100%;box-sizing:border-box;display:flex;flex-direction:column;gap:8px;padding:8px 12px 0;border-bottom-left-radius:0;border-bottom-right-radius:0;border-bottom:0;box-shadow:none;background:#121722f4}
.agrid{flex:1 1 auto;min-height:0;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));grid-auto-rows:max-content;gap:12px;align-content:start;padding:4px 4px 16px;overscroll-behavior:contain}
.agrid.more{-webkit-mask-image:linear-gradient(#000 calc(100% - 70px),transparent);mask-image:linear-gradient(#000 calc(100% - 70px),transparent)}
#menu .atile{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:0;padding:5px 5px 9px;border-radius:10px;background:#0f131c;text-align:left;white-space:normal;text-transform:none;text-shadow:none}
#menu .atile img,#menu .atile .aq{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:6px;background:#161b26;box-sizing:border-box}
#menu .atile .aq{display:flex;align-items:center;justify-content:center;font-family:var(--px);font-size:clamp(26px,6vh,44px);color:var(--yel);text-shadow:0 0 12px #ffd84a99,3px 3px 0 #000;background:repeating-linear-gradient(45deg,#1b2131 0 8px,#151a26 8px 16px)}
.atile .at{display:flex;flex-direction:column;gap:5px;min-width:0;padding:0 3px}
.atile .arow{display:flex;align-items:center;gap:8px;min-width:0}
#menu .atile .aname{font-size:11px;color:#fff}
.atile .msize em{display:none}
.atile .adesc{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;font-family:var(--body);font-size:12.5px;font-weight:600;line-height:1.3;min-height:2.6em;color:#c7cfdf;text-shadow:1px 1px 0 #000;white-space:normal;overflow:hidden}
@media (hover:hover){#menu .atile:hover{background:#1d2433}}
#menu .atile.on{background:#3a3214;border-color:var(--yel);box-shadow:0 4px 0 #000,0 0 14px #ffd84a55}
#menu .atile.on .aname{color:var(--yel)}
@media (max-height:520px){
  .scr.arena{padding-top:2px}
  #menu[data-scr="arena"],#menu:has(> .scr.arena){padding-top:max(4px,env(safe-area-inset-top));padding-bottom:0;padding-left:max(6px,env(safe-area-inset-left));padding-right:max(6px,env(safe-area-inset-right));background:linear-gradient(#0a0d1426,#0a0d1426 6px,#0a0d14b0 6px)}
  .apanel{padding:4px 6px 0;gap:4px;border-width:3px 2px 0}
  .agrid{gap:8px;padding:2px 2px 12px}
  #menu .atile{padding:4px 4px 6px;gap:5px}
  #menu .atile .aname{font-size:9px}
  .atile .adesc{display:block;min-height:0;font-size:11px;white-space:nowrap;text-overflow:ellipsis} /* phones: one line, the grid scrolls */
}

/* ---------- NEXT ROUND: the corner buttons stay up (keep the top row's right side clear); offline = your pick ---------- */
.nround.snd .nrtop{padding-right:var(--corner)}
.nround.solo .nrv{display:none}
.nrpick{font-family:var(--px);font-size:10px;color:var(--yel);text-shadow:2px 2px 0 #000}
@media (max-height:520px){.nrpick{font-size:8px}}

/* ---------- online: lobby under the top row; the corner kept clear ---------- */
.scr.olobby{max-width:900px;gap:8px}
.scr.olobby .card{margin:0}
.card.res .choices{flex-wrap:wrap}

/* ---------- pause ---------- */
.pause .setrow{margin-top:4px;max-width:520px}
/* online results on a short screen: the card reaches the top, so the replay box keeps clear of the corner buttons */
@media (max-height:520px){.card.res.rp .rpslot{width:calc(100% - var(--corner) + 10px)}}
.csw{display:inline-block;width:25px;height:25px;border-radius:50%;box-shadow:inset 0 -3px 0 #0005}
@media (max-height:520px){.csw{width:20px;height:20px}}
/* SETUP on short landscape: five chips (COLOR added) fit beside the hero zone */
@media (max-height:520px){.su .chips{gap:5px}#menu .su .chip{min-height:44px;padding:3px 10px 4px;gap:2px 6px}}

/* =====================================================================================================================
   META (docs/ui.md "Meta"; src/meta-ui.js): ACHIEVEMENTS N/M on HOME, the level badge on the hero, the unlock toast,
   the XP strip on the results screens, the ACHIEVEMENTS screen. Fits 1280x720, 844x390, 667x375 without page scroll.
   ===================================================================================================================== */
/* HOME: four small buttons; the count is its own span (it drops under the word on a short screen) */
#menu .subrow #b-ach{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;line-height:1.2}
#menu .subrow .acnt{color:var(--yel)}
.pstrip{position:relative}
.lvbadge{position:absolute;left:10px;bottom:4px;z-index:1;font-family:var(--px);font-size:9px;line-height:1;color:#1a1408;background:var(--yel);border:2px solid #000;border-radius:5px;padding:3px 4px 2px;box-shadow:0 2px 0 #000;pointer-events:none}
@media (max-height:520px){
  #menu .subrow #b-ach{flex-direction:column;gap:3px;font-size:8px;padding:0 4px}
  .lvbadge{font-size:7px;left:4px;bottom:2px;padding:2px 3px 1px}
}
@media (orientation:portrait) and (max-width:600px){.subrow{grid-template-columns:repeat(2,minmax(0,200px))}}

/* the DAILY line (docs/ui.md "Daily"): over the small-button row; "★ TODAY  goal  n/goal  STREAK n ›", green with ✓ when
   done. The goal is in the body font (it is a sentence); ★ / ✓ are SVGs (the pixel font has neither) */
#menu .dline{display:flex;align-items:center;gap:10px;width:100%;box-sizing:border-box;min-height:46px;padding:0 14px 0 12px;text-align:left;text-transform:none;
  background:#121722e0;border:3px solid #000;border-radius:12px;box-shadow:0 5px 0 #000,0 0 0 2px #ffd84a33 inset}
.dline .dico{flex:none;width:18px;height:18px;color:var(--yel)}
.dline .dlbl{flex:none;font-weight:400;font-size:10px;color:var(--yel)}
.dline .dtxt{flex:1 1 auto;min-width:0;font-family:var(--body);font-weight:700;font-size:15px;letter-spacing:0;color:#fff;text-shadow:1px 1px 0 #000;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dline .dprog{flex:none;font-size:10px;line-height:1;color:#fff;background:#2a3044;border:2px solid #000;border-radius:6px;padding:4px 6px 3px;text-shadow:1px 1px 0 #000}
.dline .dstreak{flex:none;font-size:8px;color:#ffb02e}
.dline .cgo{flex:none;font-style:normal;font-size:14px;color:var(--yel)}
#menu .dline.done{background:#14301ce8;border-color:#000;box-shadow:0 5px 0 #000,0 0 0 2px var(--green) inset}
.dline.done .dico,.dline.done .dlbl{color:var(--green)}
.dline.done .dprog{background:#2f6b1f}
.dline.done .dtxt{color:#d6f5c4}
@media (hover:hover){#menu .dline:hover{box-shadow:0 5px 0 #000,0 0 0 2px var(--yel) inset}}
@media (max-height:520px){
  #menu .dline{min-height:44px;gap:8px;padding:0 10px;border-radius:10px;box-shadow:0 4px 0 #000,0 0 0 2px #ffd84a33 inset}
  #menu .dline.done{box-shadow:0 4px 0 #000,0 0 0 2px var(--green) inset}
  .dline .dico{width:15px;height:15px}
  .dline .dlbl{font-size:8px}.dline .dtxt{font-size:12.5px}.dline .dprog{font-size:8px;padding:3px 5px 2px}.dline .dstreak{font-size:7px}
}
@media (max-width:520px){.dline .dstreak{display:none}}
/* SETTINGS open on HOME (one more row): the logo gives the room back, so the column still fits with the DAILY line */
.scr.home.setopen .logo img{max-height:26vh}
@media (max-height:520px){.scr.home.setopen .logo img{height:9vh}.scr.home.setopen .tagline{display:none}}
/* results: the daily chip in the XP strip's chip row */
.xdaily{display:inline-flex;align-items:center;gap:5px;font-family:var(--px);font-size:8px;color:#d6f5c4;background:#14301c;border:2px solid #000;border-radius:6px;padding:3px 7px 3px 4px;
  box-shadow:0 0 0 1px var(--green) inset;text-shadow:1px 1px 0 #000;animation:xnew .4s 1.3s both cubic-bezier(.2,1.5,.4,1)}
.xdaily .dico{width:12px;height:12px;color:var(--green)}
.xdaily b{font-weight:400;color:var(--green)}.xdaily em{font-style:normal;color:#ffb02e}
.xdaily.prog{color:#e8ecf3;background:#1d2333;box-shadow:none}.xdaily.prog .dico{color:var(--yel)}
@media (max-height:520px){.xdaily{font-size:7px;padding:2px 5px 2px 3px}.xdaily .dico{width:10px;height:10px}}
@media (prefers-reduced-motion:reduce){.xdaily{animation:none}}

/* the unlock toast: hidden fully off screen to the left; in a match top left under the fuel / power row (phones) or the
   corner (desktop: the fuel bar is bottom centre); on menus bottom left above the lowest buttons (bottom set in JS) */
#achtoast{position:fixed;z-index:12;left:max(10px,env(safe-area-inset-left));bottom:12px;display:flex;align-items:center;gap:9px;max-width:min(300px,70vw);box-sizing:border-box;
  padding:6px 12px 6px 6px;background:#151a25f4;border:3px solid #000;border-radius:10px;box-shadow:0 4px 0 #000,0 0 0 2px var(--yel) inset;color:#fff;pointer-events:none;
  transform:translateX(calc(-100% - 40px));transition:transform .3s cubic-bezier(.2,1.3,.4,1)}
#achtoast.show{transform:none}
#achtoast.inmatch{top:16px;bottom:auto}
html.touch #achtoast.inmatch,#achtoast.inmatch.compact{top:max(78px,calc(env(safe-area-inset-top) + 72px))}
@media (max-height:520px),(max-width:760px){#achtoast.inmatch{top:max(78px,calc(env(safe-area-inset-top) + 72px))}}
#achtoast .tico{width:40px;height:40px;flex:none;image-rendering:pixelated;background:#0b0e15;border:2px solid #000;border-radius:7px}
#achtoast div{display:flex;flex-direction:column;gap:4px;min-width:0}
#achtoast small{font-family:var(--px);font-size:8px;color:var(--yel);letter-spacing:1px}
#achtoast b{font-family:var(--px);font-weight:400;font-size:11px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:2px 2px 0 #000}
@media (max-height:520px){#achtoast{padding:4px 10px 4px 4px;gap:7px}#achtoast .tico{width:32px;height:32px}#achtoast b{font-size:9px}#achtoast small{font-size:7px}}
@media (prefers-reduced-motion:reduce){#achtoast{transition:none}}

/* the XP strip (results, local and online): LV n [bar] +XP; the breakdown; NEW! achievements; the LEVEL n! plaque */
.xps{position:relative;box-sizing:border-box;width:100%;max-width:640px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:7px 12px 6px;
  background:#141925ec;border:3px solid #000;border-radius:12px;box-shadow:0 5px 0 #000}
.xprow{position:relative;display:flex;align-items:center;gap:10px;width:100%}
.xplv{flex:none;font-family:var(--px);font-weight:400;font-size:11px;color:var(--yel);text-shadow:2px 2px 0 #000;white-space:nowrap}
.xplv i{font-style:normal}
.xpbar{position:relative;flex:1 1 auto;min-width:60px;height:18px;background:#2a3044;border:3px solid #000;border-radius:7px;overflow:hidden}
.xpfill{position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(#ffe46a,#ffc21a);box-shadow:inset 0 -3px 0 #c98e00}
.xpnum{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--px);font-style:normal;font-size:8px;color:#fff;text-shadow:1px 1px 0 #000,-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000}
.xpgain{flex:none;font-family:var(--px);font-weight:400;font-size:13px;color:#8be04e;text-shadow:2px 2px 0 #000;white-space:nowrap}
.xpbd{font-size:12px;font-weight:600;color:#c9d2e3;text-align:center;line-height:1.3}
.xpnew{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px}
.xpnew .lbl{color:var(--yel);font-size:8px}
.xnew{display:inline-flex;align-items:center;gap:5px;font-family:var(--px);font-size:8px;color:#fff;background:#0b0e15;border:2px solid #000;border-radius:6px;padding:2px 6px 2px 2px;text-shadow:1px 1px 0 #000;animation:xnew .4s 1.6s both cubic-bezier(.2,1.5,.4,1)}
.xnew.more{padding:4px 6px}
.xnew .xico{width:20px;height:20px;image-rendering:pixelated}
@keyframes xnew{from{transform:scale(.3);opacity:0}to{transform:none;opacity:1}}
/* LEVEL n! pops above the bar's middle and stays (never over the bar and its "into / need" numbers); what the levels
   unlocked is the NEW: chip in the row under the breakdown (.xrew) */
.xpplq{position:absolute;left:50%;bottom:100%;z-index:2;display:none;flex-direction:row;align-items:center;gap:6px;transform:translate(-50%,-8px);pointer-events:none;white-space:nowrap}
.xpplq.on{display:flex;animation:xplq .5s cubic-bezier(.2,1.6,.4,1) both}
.xpplq b{font-family:var(--px);font-weight:400;font-size:15px;color:#1a1408;background:var(--yel);border:3px solid #000;border-radius:8px;padding:5px 10px 4px;box-shadow:0 4px 0 var(--yel-d),0 7px 0 #000,0 0 22px #ffd84aaa;white-space:nowrap}
/* the level rewards chip: space kept from the start (no reflow), shown with the first level-up, each level's item when reached */
.xnew.xrew{visibility:hidden;animation:none;gap:6px;padding:2px 7px 2px 3px;border-color:var(--yel-d)}
.xnew.xrew.on{visibility:visible;animation:xnew .4s both cubic-bezier(.2,1.5,.4,1)}
.xri{display:inline-flex;align-items:center;gap:4px}.xri.off{visibility:hidden}
@keyframes xplq{0%{transform:translate(-50%,-8px) scale(.2) rotate(-8deg);opacity:0}100%{transform:translate(-50%,-8px) scale(1) rotate(-2deg);opacity:1}}
@media (prefers-reduced-motion:reduce){.xpplq.on,.xnew,.xnew.xrew.on{animation:none}}
.card.res + .xps{margin:6px auto 0}
@media (max-height:520px){
  .xps{padding:4px 10px 4px;gap:2px;border-radius:10px;max-width:560px}
  .xprow{gap:8px}
  .xplv{font-size:9px}.xpgain{font-size:10px}
  .xpbar{height:15px;border-width:2px}.xpnum{font-size:7px}
  .xpbd{font-size:10.5px;line-height:1.2}
  .xnew{font-size:7px;padding:1px 5px 1px 1px}.xnew .xico{width:16px;height:16px}
  .xpplq b{font-size:11px;padding:3px 7px 2px}
  .card.res + .xps{margin-top:4px}
}

/* the ACHIEVEMENTS screen: one panel; under the title one scrolling area (fade at the bottom while there is more):
   the PROFILE (level + bar, 3x2 stats | the EMOTE picker), then the achievement cards (src/meta-ui.js) */
.scr.achs{max-width:1180px;height:100%;box-sizing:border-box;justify-content:center}
@media (min-height:521px){.scr.achs{padding-top:52px}} /* the panel's top edge stays below the fullscreen + speaker corner */
.achpanel{display:flex;flex-direction:column;gap:8px;width:100%;max-height:100%;min-height:0;box-sizing:border-box;padding:8px 12px 10px}
.achscroll{flex:1 1 auto;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:8px;padding:2px 2px 8px;overscroll-behavior:contain}
.achscroll.more{-webkit-mask-image:linear-gradient(#000 calc(100% - 40px),transparent);mask-image:linear-gradient(#000 calc(100% - 40px),transparent)}
.achhead{display:flex;align-items:center;justify-content:center;gap:10px 18px;flex-wrap:wrap;margin-top:2px}
.achtl{font-family:var(--px);font-weight:400;font-size:11px;color:#fff;text-shadow:2px 2px 0 #000}
.achn{font-family:var(--px);font-size:11px;color:#fff;text-shadow:2px 2px 0 #000}.achn b{font-weight:400;color:var(--yel);font-size:15px}
.achgrid{flex:none;display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));grid-auto-rows:max-content;gap:8px}
/* profile */
.prof{flex:none;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.25fr);gap:10px 14px;padding:8px 10px;background:#0f131c;border:3px solid #000;border-radius:12px;box-shadow:0 3px 0 #000}
.profl{display:flex;flex-direction:column;gap:8px;min-width:0}
.proflv{display:flex;align-items:center;gap:10px}
.pstats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.pst{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;padding:6px 4px 5px;background:#1b2131;border:2px solid #000;border-radius:8px}
.pst b{font-family:var(--px);font-weight:400;font-size:12px;color:var(--yel);text-shadow:2px 2px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.pst small{font-size:11px;font-weight:700;color:#aeb8cc;white-space:nowrap}
.profr{display:flex;flex-direction:column;gap:6px;min-width:0}
.emohead{display:flex;align-items:baseline;gap:4px 10px;flex-wrap:wrap}
.emohead b{font-family:var(--px);font-weight:400;font-size:10px;color:#fff;text-shadow:2px 2px 0 #000}
.emohead small,.emohint{font-size:11px;font-weight:600;color:#aeb8cc}
.emohint{min-height:1.2em}
.emoslots{display:flex;gap:6px}
#menu .emoslot{position:relative;flex:1 1 0;min-width:0;height:44px;padding:0;display:flex;align-items:center;justify-content:center;background:#1f2431;border:3px solid #000;border-radius:9px;box-shadow:0 3px 0 #000;cursor:pointer}
#menu .emoslot span{font-size:24px;line-height:1}
#menu .emoslot small{position:absolute;left:4px;top:2px;font-family:var(--px);font-size:7px;color:var(--yel);text-shadow:1px 1px 0 #000}
#menu .emoslot.sel{background:#2d3550;box-shadow:0 3px 0 #000,inset 0 0 0 2px var(--yel);animation:emosel .9s ease-in-out infinite alternate}
#menu .emoslot.just{animation:emojust .35s cubic-bezier(.2,1.6,.4,1)}
@keyframes emosel{to{box-shadow:0 3px 0 #000,inset 0 0 0 3px #fff}}
@keyframes emojust{from{transform:scale(.8)}}
.emogrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(34px,1fr));gap:5px}
#menu .emo{position:relative;height:38px;min-width:0;padding:0;display:flex;align-items:center;justify-content:center;background:#1b2131;border:2px solid #000;border-radius:8px;cursor:pointer}
#menu .emo span{font-size:20px;line-height:1}
#menu .emo.on{background:#2a3044;box-shadow:inset 0 0 0 2px #8be04e}
#menu .emo.lock{cursor:default;background:#11151e}
#menu .emo.lock span{filter:grayscale(1) brightness(.45);opacity:.7}
#menu .emo.lock small{position:absolute;left:0;right:0;bottom:1px;text-align:center;font-family:var(--px);font-size:6.5px;color:#cfd6e4;text-shadow:1px 1px 0 #000}
#menu .emo.nope{animation:stnope .3s}
@media (hover:hover){#menu .emo:not(.lock):hover,#menu .emoslot:hover{filter:brightness(1.25)}}
@media (prefers-reduced-motion:reduce){#menu .emoslot.sel,#menu .emoslot.just,#menu .emo.nope{animation:none}}
.acard2{display:flex;align-items:center;gap:9px;min-width:0;padding:6px 8px 6px 6px;background:#0f131c;border:3px solid #000;border-radius:10px;box-shadow:0 3px 0 #000}
.acard2 .aico{flex:none;width:44px;height:44px;image-rendering:pixelated;background:#0b0e15;border:2px solid #000;border-radius:7px;box-sizing:border-box}
.acard2.got{background:#1f2431;border-color:#000;box-shadow:0 3px 0 #000,inset 0 0 0 2px #ffd84a55}
.acard2.got .aico{background:radial-gradient(circle,#2a3044,#0b0e15 75%)}
.at2{display:flex;flex-direction:column;gap:3px;min-width:0;flex:1 1 auto}
.at2 b{font-family:var(--px);font-weight:400;font-size:9px;line-height:1.3;color:#8a94ab;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.acard2.got .at2 b{color:var(--yel);text-shadow:2px 2px 0 #000}
.at2 small{font-size:12px;font-weight:600;line-height:1.25;color:#8a94ab}
.acard2.got .at2 small{color:#d7deeb}
.aprog{position:relative;height:12px;margin-top:1px;background:#1b2131;border:2px solid #000;border-radius:5px;overflow:hidden}
.aprog i{position:absolute;left:0;top:0;bottom:0;background:#5a6680}
.aprog em{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-family:var(--px);font-style:normal;font-size:6.5px;color:#fff;text-shadow:1px 1px 0 #000}
.xremo{font-size:14px;vertical-align:-1px}
@media (min-width:1000px) and (min-height:600px){.achgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-height:520px){
  #menu[data-scr="ach"]{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .achpanel{padding:4px 8px 6px;gap:5px}
  .achscroll{gap:6px}
  .achtl,.achn{font-size:9px}.achn b{font-size:12px}
  .achgrid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px}
  .prof{gap:6px 10px;padding:6px 8px}
  .profl{gap:6px}.pstats{gap:4px}
  .pst{padding:4px 3px 3px;gap:3px}.pst b{font-size:10px}.pst small{font-size:9.5px}
  .emohead b{font-size:9px}.emohead small,.emohint{font-size:9.5px}
  #menu .emoslot span{font-size:21px}
  .acard2{padding:4px 6px 4px 4px;gap:7px}
  .acard2 .aico{width:34px;height:34px}
  .at2 b{font-size:8px}.at2 small{font-size:10.5px}
}
@media (max-width:560px){.prof{grid-template-columns:minmax(0,1fr)}}
/* phones / touch: the 15 emotes are one strip of 44 px tiles that scrolls sideways inside itself (fade on the side with
   more; src/meta-ui.js toggles .more / .less) */
@media (max-height:520px){
  .emogrid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:44px;grid-template-rows:44px;gap:5px;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:none;padding-bottom:1px}
  .emogrid::-webkit-scrollbar{display:none}
  #menu .emo{height:44px}#menu .emo span{font-size:21px}
}
html.touch .emogrid{grid-template-columns:none;grid-auto-flow:column;grid-auto-columns:44px;grid-template-rows:44px;overflow-x:auto;overflow-y:hidden;overscroll-behavior:contain;scrollbar-width:none}
html.touch .emogrid::-webkit-scrollbar{display:none}
html.touch #menu .emo{height:44px}
.emogrid.more{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 34px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 34px),transparent)}
.emogrid.less{-webkit-mask-image:linear-gradient(90deg,transparent,#000 34px);mask-image:linear-gradient(90deg,transparent,#000 34px)}
.emogrid.more.less{-webkit-mask-image:linear-gradient(90deg,transparent,#000 34px,#000 calc(100% - 34px),transparent);mask-image:linear-gradient(90deg,transparent,#000 34px,#000 calc(100% - 34px),transparent)}

/* ---------- online room: the seats are a compact strip (not hero cards); the hero picker is the main area, the same
   component as CUSTOM (src/net/online-main.js roomHtml) ---------- */
.seats{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;padding:0 0 8px;margin-bottom:8px;border-bottom:2px solid #ffffff14}
.slbl{flex:none;font-size:8px}.slbl b{font-weight:400;color:#fff}
.sgrp{display:flex;gap:6px;flex-wrap:wrap;min-width:0}
.svs{font-family:var(--px);font-size:8px;color:var(--mut)}
.schip{display:inline-flex;align-items:center;gap:6px;min-width:0;max-width:150px;height:44px;box-sizing:border-box;padding:2px 9px 2px 2px;background:#0b0e15;border:2px solid #000;border-left:5px solid var(--tc);border-radius:8px;box-shadow:0 2px 0 #000}
.schip.me{border-color:var(--yel);border-left-color:var(--tc);box-shadow:0 2px 0 #000,0 0 10px #ffd84a44}
.schip.bot{opacity:.75}
.simg{flex:none;width:36px;height:36px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:radial-gradient(circle at 50% 60%,#26304a,#0b0e15 70%)}
.simg img.hp{width:36px;height:36px}
.simg i{font-style:normal;font-family:var(--px);font-size:16px;color:#ffe46a;text-shadow:2px 2px 0 #000,0 0 8px #ffd84a}
.schip .st{display:flex;flex-direction:column;gap:2px;min-width:0}
.schip .st b{font-family:var(--px);font-weight:400;font-size:9px;color:var(--tc);text-shadow:1px 1px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.schip .st small{font-family:var(--px);font-size:7px;color:var(--mut);white-space:nowrap;text-transform:uppercase}
.su.room .hz{gap:10px}
@media (max-height:520px){
  .seats{gap:4px 6px;padding-bottom:5px;margin-bottom:5px}
  .slbl{font-size:7px}
  .schip{height:36px;max-width:118px;padding:1px 6px 1px 1px;gap:4px;border-left-width:4px}
  .simg{width:30px;height:30px}.simg img.hp{width:30px;height:30px}.simg i{font-size:13px}
  .schip .st b{font-size:7.5px}.schip .st small{font-size:6px}
  .su.room .hz{gap:6px}
  .su.room .hzimg{width:clamp(56px,calc(100vh - 318px),110px)}
}
@media (max-height:400px){.slbl{display:none}}

/* ---------- TUTORIAL (src/tutorial.js, docs/ui.md "Tutorial"): the step card at the top centre, the stick ring on
   phones, the done screen. Key caps: gold fill, black border, thicker bottom edge. ---------- */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.kc{display:inline-block;font-family:var(--px);font-weight:400;font-size:.62em;line-height:1.5;color:#1a1408;background:var(--yel);border:2px solid #000;border-bottom-width:4px;border-radius:6px;padding:1px 6px 0;margin:0 2px;vertical-align:.12em;text-shadow:none;white-space:nowrap}
#tut{position:fixed;z-index:4;left:50%;top:max(12px,calc(env(safe-area-inset-top) + 6px));transform:translateX(-50%);box-sizing:border-box;width:min(620px,calc(100vw - 340px));
  background:#141925f0;border:3px solid #000;border-radius:12px;box-shadow:0 5px 0 #000,0 0 0 2px #2b3348 inset;padding:8px 16px 11px;text-align:center;color:var(--txt);pointer-events:none;transition:opacity .2s;-webkit-user-select:none;user-select:none}
#tut.hidden{display:none}
#tut.thru{opacity:.32}
#tut .tuth{display:flex;align-items:center;justify-content:center;gap:12px;margin:0 64px 6px}
#tut .tutn{font-family:var(--px);font-size:9px;letter-spacing:1px;color:var(--mut);white-space:nowrap}
#tut .tutdots{display:flex;gap:5px}
#tut .tutdots i{width:16px;height:16px;box-sizing:border-box;border-radius:50%;border:2px solid #3a4560;background:#1f2635;font-style:normal;font-size:10px;font-weight:900;line-height:12px;color:#0d1a05;text-align:center}
#tut .tutdots i.ok{background:var(--green);border-color:#000}
#tut .tutdots i.sk{background:#3a4152;border-color:#000}
#tut .tutdots i.cur{border-color:var(--yel);background:#3a3214;box-shadow:0 0 0 2px rgba(255,216,74,.35);animation:tutCur .55s ease-in-out infinite alternate}
@keyframes tutCur{to{transform:scale(1.22);box-shadow:0 0 0 4px rgba(255,216,74,.15)}}
#tut .tutt{font-size:18px;font-weight:700;line-height:1.45;min-height:1.45em;text-shadow:1px 1px 0 #000}
#tut .tutt.ok{font-family:var(--px);font-weight:400;font-size:18px;color:var(--green);text-shadow:2px 2px 0 #000;animation:tutOk .3s ease-out}
@keyframes tutOk{from{transform:scale(1.35)}to{transform:scale(1)}}
#tut .tutt .em{color:var(--yel)}
#tut .tsw{display:inline-block;width:.9em;height:.9em;border:2px solid #000;border-radius:4px;vertical-align:-.1em}
#tut .tutp{display:inline-block;margin-left:6px;font-family:var(--px);font-size:.55em;color:var(--yel);vertical-align:.15em;white-space:nowrap}
#tutskip{position:absolute;top:6px;right:8px;pointer-events:auto;font-family:var(--px);font-size:8px;line-height:1;color:var(--mut);background:#1f2635;border:2px solid #000;border-radius:6px;padding:5px 7px;cursor:pointer;touch-action:manipulation}
#tutskip kbd{font-size:7px;padding:1px 3px;margin-left:3px;border-width:1px 1px 2px}
#tutskip::before{content:'';position:absolute;inset:-9px -9px -9px -9px} /* a thumb-sized hit area */
#tutskip:hover{color:#fff}#tutskip:disabled{opacity:.35;cursor:default}
#tutskip:focus-visible{outline:3px solid var(--yel);outline-offset:2px}
html.touch #tut,html.touch #tut *{touch-action:none}
/* phones / short screens: between the fuel bar (top left) and the minimap (top right) */
html.touch #tut{width:calc(100vw - 2 * (min(170px,24vw) + 30px));padding:5px 8px 7px;top:max(6px,env(safe-area-inset-top))}
@media (max-height:520px),(max-width:760px){
  #tut{width:calc(100vw - 2 * (min(170px,24vw) + 30px));padding:5px 8px 7px;top:max(6px,env(safe-area-inset-top))}
  #tut .tuth{margin:0 44px 4px 0;gap:8px;justify-content:flex-start}
  #tut .tutn{font-size:7px}
  #tut .tutdots{gap:3px}
  #tut .tutdots i{width:12px;height:12px;font-size:8px;line-height:9px;border-width:1.5px}
  #tut .tutt{font-size:12.5px;line-height:1.4}
  #tut .tutt.ok{font-size:13px}
  #tutskip{top:3px;right:4px;padding:4px 6px;font-size:7px}
}
html.touch #tut .tuth{margin:0 44px 4px 0;gap:8px;justify-content:flex-start}
html.touch #tut .tutt{font-size:12.5px;line-height:1.4}
/* the stick the step needs (phones): a pulsing gold ring over its zone */
#tutstick{position:fixed;z-index:2;box-sizing:border-box;border:3px solid var(--yel);border-radius:50%;pointer-events:none;box-shadow:0 0 0 0 rgba(255,216,74,.8),inset 0 0 18px rgba(255,216,74,.35);animation:tutStick .7s ease-in-out infinite alternate}
#tutstick.hidden{display:none}
@keyframes tutStick{from{box-shadow:0 0 0 0 rgba(255,216,74,.85),inset 0 0 14px rgba(255,216,74,.3)}to{box-shadow:0 0 0 14px rgba(255,216,74,0),inset 0 0 22px rgba(255,216,74,.5)}}
/* done screen */
.scr.tdone{max-width:760px;gap:10px}
.tdpanel{width:100%;display:flex;flex-direction:column;gap:8px}
.tdlist{list-style:none;padding:0;margin:0 auto;display:grid;grid-template-columns:repeat(4,auto);gap:4px 22px;font-size:15px;font-weight:700;color:var(--mut)}
.tdlist li.ok{color:#fff}
.tdlist i{display:inline-block;width:20px;font-style:normal;font-weight:900;color:#5b6378}
.tdlist li.ok i{color:var(--green)}
.tdreal{margin:0;text-align:center;font-size:14px;line-height:1.4;color:#cfd7e8}
.tdtricks h3{font-family:var(--px);font-weight:400;font-size:10px;color:var(--yel);margin:2px 0 6px;letter-spacing:1px;text-align:center}
.tdtricks ul{list-style:none;padding:0;margin:0;display:grid;grid-template-columns:1fr 1fr;gap:5px 20px;font-size:14px;line-height:1.4}
.tdtricks li{padding-left:14px;position:relative}
.tdtricks li::before{content:'›';position:absolute;left:0;color:var(--yel);font-weight:900}
#menu .tdbtns #t-play{min-width:min(300px,56vw)}
@media (max-height:520px){
  .scr.tdone{gap:5px}
  #menu .tdone h2{font-size:14px}
  .tdpanel{gap:4px;padding:7px 12px}
  .tdlist{grid-template-columns:repeat(4,auto);font-size:12px;gap:1px 14px}
  .tdreal{font-size:11.5px;line-height:1.3}
  .tdtricks h3{font-size:8px;margin:0 0 3px}
  .tdtricks ul{font-size:11.5px;line-height:1.3;gap:2px 14px}
  #menu .tdbtns .big{min-height:44px}
}
@media (max-width:620px) and (min-height:521px){.tdtricks ul{grid-template-columns:1fr}.tdlist{grid-template-columns:repeat(2,auto)}}
@media (prefers-reduced-motion:reduce){#tut .tutdots i.cur,#tutstick,#tut .tutt.ok{animation:none}}

/* ---------- controls card (src/ctlcard.js): the first real matches, left side, clear of the HUD and the sticks ---------- */
#ctlcard{position:fixed;z-index:3;left:max(16px,calc(env(safe-area-inset-left) + 12px));top:max(16px,calc(env(safe-area-inset-top) + 10px));box-sizing:border-box;width:max-content;max-width:300px;
  background:#141925d9;border:3px solid #000;border-radius:10px;box-shadow:0 4px 0 #000;padding:7px 10px;color:var(--txt);font-size:12.5px;font-weight:600;line-height:1.25;pointer-events:none;transition:opacity .25s}
#ctlcard.hidden{display:none}
#ctlcard .cr{display:grid;grid-template-columns:auto 1fr;gap:8px;align-items:center;margin:2px 0}
#ctlcard .cr > span:first-child{min-width:78px}
#ctlcard .cr em{font-style:normal;color:var(--mut);font-size:11px}
#ctlcard .cr b,#ctlcard .cl b{color:var(--yel)}
#ctlcard .cf{margin-top:4px;padding-top:4px;border-top:2px solid #2b3348;font-size:11px;color:var(--mut)}
#ctlcard kbd{font-size:7px;padding:1px 3px}
#ctlcard .cl{margin:1px 0;white-space:nowrap}
/* phones / short screens: the fuel bar (+ its hint and the power-up row) owns the top left: the card sits under it */
@media (max-height:520px),(max-width:760px){#ctlcard{top:max(68px,calc(env(safe-area-inset-top) + 62px));left:max(10px,calc(env(safe-area-inset-left) + 8px));font-size:11px;padding:4px 7px;max-width:min(230px,32vw);border-width:2px}}
html.touch #ctlcard{top:max(68px,calc(env(safe-area-inset-top) + 62px));left:max(10px,calc(env(safe-area-inset-left) + 8px));font-size:11px;padding:4px 7px;max-width:min(230px,32vw);border-width:2px}

/* =====================================================================================================================
   STYLE (docs/ui.md "Style"; src/cosmetics-ui.js): the STYLE chip next to COLOR in SETUP, the STYLE screen (preview +
   HAT / TRAIL / SPLAT / SOUND rows), the item icon on the LEVEL n! plaque. No page scroll at 1280x720, 844x390, 667x375.
   ===================================================================================================================== */
/* SETUP: COLOR and STYLE share the last row as two half chips */
.chiprow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px}
#menu .chip.half{padding-left:10px;padding-right:8px}
#menu .chip.stchip{position:relative;grid-template-rows:1fr;padding-left:10px;padding-right:8px}
.stchip .cval{grid-row:1;gap:4px}
.stchip .cgo{grid-row:1}
#menu .stchip .cval b{font-size:10px;overflow:visible}
.sthat{width:32px;height:32px;flex:none;margin:-4px -3px -4px -6px}
.stnew{position:absolute;top:-7px;right:-5px;font-family:var(--px);font-size:7px;line-height:1;color:#1a1408;background:var(--yel);border:2px solid #000;border-radius:5px;padding:3px 4px 2px;box-shadow:0 2px 0 #000;animation:stnew 1.2s ease-in-out infinite alternate;pointer-events:none}
@keyframes stnew{to{transform:scale(1.12)}}
@media (max-height:520px){
  .chiprow{gap:5px}
  .sthat{width:26px;height:26px;margin:-3px -3px -3px -4px}
  #menu .chip.stchip{padding-left:6px;padding-right:5px;gap:2px 3px}
  #menu .stchip .cval b{font-size:8px}
  .stchip .cgo{font-size:13px}
  #menu .chip.half .cval b{display:none} /* the swatch says the colour; the name stays in the label for screen readers */
  #menu .chip.half{padding-right:6px}
}
@media (max-width:700px) and (min-height:521px){.chiprow{grid-template-columns:1fr 1fr}}
@media (max-height:520px) and (max-width:700px){.stchip .cgo{display:none}}

/* the STYLE screen */
.scr.sty{max-width:1100px;height:100%;box-sizing:border-box;justify-content:center}
.stpanel{display:flex;flex-direction:column;gap:8px;width:100%;max-height:100%;min-height:0;box-sizing:border-box;padding:8px 12px 12px}
.stbody{display:grid;grid-template-columns:clamp(200px,30vw,340px) minmax(0,1fr);gap:14px;min-height:0;align-items:stretch}
.stprev{position:relative;min-height:220px;border:3px solid #000;border-radius:10px;background:radial-gradient(circle at 40% 45%,#26304a,#0b0e15 75%);overflow:hidden}
#stcv{position:absolute;left:0;top:0;width:100%;height:calc(100% - 44px);display:block}
.stcap{position:absolute;left:0;right:0;bottom:0;height:44px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;background:#0b0e15d0;border-top:2px solid #000;text-align:center;padding:0 6px}
.stcap b{font-family:var(--px);font-weight:400;font-size:10px;color:var(--yel);text-shadow:2px 2px 0 #000;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.stcap small{font-size:11px;font-weight:700;color:#aeb7c9}.stcap .on{color:#8be04e}.stcap .lk{color:#ffb02e}
.strows{display:flex;flex-direction:column;gap:6px;min-width:0;justify-content:center}
.strow{display:flex;align-items:center;gap:10px;min-width:0}
.stk{flex:none;width:58px;font-family:var(--px);font-size:9px;color:var(--mut);text-shadow:2px 2px 0 #000}
.sttiles{display:flex;gap:8px;min-width:0;flex:1 1 auto;overflow-x:auto;overflow-y:hidden;padding:7px 4px 9px;scrollbar-width:none;overscroll-behavior:contain}
.sttiles::-webkit-scrollbar{display:none}
.stscroll{position:relative;flex:1 1 auto;min-width:0;display:flex}
.starr{display:none;position:absolute;top:50%;width:22px;height:34px;margin-top:-18px;align-items:center;justify-content:center;border-radius:8px;background:#0b0e15e6;border:2px solid #000;color:var(--yel);font-style:normal;font-size:22px;font-weight:900;line-height:1;cursor:pointer;box-shadow:0 2px 0 #000;z-index:1}
.starr.r{right:0}.starr.l{left:0}
.stscroll.more .starr.r,.stscroll.less .starr.l{display:flex}
.sttiles.more{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,#000 calc(100% - 40px),transparent)}
.sttiles.less{-webkit-mask-image:linear-gradient(90deg,transparent,#000 40px);mask-image:linear-gradient(90deg,transparent,#000 40px)}
.sttiles.more.less{-webkit-mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent);mask-image:linear-gradient(90deg,transparent,#000 40px,#000 calc(100% - 40px),transparent)}
#menu .sttile{position:relative;flex:none;width:62px;height:62px;padding:0;display:flex;align-items:center;justify-content:center;border-radius:10px;background:#0f131c;text-shadow:none;box-shadow:0 3px 0 #000}
#menu .sttile img{width:48px;height:48px;pointer-events:none}
@media (hover:hover){#menu .sttile:hover{background:#1d2433}}
#menu .sttile.on{background:#2e2a14;border-color:var(--yel);box-shadow:0 3px 0 #000,0 0 12px #ffd84a66}
#menu .sttile.lk{background:#0b0e15;cursor:default}
#menu .sttile.lk img{filter:grayscale(1) brightness(.42);opacity:.85}
.stlock{position:absolute;top:4px;right:4px;width:10px;height:12px;color:#c8cfdd;filter:drop-shadow(1px 1px 0 #000)}
.stlv{position:absolute;left:0;right:0;bottom:4px;font-family:var(--px);font-size:7px;line-height:1;color:#fff;text-shadow:1px 1px 0 #000,-1px 0 0 #000,0 -1px 0 #000;white-space:nowrap;text-align:center}
.stdot{position:absolute;top:-5px;right:-5px;width:9px;height:9px;border-radius:50%;background:var(--yel);border:2px solid #000}
#menu .sttile.nope{animation:stnope .3s}
@keyframes stnope{20%{transform:translateX(-4px)}40%{transform:translateX(4px)}60%{transform:translateX(-3px)}80%{transform:translateX(2px)}}
@media (max-height:520px){
  #menu[data-scr="style"]{padding-left:max(12px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .stpanel{padding:4px 8px 6px;gap:4px}
  .stbody{grid-template-columns:clamp(150px,26vw,210px) minmax(0,1fr);gap:8px}
  .stprev{min-height:0}
  #stcv{height:calc(100% - 36px)}
  .stcap{height:36px;gap:2px}.stcap b{font-size:8px}.stcap small{font-size:10px}
  .strows{gap:2px}
  .strow{gap:6px}
  .stk{width:40px;font-size:7px}
  .sttiles{gap:5px;padding:5px 3px 7px}
  .starr{width:18px;height:28px;margin-top:-15px;font-size:18px}
  #menu .sttile{width:46px;height:46px;border-width:2px;border-radius:8px}
  #menu .sttile img{width:38px;height:38px}
  .stlv{font-size:5.5px;bottom:3px}
  .stlock{top:2px;right:2px;width:8px;height:10px}
}
@media (max-width:700px) and (min-height:521px){.stbody{grid-template-columns:1fr}.stprev{min-height:200px}}
@media (prefers-reduced-motion:reduce){.stnew,#menu .sttile.nope{animation:none}}
/* the level rewards chip (.xrew): each new item's icon before its name */
.xrico{width:20px;height:20px;background:#0b0e15d0;border:2px solid #000;border-radius:5px;box-sizing:border-box}
@media (max-height:520px){.xrico{width:16px;height:16px;border-width:1px}}

/* ---------- action hints (src/hints.js): a key cap + verb beside the player's own hero; placed per frame by transform ---------- */
#jphint{position:fixed;z-index:2;left:0;top:0;display:flex;align-items:center;gap:6px;box-sizing:border-box;white-space:nowrap;pointer-events:none;will-change:transform,opacity;
  background:#141925e0;border:2px solid #000;border-radius:7px;box-shadow:0 3px 0 #000;padding:4px 7px;color:#fff;font-family:var(--px);font-size:9px;line-height:1;text-shadow:1px 1px 0 #000}
#jphint.hidden{display:none}
#jphint kbd{font-size:8px;padding:2px 5px;color:var(--yel);border-color:#000;text-shadow:none}
#jphint span{padding-top:1px}
#jphint .hdrop{display:block;width:10px;height:13px}
#jphint::after{content:'';position:absolute;left:var(--tip,50%);margin-left:-5px;border:5px solid transparent}
#jphint[data-at="above"]::after{top:100%;border-top-color:#000}
#jphint[data-at="below"]::after{bottom:100%;border-bottom-color:#000}
#jphint[data-at="left"]::after,#jphint[data-at="right"]::after{display:none}
#jphint[data-id="refuel"]{border-color:#a8303e}
#jphint[data-id="refuel"][data-at="above"]::after{border-top-color:#a8303e}
#jphint[data-id="refuel"][data-at="below"]::after{border-bottom-color:#a8303e}
#jphint.touch{font-size:8px;padding:4px 6px;gap:5px}
#jphint.touch kbd{font-size:7px;padding:2px 4px}
@media (min-height:700px) and (min-width:1100px){#jphint{font-size:11px;padding:5px 8px;gap:7px}#jphint kbd{font-size:10px;padding:3px 6px}#jphint .hdrop{width:12px;height:15px}}

/* ---------- RANDOM = the dice (playbook "Random seats show a dice, never ?"): one image everywhere a random hero or
   arena shows (src/ui.js diceImg) ---------- */
img.dice{display:block;object-fit:contain;-webkit-user-drag:none;user-select:none;pointer-events:none}
.nrq img.dice{width:64%;height:auto;filter:drop-shadow(2px 3px 0 #000)}
.hzq img.dice{width:52%;height:auto;filter:drop-shadow(3px 4px 0 #000) drop-shadow(0 0 14px #ffd84a66)}
.cq img.dice{height:88%;width:auto;filter:drop-shadow(1px 1px 0 #000)}
.aq img.dice{height:58%;width:auto;filter:drop-shadow(3px 4px 0 #000) drop-shadow(0 0 14px #ffd84a66)}
.simg img.sdice{width:80%;height:auto;filter:drop-shadow(1px 2px 0 #000)}
@media (prefers-reduced-motion:reduce){.pport.rnd img.pdice{animation:none}}

/* ---------- online room v2 (docs/ui.md "Online room"): YOUR NAME + dice on top, "N OF 4 · REAL PLAYERS" under the code,
   people team-coloured (hero portrait, name, YOU / HOST), bots grey with the robot ---------- */
.su.room .rtl{display:flex;align-items:center;gap:10px;min-width:0}
.yname{display:flex;flex-direction:column;gap:2px;min-width:0}
.yname .lbl{font-size:7px;line-height:1}
.ynrow{display:flex;align-items:center;gap:6px}
#menu .yname input#name{width:168px;min-height:40px;height:40px;font-size:11px;padding:0 10px}
#menu .ynrow button.dice{margin-left:0;width:40px;height:40px;min-width:40px;min-height:40px}
#menu .ynrow button.dice img.dice{width:26px;height:26px}
.cstack{display:flex;flex-direction:column;align-items:center;gap:3px}
.crow{display:flex;align-items:center;gap:10px}
.pcount{font-family:var(--px);font-size:8px;color:var(--mut);white-space:nowrap;text-shadow:1px 1px 0 #000}
.pcount b{font-weight:400;color:var(--yel)}
.schip.ppl{background:linear-gradient(90deg,color-mix(in srgb,var(--tc) 30%,#0b0e15),color-mix(in srgb,var(--tc) 12%,#0b0e15));border-color:#000;border-left-color:var(--tc)}
.schip.ppl .st b{color:#fff}
.schip.ppl.me{border-color:var(--yel);border-left-color:var(--tc)}
.schip .st small{display:flex;align-items:center;gap:4px}
.stag{font-style:normal;font-family:var(--px);font-size:6.5px;line-height:1;padding:2px 3px 1px;border-radius:3px;background:#000a;color:#e6ecf5;border:1px solid #0008}
.stag.you{background:var(--yel);color:#1a1408}
.shn{color:#c9d2e2;overflow:hidden;text-overflow:ellipsis}
.schip.bot{opacity:1;background:#1a1d24;border-left-color:#5b6272;box-shadow:0 2px 0 #000}
.schip.bot .simg{background:#262a33}
.schip.bot img.robot{width:86%;height:auto;filter:grayscale(.55) brightness(.9)}
.schip.bot .st b{color:#9aa3b3}
.schip.bot .st small{color:#7b8496}
@media (max-height:520px){
  .su.room .rtl{gap:6px}
  #menu .yname input#name{width:124px;min-height:36px;height:36px;font-size:9px;padding:0 7px}
  #menu .ynrow button.dice{width:36px;height:36px;min-width:36px;min-height:36px}
  #menu .ynrow button.dice img.dice{width:22px;height:22px}
  .ynrow{gap:4px}
  .yname .lbl{font-size:6px}
  .pcount{font-size:6.5px}
  .cstack{gap:2px}
  .stag{font-size:5.5px;padding:1px 2px 0}
}
@media (max-height:520px) and (max-width:700px){
  .yname .lbl{display:none}
  .su.room .rtl{gap:4px}
  #menu .yname input#name{width:112px;font-size:7.5px;padding:0 5px}
  #menu .ynrow button.dice{width:34px;min-width:34px}
  .ynrow{gap:3px}
  #menu .su.room .codebox{gap:6px}
  #menu .su.room .codebox button{padding:0 8px;gap:6px}
  #menu .su.room #hpub{padding:0 9px}
  .pcount{font-size:6px}
}
/* narrow: the top row packs left to right (a centred code would push PRIVATE into SHARE) */
@media (max-width:760px){
  .su.room .sutop{display:flex;justify-content:space-between;gap:8px}
  .su.room .sutop > *{flex:none}
  .su.room .sutop > .atsp{display:none}
  .su.room .sutop > :last-child{margin-right:var(--corner)}
  .su.room.guest .codebox{margin-right:var(--corner)}
}
/* seats: names up to 12 characters fit; on phones the bots shrink to the robot + BOT (the BOTS chip says how hard) */
.schip{max-width:220px}
@media (max-height:520px){
  .schip{max-width:none}
  .schip.bot .st small{display:none}
  .schip.bot{padding-right:6px}
}
.pna{font-family:var(--px);font-weight:400;font-size:9px;color:var(--yel)}
