.board-dialog{width:min(760px,96vw)}.arcade-primary,.shop-panel button,.token-choices button,.learn-subjects button{border:0;border-radius:12px;padding:12px 18px;background:#8762b4;color:white;font:inherit;font-size:12px;font-weight:700;cursor:pointer}.arcade-primary:disabled,.shop-panel button:disabled{opacity:.4;cursor:default}.arcade-help{font-size:12px;color:#89798e;line-height:1.8;margin-top:17px}.arcade-help summary{cursor:pointer;font-weight:700}.ludo-banner{display:flex;align-items:center;justify-content:space-between;font-size:10px;gap:8px;margin:15px 0}.ludo-banner>span:first-child{color:#d77c82}.ludo-banner>span:last-child{color:#668ed2}#ludo-board{width:min(100%,420px);display:block;margin:auto}.dice-controls{display:flex;justify-content:center;align-items:center;gap:20px;margin:16px 0}#ludo-die{font-size:47px;line-height:1;color:#986aa5}.token-choices{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}.token-choices button{background:#e68a92}.dice-pop{animation:dice-pop .35s ease-out}@keyframes dice-pop{0%{transform:rotate(-30deg) scale(.5)}70%{transform:rotate(15deg) scale(1.15)}100%{transform:none}}.pool-top{display:flex;justify-content:space-between;font-size:10px;letter-spacing:1px;color:#70938c;margin:15px 0}#pool-table{display:block;width:100%;border-radius:16px;touch-action:none}.pool-settings{display:flex;flex-wrap:wrap;gap:14px;align-items:center;margin:17px 0}.pool-settings label{flex:1;min-width:130px;font-size:11px;color:#8c7a96}.pool-settings input{display:block;width:100%;accent-color:#9568af;min-height:32px}.shop-scene{height:150px;border-radius:17px;background:linear-gradient(#ffe3b2,#f8c4a4);display:grid;place-items:center;position:relative}.shop-scene>span{position:absolute;right:30px;top:20px;color:#d09c52;font-size:30px}.shop-scene>div{background:#fff7e7;padding:23px 32px;border-radius:8px;border-top:14px dashed #df9387;font-size:23px;font-weight:800;color:#a77768;box-shadow:0 10px 0 #cb97722b}.shop-scene small{display:block;text-align:center;font-size:8px;letter-spacing:1.4px;margin-top:8px}.shop-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}.shop-stats>div{padding:15px;background:#f2ebf6;border-radius:12px;text-align:center}.shop-stats span{font-size:8px;letter-spacing:1.2px;color:#9b82a4;display:block}.shop-stats strong{font-size:23px;color:#98739e}.shop-panel{display:flex;flex-wrap:wrap;gap:10px;align-items:end}.shop-panel label{font-size:11px;color:#9c839e;flex:1}.shop-panel select{display:block;padding:12px;border:1px solid #e2d7e7;border-radius:10px;background:white;color:#896b95;width:100%;margin-top:7px}.shop-report{margin-top:17px;padding:18px;background:#fff5e5;border:1px solid #f1dec4;border-radius:13px;font-size:13px;line-height:1.8;color:#a28561}.learn-banner{background:linear-gradient(110deg,#e1d9f3,#f4deea);border-radius:12px;padding:16px;text-align:center;font-size:10px;letter-spacing:1.4px;color:#9171a5}.learn-subjects{display:flex;gap:8px;justify-content:center;margin:16px 0}.learn-subjects button{background:#eee7f5;color:#9478aa}.learn-subjects button[aria-pressed=true]{background:#9470b9;color:white}.learn-card{border:1px solid #e7dcec;border-radius:17px;padding:24px;background:#fffaff}.learn-card>span{font-size:10px;color:#a187ac;letter-spacing:1.2px}.learn-card h3{font-size:24px;line-height:1.5;margin:14px 0 20px}#learn-answers{display:grid;grid-template-columns:1fr 1fr;gap:10px}#learn-answers button{padding:16px;border:1px solid #e4d9ec;border-radius:12px;background:white;color:#887093;font:inherit;text-align:left;cursor:pointer;min-height:54px}#learn-answers button.answer-right{background:#dff1df;border-color:#9ebd9a;color:#4f7751}#learn-answers button.answer-wrong{background:#f7dfdf;border-color:#daa1a1;color:#a66a70}#learn-explain{font-size:13px;line-height:1.8;color:#917599}.extra-art{font-size:85px;background:linear-gradient(135deg,#e7d7ed,#f4dfc3)}.extra-art .tag{font-size:8px}.pool-art{background:linear-gradient(135deg,#bfdfce,#e0e8ba)}.business-art{background:linear-gradient(135deg,#f7e3bb,#eec6b1)}.education-art{background:linear-gradient(135deg,#d5e0f5,#ecdafa)}
/* Shared small-screen controls and room for the actual playing field. */
dialog{max-height:94dvh;overscroll-behavior:contain}body:has(dialog[open]){overflow:hidden}.modal-header{gap:15px}.modal-header>button{min-width:44px;min-height:44px;flex-shrink:0}.game-audio button,.controls button,.board-footer button{min-height:40px}.action-stage{max-width:min(570px,calc((100dvh - 330px)*1.3))}.fight-stage{max-width:720px;margin:auto}.fight-controls button{min-height:44px}.snake-stage{max-width:min(100%,max(250px,calc(100dvh - 400px)))}.sweet{min-width:0}.fight-controls button[data-hold]{touch-action:none}@media(max-width:650px){dialog,.candy-dialog,.snake-dialog,.action-dialog,.fight-dialog,.board-dialog{width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;border-radius:0;padding:16px}.modal-header h2{font-size:24px!important}.modal-header{position:sticky;top:-16px;background:inherit;z-index:10;padding:10px 0}#instructions{font-size:12px!important}#game-levels{padding:9px 11px;margin:8px 0}.game-audio{margin:8px 0}.action-stage{max-width:100%}.snake-stage{max-width:min(100%,380px)}.candy-stage{max-width:410px;margin:auto}.fight-hud{gap:5px;grid-template-columns:1fr 24px 1fr}.fight-controls{position:sticky;bottom:-16px;background:#17192af5;padding:12px 0;margin-bottom:0;z-index:4}.fight-controls button{min-width:44px}.fight-controls>div{gap:5px}.action-buttons{position:sticky;bottom:-16px;background:#f9f5fcf5;padding:12px 0;z-index:4}.action-buttons button,.snake-pad button{min-height:44px}.learn-card{padding:18px}.learn-card h3{font-size:20px}.shop-stats strong{font-size:20px}.pool-settings{gap:10px}.pool-settings label{min-width:110px}.token-choices button{min-height:44px}.learn-subjects button{padding:12px;min-height:44px}.tetris-layout .tetris-canvas{max-height:53dvh;max-width:calc(100% - 103px)}.ludo-banner{font-size:9px}}@media(max-width:370px){#learn-answers{grid-template-columns:1fr}.fight-controls button{padding:10px 8px;font-size:10px}}@media(prefers-reduced-motion:reduce){.dice-pop{animation:none}}
.shop-panel label{min-width:150px}.shop-panel button{min-height:44px}.token-choices button{animation:dice-pop .25s ease-out}.learn-card:has(.answer-right){animation:lesson-glow .5s ease-out}@keyframes lesson-glow{50%{box-shadow:0 0 0 5px #cde8ca55}}@media(prefers-reduced-motion:reduce){.token-choices button,.learn-card:has(.answer-right){animation:none}}
