.chemy-court{position:relative;flex:0 0 auto;width:100%;height:104px;height:clamp(78px,13vh,112px);margin:0 0 4px;pointer-events:none;isolation:isolate;overflow:hidden;z-index:2}
.court-art{display:block;width:100%;height:100%;overflow:hidden}
.court-mascot{pointer-events:none}
#game .game-mid{isolation:isolate}
#game .card-stack{z-index:1}
.court-chemy{transform-box:fill-box;transform-origin:center bottom}
.court-chemy.shooting{animation:court-release .35s cubic-bezier(.25,.7,.3,1) both}
.court-chemy .chemy-scene{width:100%!important;height:100%;animation:none}
.court-chemy .chemy-scene:before,.court-chemy .chemy-scene:after{display:none}
.court-chemy .chemy{width:100%;height:100%;object-fit:contain;animation:none!important}
.court-net{transform-origin:0 0;transform-box:view-box}
.court-callout{opacity:0;visibility:hidden;pointer-events:none}
.court-feedback{font-family:inherit;font-size:20px;font-weight:800;letter-spacing:.2px;fill:#173142}
.callout-panel{fill:#fff5c5;stroke:#d4a12a}
.callout-spark{stroke:#ffc83e}.callout-confetti{stroke:#25bba9}
.made-shot .court-callout,.missed-shot .court-callout{opacity:1;visibility:visible}
.made-shot .court-callout-motion{animation:court-swish-pop .65s cubic-bezier(.2,.8,.25,1) both}
.missed-shot .court-callout-motion{animation:court-rim-wobble .65s ease-out both}
.missed-shot .callout-panel{fill:#fff0f2;stroke:#e68b98}
.missed-shot .court-feedback{fill:#9c3a50}
.missed-shot .callout-spark{stroke:#f08369}.missed-shot .callout-confetti{display:none}
@keyframes court-swish-pop{0%{opacity:0;transform:translateY(8px) scale(.65) rotate(-7deg)}25%{opacity:1;transform:translateY(-3px) scale(1.08) rotate(2deg)}45%,78%{opacity:1;transform:translateY(0) scale(1) rotate(-2deg)}100%{opacity:0;transform:translateY(-8px) scale(.97) rotate(-2deg)}}
@keyframes court-rim-wobble{0%{opacity:0;transform:translateY(6px) scale(.8) rotate(4deg)}22%{opacity:1;transform:translateX(-4px) scale(1.03) rotate(-3deg)}38%{transform:translateX(3px) rotate(2deg)}52%,80%{opacity:1;transform:translateX(0) scale(1) rotate(0)}100%{opacity:0;transform:translateY(5px) scale(.96)}}
@media(prefers-reduced-motion:reduce){.court-callout-motion{animation:none!important;transform:none!important}.callout-confetti,.callout-spark{display:none}}
@keyframes court-release{0%{transform:translateY(0) rotate(0)}22%{transform:translateY(3px) rotate(3deg)}48%{transform:translateY(-7px) rotate(-7deg)}75%{transform:translateY(-4px) rotate(-3deg)}100%{transform:translateY(0) rotate(0)}}
#game .card-stack{margin-top:4px}
#game .card.wrong{animation:none}
#game .bubble{position:absolute;top:4px;left:110px;max-width:210px;font-size:12px}
@media(max-width:380px){.chemy-court{height:84px}}
@media(max-height:600px){.chemy-court{height:70px}}
@media(max-height:500px) and (min-width:500px){.chemy-court{height:58px;margin:0}.court-art{max-width:300px;margin:auto}}
@media(prefers-reduced-motion:reduce){.court-chemy,.court-net,.court-feedback{animation:none!important;transition:none!important;transform:none!important}}

/* One centered play area on phones, tablets, and desktop screens. */
#game{justify-content:center}
#game .hud,#game .timebar{flex-shrink:0}
#game .game-mid{flex:0 1 620px}
/* A short, bounded burst stays at the hoop and never covers the question or controls. */
.court-impact{pointer-events:none;stroke:#16966e}
.court-impact .impact-rays{stroke:#f3b52f}
.court-impact .impact-center{fill:#edfdf5;fill-opacity:.96}
.court-impact .impact-cross{display:none}
.court-impact[data-result="incorrect"]{stroke:#db4658}
.court-impact[data-result="incorrect"] .impact-rays{stroke:#f78c52}
.court-impact[data-result="incorrect"] .impact-center{fill:#fff2f3}
.court-impact[data-result="incorrect"] .impact-check{display:none}
.court-impact[data-result="incorrect"] .impact-cross{display:block}
@media(prefers-reduced-motion:reduce){.court-impact{visibility:hidden}}
/* Glass lives stay legible in both themes, including an unambiguous empty state. */
.life{overflow:visible}
.life .life-glass{fill:#eaf7ff;fill-opacity:.18;stroke:#839fb7;stroke-width:1.4}
.life .life-liquid{fill:#f04d63;stroke:#d72e4e;stroke-width:.6}
.life .life-shine{stroke:#fff;stroke-width:1.3;stroke-linecap:round;opacity:.85}
.life .life-bubble{fill:#fff;opacity:.8}
.life.lost{animation:life-empty .5s ease-out forwards;filter:none}
.life.lost .life-liquid,.life.lost .life-bubble{opacity:0;transition:opacity .25s}
.life.lost .life-glass{fill-opacity:.06;stroke-opacity:.5}
.life.lost .life-shine{opacity:.2}
@keyframes life-empty{0%{transform:scale(1)}30%{transform:translateY(-2px) rotate(-8deg)}65%{transform:rotate(5deg)}100%{transform:none}}
@media(prefers-reduced-motion:reduce){.life.lost{animation:none}.life.lost .life-liquid,.life.lost .life-bubble{transition:none}}
