.weight-game{--game-retro-font:'Courier New',monospace;--game-ink:#162334;--game-highlight:#f7dfa0;--game-control-radius:8px}
.scroll-down,.game-launch{position:fixed;bottom:calc(102px + env(safe-area-inset-bottom));z-index:20;display:grid;place-items:center;width:48px;height:48px;border:2px solid var(--text);border-radius:50%;background:var(--panel);color:var(--gold);box-shadow:0 3px 14px #0006;cursor:pointer}.scroll-down{right:20px;bottom:calc(158px + env(safe-area-inset-bottom))}.scroll-top{bottom:calc(214px + env(safe-area-inset-bottom))}.game-launch{left:20px}.scroll-down:hover,.game-launch:hover{background:var(--bg)}.weight-game{max-height:94dvh;padding:0;border:1px solid #dec17d;border-radius:16px;background:#101110;color:#f5f3ec;overflow:auto}.weight-game::backdrop{background:#000c}.weight-game:fullscreen,.weight-game.game-expanded{width:100%;max-width:none;height:100dvh;max-height:100dvh;border-radius:0}.game-expanded{position:fixed;inset:0;margin:0}.game-shell{margin:auto}.game-top{display:flex;align-items:center;justify-content:space-between;gap:12px}.game-top h2{font-size:1.35rem;margin:0}.game-top button{background:#252821;color:#f5f3ec;border:1px solid #746442;border-radius:6px;min-width:44px;min-height:44px;cursor:pointer}.game-hud{display:flex;justify-content:space-between;gap:12px;margin:12px 0;color:#dec17d;font-weight:bold}.game-canvas{display:block;max-height:52dvh;object-fit:contain;background:#171a18;border:1px solid #414737;image-rendering:pixelated;touch-action:manipulation;cursor:pointer}.game-instructions{color:#c1c4b9;margin:12px 0}.game-controls{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:14px 0}.game-controls button{min-height:48px;flex:1}.game-score-form{display:flex;gap:10px;flex-wrap:wrap;margin:14px 0}.game-score-form label{width:100%;font-size:.9rem}.game-score-form input{flex:1;min-width:100px;padding:10px;color:#fff;background:#252821;border:1px solid #746442;border-radius:4px}.game-board{width:100%;border-collapse:collapse;font-size:.9rem}.game-board th,.game-board td{padding:7px 10px;text-align:right;border-bottom:1px solid #414737}.game-status{min-height:1.7em;font-size:.95rem}.game-shell h3{font-size:1.1rem;margin-top:20px}.weight-game button:focus-visible,.weight-game input:focus-visible{outline:3px solid #dec17d;outline-offset:3px}@media(max-width:650px){.scroll-down{right:16px}.game-launch{left:16px}}body.game-open{overflow:hidden}
/* Arcade gym theme */
.weight-game{border:2px solid #cba55e;background:linear-gradient(145deg,#191b23,#101017);box-shadow:0 18px 90px #000b,0 0 28px #dec17d22}.game-shell{padding:20px}.game-top h2{color:#f1d79d;font-weight:900;letter-spacing:.3px}.game-top button{background:#252634;border-color:#706047}.game-hud{padding:12px 16px;border:1px solid #514636;border-radius:10px;background:#0a0d15;align-items:center;font-size:1.1rem}.game-hud [data-lives]{display:flex;gap:9px;direction:ltr}.game-heart{display:inline-block;color:#ff3356;font-size:29px;line-height:1;text-shadow:0 0 7px #ff3356,0 0 18px #ff335680;animation:heart-glow 1.8s ease-in-out infinite}.game-heart:nth-child(2){animation-delay:.2s}.game-heart:nth-child(3){animation-delay:.4s}.game-heart.heart-empty{color:#43303a;text-shadow:none;animation:none}.game-canvas{border:2px solid #77623f;border-radius:10px;box-shadow:0 5px 22px #0007}.game-controls .button{background:linear-gradient(#ebd297,#c6a35e);border-bottom:3px solid #856632;border-radius:8px}.game-controls [data-jump]{background:linear-gradient(#eef0fb,#bbc8df);border-bottom-color:#617492;color:#172137;font-size:1.1rem}.game-controls [data-pause]{flex:0 1 100px;background:#303443;color:#edf0f8;border-bottom-color:#151823}.game-board{background:#121620;border-radius:8px;overflow:hidden}.game-board th{color:#dec17d;background:#202531}.game-board tbody tr:first-child{color:#ffe19b}.game-status{color:#e5d3ae}.game-instructions{color:#c9cbd6;font-size:.9rem}@keyframes heart-glow{50%{transform:scale(1.08);text-shadow:0 0 12px #ff3356,0 0 23px #ff3356a0}}@media(prefers-reduced-motion:reduce){.game-heart{animation:none}}@media(max-width:650px){.game-hud{padding:10px 12px}.game-heart{font-size:26px}.game-controls{gap:8px}.game-canvas{max-height:45dvh}}
/* Larger desktop arena, viewport-friendly mobile layout. */
.weight-game{width:min(96vw,1040px)}.game-shell{max-width:1000px}.game-canvas{max-height:none;width:100%;height:auto;aspect-ratio:8/5}.weight-game:fullscreen .game-shell,.weight-game.game-expanded .game-shell{max-width:1100px}.weight-game:fullscreen .game-canvas,.weight-game.game-expanded .game-canvas{max-height:62dvh;object-fit:contain}@media(max-width:650px){.weight-game{width:calc(100vw - 14px);max-height:96dvh}.game-canvas{width:100%;height:auto;max-height:none;aspect-ratio:8/5}.game-top{gap:5px}.game-top h2{font-size:1rem}.game-top button{min-width:40px;min-height:42px}.game-shell{padding:10px}.weight-game:fullscreen .game-canvas,.weight-game.game-expanded .game-canvas{max-height:54dvh}.game-instructions{font-size:.85rem}}
@media(min-width:651px){.game-canvas{width:min(100%,calc(58dvh * 1.6));margin-inline:auto}.weight-game:fullscreen .game-canvas,.weight-game.game-expanded .game-canvas{width:min(100%,calc(62dvh * 1.6))}}
.runner-launch{bottom:calc(158px + env(safe-area-inset-bottom));color:#a5dfff}.runner-game{border-color:#86b5db;background:linear-gradient(145deg,#182a43,#101827)}.runner-game .game-canvas{border-color:#96c4e6}.runner-game .game-hud{font-size:.95rem}.runner-game .game-top h2{color:#bbdef8}@media(max-width:650px){.runner-game .game-hud{padding:8px;font-size:.8rem;gap:6px}.runner-game .game-heart{font-size:22px}.runner-game .game-hud [data-lives]{gap:4px}}

.game-picker{position:fixed;left:20px;bottom:calc(102px + env(safe-area-inset-bottom));z-index:20}.game-picker .game-picker-toggle{position:relative;left:auto;bottom:auto}.game-picker-options{position:absolute;bottom:62px;left:0;flex-direction:column;gap:12px}.game-picker-options[hidden]{display:none}.game-picker .game-picker-choice{left:auto;bottom:auto;animation:game-choice-in .18s ease-out}.game-picker-choice span{position:absolute;left:62px;white-space:nowrap;background:var(--panel);color:var(--text);border:1px solid var(--gold);border-radius:20px;padding:6px 12px;font-size:13px;box-shadow:0 3px 12px #0004}.game-picker-toggle[aria-expanded="true"]{border-color:var(--gold);box-shadow:0 0 16px #dec17d55}@keyframes game-choice-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:650px){.game-picker{left:16px}}@media(prefers-reduced-motion:reduce){.game-picker .game-picker-choice{animation:none}}
.food-game{background:linear-gradient(145deg,#153b34,#111c21);border-color:#9fdcb7}.food-game .game-canvas{aspect-ratio:16/9}.food-game .food-name{text-align:center;font-size:1.4rem;font-weight:bold;color:#ffdf91;min-height:1.8em;margin:12px}.food-timer{height:10px;background:#183026;border-radius:8px;overflow:hidden;margin:8px 0}.food-timer div{height:100%;background:linear-gradient(90deg,#e7b347,#91e6ab);width:100%}.food-game .food-eat{background:#8ad5a2;color:#102b20;border-color:#b8f5cb}.food-game .food-bin{background:#d57869;color:#241710;border-color:#f1b3a7}.food-game .game-controls button:disabled{opacity:.45}

.game-picker-options{inset:auto auto 0 0;width:160px;height:160px;display:block;pointer-events:none}.game-picker .game-picker-choice{position:absolute;pointer-events:auto;width:48px;height:48px}.game-picker-choice:nth-child(1){left:0;bottom:76px}.game-picker-choice:nth-child(2){left:60px;bottom:60px}.game-picker-choice:nth-child(3){left:82px;bottom:0}.game-picker-choice span{display:none}.game-picker-choice:hover span,.game-picker-choice:focus-visible span{display:block;left:52px;z-index:3}.food-game .game-canvas{max-height:58dvh}

.game-hud .game-lives-label{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}

.runner-game .game-canvas{aspect-ratio:32/21}@media(min-width:651px){.runner-game .game-canvas{width:min(100%,calc(58dvh * 1.5238))}}

.game-arena{position:relative;isolation:isolate;width:100%;margin-inline:auto}.game-arena .game-canvas{width:100%!important}.game-retro-captions{position:absolute;inset:8px 10px auto auto;max-width:72%;display:flex;flex-direction:column;align-items:flex-end;gap:5px;pointer-events:none;z-index:1}.weight-game .game-retro-captions :is(.game-status,.food-name){margin:0;min-height:0;padding:5px 9px;border:2px solid #e4c574;border-radius:2px;background:#111b30ed;color:#fff1b9;font:700 clamp(.7rem,1.5vw,.95rem)/1.4 var(--game-retro-font);text-align:right;letter-spacing:.025em;text-shadow:2px 2px 0 #493524;box-shadow:3px 3px 0 #0007;overflow-wrap:anywhere;transition:opacity .2s}.weight-game .game-retro-captions .food-name{font-size:clamp(.9rem,2vw,1.2rem);border-color:#fff1b9}.game-retro-captions .caption-faded{opacity:0}.weight-game:fullscreen .game-arena,.weight-game.game-expanded .game-arena{width:min(100%,calc(62dvh * 1.6))}.runner-game .game-arena{width:min(100%,calc(58dvh * 640 / 420))}.runner-game .game-arena .game-canvas{aspect-ratio:640/420}.runner-game:fullscreen .game-arena,.runner-game.game-expanded .game-arena{width:min(100%,calc(62dvh * 640 / 420))}.food-game:fullscreen .game-arena,.food-game.game-expanded .game-arena{width:min(100%,calc(62dvh * 16 / 9))}
@media(max-width:650px){.game-retro-captions{inset:5px 5px auto auto;max-width:74%;gap:3px}.weight-game .game-retro-captions :is(.game-status,.food-name){padding:3px 5px;font-size:.7rem;line-height:1.3}.weight-game .game-retro-captions .food-name{font-size:.85rem}.runner-game .game-arena{width:100%}}
html:is(.accessibility-custom,[data-accessibility-palette=soft],[data-accessibility-palette=blue],[data-accessibility-palette=mono],.accessibility-contrast) .game-retro-captions :is(.game-status,.food-name){background:var(--bg)!important;color:var(--text)!important;border-color:var(--gold);text-shadow:none}

.game-retro-instructions{position:absolute;top:10%;right:8%;width:74%;padding:12px;border:2px solid #e4c574;background:#111b30f2;color:#fff1b9;box-shadow:4px 4px 0 #0008;font:700 clamp(.8rem,1.5vw,1rem)/1.5 var(--game-retro-font);pointer-events:none}.game-retro-instructions strong{font-size:1.15em}.game-retro-instructions p{margin:7px 0}.game-has-started .game-retro-instructions{display:none}.game-mobile-help{display:none}.game-retro-captions [hidden]{display:none!important}.food-game .game-retro-captions{max-width:30%;right:10px;top:10px}.food-game .game-retro-captions .food-name{font-size:clamp(.72rem,1.35vw,.95rem);line-height:1.3}.food-game:not(.game-has-started) .game-retro-captions{display:none}.food-game .game-retro-captions .game-status{font-size:.75rem}
html:is(.accessibility-custom,[data-accessibility-palette=soft],[data-accessibility-palette=blue],[data-accessibility-palette=mono],.accessibility-contrast) .game-retro-instructions{background:var(--bg);color:var(--text);border-color:var(--gold)}
@media(max-width:650px),(hover:none) and (pointer:coarse){.game-desktop-help{display:none}.game-mobile-help{display:block}.game-retro-instructions{top:6%;right:5%;width:80%;padding:8px;font-size:.75rem;line-height:1.35}.game-retro-instructions p{margin:5px 0}.food-game .game-retro-captions{right:5px;top:5px;max-width:30%}.food-game .game-retro-captions .food-name{font-size:.7rem;padding:3px 4px}}

/* A shared, accessible end screen inside every game arena. */
.game-over-panel{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);max-height:92%;overflow:auto;box-sizing:border-box;border:2px solid #e4c574;background:#111b30f5;color:#fff1b9;box-shadow:4px 4px 0 #0008;z-index:3;text-align:center;font:700 clamp(.75rem,1.5vw,.95rem)/1.4 var(--game-retro-font)}
.game-over-panel[hidden]{display:none!important}.game-shell .game-over-panel h3{margin:0 0 4px;font:700 clamp(1.15rem,3vw,1.8rem)/1.25 var(--game-retro-font);color:#fff1b9}.game-over-score{margin:0 0 6px}.game-over-panel .game-score-form{margin:0;gap:6px;text-align:right}.game-over-panel .game-score-form[hidden]{display:none}.game-over-panel .game-score-form label{font:inherit}.game-over-panel .game-score-form input{width:0;min-width:80px;padding:7px;font:inherit}.game-over-panel .game-score-form button{font:inherit;padding:7px 10px;min-height:36px}.game-over-panel :is([data-feedback],[data-save-feedback]){margin:5px 0 0;min-height:0;font:inherit}.game-is-over .game-retro-captions{display:none}
@media(max-width:650px){.game-over-panel{padding:8px 10px}.game-over-panel .game-score-form label{font-size:.68rem}.game-over-panel .game-score-form input,.game-over-panel .game-score-form button{padding:6px;font-size:.72rem}}

.food-arena-actions{position:absolute;inset:auto 12px 12px;display:flex;justify-content:space-between;pointer-events:none;z-index:2;direction:rtl}.food-arena-actions button{pointer-events:auto;display:grid;justify-items:center;gap:2px;min-width:64px;min-height:64px;padding:6px 10px;border:2px solid var(--game-highlight);border-radius:var(--game-control-radius);background:#162334ed;color:var(--game-highlight);box-shadow:3px 3px 0 #0006;font:700 .85rem var(--game-retro-font);touch-action:manipulation;cursor:pointer}.food-arena-actions button:active:not(:disabled){transform:translateY(2px);box-shadow:1px 1px 0 #0006}.food-arena-actions button:disabled{opacity:.4;cursor:default}.food-arena-actions button:focus-visible{outline:3px solid #fff;outline-offset:3px}.food-arena-actions svg{flex:none}.food-arena-actions button span{color:inherit!important}.food-game:not(.game-has-started) .food-arena-actions{display:none}
@media(max-width:650px){.food-arena-actions{inset:auto 6px 6px}.food-arena-actions button{min-width:48px;min-height:48px;padding:3px 6px;font-size:.7rem}.food-arena-actions svg{width:24px;height:24px}}

.game-retro-captions .game-status:empty{display:none!important}
.weight-game:not(.runner-game):not(.food-game) .game-retro-captions{display:none!important}

/* Two distinct cards: the result title, then the high-score entry. */
.game-over-panel{padding:0;border:0;background:transparent;box-shadow:none;display:flex;flex-direction:column;gap:12px;width:min(90%,460px)}
.game-over-heading-block,.game-over-entry-block{padding:14px 16px;border:2px solid #e4c574;background:#111b30f5;box-shadow:4px 4px 0 #0008;border-radius:3px;box-sizing:border-box;flex-shrink:0}
.game-shell .game-over-heading-block h3{margin:0 0 8px;font-size:clamp(1.5rem,4vw,2.3rem);line-height:1.2}.game-over-heading-block .game-over-score{margin:0;font-size:.9rem}.game-over-entry-block .game-score-form{display:flex;flex-direction:column;gap:8px}.game-over-entry-block .game-score-form[hidden]{display:none}.game-over-entry-block .game-score-form label{font-size:.85rem}.game-over-entry-block .game-score-form input{width:100%;box-sizing:border-box;min-width:0;min-height:44px}.game-over-entry-block .game-score-form button{min-height:44px;width:100%}.game-over-entry-block:has(.game-score-form[hidden]):not(:has([data-feedback]:not(:empty),[data-save-feedback]:not(:empty))){display:none}
html:is(.accessibility-custom,[data-accessibility-palette=soft],[data-accessibility-palette=blue],[data-accessibility-palette=mono],.accessibility-contrast) .game-over-panel{background:transparent!important;color:var(--text)!important}
html:is(.accessibility-custom,[data-accessibility-palette=soft],[data-accessibility-palette=blue],[data-accessibility-palette=mono],.accessibility-contrast) :is(.game-over-heading-block,.game-over-entry-block){background:var(--bg)!important;color:var(--text)!important;border-color:var(--gold)}
@media(max-width:650px){.game-over-panel{gap:8px;max-height:96%;width:92%}.game-over-heading-block,.game-over-entry-block{padding:7px 10px}.game-shell .game-over-heading-block h3{font-size:1.5rem;margin-bottom:4px}.game-over-heading-block .game-over-score{font-size:.75rem}.game-over-entry-block .game-score-form{gap:4px;display:grid;grid-template-columns:minmax(0,1fr) auto}.game-over-entry-block .game-score-form label{grid-column:1/-1;font-size:.7rem}.game-over-entry-block .game-score-form :is(input,button){font-size:.75rem;min-height:40px}.game-over-entry-block .game-score-form button{padding:5px 8px}}

.game-shell .game-retro-instructions .game-instructions-title{margin:10px 0 0;padding-top:8px;border-top:1px solid currentColor;text-align:center;color:inherit;font:700 clamp(1rem,2.5vw,1.5rem)/1.25 var(--game-retro-font)}

.game-title-screen{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding:12px;box-sizing:border-box;background:#101b2b;overflow:hidden;border-radius:8px}.game-title-screen[hidden]{display:none!important}.game-title-picture{position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated}.game-shell .game-title-screen h3{margin:0;background:#101b2bea;border:2px solid #e4c574;color:#fff1b9;text-align:center;font:700 clamp(1.2rem,3vw,2rem)/1.2 var(--game-retro-font);text-shadow:2px 2px #493524}.game-title-start{position:relative;min-width:130px;min-height:44px;font:700 1rem var(--game-retro-font)}.game-title-pending :is(.game-controls,.game-retro-instructions,.game-retro-captions,.food-arena-actions,.game-over-panel){visibility:hidden}.game-title-pending .game-controls{pointer-events:none}

.weight-game,.weight-game *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.weight-game :is(input,textarea){-webkit-user-select:text;user-select:text;-webkit-touch-callout:default}.weight-game button{touch-action:manipulation}

.game-title-picture{pointer-events:none}.game-title-screen{width:100%;height:100%}.game-title-start{z-index:1}

.game-character-select{position:relative;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:9px 12px;background:#101b2bf0;border:2px solid #e4c574;border-radius:8px;color:#fff1b9;text-align:center;font-family:var(--game-retro-font)}.game-character-select strong{grid-column:1/-1;font-size:14px}.game-character-select button{min-height:44px;border:1px solid #e4c574;border-radius:5px;background:#18283e;color:#fff1b9;font:700 17px var(--game-retro-font)}.game-character-select button[aria-pressed=true]{background:#e4c574;color:#142236;box-shadow:0 0 0 2px #fff1b9}.game-character-select button:focus-visible{outline:3px solid white;outline-offset:3px}.game-title-screen{gap:6px}.game-title-picture{object-fit:cover}@media(max-width:600px){.game-character-select{padding:5px 8px;gap:4px}.game-character-select button{min-height:40px}.game-shell .game-title-screen h3{font-size:1.1rem;padding:4px 9px}.game-title-screen{padding:7px;gap:4px}}
.game-character-select{grid-template-columns:auto 1fr 1fr;align-items:center;min-width:260px}.game-character-select strong{grid-column:auto;padding-inline:5px}.game-shell .game-title-screen h3{position:absolute;top:10px;max-width:90%;box-sizing:border-box}.game-title-screen{background:#142236}.game-title-picture{opacity:1}.game-title-start:disabled{opacity:.75}@media(max-width:600px){.game-character-select{min-width:240px}.game-shell .game-title-screen h3{top:6px}}
/* A shared desktop viewport, keeping each game's original drawing proportions. */
@media(min-width:651px){.weight-game .game-arena{aspect-ratio:8/5}.weight-game .game-arena .game-canvas{width:100%!important;max-height:none;object-fit:contain}.weight-game:fullscreen .game-arena,.weight-game.game-expanded .game-arena{max-width:min(100%,calc(62dvh * 1.6))}.game-arena{cursor:pointer}}

@media(min-width:651px){.weight-game.runner-game .game-arena,.weight-game.food-game .game-arena{width:100%;max-width:none}.weight-game .game-arena .game-canvas{height:auto;aspect-ratio:8/5}.weight-game.runner-game:fullscreen .game-arena,.weight-game.runner-game.game-expanded .game-arena,.weight-game.food-game:fullscreen .game-arena,.weight-game.food-game.game-expanded .game-arena{width:min(100%,calc(62dvh * 1.6));max-width:none}}

.game-character-screen{position:absolute;inset:0;z-index:6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:16px;box-sizing:border-box;background:radial-gradient(ellipse at center,#304364,#101b2b 75%);border-radius:8px}.game-character-screen[hidden]{display:none!important}.game-character-screen .game-character-select{width:min(85%,600px);min-width:0;padding:12px;grid-template-columns:1fr 1fr;gap:14px;background:#101b2b88}.game-character-screen .game-character-select strong{grid-column:1/-1;font-size:clamp(1rem,2vw,1.4rem)}.game-character-screen .game-character-select button{display:flex;flex-direction:column;align-items:center;padding:8px;min-width:0}.game-character-screen canvas{display:block;width:auto;max-width:100%;height:clamp(110px,26vh,240px);image-rendering:pixelated;object-fit:contain}.game-character-screen>.button{min-height:44px;min-width:150px}.game-character-pending :is(.game-controls,.game-retro-instructions,.game-retro-captions,.food-arena-actions,.game-over-panel){visibility:hidden}@media(max-width:650px){.game-character-screen{padding:6px;gap:5px}.game-character-screen .game-character-select{width:90%;padding:5px;gap:5px}.game-character-screen .game-character-select button{padding:2px;font-size:15px}.game-character-screen canvas{height:clamp(85px,23vw,160px)}.game-character-screen .game-character-select strong{font-size:14px}.game-character-screen>.button{min-height:38px;padding:5px 14px}}

.game-selection-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;image-rendering:pixelated;pointer-events:none}.game-selection-rich .game-character-select{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr;padding:0;border:0;background:transparent;box-shadow:none}.game-selection-rich .game-character-select strong{justify-self:center;padding:6px 16px;border:2px solid #e4c574;background:#101b2bdd;text-shadow:2px 2px #000}.game-selection-rich .game-character-select canvas{display:none}.game-selection-rich .game-character-select button{background:transparent;border:2px solid transparent;border-radius:10px;box-shadow:none;color:#fff1b9;text-shadow:2px 2px #000,0 0 8px #000;font-size:clamp(1.2rem,2.5vw,1.8rem)}.game-selection-rich .game-character-select button[aria-pressed=true]{border-color:#ffe09d;background:linear-gradient(transparent 75%,#22334999);box-shadow:inset 0 0 18px #ffdb7255}.game-selection-rich>.button{position:absolute;bottom:10px;z-index:1}.game-selection-rich .game-character-select button:hover{border-color:#fff1b9}@media(max-width:650px){.game-selection-rich .game-character-select{gap:5px}.game-selection-rich .game-character-select strong{padding:3px 10px;font-size:12px}.game-selection-rich .game-character-select button{font-size:18px;padding:3px}.game-selection-rich>.button{bottom:4px;min-height:34px}}

.game-over-panel .game-restart{align-self:center;min-height:44px;min-width:150px;margin:0 0 8px;font:700 1rem var(--game-retro-font)}.game-character-feedback:empty{display:none}.game-character-feedback{position:absolute;bottom:6px;z-index:2;background:#101b2bee;padding:5px 10px;color:#fff1b9}
/* The full character and its name share one clear selection target. */
.game-selection-rich .game-character-select{inset:8px 8px 8px;gap:8px}
.game-character-screen .game-character-select button,.game-character-screen .game-character-select button[aria-pressed=true],.game-selection-rich .game-character-select button:hover{border:0;background:transparent;box-shadow:none;border-radius:0}
.game-selection-rich .game-character-select button{justify-content:flex-end}
.game-character-screen .game-character-select button:focus-visible{outline:2px solid white;outline-offset:-4px}
@media(max-width:650px){.game-selection-rich .game-character-select{inset:4px 5px}.game-selection-rich .game-character-select button{padding-bottom:8px}}

.game-character-name{display:block;text-align:center;line-height:1.3;width:100%;color:inherit;pointer-events:none}.game-selection-rich .game-character-name{position:absolute;left:0;right:0}.game-instructions-start{pointer-events:auto;min-height:44px;min-width:150px;font:700 1rem var(--game-retro-font)}.game-retro-instructions{pointer-events:auto}
/* Full-height character targets above the selection artwork. */
.game-selection-rich .game-character-select{position:absolute;inset:0!important;display:block!important;width:100%;height:100%;pointer-events:none;z-index:2}
.game-selection-rich .game-character-select strong{position:absolute;top:8px;left:50%;transform:translateX(-50%);white-space:nowrap;z-index:1;pointer-events:none}
.game-selection-rich .game-character-select button{position:absolute;top:0;bottom:0;width:50%;height:100%;padding:0;pointer-events:auto;cursor:pointer;touch-action:manipulation}
.game-selection-rich .game-character-select button[data-character=ron]{left:0;right:auto}
.game-selection-rich .game-character-select button[data-character=shirel]{right:0;left:auto}
.game-selection-rich .game-character-name{bottom:5%;padding:4px 0;text-shadow:2px 2px #000,0 0 8px #000}
.game-instructions-pending .game-retro-instructions{z-index:7;visibility:visible!important;display:block;max-height:96%;overflow:auto;box-sizing:border-box}

.game-over-actions{display:flex;justify-content:center;gap:8px;flex-wrap:wrap}.game-over-actions .button{min-width:125px;min-height:44px;margin:0 0 8px;font:700 .95rem var(--game-retro-font)}.game-choose-again{background:#d0d8e8;color:var(--game-ink)}
/* Phone layout: native game proportions, readable stages and reachable controls. */
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game,.weight-game.game-expanded,.weight-game:fullscreen{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;inset:0;border:0;border-radius:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
 .weight-game .game-shell{width:100%;padding:calc(10px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left));box-sizing:border-box}
 .game-top{gap:8px;flex-wrap:wrap}.game-top h2{font-size:clamp(1rem,4.5vw,1.3rem)}.game-top>div{display:flex;gap:5px;margin-inline-start:auto}.game-top button{min-width:44px;min-height:44px}
 .game-hud{padding:8px 10px;margin:10px 0;gap:5px 12px;font-size:1rem}
 .weight-game .game-arena,.weight-game:fullscreen .game-arena,.weight-game.game-expanded .game-arena{width:100%;max-width:none;aspect-ratio:auto}
 .weight-game .game-arena .game-canvas{display:block;width:100%!important;height:auto;max-height:none;aspect-ratio:480/300;image-rendering:pixelated}
 .weight-game.runner-game .game-arena .game-canvas{aspect-ratio:640/420}
 .weight-game.food-game .game-arena .game-canvas{aspect-ratio:640/360}
 .game-title-pending .game-arena,.game-character-pending .game-arena{aspect-ratio:16/9;min-height:180px}
 .game-title-pending .game-arena .game-canvas,.game-character-pending .game-arena .game-canvas{height:100%;aspect-ratio:auto}
 .game-title-screen,.game-character-screen{border-radius:6px}.game-title-start{min-height:48px;font-size:1rem}.game-character-name{font-size:20px}
 .game-instructions-pending .game-arena .game-canvas{display:none}
 .game-instructions-pending .game-retro-instructions{position:relative;inset:auto;width:100%;max-height:none;margin:0;padding:16px;font-size:1rem;line-height:1.6;overflow:visible;border-radius:6px;box-shadow:none}
 .game-instructions-pending .game-controls{display:none}.game-retro-instructions p{margin:10px 0}.game-instructions-start{display:flex;width:100%;margin-top:16px;min-height:48px}
 .game-controls{gap:8px;margin:12px 0}.game-controls .button{min-height:48px;font-size:1rem;padding:10px 12px}.game-controls [data-pause]{flex:1 1 100px}
 .food-game .food-arena-actions{display:none}.food-game .food-name{font-size:1.35rem}
 .game-is-over .game-over-panel{inset:0;transform:none;width:100%;max-height:100%;padding:10px;gap:8px;background:#111b30f5;border-radius:8px;overflow:auto;box-sizing:border-box}
 .game-over-heading-block,.game-over-entry-block{padding:8px}.game-over-panel .game-score-form label{font-size:.9rem}.game-over-panel .game-score-form input{min-width:80px;font-size:16px;min-height:44px}.game-over-panel .game-score-form button{font-size:.9rem;min-height:44px}
 .game-over-actions .button{flex:1;min-width:110px;min-height:48px}.game-board{font-size:.9rem}.game-board th,.game-board td{padding:8px 5px}
}
@media(max-width:650px), (max-width:950px) and (pointer:coarse){.weight-game:is(.game-title-pending,.game-character-pending) .game-arena .game-canvas{height:100%;aspect-ratio:auto}}

/* The served dish label stays directly below the plate. */
.food-game .game-arena .food-dish-name{position:absolute;left:50%;bottom:4%;transform:translateX(-50%);width:max-content;max-width:70%;margin:0;min-height:0;padding:0;text-align:center;pointer-events:none;z-index:2;color:#fff1b9;font:700 clamp(.85rem,2.4vw,1.35rem)/1.2 var(--game-retro-font);text-shadow:1px 2px 0 #493524;overflow-wrap:anywhere}
.food-game .food-dish-name[hidden],.food-game:not(.game-has-started) .food-dish-name{display:none!important}
html:is(.accessibility-custom,[data-accessibility-palette=soft],[data-accessibility-palette=blue],[data-accessibility-palette=mono],.accessibility-contrast) .food-game .food-dish-name{color:var(--text)!important;text-shadow:none}
/* Full-resolution splash artwork, matching the character selection finish. */
.game-title-screen .game-title-picture{object-fit:fill;image-rendering:auto}
.game-shell .game-title-screen h3{border:1px solid #f1d69c88;border-radius:8px;background:linear-gradient(135deg,#142236ed,#101824cf);box-shadow:0 4px 18px #0005;color:#fff1ce;padding:8px 18px}
.game-title-screen .game-title-start{border:1px solid #fff0b7;border-radius:8px;box-shadow:0 4px 16px #0007;min-height:44px;padding:10px 24px;background:linear-gradient(135deg,#f4d691,#c6a557);color:#171c27}
/* Portrait phone arenas; artwork, headings and touch actions have separate space. */
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game .game-shell{max-width:560px;margin:auto;padding-top:calc(8px + env(safe-area-inset-top))}
 .weight-game .game-top{flex-wrap:nowrap;align-items:center;gap:6px;margin-bottom:6px}
 .weight-game .game-top h2{font-size:clamp(.95rem,4vw,1.2rem);line-height:1.3;margin:0}
 .weight-game .game-top>div{gap:3px}
 .weight-game .game-top button{min-width:40px;min-height:44px;padding:4px}
 .weight-game .game-hud{margin:5px 0 8px;padding:6px 8px;font-size:.9rem}
 .weight-game .game-arena,.weight-game:fullscreen .game-arena,.weight-game.game-expanded .game-arena,.weight-game:is(.game-title-pending,.game-character-pending) .game-arena{aspect-ratio:3/4;min-height:0;max-height:none;overflow:hidden;background:linear-gradient(180deg,#23394d,#132234 50%,#1e3041);border-radius:12px;box-sizing:border-box}
 .weight-game .game-arena .game-canvas,.weight-game.runner-game .game-arena .game-canvas,.weight-game.food-game .game-arena .game-canvas,.weight-game:is(.game-title-pending,.game-character-pending) .game-arena .game-canvas{width:100%!important;height:100%;aspect-ratio:auto;object-fit:contain}
 .weight-game .game-title-screen{grid-template-rows:auto minmax(0,1fr) auto;justify-content:stretch;align-items:stretch;background:linear-gradient(180deg,#22394d,#142236);overflow:hidden}
 .weight-game .game-title-screen .game-title-picture{grid-row:2;min-height:0;align-self:center}
 .weight-game .game-title-screen h3{inset:auto;grid-row:1;max-width:100%;box-sizing:border-box;line-height:1.25;align-self:start}
 .weight-game .game-title-screen .game-title-start{grid-row:3;justify-self:center}
 .weight-game .game-character-screen{padding:0;background:linear-gradient(180deg,#22394d,#142236)}
 .weight-game .game-selection-art{image-rendering:auto}
 .weight-game .game-selection-rich .game-character-select strong{top:10px;max-width:95%;box-sizing:border-box;white-space:normal;text-align:center}
 .weight-game .game-selection-rich .game-character-name{padding:6px 0;background:#101b2b99;width:80%;left:10%;right:auto;border-radius:8px;box-sizing:border-box}
 .weight-game .game-character-feedback{bottom:56px}
 .weight-game.game-instructions-pending .game-arena{aspect-ratio:auto;overflow:visible}
 .weight-game.game-instructions-pending .game-retro-instructions{padding:18px 14px}
 .weight-game .game-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:10px 0}
 .weight-game .game-controls .button{min-height:48px;flex:1 1 100px;max-width:100%;white-space:normal}
 .weight-game.food-game .food-arena-actions{display:flex;bottom:10px;right:10px;left:10px;justify-content:space-between;pointer-events:none}
 .weight-game.food-game .food-arena-actions button{pointer-events:auto}
 .weight-game.food-game .food-dish-name{max-width:85%;padding:4px 8px;background:#17283cdd;border-radius:6px;box-sizing:border-box}
 .weight-game .game-over-panel{border-radius:12px}
}

/* The arena itself handles starting and jumping; retain hidden hooks for restart. */
.weight-game .game-controls [data-start],.weight-game .game-controls [data-jump]{display:none!important}
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game .game-arena .game-canvas{object-fit:fill}
}

/* All gameplay actions stay inside the arena. */
.weight-game .game-controls{display:none!important}
.weight-game .game-arena-pause{position:absolute;top:12px;right:12px;z-index:4;display:flex;align-items:center;justify-content:center;width:48px;height:48px;min-width:48px;min-height:48px;padding:0;border:1px solid #f5d895;border-radius:12px;background:#15263de8;color:#fff1c6;box-shadow:0 3px 10px #0005;font-size:0;touch-action:manipulation;cursor:pointer}
.weight-game .game-arena-pause::before{content:'⏸';font-size:24px;line-height:1}
.weight-game .game-arena-pause[data-paused=true]::before{content:'▶';font-size:22px}
.weight-game .game-arena-pause:focus-visible{outline:3px solid #fff;outline-offset:3px}
.weight-game .game-arena-pause:disabled{opacity:.45;cursor:default}
.weight-game:not(.game-has-started) .game-arena-pause,.weight-game.game-is-over .game-arena-pause{display:none}
.weight-game.food-game .food-arena-actions{display:flex}
.weight-game.food-game:not(.game-has-started) .food-arena-actions,.weight-game.food-game.game-is-over .food-arena-actions{display:none}
@media(max-width:650px), (max-width:950px) and (pointer:coarse){.weight-game .game-arena-pause{top:10px;right:10px}}

/* Phone composition: larger artwork and touch targets, with no sprite stretching. */
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game .game-title-screen,.weight-game .game-character-screen{isolation:isolate}
 .weight-game .game-title-screen::before,.weight-game .game-character-screen::before{content:'';position:absolute;inset:-20px;z-index:-1;background-image:linear-gradient(#14223677,#142236aa),var(--scene-art);background-position:center;background-size:cover;filter:blur(12px);pointer-events:none}
 .weight-game .game-title-screen{gap:12px}
 .weight-game .game-title-screen .game-title-picture{filter:drop-shadow(0 8px 18px #0006)}
 .weight-game .game-title-screen h3{justify-self:center;padding:12px 8px}
 .weight-game .game-title-screen .game-title-start{min-height:54px;font-size:1.1rem}
 .weight-game .game-selection-art{filter:drop-shadow(0 8px 18px #0005)}
 .weight-game .game-selection-rich .game-character-select strong{font-size:1.15rem;padding:10px 14px}
 .weight-game .game-selection-rich .game-character-name{font-size:26px;bottom:14px;min-height:48px;display:flex;align-items:center;justify-content:center}
 .weight-game .game-retro-instructions{font-size:1.05rem;line-height:1.65}
 .weight-game .game-instructions-start{min-height:54px;font-size:1.1rem}
 .weight-game .game-over-panel{padding:16px;gap:14px;font-size:1rem}
 .weight-game .game-over-heading-block{padding:20px 12px}
 .weight-game .game-over-panel h3{font-size:1.7rem}
 .weight-game .game-over-score{font-size:1.2rem}
 .weight-game .game-over-entry-block{padding:14px 12px}
 .weight-game .game-over-panel .game-score-form{display:flex;flex-direction:column;gap:10px}
 .weight-game .game-over-panel .game-score-form input{width:100%;box-sizing:border-box;min-height:48px}
 .weight-game .game-over-actions{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
 .weight-game .game-over-actions button{min-height:48px;flex:1 1 120px}
 .weight-game.food-game .food-arena-actions button{width:72px;min-height:64px;font-size:.9rem}
 .weight-game.food-game .food-arena-actions svg{width:30px;height:30px}
 .weight-game.food-game .food-dish-name{font-size:clamp(1.05rem,4.5vw,1.4rem)}
}

@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game .game-arena{height:auto;width:100%!important;aspect-ratio:3/4!important}
 .weight-game .game-arena .game-canvas,.weight-game.runner-game .game-arena .game-canvas,.weight-game.food-game .game-arena .game-canvas{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;max-height:none!important;aspect-ratio:auto!important;object-fit:fill;border:0;box-sizing:border-box}
 .weight-game.game-instructions-pending .game-arena{aspect-ratio:auto!important}
 .weight-game .game-title-screen{display:block;padding:0}
 .weight-game .game-title-screen .game-title-picture{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;filter:none}
 .weight-game .game-title-screen h3{position:absolute;top:12px;left:12px;width:calc(100% - 24px);margin:0;font-size:clamp(1.2rem,5vw,1.6rem);z-index:1}
 .weight-game .game-title-screen .game-title-start{position:absolute;bottom:14px;left:20px;width:calc(100% - 40px);max-width:none;margin:0;z-index:1}
 .weight-game .game-selection-art{inset:0;height:100%;width:100%;object-fit:cover;filter:none}
 .weight-game .game-selection-rich .game-character-name{background:#101b2be8}
 .weight-game .game-retro-captions{right:68px;max-width:65%}
 .weight-game.food-game .food-dish-name{bottom:25%}
}

/* Desktop food controls are anchored to the visible 16:9 gameplay frame. */
@media (min-width:951px), (min-width:651px) and (pointer:fine){
 .weight-game.food-game.game-has-started .game-arena{aspect-ratio:16/9;overflow:hidden}
 .weight-game.food-game.game-has-started .game-arena .game-canvas{width:100%!important;height:100%;aspect-ratio:auto;box-sizing:border-box}
 .weight-game.food-game .food-arena-actions{inset:auto 16px 16px}
 .weight-game.food-game .food-arena-actions button{min-width:80px;min-height:72px;font-size:1rem}
}

/* Paired arena controls share one accessible target size. */
.weight-game .game-arena-full{position:absolute;top:12px;right:68px;z-index:4;display:flex;align-items:center;justify-content:center;width:48px;height:48px;padding:0;border:1px solid #f5d895;border-radius:12px;background:#15263de8;color:#fff1c6;box-shadow:0 3px 10px #0005;touch-action:manipulation;cursor:pointer}
.weight-game .game-arena-full:focus-visible{outline:3px solid #fff;outline-offset:3px}
.weight-game:not(.game-has-started) .game-arena-full,.weight-game.game-is-over .game-arena-full{display:none}
.weight-game{--game-frame-ratio:1.6}.weight-game.runner-game{--game-frame-ratio:1.523809524}.weight-game.food-game{--game-frame-ratio:1.777777778}
@media(min-width:951px), (min-width:651px) and (pointer:fine){
 .weight-game:fullscreen .game-shell,.weight-game.game-expanded .game-shell{max-width:none}
 .weight-game:fullscreen .game-arena,.weight-game.game-expanded .game-arena,.weight-game.runner-game:fullscreen .game-arena,.weight-game.runner-game.game-expanded .game-arena,.weight-game.food-game:fullscreen .game-arena,.weight-game.food-game.game-expanded .game-arena{width:min(100%,calc((100dvh - 160px) * var(--game-frame-ratio)));max-width:none;aspect-ratio:var(--game-frame-ratio)}
 .weight-game:fullscreen .game-arena .game-canvas,.weight-game.game-expanded .game-arena .game-canvas{width:100%!important;height:100%;aspect-ratio:auto;object-fit:contain;box-sizing:border-box}
}
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game .game-arena-full{top:10px;right:66px}
 .weight-game:fullscreen .game-shell,.weight-game.game-expanded .game-shell{max-width:none}
 .weight-game:fullscreen .game-arena,.weight-game.game-expanded .game-arena{width:min(100%,calc((100dvh - 150px) * .75))!important;margin-inline:auto}
}

/* Explicit viewport geometry for the shared fullscreen fallback and native page fullscreen. */
.weight-game.game-expanded{position:fixed!important;inset:0!important;width:100vw!important;height:100dvh!important;max-width:100vw!important;max-height:100dvh!important;margin:0!important;border:0;border-radius:0;box-sizing:border-box;overflow:auto}

/* Fullscreen contains only the arena; unrelated page and leaderboard content stays hidden. */
.weight-game.game-expanded{overflow:hidden!important;background:#080e18}
.weight-game.game-expanded .game-shell{display:grid;place-items:center;width:100%;height:100%;max-width:none;padding:0!important;box-sizing:border-box}
.weight-game.game-expanded .game-shell>:not(.game-arena){display:none!important}
.weight-game.game-expanded .game-arena,.weight-game.runner-game.game-expanded .game-arena,.weight-game.food-game.game-expanded .game-arena{width:min(100vw,calc(100dvh * var(--game-frame-ratio)))!important;max-width:none;max-height:100dvh;margin:0;aspect-ratio:var(--game-frame-ratio);border-radius:0}

@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game.game-expanded .game-arena,.weight-game.runner-game.game-expanded .game-arena,.weight-game.food-game.game-expanded .game-arena{width:min(100vw,calc(100dvh * .75))!important;aspect-ratio:3/4!important}

}

/* Persistent in-arena score and time: one placement in normal and fullscreen play. */
.weight-game .game-arena-hud{position:absolute;z-index:3;top:12px;left:50%;transform:translateX(-50%);display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:4px 14px;width:max-content;max-width:calc(100% - 280px);margin:0;padding:7px 12px;border:1px solid #ead19799;border-radius:10px;background:#102039e8;color:#fff0bf;box-shadow:0 3px 10px #0005;font:700 .95rem/1.3 var(--game-retro-font);box-sizing:border-box;pointer-events:none}
.weight-game .game-arena-hud>span{white-space:nowrap}
.weight-game .game-arena-timer{position:absolute;z-index:3;top:61px;left:50%;transform:translateX(-50%);width:30%;max-width:260px;height:5px;margin:0;border-radius:4px;overflow:hidden;pointer-events:none;box-shadow:0 1px 4px #0005}
.weight-game:not(.game-has-started) :is(.game-arena-hud,.game-arena-timer),.weight-game.game-is-over :is(.game-arena-hud,.game-arena-timer){display:none!important}
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game .game-arena-hud{top:68px;max-width:85%;gap:4px 12px;padding:6px 10px;font-size:.9rem;border-radius:9px}
 .weight-game .game-arena-timer{top:106px;width:65%;max-width:280px}
}

/* Phone fullscreen uses the full viewport; the renderer adapts its height without stretching sprites. */
@media(max-width:650px), (max-width:950px) and (pointer:coarse){
 .weight-game.game-expanded .game-arena,.weight-game.runner-game.game-expanded .game-arena,.weight-game.food-game.game-expanded .game-arena{width:100vw!important;height:100dvh!important;max-height:none;aspect-ratio:auto!important;overflow:hidden}
 .weight-game.game-expanded .game-arena-pause{top:calc(10px + env(safe-area-inset-top));right:max(10px,env(safe-area-inset-right))}
 .weight-game.game-expanded .game-arena-full{top:calc(10px + env(safe-area-inset-top));right:calc(66px + env(safe-area-inset-right))}
 .weight-game.game-expanded .game-arena-hud{top:calc(68px + env(safe-area-inset-top))}
 .weight-game.game-expanded .game-arena-timer{top:calc(106px + env(safe-area-inset-top))}
}

/* Fullscreen is available before the action, above both introduction layers. */
.weight-game .game-arena-full{z-index:12}
.weight-game:not(.game-has-started) .game-arena-full,.weight-game.game-is-over .game-arena-full{display:flex}

/* Compact pre-game control: overlays only, with no change to art or frame geometry. */
.weight-game.game-title-pending:not(.game-character-pending) .game-arena-full{top:74px;left:12px;right:auto;width:44px;height:44px;border-radius:9px}
.weight-game.game-character-pending .game-arena-full{top:12px;left:12px;right:auto;width:44px;height:44px;border-radius:9px}
.weight-game.game-instructions-pending .game-retro-instructions>.game-arena-full{top:10px;left:10px;right:auto;width:44px;height:44px;border-radius:9px}
.weight-game.game-instructions-pending .game-retro-instructions>strong{display:block;min-height:44px;padding-left:54px;box-sizing:border-box}
@media(max-width:650px),(max-width:950px) and (pointer:coarse){
 .weight-game.game-expanded.game-title-pending:not(.game-character-pending) .game-arena-full{top:calc(74px + env(safe-area-inset-top))}
 .weight-game.game-expanded.game-character-pending .game-arena-full{top:calc(12px + env(safe-area-inset-top))}
 .weight-game.game-expanded.game-instructions-pending .game-retro-instructions>.game-arena-full{top:10px;left:10px;right:auto}
}

/* Phone-only enlarged pre-game screens fill the arena and conceal live gameplay. */
@media(max-width:650px),(max-width:950px) and (pointer:coarse){
 .weight-game.game-expanded:is(.game-title-pending,.game-character-pending,.game-instructions-pending) .game-canvas{visibility:hidden}
 .weight-game.game-expanded:is(.game-title-pending,.game-character-pending,.game-instructions-pending) :is(.game-hud,.food-timer){display:none!important}
 .weight-game.game-expanded:is(.game-title-pending,.game-character-pending,.game-instructions-pending) .game-arena{background:#142236;overflow:hidden}
 .weight-game.game-expanded:is(.game-title-pending,.game-character-pending) :is(.game-title-screen,.game-character-screen){position:absolute!important;inset:0!important;transform:none!important;width:100%!important;height:100%!important;max-width:none;max-height:none;margin:0!important;padding:0;box-sizing:border-box;border-radius:0;overflow:hidden;background:#142236;isolation:isolate}
 .weight-game.game-expanded :is(.game-title-screen,.game-character-screen)::before{content:'';position:absolute;inset:-16px;z-index:-1;background:linear-gradient(#14223644,#14223666),var(--scene-art) center/cover;filter:blur(12px);pointer-events:none}
 .weight-game.game-expanded :is(.game-title-picture,.game-selection-art){position:absolute;inset:0;width:100%;height:100%;object-fit:contain!important;filter:none}
 .weight-game.game-expanded .game-title-screen h3{position:absolute;inset:max(14px,env(safe-area-inset-top)) 12px auto;width:calc(100% - 24px);max-width:none;margin:0;box-sizing:border-box;z-index:1}
 .weight-game.game-expanded .game-title-screen .game-title-start{position:absolute;inset:auto 16px max(16px,env(safe-area-inset-bottom));width:calc(100% - 32px);max-width:none;min-height:48px;margin:0;box-sizing:border-box;padding:12px;z-index:2}
 .weight-game.game-expanded .game-selection-rich .game-character-select{inset:max(12px,env(safe-area-inset-top)) 12px max(16px,env(safe-area-inset-bottom));width:auto;height:auto;max-width:none;max-height:none;box-sizing:border-box}
 .weight-game.game-expanded .game-selection-rich .game-character-select strong{max-width:calc(100% - 112px);font-size:clamp(1rem,4vw,1.3rem)}
 .weight-game.game-expanded .game-selection-rich .game-character-name{bottom:0;min-height:48px;font-size:clamp(1.3rem,5vw,1.8rem)}
 .weight-game.game-expanded.game-instructions-pending .game-retro-instructions{position:absolute;inset:0;width:100%;height:100%;max-height:none;margin:0;padding:calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));box-sizing:border-box;overflow:auto;display:flex;flex-direction:column;justify-content:safe center;align-items:stretch;background:#142236;border:0;border-radius:0;box-shadow:none;color:#fff1b9;z-index:7}
 .weight-game.game-expanded.game-instructions-pending .game-instructions-start{flex-shrink:0;min-height:48px}
}

/* Phone artwork is the only background; pre-game controls remain above it. */
@media(max-width:650px),(max-width:950px) and (pointer:coarse){
 .weight-game.game-expanded :is(.game-title-screen,.game-character-screen)::before{display:none!important}
 .weight-game.game-expanded :is(.game-title-picture,.game-selection-art){object-fit:cover!important;object-position:50% 55%;z-index:0}
 .weight-game.game-expanded .game-title-screen h3{z-index:3;visibility:visible!important}
 .weight-game.game-expanded .game-title-screen .game-title-start{display:block!important;visibility:visible!important;opacity:1;z-index:4;bottom:max(88px,calc(16px + env(safe-area-inset-bottom)));min-height:48px}
 .weight-game.game-expanded .game-selection-rich .game-character-select{inset:0!important;width:100%!important;height:100%!important;z-index:3;visibility:visible!important}
 .weight-game.game-expanded .game-selection-rich .game-character-name{display:flex!important;visibility:visible!important;opacity:1;bottom:max(88px,calc(16px + env(safe-area-inset-bottom)));z-index:4;background:#101b2be8;min-height:48px}
 .weight-game.game-expanded.game-instructions-pending .game-retro-instructions{background:linear-gradient(#101b2bc9,#101b2bc9),var(--scene-art) center/cover;padding-bottom:max(88px,calc(20px + env(safe-area-inset-bottom)))}
 .weight-game.game-expanded.game-instructions-pending .game-instructions-start{display:block!important;visibility:visible!important;opacity:1;min-height:48px}
}

/* The end screen keeps exit below replay and character selection. */
.weight-game.game-is-over .game-arena-full{display:none!important}
.weight-game .game-over-panel>.game-exit{display:block;width:100%;min-height:48px;margin:0;padding:12px;box-sizing:border-box;flex-shrink:0;font:700 1rem var(--game-retro-font,"Courier New",monospace);background:transparent;color:#fff1b9;border:1px solid #dec17d;border-radius:6px}

/* Pause UI follows the visible arena rather than the scaled canvas coordinates. */
.weight-game .game-pause-panel{position:absolute;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:80px 20px 30px;box-sizing:border-box;background:#08131c99;direction:rtl;text-align:center;pointer-events:auto}
.weight-game .game-pause-panel[hidden]{display:none!important}
.weight-game .game-pause-panel h3{margin:0;box-sizing:border-box;max-width:100%;padding:16px 22px;border:1px solid #e6c881;border-radius:14px;background:#10223df2;color:#ffe4a5;font-size:clamp(20px,5vw,32px);line-height:1.4;overflow-wrap:anywhere}
.weight-game .game-pause-panel .game-resume-button{display:flex;align-items:center;justify-content:center;max-width:100%;min-height:52px;min-width:170px;padding:12px 24px;font-size:clamp(18px,4vw,24px);touch-action:manipulation}
.weight-game .game-arena-pause{z-index:14!important;min-width:48px;min-height:48px}
.weight-game .game-resume-button:focus-visible,.weight-game .game-arena-pause:focus-visible{outline:3px solid white;outline-offset:4px}
@media(max-height:450px){.weight-game .game-pause-panel{gap:8px;padding:58px 12px 12px}.weight-game .game-pause-panel h3{padding:8px 16px;font-size:20px}.weight-game .game-resume-button{min-height:44px}}
/* The arena keeps keyboard focus without drawing a frame around fullscreen gameplay. */
.weight-game.game-expanded.game-has-started .game-canvas:focus,
.weight-game.game-expanded.game-has-started .game-canvas:focus-visible{outline:none;outline-offset:0}
.weight-game.game-expanded button:focus:not(:focus-visible){outline:none}
.weight-game.game-expanded button:active:not(:disabled){filter:brightness(1.1)}

.weight-game .game-over-panel .game-exit{background:#e4c574;color:#142236;border:2px solid #ffecac;box-shadow:3px 3px 0 #08131c;border-radius:6px;font-weight:800}
.weight-game .game-over-panel .game-exit:hover{background:#f4d88a}

/* The picker inherits the page RTL direction; center the icon independently. */
.game-picker .game-picker-toggle{display:flex;align-items:center;justify-content:center;padding:0;line-height:1}
.game-picker .game-picker-toggle svg{position:absolute;inset:50% auto auto 50%;display:block;width:29px;height:29px;flex:none;margin:0;transform:translate(-50%,-50%)}

/* Phone food names are painted below the plate in the yellow pixel block. */
@media(max-width:650px),(max-width:950px) and (pointer:coarse){.food-game .game-arena .food-dish-name{display:none!important}}

/* Keep the original radial bubbles above the fixed mobile controller. */
@media (max-width:650px), (pointer:coarse) {
 .game-picker .game-picker-toggle{left:auto!important;right:auto!important;top:auto!important;bottom:auto!important}
 .game-picker .game-picker-choice{top:auto!important;right:auto!important}
 .game-picker .game-picker-choice:nth-child(1){left:0!important;bottom:76px!important}
 .game-picker .game-picker-choice:nth-child(2){left:60px!important;bottom:60px!important}
 .game-picker .game-picker-choice:nth-child(3){left:82px!important;bottom:0!important}
}
