/* Touch-first phone layout. Scoring and storage are unchanged. */
@media(max-width:700px){
 .arena{padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px));max-width:620px}.top .brand h1{font-size:25px}.brand small{font-size:9px;letter-spacing:1.2px}.career span{font-size:10px}.toolbar{gap:7px;margin:10px 0}.toolbar select,.toolbar .quiet{min-height:44px;font-size:11px}.toolbar select{max-width:180px}.toolbar .quiet{padding:8px 10px}.match-score{padding:10px 12px;margin-bottom:10px}.match-score small{font-size:9px;letter-spacing:.6px}.match-score strong{font-size:19px}.timer small{font-size:8px}.play-grid{gap:10px}.football{border-radius:15px;padding:10px}.difficulty button{min-height:53px}.difficulty b{font-size:12px}.difficulty small{font-size:10px}.coach p{font-size:11px}.field-head{font-size:11px}.math-panel{padding:15px;border-radius:16px}.question-head{font-size:10px;letter-spacing:.7px}.question-head .text-button{min-height:36px}.math-panel h2#problem{font-size:41px;margin:8px 0 10px}.instruction{font-size:12px;margin-bottom:12px}.answer-wrap label{font-size:11px}.answer-wrap input{height:43px;font-size:31px}.answer-wrap .text-button{font-size:11px;min-height:42px}.keypad{gap:8px;margin-top:12px}.keypad button{min-height:53px;font-size:25px}.keypad #shoot{font-size:17px}.help-row{margin-top:11px;gap:7px}.help-row .quiet,.help-row .text-button{min-height:44px;font-size:11px}.feedback{font-size:13px;line-height:1.5;margin-top:10px}.explanation{font-size:13px}.primary{min-height:49px;margin-top:12px}.arena footer{font-size:10px;line-height:1.5}.arena footer .text-button{min-height:44px;font-size:11px}
 body[data-game-phase=ready] .keypad,body[data-game-phase=ready] .answer-wrap,body[data-game-phase=ready] .help-row{display:none}body[data-game-phase=ready] .instruction{font-size:13px}body[data-game-phase=ready] .math-panel{padding:18px}body[data-game-phase=playing] .football{display:none}body[data-game-phase=feedback] .keypad,body[data-game-phase=feedback] .answer-wrap,body[data-game-phase=feedback] .help-row{display:none}body[data-game-phase=result] .play-grid{display:none}body[data-game-phase=feedback] .football .difficulty,body[data-game-phase=feedback] .football .coach,body[data-game-phase=feedback] .football .field-head{display:none}body[data-game-phase=feedback] .goal-scene{display:block;height:105px;margin:0 auto}.goal-banner{font-size:35px}.football .trophy{display:none}
}
@media(max-width:380px) and (max-height:700px){.arena{padding:8px}.top .brand h1{font-size:23px}.toolbar{margin:8px 0}.toolbar select{max-width:164px}.toolbar .quiet{padding:8px}.match-score{margin-bottom:9px}.math-panel{padding:12px}.math-panel h2#problem{font-size:36px}.question-head .text-button{min-height:31px}.instruction{font-size:11px}.keypad{gap:6px;margin-top:9px}.keypad button{min-height:46px}.help-row{margin-top:8px}.help-row .quiet,.help-row .text-button{min-height:41px}.feedback{font-size:12px}.difficulty small{font-size:9px}.difficulty b{font-size:11px}}
@media(max-height:500px) and (min-width:540px) and (max-width:1000px){
 .arena{display:grid;grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr);gap:8px;padding:8px;max-width:none;align-items:start}.top{grid-column:1;grid-row:1}.top .brand h1{font-size:22px}.brand small{font-size:8px}.brand-ball{font-size:25px}.career span{font-size:9px}.career strong{font-size:21px}.toolbar{grid-column:1;grid-row:2;margin:0;gap:5px}.toolbar label{font-size:0}.toolbar select{font-size:10px;max-width:155px;min-height:42px}.toolbar .quiet{font-size:10px;padding:7px;min-height:42px}.toolbar>div{gap:4px}.match-score{grid-column:1;grid-row:3;margin:0;padding:9px}.match-score strong{font-size:17px}.match-score small{font-size:8px}#shots{gap:5px}#shots li{width:12px;height:12px}.play-grid{display:contents}.football{grid-column:1;grid-row:4;padding:8px}.football .field-head,.football .goal-scene,.football .coach,.football .trophy{display:none}.football .difficulty{gap:5px}.difficulty button{min-height:48px}.difficulty b{font-size:10px}.difficulty small{font-size:8px}.math-panel{grid-column:2;grid-row:1/6;padding:10px 12px;border-radius:15px}.question-head{font-size:9px;min-height:23px}.question-head .text-button{min-height:26px;padding:3px}.math-panel h2#problem{font-size:32px;margin:5px 0 8px}.math-panel .instruction{display:none}.answer-wrap input{height:33px;font-size:26px}.answer-wrap label{font-size:10px}.answer-wrap .text-button{min-height:32px;font-size:10px}.keypad{grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin-top:8px}.keypad button{min-height:44px;font-size:21px}.keypad [data-digit="1"]{grid-area:1/1}.keypad [data-digit="2"]{grid-area:1/2}.keypad [data-digit="3"]{grid-area:1/3}.keypad [data-digit="4"]{grid-area:2/1}.keypad [data-digit="5"]{grid-area:2/2}.keypad [data-digit="6"]{grid-area:2/3}.keypad [data-digit="7"]{grid-area:3/1}.keypad [data-digit="8"]{grid-area:3/2}.keypad [data-digit="9"]{grid-area:3/3}#back{grid-area:1/4}.keypad [data-digit="0"]{grid-area:2/4}#shoot{grid-area:3/4;font-size:14px}.help-row{margin-top:5px}.help-row .quiet,.help-row .text-button{min-height:32px;font-size:10px}.feedback{font-size:11px;line-height:1.4;margin-top:6px;min-height:0}.explanation{font-size:11px;padding:9px}.primary{min-height:44px;margin-top:8px}.arena footer{grid-column:1;grid-row:5;margin:0;font-size:9px;display:block}.arena footer .text-button{font-size:10px;padding:4px;min-height:30px}.result{grid-column:2;grid-row:1/6;margin:0;padding:20px}.result h2{font-size:27px}body[data-game-phase=result] .play-grid{display:none}body[data-game-phase=feedback] .keypad,body[data-game-phase=feedback] .answer-wrap,body[data-game-phase=feedback] .help-row,body[data-game-phase=ready] .keypad,body[data-game-phase=ready] .answer-wrap,body[data-game-phase=ready] .help-row{display:none}
}

@media(max-width:700px),(max-height:500px) and (max-width:1000px){.toolbar select{font-size:16px}}
