/* Shared FrameDo game chrome. Gameplay canvases and semantic answer colours stay local. */
[data-framedo-game]{--fd-game-violet:#7430ee;--fd-game-orange:#ff902e;--fd-game-ink:#191329;--fd-game-header:#1a1030;--fd-game-paper:#fffdf9;--fd-game-border:#c9b6e4;--fd-game-muted:#ddd2e9;--fd-game-font:Poppins,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.trivia-marquee,.dance-header,.wq-header,.ws-header,.crossword-marquee,.racing>header,.custom-player>header,.bubble-hud),html body[data-framedo-game] :is(.top,main>header){box-sizing:border-box;min-width:0;min-height:48px;padding:8px 18px;gap:12px;background:var(--fd-game-header);color:#fff;border:0;border-bottom:1px solid #ffffff24;box-shadow:none;font-family:var(--fd-game-font);align-items:center}
html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.dance-header,.wq-header,.ws-header,.crossword-marquee,.racing>header,.custom-player>header,.bubble-hud){flex-wrap:wrap}
html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.trivia-marquee,.dance-header,.wq-header,.ws-header,.crossword-marquee,.racing>header,.custom-player>header) :is(h1,h2),html body[data-framedo-game] :is(.top,main>header) :is(.brand-kicker,.game-title,.brand){margin:0;min-width:0;color:#fff;font-family:var(--fd-game-font);font-size:clamp(16px,1.5vw,22px);font-weight:800;line-height:1.2;letter-spacing:.1px;overflow-wrap:anywhere}
html body [data-framedo-game] :is(.archery-score,.concert-stats,.wq-header-meta,.ws-progress,.crossword-stats){min-width:0;gap:14px;line-height:1.45;flex-wrap:wrap;font-family:var(--fd-game-font)}
html body [data-framedo-game] :is(.galaxy-header,.maze-header,.custom-player>header)>strong,html body[data-framedo-game] .hud strong{color:#ffca81}
html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.trivia-marquee,.dance-header,.wq-header,.ws-header,.crossword-marquee,.racing>header,.custom-player>header) button,html body[data-framedo-game] :is(.top,main>header) button{min-height:38px;border:1px solid #bda3d577;border-radius:9px;padding:7px 12px;background:#ffffff0e;color:#fff;font:650 12px/1.2 var(--fd-game-font);white-space:normal}
html body [data-framedo-game] :is(.archery-prompt,.tennis-prompt,.race-sign,.memory-player>.player-question,.bubble-question){box-sizing:border-box;max-width:100%;border:1px solid var(--fd-game-border);border-radius:12px;background:var(--fd-game-paper);color:var(--fd-game-ink);box-shadow:none;text-align:center;font-family:var(--fd-game-font)}
html body [data-framedo-game] :is(.archery-prompt h3,.tennis-prompt,.race-sign>strong,.memory-player>.player-question,.bubble-question p){font-family:var(--fd-game-font);font-size:clamp(19px,2.2vw,30px);font-weight:750;line-height:1.3;letter-spacing:-.25px;overflow-wrap:anywhere;text-wrap:balance;color:var(--fd-game-ink)}
html body [data-framedo-game] .archery-question{display:flex;flex-direction:column;align-items:center;gap:7px;padding:10px 18px 12px}
html body [data-framedo-game] .archery-prompt{width:fit-content;min-width:min(100%,22rem);max-width:min(100%,64rem);margin-inline:auto;padding:10px 26px}
html body [data-framedo-game] .archery-prompt h3{margin:0;max-height:22dvh;overflow:auto}
html body [data-framedo-game] .archery-prompt small{display:none}
html body [data-framedo-game] .archery-status{position:static;width:100%;margin:0;text-align:center;line-height:1.45;font:500 12px/1.45 var(--fd-game-font);color:var(--fd-game-muted);overflow-wrap:anywhere}
html body [data-framedo-game] .archery-brand>span{display:none}
html body [data-framedo-game] .tennis-prompt{width:100%;max-height:24dvh;padding:10px 18px;flex-shrink:0}
html body [data-framedo-game] .tennis-prompt small{font:700 10px/1.5 var(--fd-game-font);letter-spacing:1px;color:#6c4f86;margin-bottom:4px}
html body [data-framedo-game] .memory-player>.player-question{margin:0;padding:10px 16px;font-size:clamp(17px,2vw,24px)}
html body [data-framedo-game] .memory-prompt-board{font:600 12px/1.5 var(--fd-game-font);color:#6c4f86}
html body [data-framedo-game] .bubble-question{display:flex;flex-direction:column;justify-content:center;gap:5px;padding:10px 18px;border-left:1px solid var(--fd-game-border);flex-shrink:0;max-height:24dvh;overflow:auto}
html body [data-framedo-game] .bubble-question>div{min-width:0;width:100%;text-align:center}
html body [data-framedo-game] .bubble-question small,html body [data-framedo-game] .bubble-question [data-bubble=round]{color:#6c4f86;font:650 11px/1.45 var(--fd-game-font)}
html body [data-framedo-game] .bubble-question p{margin:2px 0}
html body [data-framedo-game] .race-sign{padding:10px 18px;flex-shrink:0;max-height:24dvh;overflow:auto}
html body [data-framedo-game] .race-sign small{color:#6c4f86;font-family:var(--fd-game-font);font-size:10px;line-height:1.5}
html body [data-framedo-game] .race-sign>strong{display:block}
html body [data-framedo-game] .trivia-marquee{grid-template-columns:minmax(0,1fr) auto auto;padding-right:18px}
html body [data-framedo-game] .trivia-marquee>img,html body [data-framedo-game] .trivia-marquee div>span{display:none}
html body [data-framedo-game] .trivia-marquee>small{display:block;color:var(--fd-game-muted);font:650 11px/1.4 var(--fd-game-font)}
html body [data-framedo-game] .trivia-card h3{text-align:center;overflow-wrap:anywhere;text-wrap:balance;line-height:1.3}
html body [data-framedo-game] .trivia-options strong{line-height:1.4;overflow-wrap:anywhere}
html body [data-framedo-game] .galaxy-header{padding-right:18px;gap:10px 14px}
html body [data-framedo-game] .galaxy-header h2{margin-right:auto}
html body [data-framedo-game] .galaxy-targets{width:100%;justify-content:center;gap:10px}
html body [data-framedo-game] .galaxy-target{border:1px solid #a98bc7;border-radius:10px;clip-path:none;box-shadow:none;background:#24163c;padding:9px 12px}
html body [data-framedo-game] .galaxy-target strong{font-family:var(--fd-game-font);line-height:1.3;text-wrap:balance}
html body [data-framedo-game] .galaxy-target small{letter-spacing:1px;color:#e6cffd!important}
html body [data-framedo-game] .maze-header>span{line-height:1.5;overflow-wrap:anywhere}
html body [data-framedo-game] .maze-question h3{border:1px solid var(--fd-game-border);border-radius:12px;background:var(--fd-game-paper);color:var(--fd-game-ink);line-height:1.35;text-wrap:balance}
html body [data-framedo-game] .dance-header{padding-right:18px}
html body [data-framedo-game] .dance-question-panel .word-box{border:1px solid var(--fd-game-border);border-radius:12px;background:var(--fd-game-paper);color:var(--fd-game-ink);line-height:1.35;text-wrap:balance;overflow-wrap:anywhere;letter-spacing:0;font-family:var(--fd-game-font)}
html body [data-framedo-game] :is(.wq-header,.ws-header,.crossword-marquee){gap:12px 18px}
html body [data-framedo-game] .wq-intro{text-align:center;max-width:100%;padding-inline:12px}
html body [data-framedo-game] .wq-intro p{text-wrap:balance;overflow-wrap:anywhere;line-height:1.4}
html body [data-framedo-game] :is(.archery-controls,.dance-footer,.wq-footer,.ws-footer,.crossword-hud,.galaxy-footer,.race-controls){box-sizing:border-box;min-width:0;gap:8px;align-items:center;font-family:var(--fd-game-font)}
html body [data-framedo-game] :is(.archery-controls,.dance-footer,.wq-footer,.ws-footer,.crossword-hud,.galaxy-footer,.race-controls) button{min-height:40px;font-family:var(--fd-game-font);font-weight:650;border-radius:9px}
html body [data-framedo-game] .player-exit-bar .exit-player{min-height:40px;font:700 13px/1.2 var(--fd-game-font);padding:9px 18px;background:var(--fd-game-orange);color:var(--fd-game-ink);border:1px solid #ffb470;border-radius:9px}
[data-framedo-game] :is(button,input,select,textarea,a):focus-visible{outline:3px solid #ffad54;outline-offset:3px}
[data-framedo-game] button:disabled{cursor:not-allowed}
/* Same centered question surface in the three iframe games. */
html body[data-framedo-game] .question{box-sizing:border-box;text-align:center;flex-shrink:0;max-height:26dvh;overflow:auto;overflow-wrap:anywhere}
html body[data-framedo-game] .question h1{font:750 clamp(20px,2.2vw,32px)/1.3 var(--fd-game-font);letter-spacing:-.25px;text-align:center;text-wrap:balance;overflow-wrap:anywhere;margin:0}
html body[data-framedo-game] :is(.bottom,footer){font-family:var(--fd-game-font);box-sizing:border-box}
html body[data-framedo-game] :is(.bottom,footer) button{min-height:40px;min-width:40px;border-radius:9px;font-family:var(--fd-game-font);font-weight:700}
html body[data-framedo-game=basketball]{margin:0;background:var(--fd-game-header);font-family:var(--fd-game-font);overflow:hidden}
html body[data-framedo-game=basketball] .app{display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;height:100dvh;min-height:0;padding:0;gap:0;max-width:none}
html body[data-framedo-game=basketball] .top{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 18px;min-height:46px}
html body[data-framedo-game=basketball] .brand-kicker{color:#ffbd79;font-size:12px;letter-spacing:1.5px}
html body[data-framedo-game=basketball] .hud{display:flex;gap:20px;align-items:center;margin-left:auto;font:750 11px/1.5 var(--fd-game-font);letter-spacing:.4px;color:#e9dcfc}
html body[data-framedo-game=basketball] .question{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 20px;background:#21172f;border:0;border-bottom:3px solid transparent;border-image:linear-gradient(90deg,#7430ee,#ff902e) 1;border-radius:0}
html body[data-framedo-game=basketball] .prompt-card{box-sizing:border-box;inline-size:fit-content;min-inline-size:min(100%,clamp(16rem,45vw,36rem));max-inline-size:min(100%,64rem);padding:10px 28px;border:1px solid var(--fd-game-border);border-radius:12px;background:var(--fd-game-paper);color:var(--fd-game-ink)}
html body[data-framedo-game=basketball] .prompt-card small{display:none}
html body[data-framedo-game=basketball] .status{position:static;transform:none;inset:auto;width:100%;max-width:100%;margin:0;padding:0;border:0;border-radius:0;background:none;color:var(--fd-game-muted);text-align:center;text-shadow:none;white-space:normal;font:500 12px/1.45 var(--fd-game-font)}
html body[data-framedo-game=basketball] .bottom{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:10px;padding:7px 14px calc(7px + env(safe-area-inset-bottom));background:#fff;border:0;border-top:1px solid #e3d9ee}
html body[data-framedo-game=basketball] .bottom :is(.tools,.controls){display:flex;align-items:center;gap:7px;flex:0 0 auto}
html body[data-framedo-game=basketball] .bottom .controls{grid-column:2;justify-self:center;margin:0}
html body[data-framedo-game=basketball] .bottom button{padding:8px 12px;border:1px solid #d9cfe6;background:#faf8fc;color:var(--fd-game-ink);font-size:12px;white-space:nowrap}
html body[data-framedo-game=basketball] .bottom #shoot{background:var(--fd-game-violet);border-color:var(--fd-game-violet);color:#fff}
html body[data-framedo-game=basketball] .bottom #exit{grid-column:3;justify-self:end;background:var(--fd-game-orange);color:var(--fd-game-ink);border-color:#ffb470}
html body[data-framedo-game=basketball] .footer-hint{display:none}
html body[data-framedo-game=basketball] #exit[hidden]{display:none}
html body[data-framedo-game=bowling] main>header{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 18px}
html body[data-framedo-game=bowling] .stats{display:flex;align-items:center;flex-wrap:wrap;gap:10px 14px;color:#fff;font-family:var(--fd-game-font);font-size:11px}
html body[data-framedo-game=bowling] .question{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;padding:10px 18px;background:var(--fd-game-paper);color:var(--fd-game-ink);border-color:var(--fd-game-border)}
html body[data-framedo-game=bowling] .question-kicker{color:#6c4f86;font:700 10px/1.5 var(--fd-game-font);letter-spacing:1px}
html body[data-framedo-game=bowling] .question-hint{text-align:center;line-height:1.5;margin:0;padding:4px 12px;color:#ddd2e9}
html body[data-framedo-game=football] .app{padding:10px 14px;gap:8px}
html body[data-framedo-game=football] .top{border-radius:10px 10px 0 0}
html body[data-framedo-game=football] .game-title{margin-left:12px;font-size:13px;letter-spacing:.6px}
html body[data-framedo-game=football] .logo{font-size:19px;color:#fff}
html body[data-framedo-game=football] .question{align-self:center;width:min(100%,64rem);padding:10px 20px;background:var(--fd-game-paper);border:1px solid var(--fd-game-border);border-radius:12px;color:var(--fd-game-ink)}
html body[data-framedo-game=football] .question .caption{color:#6c4f86;font:700 10px/1.5 var(--fd-game-font);letter-spacing:1px;margin-bottom:4px}
@media(max-width:700px){
 html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.trivia-marquee,.dance-header,.wq-header,.ws-header,.crossword-marquee,.racing>header,.custom-player>header,.bubble-hud),html body[data-framedo-game] :is(.top,main>header){padding:8px 10px;gap:8px;min-height:44px}
 html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.trivia-marquee,.dance-header,.wq-header,.ws-header,.crossword-marquee,.custom-player>header) :is(h1,h2){font-size:17px}
 html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.dance-header,.custom-player>header) button,html body [data-framedo-game] :is(.archery-controls,.dance-footer,.wq-footer,.ws-footer,.crossword-hud,.race-controls) button,html body[data-framedo-game] :is(.top,footer,.bottom) button{min-height:44px;min-width:44px}
 html body [data-framedo-game] .archery-head{flex-wrap:wrap;justify-content:space-between}
 html body [data-framedo-game] .archery-score{gap:9px;font-size:10px}
 html body [data-framedo-game] .archery-question{padding:9px 10px;gap:6px}
 html body [data-framedo-game] .archery-prompt{padding:9px 16px;min-width:min(100%,16rem)}
 html body [data-framedo-game] .archery-status{font-size:11px}
 html body [data-framedo-game] .trivia-marquee{grid-template-columns:minmax(0,1fr) auto auto;padding-right:10px;gap:8px}
 html body [data-framedo-game] .trivia-marquee>strong,html body [data-framedo-game] .trivia-marquee>small{font-size:10px}
 html body [data-framedo-game] .galaxy-targets{gap:6px}
 html body [data-framedo-game] .galaxy-target{min-width:0;padding:7px 6px}
 html body [data-framedo-game] .galaxy-target strong{font-size:15px}
 html body [data-framedo-game] .galaxy-header>span{display:none}
 html body [data-framedo-game] .dance-header{justify-content:space-between}
 html body [data-framedo-game] .dance-controls{display:flex;gap:6px;flex-wrap:wrap}
 html body [data-framedo-game] :is(.wq-header-meta,.ws-level,.ws-progress){font-size:10px;gap:8px;min-width:0}
 html body [data-framedo-game] :is(.wq-footer,.ws-footer,.crossword-hud,.dance-footer){flex-wrap:wrap}
 html body [data-framedo-game] :is(.wq-footer,.ws-footer,.crossword-hud,.dance-footer)>p{flex:1 1 100%;margin:0;font-size:11px;line-height:1.5}
 html body[data-framedo-game=basketball] .question{padding:9px 10px 10px;gap:6px}
 html body[data-framedo-game=basketball] .prompt-card{padding:9px 18px}
 html body[data-framedo-game=basketball] .brand-kicker{font-size:10px;letter-spacing:1px}
 html body[data-framedo-game=basketball] .hud{gap:10px;font-size:10px;letter-spacing:0}
 html body[data-framedo-game=basketball] .bottom{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px;padding:6px 8px calc(6px + env(safe-area-inset-bottom))}
 html body[data-framedo-game=basketball] .bottom .controls{grid-column:1;grid-row:1;display:grid;grid-template-columns:44px 44px minmax(0,1fr);width:100%;min-width:0;margin:0;gap:5px}
 html body[data-framedo-game=basketball] .bottom #exit{grid-column:2;grid-row:1}
 html body[data-framedo-game=basketball] .bottom .tools{grid-column:1/-1;grid-row:2;justify-content:center}
 html body[data-framedo-game=basketball] .bottom button{font-size:11px;padding:7px 9px}
 html body[data-framedo-game=bowling] .stats{gap:7px 10px;font-size:10px}
 html body[data-framedo-game=football] .app{padding:6px 8px;gap:6px}
 html body[data-framedo-game=football] .left-brand{flex-wrap:wrap;gap:5px}
 html body[data-framedo-game=football] .game-title{margin:0;font-size:11px}
}
@media(prefers-reduced-motion:reduce){[data-framedo-game] :is(header,footer,button){scroll-behavior:auto;transition:none}}
html body [data-framedo-game] .crossword-marquee h2{text-shadow:none}
html body [data-framedo-game] .crossword-marquee p{line-height:1.5;margin:5px 0 0;max-width:70ch}
html body [data-framedo-game] .racing>header small{display:none}
html body [data-framedo-game] .bubble-strike>.galaga-header{display:flex;align-items:center;justify-content:space-between;min-height:40px;padding:7px 18px;background:var(--fd-game-header);border-bottom:1px solid #ffffff24;font-family:var(--fd-game-font)}
html body [data-framedo-game] .bubble-strike>.galaga-header .arcade-kicker{display:none}
html body [data-framedo-game] .bubble-strike>.galaga-header h2{margin:0;font:800 21px/1.2 var(--fd-game-font);color:#fff}

/* ID controls in the standalone court must keep the same touch target as embedded games. */
html body[data-framedo-game=basketball] .bottom :is(#pause,#restart,#sound,#left,#right,#shoot,#exit){min-height:40px}
@media(max-width:700px){html body[data-framedo-game=basketball] .bottom :is(#pause,#restart,#sound,#left,#right,#shoot,#exit){min-height:44px}}

/* Page-level footer rules must not turn game controls into wrapped columns. */
html body [data-framedo-game] footer{flex-direction:row}
html body [data-framedo-game] footer>div{gap:8px}
@media(max-width:700px){
 html body [data-framedo-game] :is(.fc-actions,.dance-footer-actions,.tennis-controls) button,html body [data-framedo-game] .player-exit-bar .exit-player,html body [data-framedo-game] .archery-controls button{min-height:44px;min-width:44px}
 html body [data-framedo-game] :is(.wq-footer,.ws-footer){flex-wrap:wrap;justify-content:flex-end}
 html body [data-framedo-game] .ws-stage{min-width:0;max-width:100%}
 html body [data-framedo-game] .ws-board{max-width:100%;box-sizing:border-box}
}

html body [data-framedo-game] .ws-stage{grid-template-columns:minmax(0,1fr)}
html body [data-framedo-game] .ws-board .ws-cell{min-height:0;min-width:0;padding:0;font:900 clamp(9px,1.5vmin,15px)/1 var(--fd-game-font);border:0}
html body [data-framedo-game] .ws-board{grid-auto-rows:minmax(0,1fr)}

html body[data-framedo-game=basketball] .question{justify-content:flex-start}
html body[data-framedo-game=basketball] .question>:is(.prompt-card,.status){flex-shrink:0}

/* ---------------------------------------------------------------------------
   FrameDo game shell, modelled on Neon Bowling. One brand, one header look,
   one exit button (bottom right) and one typeface for every game.
   ------------------------------------------------------------------------ */
[data-framedo-game]{--fd-shell-header:radial-gradient(ellipse at 49% -35%,#54256d 0,#211234 42%,#120c25 82%);--fd-shell-line:#5e3671;--fd-shell-peach:#ffb56f;--fd-shell-exit:#ff902e}
html body [data-framedo-game] :is(.archery-head,.galaxy-header,.maze-header,.trivia-marquee,.dance-header,.wq-header,.ws-header,.crossword-marquee,.racing>header,.custom-player>header,.bubble-hud,.fc-header,.tennis-header),html body[data-framedo-game] :is(.top,main>header){background:var(--fd-shell-header);border-bottom:1px solid var(--fd-shell-line)}
html body [data-framedo-game] .fd-game-brand{display:inline-flex;align-items:baseline;gap:0;min-width:0;font-family:var(--fd-game-font);white-space:nowrap;line-height:1.2}
html body [data-framedo-game] .fd-game-brand .fd-brand-mark{color:#fff;font-size:clamp(17px,1.5vw,24px);font-weight:800;letter-spacing:-.2px}
html body [data-framedo-game] .fd-game-brand .fd-brand-mark>span{color:var(--fd-shell-peach)}
html body [data-framedo-game] .fd-game-brand>i{margin:0 12px;color:#8d6f9c;font-style:normal;font-weight:400}
html body [data-framedo-game] .fd-game-brand>b{overflow:hidden;color:#e4ceef;font-size:clamp(10px,.85vw,13px);font-weight:700;letter-spacing:2.5px;text-overflow:ellipsis;text-transform:uppercase}
html body [data-framedo-game] button.fd-exit,html body [data-framedo-game] .player-exit-bar .exit-player{display:inline-flex;flex:0 0 auto;order:99;align-self:center;justify-self:end;align-items:center;justify-content:center;box-sizing:border-box;width:auto!important;max-width:max-content;min-width:112px!important;height:44px!important;min-height:44px!important;margin-left:auto;padding:0 18px!important;border:1px solid #ffb470!important;border-radius:10px!important;background:var(--fd-shell-exit)!important;color:#191329!important;font:700 13px/1 var(--fd-game-font)!important;letter-spacing:.1px;box-shadow:none!important;cursor:pointer}
html body [data-framedo-game] button.fd-exit:hover,html body [data-framedo-game] .player-exit-bar .exit-player:hover{background:#ffa452!important}
html body [data-framedo-game] button.fd-exit:focus-visible,html body [data-framedo-game] .player-exit-bar .exit-player:focus-visible{outline:3px solid #fff;outline-offset:2px}
html body [data-framedo-game],html body [data-framedo-game] :is(button,input,select,textarea){font-family:var(--fd-game-font)}
@media(max-width:700px){html body [data-framedo-game] .fd-game-brand>i{margin:0 8px}html body [data-framedo-game] button.fd-exit,html body [data-framedo-game] .player-exit-bar .exit-player{width:auto!important;min-width:104px!important;padding:0 14px!important}}
html body [data-framedo-game] .fd-game-brand,html body [data-framedo-game] .fd-game-brand *,html body[data-framedo-game] .fd-game-brand,html body[data-framedo-game] .fd-game-brand *{text-transform:none;font-style:normal}
html body [data-framedo-game] .fd-game-brand>b,html body[data-framedo-game] .fd-game-brand>b{text-transform:uppercase}
html body[data-framedo-game] .fd-game-brand{display:inline-flex;align-items:baseline;min-width:0;font-family:var(--fd-game-font);white-space:nowrap;line-height:1.2;letter-spacing:0}
html body[data-framedo-game] .fd-game-brand .fd-brand-mark{color:#fff;font-size:clamp(17px,1.5vw,24px);font-weight:800;letter-spacing:-.2px}
html body[data-framedo-game] .fd-game-brand .fd-brand-mark>span,html body [data-framedo-game] .fd-game-brand .fd-brand-mark>span{color:var(--fd-shell-peach,#ffb56f);font-size:inherit;letter-spacing:inherit}
html body[data-framedo-game] .fd-game-brand>i{margin:0 12px;color:#8d6f9c;font-weight:400}
html body[data-framedo-game] .fd-game-brand>b{color:#e4ceef;font-size:clamp(10px,.85vw,13px);font-weight:700;letter-spacing:2.5px}
html body [data-framedo-game] .fd-game-brand .fd-brand-mark{font-size:clamp(17px,1.5vw,24px)!important;letter-spacing:-.2px!important}
html body [data-framedo-game] .fd-game-brand>b{font-size:clamp(10px,.85vw,13px)!important;letter-spacing:2.5px!important}
/* Shared start card (GameIntro), modelled on Neon Bowling's "Let it roll." */
html body [data-framedo-game] :is(.galaxy-setup,.race-intro){display:grid;place-items:center;box-sizing:border-box;width:100%;max-width:none;height:100%;min-height:0;margin:0;padding:clamp(10px,2vw,24px);border:0;border-radius:0;background:transparent;box-shadow:none;overflow:auto;font-family:var(--fd-game-font)}
html body [data-framedo-game] .fd-intro{box-sizing:border-box;width:min(560px,100%);margin:auto;padding:clamp(20px,3vw,36px);border:1px solid var(--fd-shell-line);border-radius:18px;background:linear-gradient(160deg,#211234f5,#120c25f5);color:#f8f3ff;text-align:left;box-shadow:0 24px 70px #00000066;font-family:var(--fd-game-font)}
html body [data-framedo-game] .fd-intro .maze-cover{display:block;width:112px;height:auto;margin:0 0 14px;border-radius:14px}
html body [data-framedo-game] .fd-intro-kicker{margin:0 0 8px;color:var(--fd-shell-peach);font-size:11px;font-weight:800;letter-spacing:2.5px;line-height:1.3}
html body [data-framedo-game] .fd-intro-title{margin:0 0 12px;color:#fff;font-family:var(--fd-game-font);font-size:clamp(34px,4.4vw,58px);font-weight:700;letter-spacing:-1.5px;line-height:1.02;text-align:left;text-transform:none}
html body [data-framedo-game] .fd-intro-title em{color:var(--fd-shell-peach);font-style:normal}
html body [data-framedo-game] .fd-intro-lead{margin:0 0 18px;color:#e1d4e9;font-size:15px;line-height:1.6;text-align:left}
html body [data-framedo-game] .fd-intro-keys{display:flex;flex-wrap:wrap;gap:14px 24px;margin:0 0 20px;padding:0;list-style:none}
html body [data-framedo-game] .fd-intro-keys li{display:grid;gap:3px;margin:0;padding:0}
html body [data-framedo-game] .fd-intro-keys kbd{color:#fff;font:700 16px/1.2 var(--fd-game-font);background:none;border:0;padding:0}
html body [data-framedo-game] .fd-intro-keys span{color:#bfa9d3;font-size:10px;font-weight:700;letter-spacing:1.6px}
html body [data-framedo-game] .fd-intro-choice{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 18px;justify-content:flex-start}
html body [data-framedo-game] .fd-intro-choice button{min-height:38px;padding:6px 14px;border:1px solid #8d6f9c;border-radius:999px;background:#ffffff0d;color:#f1e7f8;font:650 13px var(--fd-game-font)}
html body [data-framedo-game] .fd-intro-choice button[aria-pressed=true]{border-color:var(--fd-shell-peach);background:var(--fd-shell-peach);color:#191329}
html body [data-framedo-game] .fd-intro-start{display:block;width:100%;min-height:52px;margin:0;border:0;border-radius:12px;background:var(--fd-shell-peach);color:#191329;font:700 16px var(--fd-game-font);cursor:pointer}
html body [data-framedo-game] .fd-intro-start:hover:not(:disabled){background:#ffc58b}
html body [data-framedo-game] .fd-intro-start:focus-visible{outline:3px solid #fff;outline-offset:3px}
html body [data-framedo-game] .fd-intro-rules{margin-top:14px;color:#cdbbdc;font-size:13px;line-height:1.6}
html body [data-framedo-game] .fd-intro-rules summary{cursor:pointer;color:#fff;font-weight:700}
html body [data-framedo-game] .fd-intro-rules ul{margin:10px 0 0;padding-left:18px}
@media(max-width:700px){html body [data-framedo-game] .fd-intro{padding:20px 18px;border-radius:16px}html body [data-framedo-game] .fd-intro-lead{font-size:14px}html body [data-framedo-game] .fd-intro-keys{gap:12px 18px;margin-bottom:16px}}
html body [data-framedo-game] .fd-intro-screen{display:flex;flex-direction:column;height:100%;min-height:0}
html body [data-framedo-game] .fd-intro-screen>:is(.galaxy-setup,.maze-setup){flex:1;min-height:0}
html body [data-framedo-game] .fd-game-brand .fd-brand-mark,html body [data-framedo-game] .fd-game-brand .fd-brand-mark>span,html body[data-framedo-game] .fd-game-brand .fd-brand-mark{display:inline!important;visibility:visible!important}
/* Bottom control rails match Neon Bowling: dark rail, ghost buttons, primary action in peach. */
html body [data-framedo-game] .archery-controls,html body[data-framedo-game] footer.bottom{background:#140d26!important;border-top:1px solid var(--fd-shell-line,#5e3671)!important;color:#cdbbdc!important}
html body [data-framedo-game] .archery-controls button:not(.fd-exit),html body[data-framedo-game] footer.bottom button:not(.fd-exit):not(.primary):not(#shoot){border:1px solid #6b4a82!important;background:#ffffff0d!important;color:#f1e7f8!important}
html body [data-framedo-game] .archery-controls :is(p,span,small),html body[data-framedo-game] footer.bottom :is(p,span,small){color:#cdbbdc}
/* Pages where <body> itself is the game (Basketball): same exit and primary action. */
html body[data-framedo-game] button.fd-exit:not([hidden]){display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:auto!important;min-width:112px!important;height:44px!important;min-height:44px!important;margin-left:auto;padding:0 18px!important;border:1px solid #ffb470!important;border-radius:10px!important;background:#ff902e!important;color:#191329!important;font:700 13px/1 var(--fd-game-font)!important;box-shadow:none!important}
html body[data-framedo-game] footer.bottom #shoot{border:0!important;background:#ffb56f!important;color:#191329!important}
@media(max-width:700px){html body[data-framedo-game] button.fd-exit:not([hidden]){min-width:104px!important;padding:0 14px!important}}
/* The brand stays visible on phones even where a game used to hide its title. */
html body [data-framedo-game] :is(h1,h2):has(>.fd-game-brand){display:block!important;visibility:visible!important;margin:0;min-width:0;flex:0 1 auto}
@media(max-width:700px){html body [data-framedo-game] .fd-game-brand .fd-brand-mark{font-size:16px!important}html body [data-framedo-game] .fd-game-brand>b{font-size:10px!important;letter-spacing:1.8px!important}}
html body [data-framedo-game] .fd-game-brand,html body[data-framedo-game] .fd-game-brand{display:inline-flex!important}
/* Bubble Strike used to hide its title on phones; give the brand its own first row like every other game. */
@media(max-width:760px){
 html body [data-framedo-game] .fd-game-runtime .runtime-content>section.bubble-strike{grid-template-rows:auto auto auto minmax(160px,1fr) auto auto}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.galaga-header{display:flex!important;grid-column:1;grid-row:1;align-items:center;padding:6px 8px;border-radius:10px}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.galaga-header .arcade-kicker{display:none}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.bubble-hud{grid-row:2}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.bubble-question{grid-row:3}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.bubble-stage{grid-row:4}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.bubble-controls{grid-row:5}
 html body [data-framedo-game] .fd-game-runtime .bubble-strike>.galaga-feedback{grid-row:6}
}
/* Primary actions use the shared peach (Neon Bowling "Roll ball"), not per-game accents. */
html body [data-framedo-game] .bubble-strike button.primary{border:0!important;background:var(--fd-shell-peach)!important;color:#191329!important;font-family:var(--fd-game-font)!important;font-weight:700!important}
html body [data-framedo-game] .bubble-strike :is(.bubble-modal,.galaga-modal) :is(p,small,span){font-family:var(--fd-game-font)}
/* One typeface: older DOM games used monospace for helper text and prompts. */
html body [data-framedo-game] .custom-player :is(p,h2,h3,span,small,strong),html body [data-framedo-game] .custom-player .player-question{font-family:var(--fd-game-font)!important}
/* Shared touch joystick (same look as Galaxy). Only on touch screens; there it
   replaces the step arrow buttons it duplicates. */
html body [data-framedo-game] .fd-joystick,html body[data-framedo-game] .fd-joystick{display:none}
@media(any-pointer:coarse),(hover:none){
 html body [data-framedo-game] .fd-joystick,html body[data-framedo-game] .fd-joystick{position:relative;display:block;flex:0 0 auto;width:120px;height:76px;touch-action:none;user-select:none;-webkit-user-select:none;cursor:ew-resize}
 html body [data-framedo-game] .fd-joystick--xy,html body[data-framedo-game] .fd-joystick--xy{cursor:move}
 html body [data-framedo-game] .fd-joystick .joystick-base,html body[data-framedo-game] .fd-joystick .joystick-base{position:absolute;left:23px;bottom:10px;width:74px;height:24px;background:radial-gradient(ellipse,#5e6a71,#101827 80%);border:2px solid #171b28;border-radius:50%;box-shadow:0 4px 0 #08102a}
 html body [data-framedo-game] .fd-joystick .joystick-shaft,html body[data-framedo-game] .fd-joystick .joystick-shaft{position:absolute;left:52px;top:17px;width:16px;height:40px;background:linear-gradient(90deg,#070f16,#637c88,#101c28);border-radius:4px}
 html body [data-framedo-game] .fd-joystick .joystick-ball,html body[data-framedo-game] .fd-joystick .joystick-ball{position:absolute;left:36px;top:0;width:48px;height:44px;border-radius:50%;background:radial-gradient(circle at 30% 22%,#acb9c1,#1c252b 35%,#000 85%);box-shadow:0 3px 0 #081020}
 html body [data-framedo-game] .fd-joystick small,html body[data-framedo-game] .fd-joystick small{position:absolute;left:0;right:0;bottom:-2px;color:#cdbbdc;font:800 9px/1 var(--fd-game-font);letter-spacing:1.5px;text-align:center}
 html body [data-framedo-game] .fd-joystick-step,html body[data-framedo-game] .fd-joystick-step{display:none!important}
}
/* World Cup: the aim highlight moved with the arrow keys or the joystick, and the touch controls. */
html body[data-framedo-game=football] .answer.aim{outline:4px solid #ffe27a;outline-offset:2px;box-shadow:0 0 0 7px #ffe27a59}
html body[data-framedo-game=football] .fd-touch-controls{display:none}
@media(any-pointer:coarse),(hover:none){
 /* Thumb controls sit over the bottom corners of the pitch so they take no height from it. */
 html body[data-framedo-game=football] .fd-touch-controls{position:fixed;left:max(14px,env(safe-area-inset-left));right:max(14px,env(safe-area-inset-right));bottom:max(10px,env(safe-area-inset-bottom));z-index:6;display:flex;align-items:flex-end;justify-content:space-between;pointer-events:none}
 html body[data-framedo-game=football] .fd-touch-controls>*{pointer-events:auto}
 html body[data-framedo-game=football] .fd-touch-controls .fd-joystick{filter:drop-shadow(0 2px 6px #000a)}
 html body[data-framedo-game=football] .fd-touch-controls .fd-action{min-width:104px;min-height:56px;border:2px solid #1b1030;border-radius:16px;background:linear-gradient(135deg,#ffe27a,#ff9a3c);color:#1b1030;font:850 16px/1 var(--fd-game-font);letter-spacing:.5px;box-shadow:0 4px 0 #1b1030,0 6px 14px #0008}
 html body[data-framedo-game=football] .fd-touch-controls .fd-action:disabled{opacity:.55}
 html body[data-framedo-game=football] .bottom .instruction{display:none}
}
/* On narrow touch screens the joystick replaces both arrow buttons. Give its
   120px footprint a column so it cannot cover the neighboring shot button. */
@media(max-width:700px) and (any-pointer:coarse),(max-width:700px) and (hover:none){
 html body[data-framedo-game=basketball] .bottom .controls{grid-template-columns:120px minmax(0,1fr)}
}
/* Flashcards: simple visual switch for which side is on the front. */
html body [data-framedo-game] .fc-side-switch{display:inline-flex;align-items:center;gap:2px;padding:3px;border:1px solid #6b4a82;border-radius:999px;background:#140d26cc}
html body [data-framedo-game] .fc-side-switch button{display:inline-flex;align-items:center;gap:6px;min-height:34px;padding:0 12px;border:0;border-radius:999px;background:transparent;color:#e4d6ef;font:650 12px/1 var(--fd-game-font);cursor:pointer}
html body [data-framedo-game] .fc-side-switch button span{font-size:13px;opacity:.85}
html body [data-framedo-game] .fc-side-switch button[aria-checked=true]{background:var(--fd-shell-peach,#ffb56f);color:#191329}
html body [data-framedo-game] .fc-side-switch button:focus-visible{outline:2px solid #fff;outline-offset:1px}
html body [data-framedo-game] .fc-side-switch button:disabled{opacity:.6;cursor:default}

/* Shared sound toggle (src/ui/game-sound.tsx): same size and look in every game header. */
.fd-sound-toggle,html body [data-framedo-game] header .fd-sound-toggle{flex:0 0 auto;min-height:38px;border:1px solid #bda3d577;border-radius:9px;padding:7px 12px;background:#ffffff0e;color:#fff;font:650 12px/1.2 var(--fd-game-font,Poppins,sans-serif);white-space:nowrap;cursor:pointer}
.fd-sound-toggle[aria-pressed="false"]{opacity:.6}
.fd-header-tools{display:inline-flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0}
.trivia-marquee .fd-header-tools>small{color:var(--fd-game-muted,#ddd2e9);font:650 11px/1.4 var(--fd-game-font,Poppins,sans-serif);white-space:nowrap}
.crossword-marquee .fd-header-tools>strong{padding:8px 12px;border-radius:8px;background:#6b35dd;font-size:clamp(12px,1.5vw,18px);color:#fff;white-space:nowrap}
@media(max-width:560px){.trivia-marquee .fd-header-tools>small{display:none}}
/* FrameDo logo in every game header (neon gradient FrameDo wordmark with its black background removed). */
.fd-game-brand,html body [data-framedo-game] .fd-game-brand,html body[data-framedo-game] .fd-game-brand{align-items:center}
.fd-game-brand .fd-brand-mark{display:inline-flex;align-items:center;line-height:0}
.fd-brand-logo{display:block;width:auto;height:clamp(26px,2.3vw,34px);max-width:none}
@media(max-width:560px){.fd-brand-logo{height:24px}}
/* Neon Bowling keeps its own markup: the wordmark text is replaced by the same logo. */
[data-framedo-game="bowling"] .brand{display:flex;align-items:center;font-size:0}
[data-framedo-game="bowling"] .brand::before{content:"";flex:none;width:calc(clamp(26px,2.3vw,34px)*3.49);height:clamp(26px,2.3vw,34px);background:url(/art/framedo-logo-light.png) left center/contain no-repeat}
[data-framedo-game="bowling"] .brand>i{font-size:18px;margin:0 12px}
[data-framedo-game="bowling"] .brand>b{font-size:clamp(10px,.85vw,13px)}
@media(max-width:560px){[data-framedo-game="bowling"] .brand::before{width:84px;height:24px}[data-framedo-game="bowling"] .brand>i{margin:0 8px}}
/* Trivial's marquee styles every image as a white badge; the header logo must stay transparent. */
html body [data-framedo-game] .trivia-marquee .fd-brand-logo{width:auto;height:clamp(26px,2.3vw,34px);padding:0;border-radius:0;background:none;object-fit:contain}
html body[data-framedo-game="bowling"] main>header .brand.brand{display:flex;align-items:center;font-size:0}
html body[data-framedo-game="bowling"] main>header .brand.brand>i{font-size:18px}
html body[data-framedo-game="bowling"] main>header .brand.brand>b{font-size:clamp(10px,.85vw,13px)}
@media(max-width:560px){html body [data-framedo-game] .trivia-marquee .fd-brand-logo{height:24px}}

/* Game name set in the logo's own typeface (Poppins ExtraBold, self-hosted, SIL OFL) with the logo's sunset gradient. */
@font-face{font-family:"FrameDo Display";src:url(/fonts/poppins-800-latin.woff2) format("woff2");font-weight:800;font-style:normal;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"FrameDo Display";src:url(/fonts/poppins-800-latin-ext.woff2) format("woff2");font-weight:800;font-style:normal;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
html body [data-framedo-game] .fd-game-brand>b,html body[data-framedo-game] .fd-game-brand>b,html body[data-framedo-game="bowling"] main>header .brand.brand>b{font-family:"FrameDo Display",Poppins,ui-sans-serif,system-ui,sans-serif;font-weight:800;font-size:clamp(15px,1.45vw,22px)!important;letter-spacing:-.2px!important;line-height:1.3;text-transform:none!important;color:#ff7a1a;background:linear-gradient(180deg,#ffc21f 10%,#ff7a1a 44%,#ff1f8e 76%,#d916d0 96%);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;filter:drop-shadow(0 1px 0 #2a0f45) drop-shadow(0 0 5px #ff3d9a59)}
@media(max-width:700px){html body [data-framedo-game] .fd-game-brand>b,html body[data-framedo-game] .fd-game-brand>b,html body[data-framedo-game="bowling"] main>header .brand.brand>b{font-size:13px!important;letter-spacing:0!important}}
@media(forced-colors:active){html body [data-framedo-game] .fd-game-brand>b,html body[data-framedo-game] .fd-game-brand>b{background:none;-webkit-text-fill-color:currentColor;filter:none}}
/* Logo and game name sit on one baseline: the wordmark fills its image, so the image's bottom edge is its baseline. */
.fd-game-brand,html body [data-framedo-game] .fd-game-brand,html body[data-framedo-game] .fd-game-brand,html body[data-framedo-game="bowling"] main>header .brand.brand{align-items:baseline!important}
.fd-game-brand .fd-brand-mark{align-items:flex-end}
html body [data-framedo-game] .fd-game-brand>b,html body[data-framedo-game] .fd-game-brand>b,html body[data-framedo-game="bowling"] main>header .brand.brand>b{line-height:1!important;position:relative;top:-.04em}
html body [data-framedo-game] .fd-game-brand>i,html body[data-framedo-game] .fd-game-brand>i,html body[data-framedo-game="bowling"] main>header .brand.brand>i{line-height:1!important;font-size:clamp(18px,1.7vw,26px)!important}
/* Score system: every game shows its score the same way — a gold pill for the score, neon chips for the rest. */
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-hud{display:flex;flex:0 1 auto;align-items:center;justify-content:center;gap:10px;flex-wrap:wrap;min-width:0;margin-inline:auto;padding:0;font-family:var(--fd-game-font);letter-spacing:0}
:is(html body[data-framedo-game],html body [data-framedo-game]) :is(.fd-score,.fd-chip){display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;gap:6px;box-sizing:border-box;margin:0;border-radius:999px;font-family:var(--fd-game-font);font-style:normal;line-height:1;white-space:nowrap;font-variant-numeric:tabular-nums;text-transform:none}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-score{min-height:38px;padding:0 18px;border:1px solid #fff6;background:linear-gradient(135deg,#ffe27a,#ff9a3c 60%,#ff6fa5);color:#1b1030!important;font-size:clamp(15px,1.35vw,19px);font-weight:850;letter-spacing:.3px;box-shadow:0 4px 16px #ff9a3c66,inset 0 1px 0 #fff8;text-shadow:none}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-score :is(strong,b,span){color:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip{min-height:32px;padding:0 13px;border:1px solid #7ff3ff99;background:#7ff3ff1f;color:#c4fbff!important;font-size:clamp(12px,1vw,14px);font-weight:750;letter-spacing:.3px}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip :is(strong,b,span){color:#fff;font-size:inherit;font-weight:850}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip.hot{border-color:#ff8ec2;background:#ff8ec228;color:#ffd0e4!important}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-hud>*{margin:0}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-header-tools{margin-left:0}
:is(html body[data-framedo-game],html body [data-framedo-game]) :is(.maze-header,.galaxy-header,.trivia-marquee,.custom-player>header,.archery-head,.dance-header,.wq-header,.ws-header,.bubble-hud,.fc-header,.racing>header){align-items:center}
@media(max-width:700px){:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip.opt{display:none}:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-hud{gap:6px}:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-score{min-height:32px;padding:0 12px;font-size:14px}:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip{min-height:28px;padding:0 9px;font-size:11px}}
:is(html body[data-framedo-game],html body [data-framedo-game]) .trivia-marquee{grid-template-columns:auto 1fr auto}
.trivia-game.board-mode .trivia-marquee .fd-hud{display:none}
html body[data-framedo-game=bowling] #app>header{grid-template-columns:auto 1fr;grid-template-rows:auto;align-items:center;padding-right:250px}
html body[data-framedo-game=bowling] #app>header .brand{align-self:center}
html body[data-framedo-game=bowling] .stats{display:contents}
html body[data-framedo-game=bowling] .stats .fd-hud strong{margin:0}
html body[data-framedo-game=bowling] .stats button{top:50%;transform:translateY(-50%)}
@media(max-width:700px){html body[data-framedo-game=bowling] #app>header{padding-right:0;grid-template-columns:1fr;grid-template-rows:auto auto}html body[data-framedo-game=bowling] .stats button{top:7px;transform:none}}
@media(max-width:700px){
:is(html body[data-framedo-game],html body [data-framedo-game]) .fc-header .fd-hud{flex-wrap:nowrap;gap:5px;margin-inline:0 0;margin-left:auto}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fc-header .fd-score{min-height:26px;padding:0 9px;font-size:11px}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fc-header .fd-chip{display:none}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fc-header .fd-chip.fc-audio-state{display:none}
:is(html body[data-framedo-game],html body [data-framedo-game]) .dance-header .fd-hud{flex:1 1 100%;order:3}
html body[data-framedo-game=bowling] #app{grid-template-rows:auto auto 30px minmax(0,1fr) 72px}
html body[data-framedo-game=bowling] #app>header{padding-bottom:10px;row-gap:6px}
:is(html body[data-framedo-game],html body [data-framedo-game]) .archery-head .fd-hud{flex-wrap:nowrap;gap:5px;margin-inline:0;margin-left:auto}
:is(html body[data-framedo-game],html body [data-framedo-game]) .archery-head .fd-score{min-height:28px;padding:0 10px;font-size:12px}
:is(html body[data-framedo-game],html body [data-framedo-game]) .archery-head .fd-chip{min-height:26px;padding:0 9px;font-size:10px}
}
:is(html body[data-framedo-game],html body [data-framedo-game]) :is(.fd-score,.fd-chip) :is(strong,b,span){display:inline;margin:0;white-space:nowrap}
@media(max-height:500px){
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-hud{flex-wrap:nowrap;gap:5px}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip.opt{display:none}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-score{min-height:28px;padding:0 11px;font-size:13px}
:is(html body[data-framedo-game],html body [data-framedo-game]) .fd-chip{min-height:24px;padding:0 8px;font-size:10px}
}

/* Keyboard hints are shown only where there is a keyboard; touch screens get the tap wording. */
.fd-touch-only{display:none}
@media(hover:none) and (pointer:coarse){.fd-keys-only{display:none!important}.fd-touch-only{display:inline}}
/* End-of-game review: the cards the student missed (src/ui/ReviewList.tsx). */
.fd-review{width:min(520px,100%);margin:10px auto;text-align:left;font:500 14px/1.35 Poppins,system-ui,sans-serif}
.fd-review>p{margin:0 0 6px;font-weight:700;text-align:center}
.fd-review ul{list-style:none;margin:0;padding:0;display:grid;gap:5px;max-height:min(34vh,220px);overflow:auto}
.fd-review li{display:flex;justify-content:space-between;gap:12px;padding:7px 11px;border-radius:9px;border-left:4px solid #ff5d8f;background:#ffffff14;color:inherit}
/* Sizes are fixed here because each game styles the headings of its own end screen much larger. */
.fd-review>p,.fd-review ul li span,.fd-review ul li strong{font-size:14px!important;line-height:1.35!important;letter-spacing:0!important;text-transform:none!important}
.fd-review ul li span{opacity:.85;overflow-wrap:anywhere;font-weight:500!important}.fd-review ul li strong{text-align:right;overflow-wrap:anywhere;font-weight:700!important}

/* ───────── Arcade cabinet (phones held upright) ─────────
   A game adds .fd-cabinet to its root while useArcadeCabinet() is true, and marks its parts:
   .fd-cab-marquee (top bar) with .fd-cab-sign inside (the title), .fd-cab-info (question), .fd-cab-screen (play area),
   an ArcadeDeck (3D control panel, src/ui/arcade-deck.ts) and .fd-cab-foot (the game's Pause, Restart and Exit bar).
   The result is a walnut cabinet: neon sign on top, the play area recessed like a screen with wood at the sides and a
   control deck at the bottom. The Pause, Restart and Exit bar is moved to the very top (the root must be a grid or flex
   container for `order` to apply) so nothing tappable sits next to the stick and the button. */
html body [data-framedo-game] .fd-cabinet,html body[data-framedo-game] .fd-cabinet{--cab-trim:#ff8a2a;
 background:repeating-linear-gradient(93deg,#ffffff0a 0 2px,#0000 2px 7px,#0000001f 7px 9px,#0000 9px 15px),repeating-linear-gradient(88deg,#0000001a 0 1px,#0000 1px 11px),linear-gradient(90deg,#3d2212,#5b3620 50%,#3d2212)}
html body [data-framedo-game] .fd-cabinet .fd-cab-marquee,html body[data-framedo-game] .fd-cabinet .fd-cab-marquee{gap:6px 8px;align-items:center;padding:9px 12px 7px;border:0;border-bottom:4px solid var(--cab-trim);box-shadow:0 3px 12px #ff8a2a44;
 background:repeating-linear-gradient(90deg,#0000 0 118px,#00000055 118px 120px),repeating-linear-gradient(3deg,#ffffff0a 0 2px,#0000 2px 7px,#0000001f 7px 9px,#0000 9px 15px),linear-gradient(180deg,#5b3620,#4a2a17 45%,#38200f)}
/* The neon sign: the game's name glowing on black inside an orange tube frame. */
html body [data-framedo-game] .fd-cabinet .fd-cab-sign,html body[data-framedo-game] .fd-cabinet .fd-cab-sign{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-width:0;min-height:54px;padding:4px 10px;border:3px solid var(--cab-trim);border-radius:8px;background:#0d0a14;box-shadow:inset 0 0 18px #ff8a2a44,0 0 14px #ff8a2a77}
html body [data-framedo-game] .fd-cabinet .fd-cab-sign h2,html body[data-framedo-game] .fd-cabinet .fd-cab-sign h2{margin:0;line-height:1}
html body [data-framedo-game] .fd-cabinet .fd-cab-sign .fd-game-brand,html body[data-framedo-game] .fd-cabinet .fd-cab-sign .fd-game-brand{align-items:center}
html body [data-framedo-game] .fd-cabinet .fd-cab-sign .fd-brand-logo,html body[data-framedo-game] .fd-cabinet .fd-cab-sign .fd-brand-logo{display:block;width:auto;height:30px}
html body [data-framedo-game] .fd-cabinet .fd-cab-sign .fd-game-brand>i,html body[data-framedo-game] .fd-cabinet .fd-cab-sign .fd-game-brand>i{margin:0 10px;color:#b79ad6;font-size:22px}
html body [data-framedo-game] .fd-cabinet .fd-cab-sign .fd-game-brand>b,html body[data-framedo-game] .fd-cabinet .fd-cab-sign .fd-game-brand>b{overflow:visible;color:#fff!important;background:none!important;-webkit-text-fill-color:#fff!important;font:800 clamp(17px,5.6vw,23px)/1 Outfit,Poppins,sans-serif!important;letter-spacing:1.5px!important;text-transform:uppercase!important;text-shadow:0 0 6px #ff4fd8,0 0 14px #ff4fd8,0 0 26px #b02bff!important}
/* Score chips become a small LED scoreboard. */
html body [data-framedo-game] .fd-cabinet .fd-cab-marquee .fd-hud>span,html body[data-framedo-game] .fd-cabinet .fd-cab-marquee .fd-hud>span{display:inline-flex;flex-direction:row;align-items:baseline;gap:5px;min-height:0;padding:4px 7px;border:1px solid #000;border-radius:5px;background:#0d0a14;box-shadow:inset 0 0 6px #ff8a2a44;color:#ffb347!important;font:800 10px/1.1 Outfit,Poppins,sans-serif;letter-spacing:1px}
html body [data-framedo-game] .fd-cabinet .fd-cab-marquee .fd-hud>span strong,html body[data-framedo-game] .fd-cabinet .fd-cab-marquee .fd-hud>span strong{color:#7dffb0!important;font-size:11px}
html body [data-framedo-game] .fd-cabinet .fd-cab-marquee .fd-hud>.opt,html body[data-framedo-game] .fd-cabinet .fd-cab-marquee .fd-hud>.opt{display:none}
html body [data-framedo-game] .fd-cabinet .fd-cab-marquee button,html body[data-framedo-game] .fd-cabinet .fd-cab-marquee button{min-height:26px;padding:3px 8px;border-radius:7px;font-size:10px}
/* The play area sits inside a black bezel with the cabinet's wood showing at both sides. */
html body [data-framedo-game] .fd-cabinet .fd-cab-screen,html body[data-framedo-game] .fd-cabinet .fd-cab-screen{margin:0 14px;border:7px solid #0b0910;border-bottom-width:9px;border-radius:12px;box-shadow:0 0 0 2px #2a2433,0 6px 14px #0008}
html body [data-framedo-game] .fd-cabinet .fd-cab-foot,html body[data-framedo-game] .fd-cabinet .fd-cab-foot{order:-1;border-top:0;border-bottom:1px solid #000;background:linear-gradient(180deg,#1b1524,#0f0b16)}
/* Leaving is red everywhere in the cabinet, so orange stays the colour of the play button. */
html body [data-framedo-game] .fd-cabinet button.fd-exit,html body[data-framedo-game] .fd-cabinet button.fd-exit{border-color:#e5352b!important;background:#e5352b!important;color:#fff!important;box-shadow:0 3px 0 #8c1711!important}
/* Control deck, drawn flat: a walnut panel, a console plate, the four-way pad and the button. */
.fd-deck{--deck-h:clamp(118px,19vh,150px);position:relative;box-sizing:border-box;height:var(--deck-h);margin-top:6px;overflow:hidden;border-top:5px solid #ff8a2a;background:#4a2a17;touch-action:none;user-select:none;-webkit-user-select:none}
.fd-deck canvas{position:absolute;inset:0;display:block;width:100%;height:100%}
/* Rims are borders and gradients, not shadows: low-quality mode removes every shadow inside a game. */
.fd-deck .fd-deck-plate{position:absolute;inset:6px 10px;box-sizing:border-box;border:2px solid #a9a4b6;border-radius:18px;background:linear-gradient(#e6e3ec 0 4px,#c9c5d1 4px)}
.fd-deck .fd-deck-stick{position:absolute;left:0;top:0;bottom:0;width:50%;display:grid;place-items:center;touch-action:none}
.fd-deck .fd-deck-cross{display:block;flex:none;width:calc(var(--deck-h) - 30px);height:calc(var(--deck-h) - 30px);overflow:visible}
.fd-deck .fd-deck-well{fill:#b3aebd}.fd-deck .fd-deck-body{fill:#17151c}.fd-deck .fd-deck-arrow{fill:#8d8a99}.fd-deck .fd-deck-stud{fill:#7a3df0}
.fd-deck .fd-deck-arm{fill:#fff;opacity:0}
.fd-deck .fd-deck-arm.is-held{opacity:.24}
.fd-deck .fd-deck-cap{display:block;box-sizing:border-box;width:calc(var(--deck-h) - 40px);height:calc(var(--deck-h) - 40px);border:7px solid #b3aebd;border-radius:50%;background:linear-gradient(#ffb367 0 5%,#ff8a22 5% 89%,#b8540a 89%)}
.fd-deck .fd-deck-button:is(.is-down,.is-held) .fd-deck-cap{background:linear-gradient(#f79a3f 0 3%,#ec7714 3% 95%,#b8540a 95%);transform:translateY(2px) scale(.97)}
.fd-deck .fd-deck-button:disabled .fd-deck-cap{filter:saturate(.35) brightness(.7)}
html body [data-framedo-game] .fd-deck .fd-deck-button,html body[data-framedo-game] .fd-deck .fd-deck-button{position:absolute;right:0;top:0;bottom:0;width:50%;display:grid;place-items:center;min-height:0;padding:0;border:0!important;border-radius:0;background:transparent!important;box-shadow:none!important;touch-action:none;-webkit-tap-highlight-color:transparent;cursor:pointer}
html body [data-framedo-game] .fd-deck .fd-deck-button:focus-visible{outline:3px solid #fff;outline-offset:-6px}
/* Without WebGL the deck is a flat walnut panel with a drawn stick and button; the touch zones work the same. */
/* ───────── Cabinet frame (src/content/Player.tsx) ─────────
   The player wraps each action game listed in src/ui/cabinet-games.ts. Away from an upright phone the wrapper is
   invisible to layout; on one it becomes the cabinet: Exit bar on top, neon sign, the whole game as the screen, deck. */
.fd-cab-frame,.fd-cab-frame>.fd-cab-body{display:contents}
html body .player-overlay:has(.fd-cab-frame.fd-cabinet){display:flex!important;flex-direction:column;padding:0!important;overflow:hidden!important}
html body .player-overlay:has(.fd-cab-frame.fd-cabinet)>.player-game-content{display:flex;flex:1 1 auto;flex-direction:column;min-height:0;max-width:none;margin:0;padding:0!important;overflow:hidden!important}
/* Exit moves to a bar at the very top, away from the stick and the button. */
html body .player-overlay:has(.fd-cab-frame.fd-cabinet)>.player-exit-bar{display:none!important}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet,html body[data-framedo-game] .fd-cab-frame.fd-cabinet{display:flex;flex-direction:column;flex:1 1 auto;width:100%;height:100%;min-height:0;box-sizing:border-box}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-marquee,html body[data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-marquee{display:block;padding:7px 12px 6px}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-marquee .fd-cab-sign,html body[data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-marquee .fd-cab-sign{min-height:44px}
/* The game itself is the screen: black bezel, wood at both sides. */
.fd-cab-frame.fd-cabinet>.fd-cab-body{display:flex;flex:1 1 0;flex-direction:column;min-width:0;min-height:0;margin:8px 12px 0;overflow:hidden;border:6px solid #0b0910;border-bottom-width:8px;border-radius:12px;background:#080e26;box-shadow:0 0 0 2px #2a2433,0 6px 14px #0008}
.fd-cab-frame.fd-cabinet>.fd-cab-body>*{flex:1 1 auto;min-width:0;min-height:0;width:100%;max-width:none;margin:0;box-sizing:border-box}
.fd-cab-frame.fd-cabinet>.fd-deck{margin-top:8px}
/* The sign carries the name and the deck replaces these touch controls and keyboard hints. */
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body :is(.fd-game-brand,.arcade-kicker,.race-controls,.tennis-controls,.tennis-help,.bubble-controls,.galaga-rules,.galaxy-controller,.maze-help){display:none!important}
@media(max-height:720px){.fd-cab-frame.fd-cabinet>.fd-deck{--deck-h:112px;margin-top:4px}html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-marquee .fd-cab-sign{min-height:38px}}
/* Exit Game: red like in Bullseye's bar, and the same size as that bar's buttons. */
/* A header that held only the game's name is empty now, so it gives its height to the game. */
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body h2:has(>.fd-game-brand){display:none!important}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body header:not(:has(button,.fd-hud,.fd-chip,.fd-score)){display:none!important}
/* Per-game fit inside the cabinet screen. */
html body [data-framedo-game] .fd-cab-frame.fd-cabinet .tennis-player{padding-top:8px}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet :is(.race-help,.racing>footer,.galaxy-keys,.maze-keys){display:none!important}
/* Games that draw their own Exit button get the same top bar from the cabinet instead. */
.fd-cab-frame.fd-cabinet>.fd-cab-exit{display:grid;flex:0 0 auto;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:calc(5px + env(safe-area-inset-top,0px)) 12px 5px;border-bottom:1px solid #000;background:linear-gradient(180deg,#1b1524,#0f0b16)}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit button,html body[data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit button{display:flex!important;align-items:center;justify-content:center;width:100%!important;min-width:0!important;max-width:none!important;height:34px!important;min-height:34px!important;margin:0!important;padding:4px 8px!important;border:1px solid #4d4463!important;border-radius:10px!important;background:#1d1830!important;color:#fff!important;box-shadow:none!important;font:800 12px/1 var(--fd-font-ui,Poppins,Arial,sans-serif)!important;white-space:nowrap;overflow:hidden;justify-self:stretch!important;transform:none!important}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit .fd-cab-pause,html body[data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit .fd-cab-pause{grid-column:1}html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit .fd-cab-restart,html body[data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit .fd-cab-restart{grid-column:2}html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit button.fd-exit,html body[data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-exit button.fd-exit{grid-column:3;border-color:#e5352b!important;background:#e5352b!important}
.fd-cab-frame.fd-cabinet>.fd-cab-marquee,.fd-cab-frame.fd-cabinet>.fd-deck{flex:0 0 auto}
.fd-cab-frame.fd-cabinet>.fd-cab-body iframe{flex:1 1 auto;width:100%;height:100%;min-height:0;border:0}
/* With Pause and Restart in the top bar, each screen keeps a slim HUD so the playfield gets the room. */
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body :is(header,.fd-hud) button{min-height:30px!important;height:30px;padding:2px 9px!important;font-size:11px!important;border-radius:9px}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body :is(.galaxy-header,.maze-header,.bubble-hud){align-items:center;gap:6px;padding-top:6px;padding-bottom:6px}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-footer{display:none!important}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet .maze-layout{grid-template-rows:minmax(110px,1fr) minmax(96px,130px)}
/* Galaxy on a phone: one slim HUD row and a playfield that takes all the height that is left. */
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-header{flex-wrap:nowrap;gap:5px;padding:5px 6px!important}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-header .fd-hud{flex:1 1 auto;min-width:0;gap:4px;flex-wrap:nowrap}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-header .fd-hud>*{padding-inline:8px;font-size:11px;white-space:nowrap}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-header button{flex:none;padding:2px 6px!important;font-size:10px!important}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body :is(.galaxy-targets,.galaxy-target){min-height:0}
html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-target{padding:5px 6px}
@media(max-height:720px){html body [data-framedo-game] .fd-cab-frame.fd-cabinet>.fd-cab-body .galaxy-target small{display:none}}

