:root{--ink:#073d2c;--green:#08553c;--mint:#e9f4e9;--orange:#f5790b;--red:#d7353f;--blue:#2166be;--line:#b8d1bf;font-family:ui-rounded,"Arial Rounded MT Bold","Trebuchet MS",Arial,sans-serif;color:var(--ink);background:#f5faf5;font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,select{font:inherit;color:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:disabled{cursor:default}button:focus-visible,select:focus-visible{outline:4px solid #073d2c;outline-offset:4px}button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round;flex:none}button{border:0}button[hidden],[hidden]{display:none!important}
.game{min-height:100dvh;padding:13px 26px 10px;background:linear-gradient(155deg,#fffaf0,#e8f3e6 70%);display:flex;flex-direction:column;gap:10px}
.game-header{display:flex;justify-content:center;align-items:center;position:relative;min-height:79px}.title{text-align:center;padding:0 110px}.title h1{font-size:clamp(28px,3.7vw,51px);font-weight:900;letter-spacing:-1.8px;margin:0;line-height:1.1}.title p{font-size:clamp(13px,1.55vw,20px);font-weight:700;margin:8px 0 0}.tools{position:absolute;right:0;top:5px;display:flex;gap:8px}.icon-button{border:1.5px solid var(--line);border-radius:13px;width:45px;height:45px;background:#fffffff2;display:grid;place-items:center}.icon-button:hover{background:var(--mint)}
.settings{background:#fffffff0;border:1.5px solid var(--line);padding:12px 15px;border-radius:19px;display:flex;align-items:center;gap:18px}.mode-select{display:flex;border:1.5px solid var(--line);border-radius:13px;padding:3px;background:#fff}.mode-select button{padding:12px 20px;border-radius:9px;background:transparent;font-size:16px;font-weight:800;white-space:nowrap}.mode-select button[aria-pressed=true]{background:var(--ink);color:#fff}.mode-select button:disabled{opacity:.65}.mode-select button[aria-pressed=true]:disabled{opacity:1}.level-select{display:flex;align-items:center;gap:10px;margin-left:auto;font-size:15px;font-weight:800}.level-select select{appearance:auto;background:white;border:1.5px solid var(--line);border-radius:11px;padding:13px 12px;font-weight:800;min-width:155px}.primary{display:inline-flex;align-items:center;justify-content:center;gap:15px;background:var(--orange);border:1.5px solid #d45a00;border-radius:12px;padding:13px 23px;font-size:18px;color:#fff;font-weight:800;box-shadow:0 3px 0 #c65a08}.primary:hover{background:#df6800}.primary:disabled{opacity:.5}.start-button{min-width:173px;white-space:nowrap}
.courts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex:1}.practice .courts{grid-template-columns:1fr}.court{min-width:0;overflow:hidden;border:1.5px solid var(--line);border-radius:18px;background:#f4f9ed;position:relative}.red{--team:var(--red)}.blue{--team:var(--blue)}.solo{--team:var(--green)}.scoreboard{display:flex;align-items:center;gap:7px;background:var(--team);color:white;padding:10px 12px;min-height:67px}.scoreboard h2{font-size:clamp(18px,2.4vw,30px);font-weight:900;letter-spacing:-.5px;margin:0 auto 0 0}.stat{color:var(--ink);background:#ffffffeb;padding:5px 10px;min-width:64px;text-align:center;border-radius:9px;line-height:1.1}.stat strong{display:block;font-size:25px;letter-spacing:-.8px;font-variant-numeric:tabular-nums}.stat span{display:block;font-size:11px;margin-top:3px;white-space:nowrap}.stat .timer{font-size:21px}.shot-count{white-space:nowrap;border-radius:8px;padding:11px 8px;background:#ffffffed;color:var(--ink);font-size:14px;font-weight:800}
.court-body{position:relative;padding:18px 18px 10px;display:flex;flex-direction:column;min-height:445px}.question-row{display:grid;grid-template-columns:minmax(0,1fr) 25%;align-items:center;gap:12px;min-height:225px}.question-card{background:#fffffff7;border:1.5px solid #c7d5b6;border-radius:15px;padding:14px 12px;min-width:0;box-shadow:0 4px 14px #073d2c09;align-self:stretch;display:flex;flex-direction:column}.question-card h3{font-size:clamp(16px,1.8vw,22px);font-weight:800;text-align:center;margin:0 0 12px;line-height:1.25}.hoop-zone{position:relative;align-self:stretch;display:flex;align-items:flex-end;justify-content:center}.hoop{width:100%;height:100%;max-height:235px;object-fit:contain;user-select:none}.basket-flash{position:absolute;top:30%;font-size:37px;font-weight:900;color:#fff;text-shadow:0 2px 2px var(--ink);opacity:0}.scored .basket-flash{animation:flash .9s .5s both}.scored .hoop{animation:swish .6s .65s}.rimmed .hoop{animation:rim .4s .65s}.blocks{display:flex;justify-content:center;align-items:stretch;gap:18px;flex:1;min-height:126px;--unit:12px}.block-group{display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:12px;min-width:0}.block-pieces{display:flex;flex-wrap:wrap;justify-content:center;gap:5px;align-content:center;align-items:center;flex:1}.rod-group .block-pieces{flex-wrap:nowrap;gap:4px}.cube-group .block-pieces{display:grid;grid-template-columns:repeat(3,var(--unit));gap:7px}.block{display:block;flex:none;overflow:visible}.block>svg{display:block;width:100%;height:100%;overflow:visible}.block>svg path{vector-effect:non-scaling-stroke}.rod{width:var(--unit);height:calc(var(--unit) * 10)}.cube{width:var(--unit);height:var(--unit)}.flat{width:calc(var(--unit) * 10);height:calc(var(--unit) * 10)}.flat-group .block-pieces{display:grid;grid-template-columns:repeat(3,max-content);gap:7px}.with-hundreds{--unit:5px;gap:10px}.with-hundreds .rod-group .block-pieces{display:grid;grid-template-columns:repeat(5,var(--unit));gap:7px}.with-hundreds .cube-group .block-pieces{gap:8px}.with-hundreds .rod{height:50px}.with-hundreds .flat{width:50px;height:50px}.place-label{font-size:12px;font-weight:800;color:#5d715c}.with-hint .place-label{color:var(--ink);background:#fff2b8;border-radius:5px;padding:4px}.empty-place{font-weight:800;font-size:22px;color:#879984}
.feedback{min-height:49px;display:flex;justify-content:center;align-items:center;gap:5px;text-align:center;flex-direction:column;padding:5px 2px;font-size:14px;font-weight:700;color:#3c5747}.feedback strong{font-size:17px}.feedback span{font-size:13px}.positive{color:#07532d}.negative{color:#8c4314}.answers{display:flex;justify-content:center;align-items:flex-end;gap:clamp(10px,2vw,30px);margin:0 auto;width:100%}.ball-button{padding:0;background:transparent;display:flex;align-items:center;flex-direction:column;position:relative;max-width:155px;width:28%;isolation:isolate}.ball{position:relative;display:block;width:100%;aspect-ratio:1;filter:drop-shadow(0 7px 4px #10462635);transition:transform .15s}.ball img{width:100%;height:100%;object-fit:contain;display:block;user-select:none}.ball strong{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);font-size:clamp(25px,4.6vw,57px);line-height:1;font-weight:900;color:#083522;letter-spacing:-1.5px;background:#ffca75df;border-radius:8px;padding:3px 7px;min-width:60%;text-align:center;text-shadow:0 1px 0 #fff8}.ball-button:not(:disabled):hover .ball{transform:translateY(-6px) rotate(-4deg)}.ball-button:not(:disabled):active .ball{transform:scale(.94)}.ball-button:disabled{opacity:1}.ball-button.missed{opacity:.38}.ball-button.answer-correct .ball{filter:drop-shadow(0 0 8px #37af42)}kbd{position:relative;z-index:1;border:1px solid #96b69c;background:#fffdf5;min-width:27px;height:27px;line-height:25px;text-align:center;font-size:15px;font-family:inherit;font-weight:800;border-radius:6px;margin-top:-10px;box-shadow:0 2px 0 #96b69c}.ball-button:focus-visible{outline-offset:5px;border-radius:50%}.panel-bottom{height:48px;display:flex;align-items:center;justify-content:center;margin-top:8px}.next-button{font-size:16px;padding:8px 24px;min-width:163px}.shot-dots{display:flex;gap:7px}.shot-dots span{width:11px;height:11px;background:#fff9;border:1.5px solid #547b61;border-radius:50%}.shot-dots .made{background:#127843;border-color:#127843}.shot-dots .miss{background:#c87538;border-color:#a8541e}.finished-label{font-size:19px;font-weight:900;background:#fffffff2;padding:7px 22px;border-radius:12px}
.practice .court-body{max-width:950px;margin:auto;padding:20px 30px 12px}.practice .question-row{grid-template-columns:minmax(0,1fr) 23%;min-height:220px;gap:30px}.practice .question-card{padding:16px 25px}.practice .blocks{--unit:14px;gap:36px}.practice .blocks.with-hundreds{--unit:7px;gap:25px}.practice .with-hundreds .rod{height:70px;width:7px}.practice .with-hundreds .flat{width:70px;height:70px}.practice .with-hundreds .flat-group .block-pieces{grid-template-columns:repeat(5,max-content)}.practice .with-hundreds .rod-group .block-pieces{grid-template-columns:repeat(9,var(--unit))}.practice .ball-button{max-width:132px}.practice .answers{gap:42px}.practice .ball strong{font-size:clamp(34px,4.5vw,54px)}.practice .scoreboard h2{margin-right:auto}.practice .scoreboard{padding-left:25px;padding-right:25px}.practice .scoreboard .stat{min-width:88px}
.game-footer{background:#f3fff0e6;border:1px solid #ccdfca;border-radius:11px;text-align:center;padding:10px;display:flex;flex-direction:column;gap:4px}.game-footer strong{font-size:14px}.game-footer span{font-size:11px;color:#48674f}.countdown{position:fixed;inset:0;background:#053c2ce8;z-index:100;display:flex;align-items:center;justify-content:center;flex-direction:column;color:white;backdrop-filter:blur(5px)}.countdown span{font-size:24px;font-weight:700}.countdown strong{font-size:170px;line-height:1.2;font-weight:900;color:#ffb23f}dialog{border:1px solid var(--line);border-radius:22px;background:white;color:var(--ink);padding:30px;width:min(420px,90vw);box-shadow:0 15px 80px #0003}dialog::backdrop{background:#083b2c80}dialog h2{margin:0;font-size:25px}dialog p{line-height:1.5}.dialog-actions{display:flex;gap:10px;justify-content:flex-end}.dialog-actions button{padding:12px 15px;border-radius:10px;font-size:15px;font-weight:700}.dialog-actions button:not(.primary){background:var(--mint)}.rotate-note{display:none}
.results{grid-column:1/-1;background:#fffffff0;border:1.5px solid var(--line);border-radius:20px;text-align:center;padding:24px;min-width:0}.result-ball{width:64px;height:64px;margin:0 auto 12px}.result-ball img{width:100%;height:100%;object-fit:contain}.results h2{font-size:clamp(26px,4vw,43px);margin:0;line-height:1.15;letter-spacing:-1px}.results>p{margin:10px 0 24px}.result-teams{display:flex;justify-content:center;gap:18px}.result-team{width:min(380px,47%);border:1.5px solid var(--line);background:white;border-radius:15px;overflow:hidden;padding-bottom:10px}.result-team h3{margin:0;padding:10px;background:var(--team);color:#fff;font-size:20px}.result-score{display:block;font-size:44px;margin:12px 0;color:var(--team)}.result-score small{font-size:16px}.result-team dl{margin:0;padding:0 18px}.result-team dl>div{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #e2ebe2;padding:12px 0;gap:10px}.result-team dt{font-size:13px;font-weight:700;text-align:left}.result-team dd{font-size:18px;font-weight:900;margin:0;white-space:nowrap;font-variant-numeric:tabular-nums}.result-team dd small{font-size:12px}.result-actions{display:flex;justify-content:center;gap:12px;margin-top:25px}.secondary{border:1.5px solid var(--line);border-radius:12px;padding:12px 20px;background:white;font-weight:800}.practice .result-team{width:min(480px,100%)}
@keyframes flash{0%{opacity:0;transform:translateY(10px)}35%{opacity:1}100%{opacity:0;transform:translateY(-50px)}}@keyframes swish{0%,100%{transform:rotate(0)}30%{transform:rotate(3deg)}65%{transform:rotate(-2deg)}}@keyframes rim{0%,100%{transform:translateX(0)}35%{transform:translateX(4px)}65%{transform:translateX(-4px)}}
@media(min-width:1300px) and (min-height:800px){.court-body{padding:22px 25px 12px}.question-row{min-height:240px}.hoop{max-height:240px}.blocks:not(.with-hundreds){--unit:16px}.with-hundreds{--unit:6px}.with-hundreds .flat{width:60px;height:60px}.with-hundreds .rod{height:60px;width:6px}.with-hundreds .flat-group .block-pieces{grid-template-columns:repeat(5,max-content)}.ball-button{max-width:145px}.practice .ball-button{max-width:140px}}
@media(max-width:1000px){.game{padding:14px;gap:11px}.settings{gap:10px;padding:10px}.mode-select button{font-size:14px;padding:10px 12px}.level-select{font-size:13px;gap:6px}.level-select select{min-width:130px;padding:11px 7px;font-size:14px}.start-button{min-width:130px;padding:11px 12px;font-size:16px}.scoreboard{padding:8px;gap:5px}.scoreboard h2{font-size:21px}.stat{min-width:48px;padding:4px 7px}.stat strong{font-size:23px}.stat .timer{font-size:17px}.stat span{font-size:10px}.shot-count{font-size:11px;padding:11px 5px}.court-body{padding:12px 10px 6px}.question-row{gap:7px;grid-template-columns:minmax(0,1fr) 23%}.question-card{padding:12px 8px}.question-card h3{font-size:16px}.with-hundreds{--unit:4px;gap:8px}.with-hundreds .flat{width:40px;height:40px}.with-hundreds .rod{height:40px;width:4px}.with-hundreds .rod-group .block-pieces{gap:4px;grid-template-columns:repeat(3,var(--unit))}.flat-group .block-pieces{gap:5px}.with-hundreds .cube-group .block-pieces{gap:6px}.place-label{font-size:10px}.feedback{min-height:58px}.feedback span{font-size:12px}.practice .question-card h3{font-size:21px}}
@media(max-width:679px){.game{padding:12px;gap:12px;background-attachment:scroll}.game-header{min-height:88px;align-items:flex-start;justify-content:flex-start}.title{text-align:left;padding:3px 0 0;width:calc(100% - 76px)}.title h1{font-size:29px;letter-spacing:-1.2px;max-width:260px}.title p{font-size:12px;line-height:1.4;max-width:240px}.tools{gap:5px;top:3px}.icon-button{width:33px;height:36px;border-radius:9px}.icon-button svg{width:18px;height:18px}.settings{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;padding:10px}.mode-select{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr}.mode-select button{font-size:13px;padding:10px 5px}.level-select{margin:0;gap:8px;font-size:12px}.level-select select{width:100%;min-width:0;padding:11px 4px;font-size:13px}.start-button{min-width:0;gap:8px;font-size:14px;padding:11px 10px}.start-button svg{width:17px}.practice .scoreboard{padding:10px}.practice .scoreboard h2{font-size:18px;letter-spacing:-.5px}.practice .scoreboard .stat{min-width:46px}.practice .court-body{padding:13px 10px 7px}.practice .question-row{grid-template-columns:minmax(0,1fr) 22%;gap:10px;min-height:215px}.practice .question-card{padding:13px 9px}.practice .question-card h3{font-size:16px}.practice .blocks{--unit:10px;gap:15px}.practice .blocks.with-hundreds{--unit:3px;gap:9px}.practice .with-hundreds .flat{width:30px;height:30px}.practice .with-hundreds .flat-group .block-pieces{grid-template-columns:repeat(3,max-content);gap:5px}.practice .with-hundreds .rod{width:4px;height:40px}.practice .with-hundreds .rod-group .block-pieces{grid-template-columns:repeat(3,4px);gap:5px}.practice .with-hundreds .cube-group .block-pieces{gap:6px;grid-template-columns:repeat(3,4px)}.practice .with-hundreds .cube{width:4px;height:4px}.practice .answers{gap:13px}.practice .ball-button{width:29%;max-width:105px}.practice .ball strong{font-size:32px;letter-spacing:-1px;padding:3px 4px}.practice .court-body{min-height:410px}.game-footer{padding:9px 7px}.game-footer strong{font-size:12px;line-height:1.4}.game-footer span{font-size:10px;line-height:1.4}.needs-landscape .courts,.needs-landscape .game-footer{display:none}.needs-landscape .rotate-note{display:block;text-align:center;background:#fffffff0;border:1px solid var(--line);border-radius:15px;padding:45px 22px;min-height:270px}.rotate-note strong{font-size:25px}.rotate-note p{line-height:1.6}.rotate-note button{padding:12px 20px;background:var(--green);border-radius:10px;color:white;font-weight:700}.needs-landscape .countdown{display:none}.results{padding:20px 12px}.result-team dl{padding:0 12px}.result-actions{flex-wrap:wrap}.result-actions .primary,.result-actions .secondary{font-size:15px;padding:12px 15px}}
@media(min-width:680px) and (max-height:550px){.game{padding:8px 12px;gap:8px}.game-header{min-height:46px}.title h1{font-size:27px;letter-spacing:-1px}.title p{font-size:11px;margin-top:3px}.tools{top:0}.icon-button{width:34px;height:34px;border-radius:9px}.icon-button svg{width:18px;height:18px}.settings{padding:5px 8px;border-radius:12px;gap:8px}.mode-select button{padding:7px 12px;font-size:12px}.level-select{font-size:12px}.level-select select{padding:7px;font-size:12px}.start-button{padding:7px 12px;font-size:13px;min-width:110px}.scoreboard{min-height:45px;padding:5px 8px}.scoreboard h2{font-size:18px}.stat{padding:3px 8px}.stat strong{font-size:18px}.stat .timer{font-size:16px}.stat span{font-size:8px}.shot-count{font-size:10px;padding:8px 6px}.court-body,.practice .court-body{padding:8px;min-height:270px}.question-row,.practice .question-row{min-height:125px;height:125px;gap:9px;grid-template-columns:minmax(0,1fr) 20%}.question-card,.practice .question-card{padding:8px}.question-card h3,.practice .question-card h3{font-size:14px;margin-bottom:7px}.blocks,.practice .blocks{--unit:7px;min-height:65px;gap:16px}.blocks.with-hundreds,.practice .blocks.with-hundreds{--unit:3px;gap:9px}.with-hundreds .flat,.practice .with-hundreds .flat{width:25px;height:25px}.with-hundreds .rod,.practice .with-hundreds .rod{width:4px;height:30px}.with-hundreds .flat-group .block-pieces,.practice .with-hundreds .flat-group .block-pieces{grid-template-columns:repeat(5,max-content);gap:4px}.with-hundreds .rod-group .block-pieces,.practice .with-hundreds .rod-group .block-pieces{grid-template-columns:repeat(5,4px);gap:4px}.place-label{font-size:9px}.block-group{gap:5px}.feedback{min-height:35px;padding:2px;font-size:11px;gap:2px}.feedback strong{font-size:13px}.feedback span{font-size:10px}.ball-button,.practice .ball-button{max-width:75px}.ball strong,.practice .ball strong{font-size:26px}.answers,.practice .answers{gap:30px}.panel-bottom{height:25px;margin-top:6px}.next-button{padding:4px 15px;font-size:12px;min-width:130px}.shot-dots span{width:8px;height:8px}.game-footer{padding:6px;gap:2px}.game-footer strong{font-size:11px}.game-footer span{font-size:9px}kbd{width:21px;height:21px;min-width:21px;font-size:12px;line-height:19px}.results{padding:13px}.result-ball{width:35px;height:35px;margin-bottom:5px}.results h2{font-size:26px}.results>p{margin:6px 0 12px;font-size:12px}.result-score{font-size:29px;margin:7px}.result-team h3{padding:6px;font-size:15px}.result-team dl>div{padding:7px 0}.result-team dt{font-size:11px}.result-team dd{font-size:14px}.result-actions{margin-top:13px}.result-actions button{padding:8px 15px;font-size:14px}}
@media(min-width:680px) and (max-width:1299px) and (min-height:800px){
  .practice .blocks.with-hundreds{--unit:5px;gap:15px}
  .practice .with-hundreds .flat{width:50px;height:50px}
  .practice .with-hundreds .rod{width:5px;height:50px}
  .practice .with-hundreds .flat-group .block-pieces{grid-template-columns:repeat(3,max-content)}
  .practice .with-hundreds .rod-group .block-pieces{grid-template-columns:repeat(3,5px);gap:5px}
}
@media(min-width:680px) and (min-height:551px) and (max-height:799px){
  .game{padding:12px 16px;gap:9px}
  .game-header{min-height:58px}
  .title h1{font-size:36px;letter-spacing:-1px}
  .title p{font-size:14px;margin-top:5px}
  .settings{padding:8px 12px}
  .mode-select button{padding:9px 14px;font-size:14px}
  .level-select select{padding:10px}
  .primary.start-button{padding:10px 16px;font-size:16px}
  .scoreboard{min-height:57px;padding:7px 12px}
  .scoreboard h2{font-size:24px}
  .stat strong{font-size:21px}
  .stat .timer{font-size:18px}
  .court-body,.practice .court-body{padding:12px 16px 8px;min-height:350px}
  .question-row,.practice .question-row{min-height:160px}
  .question-card,.practice .question-card{padding:10px 12px}
  .question-card h3,.practice .question-card h3{font-size:17px;margin-bottom:8px}
  .blocks,.practice .blocks{--unit:9px;min-height:90px}
  .with-hundreds,.practice .blocks.with-hundreds{--unit:3px;gap:10px}
  .with-hundreds .flat,.practice .with-hundreds .flat{width:30px;height:30px}
  .with-hundreds .rod,.practice .with-hundreds .rod{width:4px;height:40px}
  .practice .with-hundreds .flat-group .block-pieces{grid-template-columns:repeat(5,max-content)}
  .with-hundreds .rod-group .block-pieces,.practice .with-hundreds .rod-group .block-pieces{grid-template-columns:repeat(5,4px);gap:5px}
  .ball-button,.practice .ball-button{max-width:105px}
  .ball strong,.practice .ball strong{font-size:39px}
  .feedback{min-height:43px}
  .panel-bottom{height:34px;margin-top:6px}
  .next-button{padding:6px 20px;font-size:14px}
  .game-footer{padding:8px}
  .game-footer strong{font-size:12px}
}
@media(min-width:680px) and (max-height:550px){
  .game.race{padding:6px 12px;gap:5px}
  .race .game-header{min-height:0;height:0}
  .race .title{display:none}
  .race .tools{position:fixed;top:auto;right:14px;bottom:7px;z-index:10}
  .race .tools .icon-button{width:28px;height:28px}
  .race .court-body{padding:6px;min-height:0}
  .race .question-row{height:98px;min-height:98px;grid-template-rows:minmax(0,1fr)}
  .race .hoop-zone{min-height:0;max-height:98px}
  .race .hoop{max-height:98px}
  .race .question-card{padding:5px 6px;min-height:0}
  .race .question-card h3{font-size:12px;margin-bottom:4px}
  .race .blocks{--unit:5px;height:68px;min-height:0;flex:none}
  .race .block-pieces{min-height:0}
  .race .blocks.with-hundreds{--unit:3px;gap:7px}
  .race .block-group{gap:3px}
  .race .feedback{min-height:29px;gap:1px}
  .race .feedback strong{font-size:12px}
  .race .feedback span{font-size:10px}
  .race .ball-button{max-width:60px}
  .race .ball strong{font-size:23px;padding:2px 3px}
  .race .panel-bottom{height:14px;margin-top:4px}
  .race .game-footer{padding:7px 90px 7px 7px;min-height:28px}
  .race .game-footer strong{font-size:10px}
  .race .game-footer span{display:none}
}
.practice .is-shooting .feedback,.practice .is-shooting .auto-next{visibility:hidden}
.auto-next{font-size:14px;font-weight:700;color:var(--green)}
.is-shooting .flying-source .ball{opacity:0}
.next-button:disabled{cursor:default}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}.scored .basket-flash{opacity:1}}

/* Court, stand, basket, net and shot share one 3D camera at every size. */
.court-body{isolation:isolate;background:#e8eedc}
.practice .court-body{max-width:none}
.question-row,.practice .question-row{grid-template-columns:minmax(0,1fr) 32%}
.hoop-zone{position:static;min-width:0}
.basket-scene{position:absolute;inset:0;pointer-events:none;z-index:0}
.court-3d{display:block;width:100%;height:100%}
.shot-3d{position:fixed;inset:0;width:100%;height:100%;z-index:1;pointer-events:none}
.basket-scene .basket-flash{transform:translate(-50%,-50%);line-height:1;white-space:nowrap}
.question-card,.feedback,.answers,.panel-bottom{position:relative;z-index:2}
.feedback{background:#fffbeddb;align-self:center;border-radius:10px;padding-inline:12px;max-width:100%}
@media(max-width:679px){
 .practice .question-row{display:flex;flex-direction:column;gap:12px}
 .practice .question-card{width:100%;min-height:215px}
 .practice .hoop-zone{position:relative;width:100%;height:230px;flex:none;border-radius:12px;overflow:hidden}
}
@media(min-width:680px) and (max-height:550px){
 .question-row,.practice .question-row{grid-template-columns:minmax(0,1fr) 32%}
 .race .hoop-zone{max-height:none}
}

/* Keep the question readable without stretching its empty sides across court. */
.game-actions{display:flex;justify-content:flex-end}
.arithmetic-card{justify-content:center}
.math-equation{font-size:clamp(32px,5vw,58px);font-weight:900;text-align:center;line-height:1.3;white-space:nowrap;padding:12px 0;font-variant-numeric:tabular-nums}
.math-equation>span{color:#62836e}
.math-model,.math-exchange{display:flex;align-items:center;justify-content:center;gap:16px;--unit:5px;margin-top:6px}
.math-symbol{font-size:25px;font-weight:800;color:#62836e}
.math-operand,.exchange-group{display:flex;flex-direction:column;align-items:center;gap:7px;font-size:12px;font-weight:800}
.math-pieces{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;max-width:140px;min-height:44px}
.math-pieces .rod,.exchange-group>.rod{width:5px;height:50px}
.math-pieces .flat{width:50px;height:50px}
.math-pieces .cube,.exchange-cubes .cube{width:5px;height:5px}
.exchange-cubes{display:grid;grid-template-columns:repeat(5,5px);gap:5px;padding:10px}
.math-zero{font-size:25px;color:#78917d}
.race .math-equation{font-size:clamp(23px,4vw,36px)}
.race .math-model,.race .math-exchange{gap:10px}
@media(max-width:679px){.math-equation{font-size:36px}.math-model,.math-exchange{gap:12px}.math-pieces{max-width:105px}.arithmetic-card{min-height:215px}}
@media(min-width:680px) and (max-height:550px){.math-equation,.race .math-equation{font-size:25px;padding:2px 0}.math-model,.math-exchange{margin-top:2px;gap:8px}.math-pieces{min-height:25px;gap:2px;max-width:88px}.math-pieces .rod,.exchange-group>.rod{height:24px;width:3px}.math-pieces .flat{height:25px;width:25px}.math-pieces .cube,.exchange-cubes .cube{width:3px;height:3px}.exchange-cubes{grid-template-columns:repeat(5,3px);gap:3px;padding:3px}.math-operand,.exchange-group{gap:2px;font-size:9px}.math-symbol{font-size:16px}.race .question-row:has(.math-model),.race .question-row:has(.math-exchange){height:auto;min-height:115px}}
.court{display:flex;flex-direction:column}
.court-body{flex:1;width:100%;justify-content:space-between}
.practice .court-body{margin:0}
#settings-form{display:flex;flex-direction:column;gap:18px}
#settings-form label{display:flex;flex-direction:column;gap:8px;font-weight:700}
#settings-form select{width:100%;padding:12px;border:1px solid var(--line);border-radius:10px;background:white}
.question-card{width:100%;max-width:400px;justify-self:center}
.practice .question-card{max-width:560px}
.practice .question-card:has(.with-hundreds){max-width:700px}
.race .question-card:has(.with-hundreds){max-width:none}
.feedback:empty{background:transparent}
.settings{flex-wrap:wrap}
.question-count-select{margin-left:0;flex-shrink:0}
.question-count-select select{min-width:66px}
.shot-dots{gap:clamp(3px,.7vw,7px);max-width:100%;flex-wrap:wrap;justify-content:center}
@media(max-width:679px){.question-count-select{grid-column:2;grid-row:2;gap:5px;font-size:11px}.question-count-select select{width:58px;min-width:58px}.settings>.start-button{grid-column:1/-1}.settings>.level-select:not(.question-count-select){grid-column:1;grid-row:2}}
@media(min-width:680px) and (max-height:550px){.question-count-select{font-size:11px;gap:5px}.question-count-select select{min-width:52px;padding:7px 5px}}

/* A finite end-of-round celebration keeps the score and replay controls clear. */
.results.is-celebrating{position:relative;isolation:isolate;overflow:hidden;background:radial-gradient(ellipse at 50% 0,#fff0bf 0,transparent 58%),linear-gradient(150deg,#fffef7,#f5fff9);border-color:#e4cb83;padding-top:30px}
.results.is-celebrating> :not(.celebration-confetti){position:relative;z-index:1}
.is-celebrating .result-ball{width:88px;height:88px;margin:0 auto 21px;display:grid;place-items:center;background:linear-gradient(140deg,#fff4bd,#e9b742);border:3px solid #ffe9a0;border-radius:50%;box-shadow:0 0 0 8px #fff3c3aa,0 8px 20px #98642320;animation:award-arrive .65s cubic-bezier(.2,.7,.25,1.2) both}
.is-celebrating .result-ball img{width:79%;height:79%;position:relative;z-index:1}
.result-ball::before,.result-ball::after{content:"";position:absolute;z-index:-1;top:67px;width:24px;height:34px;background:#e9b742;clip-path:polygon(0 0,100% 0,100% 100%,50% 78%,0 100%)}
.result-ball::before{left:15px;transform:rotate(15deg)}.result-ball::after{right:15px;transform:rotate(-15deg)}
.result-spark{position:absolute;left:-33px;top:6px;color:#dfa620;font-size:32px;animation:award-arrive .7s .15s both}.result-spark:last-child{left:auto;right:-28px;top:42px;font-size:23px}
.result-eyebrow{font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:2px;color:#85600d;margin-bottom:9px}
.is-celebrating h2{animation:result-arrive .5s .1s both}.celebration-blue h2{color:#2364b7}.celebration-red h2{color:#ce333e}
.is-celebrating>p{font-weight:700;color:#53664c;margin-bottom:25px}
.is-celebrating .result-team{animation:result-arrive .55s .2s both}
.result-team.is-winner{border:2px solid #e9bc4d;box-shadow:0 0 0 4px #ffedb46b,0 8px 24px #94713d14}
.result-award{display:inline-block;margin:12px 10px 0;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:800;color:#526749;background:#eef5e9}
.is-winner .result-award{color:#76510d;background:#fff0bc}.result-award span{color:#b77e05}
.is-celebrating .result-score{margin:9px 0 12px}
.celebration-confetti{position:absolute;inset:0;z-index:2;pointer-events:none;overflow:hidden}
.confetti-piece{position:absolute;left:var(--x);top:-18px;width:8px;height:14px;border-radius:var(--round);background:var(--confetti);opacity:0;animation:celebration-fall var(--duration) var(--delay) cubic-bezier(.2,.35,.6,.95) both;will-change:transform,opacity}
@keyframes celebration-fall{0%{opacity:0;transform:translate3d(0,-20px,0) rotate(0)}8%{opacity:1}85%{opacity:.95}100%{opacity:0;transform:translate3d(var(--drift),var(--fall),0) rotate(var(--spin))}}
@keyframes award-arrive{from{opacity:0;transform:translateY(14px) scale(.65) rotate(-10deg)}to{opacity:1;transform:translateY(0) scale(1) rotate(0)}}
@keyframes result-arrive{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:679px){.results.is-celebrating{padding:25px 12px 20px}.is-celebrating .result-ball{width:70px;height:70px}.result-ball::before,.result-ball::after{top:52px;height:29px}.result-ball::before{left:10px}.result-ball::after{right:10px}.result-eyebrow{font-size:10px;letter-spacing:1.3px}.result-award{font-size:11px}}
@media(min-width:680px) and (max-height:550px){.results.is-celebrating{padding:12px}.is-celebrating .result-ball{width:42px;height:42px;margin-bottom:13px;border-width:2px;box-shadow:0 0 0 4px #fff3c3aa}.result-ball::before,.result-ball::after{top:30px;width:13px;height:20px}.result-ball::before{left:5px}.result-ball::after{right:5px}.result-spark{font-size:20px;left:-24px;top:0}.result-spark:last-child{font-size:16px;right:-21px;top:20px}.result-eyebrow{font-size:9px;letter-spacing:1px;margin-bottom:4px}.is-celebrating>p{margin:5px 0 12px}.result-award{font-size:10px;padding:2px 9px;margin-top:7px}.is-celebrating .result-score{margin:5px 0 7px}.confetti-piece{width:6px;height:10px}}
@media(prefers-reduced-motion:reduce){.celebration-confetti{display:none}}
