/* Tail Tag rc.6: a toy arena, with one material and spacing system. */
:root{color-scheme:light;--ink:#173f36;--cream:#fff8e8;--gold:#dfbd79;--coral:#f46b53;--pine:#123c34}
body{margin:0;background:#10372f;color:var(--ink)}
.local-game{max-width:1480px;width:100%;margin:auto;padding:18px 24px 0}
.local-game [hidden]{display:none!important}
.local-game button,.local-game summary{touch-action:manipulation}
.local-game button:focus-visible,.local-game summary:focus-visible,.local-game a:focus-visible{outline:3px solid #ffa75f;outline-offset:4px}
.local-game button{transition:transform .15s,filter .15s}
.local-game button:hover:not(:disabled){filter:brightness(1.06)}
.local-game button:active:not(:disabled){transform:translateY(2px)}
.local-game .topbar{position:absolute;right:50px;top:30px;z-index:6;margin:0;color:#fff8e8}
.local-game .brand,.local-game .profile-chip,.local-game .language-picker>span{display:none}
.local-game .language-picker select{background:#153e35ed;color:#fff8e8;border:1px solid #8b9f7d;border-radius:9px;padding:8px 10px;min-height:38px}
.local-game .game-shell{padding:0;border:1px solid #889477;border-radius:24px;background:var(--pine);box-shadow:0 14px 45px #001a1570;overflow:hidden}
.local-game .field{border:0;border-radius:0;background:var(--pine)}
.local-game:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) .field{height:auto;min-height:0;overflow:visible;touch-action:auto}
.local-game:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) #arena{position:absolute;inset:0;opacity:0;pointer-events:none}
.local-game .overlay{background:#103a32d9;backdrop-filter:blur(5px);padding:24px}
.local-game:is([data-view="menu"],[data-view="result"],[data-view="storage-error"]) .overlay{position:relative;inset:auto;display:block;overflow:visible;padding:0;backdrop-filter:none;background:transparent}
.local-game .panel{color:var(--ink);background:var(--cream);border:1px solid #c8ae7d;border-radius:22px;box-shadow:0 6px 0 #0a2a24,0 16px 50px #001b1555;width:min(100%,760px);padding:28px}
.local-game[data-view="menu"] .panel{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));width:100%;max-width:none;padding:0;border:0;box-shadow:none;background:transparent;border-radius:0}
.lobby-stage{grid-column:1/-1;isolation:isolate;position:relative;display:grid;grid-template-columns:52% minmax(0,1fr);align-content:center;gap:10px 28px;min-height:680px;padding:75px 50px 38px;color:#fff8e8;background:linear-gradient(90deg,#0c37210d 28%,#10362bba 69%,#10362bd9),url('./assets/art/arena-lobby.webp') center/cover}
.lobby-stage>*{grid-column:2;min-width:0;z-index:1}
.lobby-stage .lobby-hero{grid-column:auto;grid-row:auto;position:absolute;inset:0 auto 0 0;width:54%;border:0;background:none;display:flex;align-items:center;justify-content:center;pointer-events:none}
.lobby-hero>canvas{display:block;width:100%;height:480px;object-fit:contain;filter:drop-shadow(0 20px 10px #163d3830)}
.lobby-profile{position:absolute;top:24px;left:24px;display:flex;align-items:center;gap:10px;width:280px;max-width:calc(100% - 36px);padding:10px 15px;border:1px solid #b9c39b;border-radius:16px;background:#123c34ec;box-shadow:inset 0 2px 0 #ffffff22,0 4px 8px #183a3430;color:#fff8e8}
.lobby-profile>img{width:44px;height:48px;object-fit:contain}.lobby-profile>div{flex:1;min-width:0}.lobby-profile strong{display:block;font-size:17px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.lobby-profile span{display:block;font-size:11px;color:#d4ddc3;margin:3px 0}.lobby-profile b{font-size:16px;color:#ffda85;white-space:nowrap}.lobby-profile progress{width:100%;height:5px;accent-color:#efc474;display:block}
.lobby-wordmark{display:flex;align-items:center;justify-content:center;position:relative;width:fit-content;font-weight:1000;font-size:clamp(48px,5.2vw,80px);line-height:1;letter-spacing:-.065em;text-shadow:0 3px 0 #ccbb94,0 7px 0 #14382f,0 10px 15px #112e26a0;transform:rotate(-3deg);margin:0 0 15px}
.lobby-wordmark em{font-style:normal;color:#ff725a;text-shadow:0 3px 0 #b94536,0 7px 0 #14382f,0 10px 15px #112e26a0}.lobby-wordmark img{position:absolute;width:57px;height:55px;object-fit:contain;left:8px;top:-43px;transform:rotate(-15deg)}
.local-game[data-view="menu"] .panel-kicker{display:none}
.local-game[data-view="menu"] h1{font-size:25px;line-height:1.25;margin:0;letter-spacing:-.035em;color:#fff8e8}
.local-game[data-view="menu"] h1 br{display:none}.local-game[data-view="menu"] h1 em{color:#ffdc9a;margin-left:6px;font-style:normal}
.local-game[data-view="menu"] #panel-description{font-size:14px;line-height:1.5;color:#e8ead8;margin:0 0 8px;text-wrap:pretty}
.local-game .mode-options{display:grid;gap:13px;margin:0}
.local-game .mode-button{display:flex;align-items:center;gap:13px;min-height:90px;padding:12px 17px;border:1px solid #a6b296;border-radius:17px;background:linear-gradient(#285b4f,#153f36);color:#fff8e8;box-shadow:inset 0 2px 1px #ffffff35,0 4px 0 #0d2b25,0 8px 15px #112e2630;text-align:left}
.local-game .mode-button.quick{border-color:#ffc49b;background:linear-gradient(#ff8365,#ed5b49);box-shadow:inset 0 2px 1px #ffffff75,0 4px 0 #a43f32,0 8px 15px #112e2630}
.local-game .mode-button strong{display:block;font-size:23px;font-weight:900;line-height:1.2;letter-spacing:-.025em}.local-game .mode-button small{display:block;color:inherit;font-size:12px;line-height:1.45;opacity:.9;margin-top:5px}.local-game .mode-recommendation{font-size:10px;color:#f4d89c;margin:0 0 4px}.mode-art{width:53px;height:58px;object-fit:contain;flex:none;filter:drop-shadow(0 3px 2px #001e1970)}.mode-arrow{margin-left:auto;font-size:28px}
.lobby-shortcuts{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0 0}
.lobby-shortcuts button{display:flex;align-items:center;gap:9px;padding:6px 12px;min-width:0;min-height:58px;background:#163f34e8;border:1px solid #a6b296;border-radius:15px;color:#fff8e8;text-align:left;font-size:14px;font-weight:850;box-shadow:inset 0 1px 0 #fff3,0 3px 0 #113027}.lobby-shortcuts img{width:36px;height:40px;object-fit:contain}.lobby-shortcuts button>span:last-child{margin-left:auto;color:#d8d6bb;font-size:22px}
.local-game .entry-controls{background:transparent;padding:0;border:0;margin:10px 0 0;color:#e6eadb}.local-game .entry-controls p{font-size:11px;margin:0}.local-game .entry-controls p:nth-child(2){display:none}.local-game .entry-controls small{color:#d0d8c2;font-size:11px;margin-top:4px}.local-game .entry-controls strong{width:30px;color:#ffe0a2}
.local-game .entry-status{grid-column:1/-1;margin:0!important;background:#fff0d6;color:#6f471e!important;border-radius:10px;padding:10px;font-size:12px!important}
.local-game .panel>.menu-details{padding:0 24px;margin:0;border:0;border-top:1px solid #78917b55;border-radius:0;background:#173f36;color:#f5f0dd}.local-game .panel>.menu-details>summary{display:flex;align-items:center;justify-content:space-between;min-height:52px;font-size:14px;font-weight:750;padding:12px 0;color:inherit}.local-game .panel>.menu-details[open]{padding:0 28px 24px;background:var(--cream);color:var(--ink)}
.local-game[data-view="menu"] .panel>.menu-details[open],.local-game[data-view="menu"] .panel>.badge-award{grid-column:1/-1}.local-game[data-view="menu"] .panel>.menu-details:not([open]){border-right:1px solid #78917b55}
.local-game #player-panel{margin:0;padding:0 24px;border:0;border-top:1px solid #78917b55;border-radius:0}.local-game #player-panel>summary{padding:12px 0;min-height:54px;font-size:14px}.local-game #player-panel[open]{padding:0 28px 24px}.local-game #player-panel[open]>summary{border-bottom:1px solid #cdbd96;margin:0}
.local-game #player-panel .player-drawer summary{font-size:16px}
.local-game .footerbar,.local-game .page-footnote{display:none}.local-game .webapp-tools{padding:12px 0 18px;margin:0;color:#bdcabb;font-size:11px}.local-game .webapp-tools nav{justify-content:center}.local-game .webapp-tools a,.local-game .webapp-tools summary{color:#bdcabb}.local-game .webapp-tools #game-version{opacity:.7}
.local-game .player-identity{margin-top:15px;flex-wrap:wrap;gap:16px}.local-game .player-identity canvas{width:40%;min-width:160px;height:auto;aspect-ratio:2;background:#eee4cc url('./assets/art/arena-lobby.webp') center/cover;border:1px solid #decdaa;border-radius:14px}.local-game .player-details{flex:1;min-width:110px}.local-game .player-details input{font-size:14px;min-height:42px}.local-game .player-details .eyebrow{font-size:10px}.local-game .player-details strong{font-size:18px}
.rank-emblem{display:flex;flex-direction:column;align-items:center;gap:3px}.rank-emblem img{width:65px;height:72px;object-fit:contain}.local-game .player-tier{align-self:center;background:transparent;color:#765224;padding:0;font-size:12px}
.local-game .player-progress-copy{font-size:12px}.local-game .player-progress-copy span:last-child{font-size:11px}.local-game .player-card progress{accent-color:#1c9984;height:10px}
.local-game .player-drawer{border-color:#e1d3b6}.local-game .player-drawer>summary{font-size:14px;padding:15px 0}.local-game .player-drawer h3{font-size:15px;margin-top:18px}.local-game .player-drawer p{font-size:12px;line-height:1.5;color:#52685b}
.local-game .shop-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.local-game .shop-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;padding:12px 8px;min-height:112px;background:linear-gradient(#fffdf7,#f4e9d3);border:1px solid #dcc7a2;border-radius:13px;color:#244b3e;font-size:12px;line-height:1.35;font-weight:750;text-align:center;box-shadow:0 2px 0 #e2d4b7;overflow-wrap:anywhere}
.local-game .shop-choice>:is(img,canvas){width:86px;height:86px;object-fit:contain;filter:drop-shadow(0 3px 2px #4e361218)}
.local-game .shop-choice[aria-pressed="true"]{border:2px solid #ef7054;background:#fff0d8;box-shadow:0 0 0 2px #ef705423}
.local-game .shop-choice:disabled{opacity:.68;cursor:default}.local-game .shop-choice:hover:not(:disabled){border-color:#d77542;transform:translateY(-1px)}
.local-game .wardrobe{grid-template-columns:repeat(auto-fit,minmax(85px,1fr))}.local-game .wardrobe .shop-choice{min-height:92px;font-size:11px}.local-game .wardrobe .shop-choice :is(img,canvas){width:58px;height:58px}
.shop-fitting{display:flex;align-items:center;gap:16px;margin:14px 0;padding:12px;border:2px solid #e3b56a;border-radius:16px;background:#fff2d5}.shop-fitting canvas{width:50%;height:auto;aspect-ratio:2;background:url('./assets/art/arena-lobby.webp') center/cover;border-radius:12px}.fitting-copy{flex:1;min-width:0}.fitting-copy>span{font-size:11px;color:#896222}.fitting-copy h3{margin:6px 0 10px!important}.fitting-copy button{display:block;max-width:100%;font-size:12px}.fitting-copy .text-button{margin:12px 0 0;padding:4px}.fitting-copy .primary-button:disabled{background:#e4dac3;color:#655e4f;border-color:#b9af97;box-shadow:none;cursor:default}
#badge-drawer>summary{display:flex;justify-content:space-between;gap:10px}#badge-count{font-size:11px;color:#8a6b36}
.badge-collection{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.badge-card{display:flex;flex-direction:column;align-items:center;text-align:center;padding:12px 9px;background:#fff5df;border:1px solid #d6bd8f;border-radius:13px}.badge-card>img{width:100px;height:110px;object-fit:contain}.badge-card strong{font-size:13px;margin-top:5px}.badge-card .badge-state{font-size:10px;margin:4px 0;color:#26765d}.badge-card p{font-size:11px!important;margin:3px 0 0;line-height:1.45}.badge-card[data-earned="false"]{background:#f0ede3;border-color:#d6d0c1}.badge-card[data-earned="false"]>img{filter:grayscale(1);opacity:.6}.badge-card[data-earned="false"] .badge-state{color:#757569}
.badge-award{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:12px 0;padding:16px;border:1px solid #d7a854;border-radius:14px;background:#fff0c9;box-shadow:inset 0 1px 0 white}.badge-award .eyebrow{color:#ab5928}.badge-award img{width:58px;height:65px;object-fit:contain}#badge-award-list{display:flex;gap:15px;flex-wrap:wrap}#badge-award-list>div{display:flex;align-items:center;gap:7px;font-size:13px}
.local-game .next-run-choice>:is(img,canvas){height:90px;width:100%;object-fit:contain}.local-game .postgame-panel{background:#fff3dc;border-color:#dbc093}.local-game .next-run-choice{background:#fffaf0;border-color:#dbcdb0}
.local-game .next-run-choice .shop-choice{min-height:44px}.local-game .next-run-choice .shop-choice>:is(img,canvas){display:none}
.local-game .item-dot.bomb,.local-game .item-dot.guard,.local-game .item-dot.dash{width:20px;height:20px;border:0;clip-path:none;border-radius:0;background:transparent center/contain no-repeat}
.local-game .item-dot.bomb{background-image:url('./assets/art/item-mine.webp')}.local-game .item-dot.guard{background-image:url('./assets/art/item-guard.webp')}.local-game .item-dot.dash{background-image:url('./assets/art/item-dash.webp')}

/* The arena fills the display. Status chips occupy a dedicated top rail. */
body.game-active{height:100dvh;min-height:0;overflow:hidden;overscroll-behavior:none}
body.game-active>.local-game{height:100%;min-height:0;max-width:none;padding:0;display:flex;flex-direction:column}
.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.topbar{display:none}
.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.game-shell{height:100%;display:flex;flex-direction:column;flex:1;min-height:0;border:0;border-radius:0;box-shadow:none;padding:0}
.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .field{flex:1;min-height:0;max-height:none;height:auto;border-radius:0}
.local-game .scorebar{display:grid;grid-template-columns:minmax(0,1fr) minmax(100px,1fr) minmax(0,1fr);gap:14px;position:relative;flex:none;min-height:90px;padding:max(10px,env(safe-area-inset-top)) 24px 10px;background:linear-gradient(#1e4b40,#10382f);border-bottom:1px solid #a6ae86;color:#fff8e8;z-index:4}
.local-game .score-group{position:relative;display:flex;flex-direction:column;align-items:flex-start;padding-left:62px;min-width:0}.local-game .score-group>.eyebrow{font-size:10px;letter-spacing:.08em;color:#d8dbc2}.local-game .score-group>strong{font-size:30px;line-height:1.08;color:#fff8e8}.local-game .score-group>small{font-size:11px;line-height:1.5;color:#d6dec7}.local-game #scorebar #standing{color:#d8ddc2!important}.local-game .score-group.center{padding:0;align-items:center;justify-content:center;text-align:center}.local-game .score-group.center strong{font-size:34px;font-variant-numeric:tabular-nums;letter-spacing:.03em}.hud-portrait{position:absolute;left:0;top:6px;width:54px;height:54px;object-fit:contain}.local-game #standing{font-size:10px;color:#cbd5bb}.local-game .score-actions{justify-content:flex-end;align-items:center}
.local-game .pause-button{min-width:48px;min-height:46px;background:#285647;border:1px solid #a0b698;color:#fff9e8;border-radius:12px;font-size:0;box-shadow:inset 0 2px 0 #fff2,0 3px 0 #092b24}.local-game .pause-button:after{content:'Ⅱ';font-size:26px;font-weight:900;line-height:1}
.local-game #effects{position:absolute;top:78px;left:0;padding:6px 10px;background:#173f36eb;color:#fff8e8;border-radius:8px;white-space:nowrap}.local-game #head-risk:not(:empty){position:absolute;top:80px;left:50%;transform:translateX(-50%);background:#a43327;padding:6px 12px;border:1px solid #ffd6aa;border-radius:9px;color:#fff;white-space:nowrap;z-index:5;font-weight:900}.local-game #head-risk:empty{display:none}.local-game #tail-growth:empty{display:none}
.local-game .live-standings{pointer-events:auto;position:absolute;left:auto;right:18px;top:14px;width:auto;min-width:0;padding:0;background:transparent;border:0;z-index:5;box-shadow:none}.local-game #ranking-toggle{display:flex;align-items:center;justify-content:center;gap:7px;min-width:98px;min-height:43px;border:1px solid #93ac8d;background:#153f35ee;color:#fff8e8;border-radius:12px;box-shadow:inset 0 1px 0 #fff3,0 3px 0 #133c32;padding:5px 10px}.local-game #ranking-toggle img{width:30px;height:30px;object-fit:contain}.local-game #rank-position{font-size:18px}.local-game #live-standings-list{width:215px;max-width:70vw;background:#fff8e8f7;border:1px solid #b4b598;border-radius:12px;padding:10px;margin:8px 0 0;box-shadow:0 6px 20px #163e3330}.local-game #live-standings-list li{font-size:12px;min-height:26px;color:#204739}.local-game #live-standings-list .is-you{background:#f9dbb3}
.local-game #ranking-toggle:not(.is-leader) img{display:none}.local-game #ranking-toggle.is-leader{border-color:#f7d779;background:linear-gradient(150deg,#5a421e,#1d4d39);box-shadow:0 0 0 2px #f5d47244,0 4px 13px #111b1055}.local-game #live-standings-list{width:258px}.local-game #free-goal{max-width:260px;white-space:normal;line-height:1.15;color:#ffdc8e;font-weight:800}.local-game #free-best{color:#f1d6a0;font-weight:800;font-variant-numeric:tabular-nums}
.local-game .item-button{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:0;position:absolute;right:max(22px,env(safe-area-inset-right));bottom:max(24px,env(safe-area-inset-bottom));width:108px;height:108px;min-width:0;min-height:0;padding:7px;border:4px solid #ffead0;outline:2px solid #244b3c;border-radius:50%;background:linear-gradient(#ff9b72,#f06049);color:#fff7e6;box-shadow:inset 0 2px 2px #fff7,0 6px 0 #143e32,0 10px 22px #113a3455;z-index:6;opacity:1;touch-action:manipulation}
.local-game .item-button img{width:64px;height:66px;object-fit:contain;filter:drop-shadow(0 2px 2px #52352750)}.local-game #item-label{font-size:11px;font-weight:850;line-height:1.2;max-width:100%;text-align:center}.local-game .item-key{position:absolute;right:-5px;bottom:-4px;border:1px solid #c6ceac;border-radius:7px;background:#173f36;color:#fff7e6;padding:2px 7px;font-size:17px;box-shadow:0 2px 0 #082b24}.local-game .empty-item{display:none;font-size:30px;line-height:1}.local-game .item-button:disabled{background:#315c4bea;border-color:#c2c6a3;color:#ecedda;opacity:.86}.local-game .item-button:disabled .empty-item{display:block;margin-bottom:8px}
.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .special-button{position:absolute;right:150px!important;bottom:max(26px,env(safe-area-inset-bottom));min-width:80px;max-width:130px;min-height:62px;border-radius:16px;border:2px solid #d5e7b9;background:#215f43;color:#faffea;padding:8px;font-size:12px;z-index:6}
.local-game .field>.toast{top:auto;bottom:150px;height:auto;width:max-content;white-space:normal;border-radius:13px;background:#173f36f0;color:#fff8e8;border:1px solid #a4b78d;font-size:14px;max-width:calc(100% - 32px)}
.local-game:not([data-view="menu"]) .lobby-stage{display:contents;background:none;color:var(--ink)}.local-game:not([data-view="menu"])>.topbar{display:none}.local-game:not([data-view="menu"]) #lobby-hero,.local-game:not([data-view="menu"]) .lobby-wordmark,.local-game:not([data-view="menu"]) .lobby-shortcuts{display:none}
.local-game[data-view="result"] .overlay,.local-game[data-view="storage-error"] .overlay{padding:36px 20px;background:linear-gradient(#143e36d9,#143e36ed),url('./assets/art/arena-lobby.webp') center/cover}
.local-game[data-view="result"] .panel,.local-game[data-view="storage-error"] .panel{margin:auto;width:min(100%,820px);padding:28px;display:flex;flex-direction:column;gap:6px;overflow:hidden}
.local-game[data-view="result"] #panel-title{font-size:36px;margin:5px 0 10px;letter-spacing:-.04em}.local-game[data-view="result"] #panel-kicker{color:#927036;font-size:12px}.local-game[data-view="result"] .result-actions{gap:12px}.local-game .primary-button{background:linear-gradient(#ff8464,#ed634b);color:#fffdf0;border:1px solid #dc543b;border-radius:13px;box-shadow:0 3px 0 #a93e2e;font-size:16px;min-height:48px}.local-game .result-standings{border:1px solid #ddcfac;border-radius:13px;padding:16px;background:#f2e6cc}.local-game .result-standings li{min-height:34px;font-size:14px}.local-game .postgame-panel{padding:18px;border-radius:16px;margin:10px 0}.local-game .postgame-heading h2{font-size:20px}.local-game .next-run-choice{border-radius:13px;padding:14px}.local-game .next-run-choice>img{height:110px}.local-game .next-run-choice strong{font-size:16px}.local-game .next-run-choice p{font-size:13px}
.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.webapp-tools{display:contents}.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"])>.webapp-tools>:not(.app-error):not(.connection-notice){display:none}.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .app-error,.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .connection-notice{position:fixed;bottom:10px;left:10px;right:150px;z-index:20;background:#fff1d2;color:#653326;padding:12px;border-radius:12px;box-shadow:0 3px 15px #1238}
/* The same collectibles get room to breathe in the wardrobe. */
.local-game .player-identity{margin:20px 0;gap:28px}.local-game .player-identity canvas{height:240px;width:48%;border:1px solid #bba77c;border-radius:18px}.local-game .player-details strong{font-size:26px}.local-game .rank-emblem img{width:88px;height:100px}.local-game .shop-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.local-game .shop-choice{min-height:155px;padding:14px;border:1px solid #cbb68e;border-radius:16px;font-size:14px}.local-game .shop-choice>:is(img,canvas){width:106px;height:106px}.local-game .wardrobe{grid-template-columns:repeat(auto-fit,minmax(100px,1fr))}.local-game .badge-collection{grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.local-game .badge-card{padding:18px}.local-game .badge-card>img{width:130px;height:144px}.local-game .badge-card strong{font-size:16px}.local-game .badge-card p{font-size:13px!important}.local-game .shop-fitting{position:sticky;top:8px;z-index:3;box-shadow:0 8px 25px #173f3630;background:#fff2d7;max-height:80dvh;overflow:auto}.local-game .shop-fitting canvas{max-height:240px;object-fit:contain}
@media(max-width:760px){
 .local-game[data-view="menu"] .panel{grid-template-columns:repeat(2,minmax(0,1fr))}.local-game{padding:8px 8px 0}.local-game .game-shell{border-radius:18px}.local-game .topbar{right:18px;top:17px}.local-game .language-picker select{font-size:11px;max-width:95px;min-height:32px;padding:5px}.lobby-stage{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-height:0;padding:76px 18px 20px;background:linear-gradient(#123e3120 15%,#10382ba6 50%,#10382bf5 100%),url('./assets/art/arena-lobby.webp') center top/auto 560px no-repeat}
 .lobby-wordmark{align-self:center;font-size:49px;margin:10px 0 0;order:0}.lobby-wordmark img{width:37px;height:39px;left:8px;top:-25px}.lobby-stage .lobby-hero{position:static;width:100%;height:173px;display:flex;order:1}.lobby-hero>canvas{width:100%;height:210px;margin-top:-10px}.lobby-profile{top:10px;left:10px;width:calc(100% - 120px);max-width:none;padding:6px 9px;gap:6px;border-radius:12px}.lobby-profile>img{width:30px;height:36px}.lobby-profile strong{font-size:13px}.lobby-profile span{font-size:10px;margin:2px 0}.lobby-profile b{font-size:12px}.lobby-profile progress{height:4px}
 .local-game[data-view="menu"] h1{font-size:20px;text-align:center;order:2}.local-game[data-view="menu"] #panel-description{font-size:12px;line-height:1.5;text-align:center;order:3;margin:0 0 5px}.local-game .mode-options{order:4;gap:10px}.local-game .mode-button{min-height:75px;padding:10px 12px;border-radius:14px;gap:10px}.local-game .mode-button strong{font-size:19px}.local-game .mode-button small{font-size:11px;margin-top:4px}.local-game .mode-recommendation{font-size:9px;margin:0 0 2px}.mode-art{width:43px;height:45px}.mode-arrow{font-size:21px}.lobby-shortcuts{order:5;margin:4px 0 0;gap:9px}.lobby-shortcuts button{min-height:51px;padding:5px 9px;font-size:12px;gap:5px}.lobby-shortcuts img{width:28px;height:34px}.local-game .entry-controls{order:6;margin:5px 0 0}.local-game .entry-controls p:first-child{display:none}.local-game .entry-controls p:nth-child(2){display:flex;justify-content:center;font-size:10px}.local-game .entry-controls strong{display:none}.local-game .entry-controls small{text-align:center;font-size:10px;margin-top:2px}.local-game #entry-status{order:7}
 .local-game .panel>.menu-details,.local-game #player-panel{padding:0 18px}.local-game .panel>.menu-details[open],.local-game #player-panel[open]{padding:0 16px 18px}.local-game #player-panel .player-drawer summary{font-size:14px}.local-game .player-identity{gap:12px;margin:15px 0}.local-game .player-identity canvas{width:100%;height:190px;min-width:0}.local-game .player-details strong{font-size:20px}.local-game .rank-emblem img{width:55px;height:62px}.local-game .player-progress-copy{flex-direction:column;gap:5px}.local-game .shop-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}.local-game .shop-choice{font-size:12px;min-height:121px;padding:10px 4px;border-radius:12px}.local-game .shop-choice>:is(img,canvas){width:72px;height:72px}.local-game .wardrobe .shop-choice{font-size:11px}.local-game .badge-collection{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.local-game .badge-card{padding:12px 7px}.local-game .badge-card>img{width:86px;height:96px}.local-game .badge-card strong{font-size:14px}.local-game .badge-card p{font-size:12px!important}.local-game .shop-fitting{gap:10px;padding:10px;top:5px}.local-game .shop-fitting canvas{width:44%;height:140px;object-fit:contain}.local-game .fitting-copy .primary-button{font-size:12px;min-height:44px}.local-game .fitting-copy .text-button{margin-top:10px;font-size:11px}
 .local-game .scorebar{min-height:80px;gap:4px;padding:max(7px,env(safe-area-inset-top)) 10px 7px;grid-template-columns:1fr 1fr 44px}.local-game .score-group{padding-left:41px}.local-game .hud-portrait{width:38px;height:42px;top:7px}.local-game .score-group>.eyebrow{font-size:8px;letter-spacing:0}.local-game .score-group>strong{font-size:27px}.local-game .score-group>small{font-size:9px}.local-game .score-group.center>strong{font-size:30px}.local-game #standing{font-size:8px;line-height:1.4}.local-game .pause-button{min-width:40px;width:40px;min-height:42px;padding:4px;border-radius:10px}.local-game .archetype-badge{font-size:8px;padding:1px 3px;min-width:0}.local-game #effects{top:73px;font-size:10px;max-width:calc(100vw - 130px);white-space:normal}.local-game #head-risk:not(:empty){top:110px;left:0;transform:none;max-width:calc(100vw - 30px);font-size:10px;padding:5px 8px}.local-game #tail-growth{font-size:8px;white-space:nowrap}
 .local-game .live-standings{right:12px;top:10px}.local-game #ranking-toggle{min-width:80px;min-height:40px;padding:4px 8px}.local-game #ranking-toggle img{width:26px;height:26px}.local-game #rank-position{font-size:16px}.local-game #live-standings-list li{font-size:11px}.local-game .item-button{width:92px;height:92px;right:max(16px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));border-width:3px}.local-game .item-button img{width:54px;height:57px}.local-game .item-key{display:none}.local-game #item-label{font-size:10px}.local-game:is([data-view="play"],[data-view="pause"],[data-view="spectate"]) .special-button{right:18px!important;min-width:65px;max-width:110px;min-height:52px;bottom:130px;font-size:10px}.local-game .field>.toast{bottom:132px;font-size:12px}
 .local-game[data-view="result"] .overlay,.local-game[data-view="storage-error"] .overlay{padding:12px}.local-game[data-view="result"] .panel,.local-game[data-view="storage-error"] .panel{padding:18px 12px;border-radius:16px}.local-game[data-view="result"] #panel-title{font-size:28px}.local-game .postgame-panel{padding:12px}.local-game .postgame-heading h2{font-size:17px}.local-game .next-run-choice{padding:10px}.local-game .next-run-choice>img{height:80px}.local-game .next-run-choice strong{font-size:14px}.local-game .next-run-choice p{font-size:11px}.local-game .result-actions{flex-wrap:wrap}.local-game .primary-button{font-size:14px}.local-game .badge-award{padding:10px;gap:5px}.local-game #badge-award-list{gap:7px}.local-game #badge-award-list>div{font-size:12px}
}
@media(max-width:360px){.lobby-stage{padding:68px 13px 15px;gap:6px}.lobby-wordmark{font-size:40px;margin:5px 0}.lobby-stage .lobby-hero{height:119px}.lobby-hero>canvas{height:158px}.local-game[data-view="menu"] h1{font-size:17px}.local-game .mode-button{min-height:69px;padding:8px}.local-game .mode-button strong{font-size:17px}.local-game .mode-button small{font-size:10px}.mode-art{width:36px;height:39px}.lobby-shortcuts button{font-size:11px;padding:5px}.local-game .lobby-profile{width:calc(100% - 109px);gap:4px;padding:5px}.lobby-profile>img{width:26px}.lobby-profile b{font-size:10px}.local-game .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.local-game .postgame-choices{grid-template-columns:1fr 1fr}.local-game #standing{max-width:110px}.local-game .scorebar{grid-template-columns:1fr 1fr 40px}.local-game .score-group>small{font-size:8px}.local-game .shop-fitting{flex-direction:column}.local-game .shop-fitting canvas{width:100%;height:130px}}
@media(hover:none) and (pointer:coarse){.local-game .item-key{display:none}}
@media(max-height:500px) and (min-width:641px){.local-game .scorebar{min-height:65px;padding:5px 15px}.local-game .hud-portrait{width:44px;height:44px}.local-game .score-group{padding-left:50px}.local-game .score-group>strong,.local-game .score-group.center>strong{font-size:25px}.local-game .item-button{width:80px;height:80px;bottom:14px;right:14px}.local-game .item-button img{width:45px;height:45px}.local-game .item-key{display:none}}
@media(prefers-reduced-motion:reduce){.local-game button{transition:none!important;animation:none!important}}

/* Shared rooms reuse the established toy-arena palette and surfaces. */
.local-game .mode-button.multi{background:#d8e7f2;border-color:#96b9cf;color:#244b65}
.local-game .network-tools{margin:12px 0;padding:12px 16px;background:#f3ead6;border:1px solid #cbb991;border-radius:14px;color:#264c40}
.local-game #network-status{margin:0 0 8px;font-size:13px;font-weight:700;line-height:1.5}
.local-game .channel-list,.local-game .network-actions{display:flex;flex-wrap:wrap;gap:7px}
.local-game .network-tools button{padding:8px 12px;min-height:40px;border:1px solid #b4c5ad;border-radius:10px;background:#fffaf0;color:#294d41;font-size:12px;font-weight:700}
.local-game .network-tools button:disabled{opacity:.5}
.local-game:is([data-view="lobby"],[data-view="countdown"]) .lobby-hero,.local-game:is([data-view="lobby"],[data-view="countdown"]) .lobby-wordmark,.local-game:is([data-view="lobby"],[data-view="countdown"]) .lobby-shortcuts{display:none}
.local-game:is([data-view="lobby"],[data-view="countdown"]) #panel-title{font-size:30px}
@media(max-width:640px){.local-game .network-tools{padding:9px;margin:8px 0}.local-game #network-status{font-size:11px}.local-game .network-tools button{padding:7px;font-size:11px;min-height:38px}.local-game .mode-button.multi{min-height:65px}}

@media(max-width:760px){.local-game .network-tools{order:5}.local-game .lobby-shortcuts{order:6}.local-game .entry-controls{order:7}}

/* Four distinct collectible characters lead the catalog. */
.local-game #player-shop{grid-template-columns:repeat(4,minmax(0,1fr))}
.local-game #player-shop .character-product{position:relative;gap:8px;padding:18px 10px 15px;background:radial-gradient(ellipse at 50% 34%,#fff8e8 0,#f5e3be 64%,#e9cfa0);border-color:#c4a164;box-shadow:inset 0 1px #fff9,0 3px 0 #cfb17c}
.local-game #player-shop .character-product>canvas{width:100%;height:auto;max-width:170px;aspect-ratio:1;filter:drop-shadow(0 6px 5px #704f2926)}
.local-game #player-shop .character-product>span{font-size:15px;line-height:1.5}
.local-game #player-shop .character-product>small{font-size:11px;font-weight:600;color:#785e38}
.local-game #player-shop .shop-section-title{grid-column:1/-1;font-size:14px;margin:15px 0 0;padding-top:16px;border-top:1px solid #cfb68a;text-align:left}
@media(max-width:640px){.local-game #player-shop{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.local-game #player-shop .character-product{padding:12px 7px}.local-game #player-shop .character-product>span{font-size:13px}.local-game #player-shop .character-product>small{font-size:10px}}

.local-game #player-shop .tail-product{gap:8px;background:linear-gradient(150deg,#edf7ef,#d1e5dc);border-color:#a3beb0;box-shadow:inset 0 1px #fff9,0 3px 0 #a3beb0;min-height:180px}
.local-game #player-shop .tail-product>canvas{width:100%;height:auto;max-width:300px;aspect-ratio:2;object-fit:contain}
.local-game #player-shop .tail-product>small{font-size:11px;font-weight:600;color:#42634f}
.local-game .wardrobe .shop-choice>.tail-preview{width:90px;height:58px;object-fit:contain}
@media(max-width:640px){.local-game #player-shop .tail-product{min-height:150px;padding:12px 5px}.local-game #player-shop .tail-product>small{font-size:10px}}
/* Account controls reuse the lobby's warm paper and deep green palette. */
.account-strip{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:8px 0 16px;padding:10px 14px;border:1px solid #4e766936;border-radius:14px;background:#f7f5ed;color:#426357;font-size:12px}
.account-strip[hidden]{display:none}.account-strip button{border:0;border-radius:20px;background:#183f34;color:#fff;padding:9px 14px;font:inherit;font-weight:800;cursor:pointer}
.account-dialog{box-sizing:border-box;width:min(430px,calc(100vw - 28px));max-height:calc(100dvh - 32px);overflow:auto;padding:22px;border:1px solid #d5ddce;border-radius:24px;background:#faf8ef;color:#193e32;box-shadow:0 24px 90px #071c3566;font-family:inherit}
.account-dialog::backdrop{background:#102e26a8;backdrop-filter:blur(7px)}.account-heading{display:flex;align-items:start;justify-content:space-between;gap:14px}.account-heading h2{font-size:24px;line-height:1.15;margin:0}.account-heading button{border:0;background:#e5e9dc;border-radius:50%;width:32px;height:32px;flex:none;font-size:24px;cursor:pointer}
#account-preview{width:100%;height:auto;display:block;background:radial-gradient(ellipse,#e4ecdd,transparent 70%);margin:12px 0}#account-message{font-size:15px;line-height:1.6;min-height:48px}#account-google{display:flex;justify-content:center;min-width:0}#account-comparison{white-space:pre-line;background:#eaf0e2;border-radius:12px;line-height:1.9;padding:0 12px;overflow-wrap:anywhere}
#account-confirm,#account-logout,#account-guest{width:100%;padding:13px;border:0;border-radius:12px;font:inherit;font-weight:800;background:#1c4e3d;color:white;margin:5px 0;cursor:pointer}.account-help,.account-note{font-size:12px;line-height:1.6;color:#50695d;margin-top:18px}.account-help summary{cursor:pointer;font-weight:700}.account-dialog button:focus-visible,.account-help summary:focus-visible{outline:3px solid #cc8d2a;outline-offset:3px}

/* Google brand button: official multicolor logo, white face and neutral border. */
#account-google{display:grid;justify-items:center;gap:12px;margin:16px 0}
#account-google .google-signin-button{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:0 12px;height:44px;border-radius:24px;border:1px solid #747775;background:#fff;color:#1f1f1f;font:500 14px/20px Arial,sans-serif;box-shadow:none;max-width:100%}
.google-signin-button img{flex:0 0 18px;width:18px;height:18px;background:#fff}
#account-google .account-switch{font:inherit;color:#1c4c3e;background:none;border:0;text-decoration:underline;padding:8px}
