.snow-page{margin:0;background:#f3f7fc;color:#15283e;font-family:system-ui,-apple-system,sans-serif}.snow-page *{box-sizing:border-box}.snow-shell{max-width:1150px;margin:auto;padding:30px 24px 12px}.snow-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.snow-label{font-size:11px;letter-spacing:2px;font-weight:800;color:#447286}.snow-heading h1{font-size:clamp(26px,4vw,40px);margin:6px 0;letter-spacing:-1.3px}.snow-heading p{margin:0;color:#53677b}.snow-badge{white-space:nowrap;font-size:12px;background:#fff0df;color:#965320;border:1px solid #f5d8b2;border-radius:30px;padding:10px 15px;font-weight:700}.snow-game{overflow:hidden;border-radius:22px;border:1px solid #cbddea;box-shadow:0 18px 50px #1c416715;background:#fff}.snow-hud{background:#142a42;color:white;display:flex;align-items:center;gap:36px;padding:15px 24px}.snow-hud>div{display:grid;gap:4px}.snow-hud span{font-size:10px;letter-spacing:1.5px;color:#afcadf;font-weight:700}.snow-hud strong{font-size:20px}.snow-hud progress{width:145px;height:6px;accent-color:#79dcc7;border:0;border-radius:10px;overflow:hidden}.snow-hud progress::-webkit-progress-bar{background:#35506b}.snow-hud progress::-webkit-progress-value{background:#79dcc7}.snow-page button{font:inherit;font-size:14px;font-weight:750;border:1px solid #cadbea;border-radius:10px;padding:11px 18px;background:#f4f8fc;color:#15283e;cursor:pointer;touch-action:manipulation}.snow-page button:hover{filter:brightness(.96)}.snow-page button:focus-visible,.snow-page canvas:focus-visible{outline:3px solid #f79d45;outline-offset:3px}.snow-page button:disabled{opacity:.5;cursor:default}.snow-hud button{margin-left:auto;background:#2c435a;border-color:#486078;color:#fff}.snow-stage{height:clamp(380px,60vh,620px);position:relative;background:#b5d5eb}.snow-stage canvas{width:100%;height:100%;display:block;touch-action:none}.snow-overlay{position:absolute;inset:0;display:grid;place-items:center;background:#d5e5f03b;backdrop-filter:blur(3px);padding:20px}.snow-overlay[hidden]{display:none}.snow-card{max-width:430px;text-align:center;background:#fffffff2;border:1px solid #fff;padding:30px;border-radius:22px;box-shadow:0 20px 60px #17395130}.snow-card h2{font-size:29px;letter-spacing:-.9px;margin:10px 0}.snow-card p{font-size:15px;line-height:1.6;color:#53677b}.snow-page .snow-primary{background:#ed8f3c;color:#182a3a;border-color:#ed8f3c;padding:14px 24px;font-size:16px;width:100%}.snow-card .snow-small{font-size:11px;margin-bottom:0}.snow-tip{position:absolute;bottom:18px;left:50%;transform:translateX(-50%);white-space:nowrap;background:#15334dc9;color:#fff;padding:9px 16px;border-radius:30px;font-size:12px;pointer-events:none}.snow-bottom{display:flex;align-items:center;gap:20px;padding:14px 24px}.snow-controls{display:flex;gap:8px}.snow-controls button{touch-action:none;user-select:none;min-width:85px}.snow-bottom p{font-size:13px;color:#52677b;margin:0;flex:1}.snow-note{font-size:12px;text-align:center;color:#60788b;margin:18px 0}.snow-footer{text-align:center;font-size:12px;color:#688399;padding:20px}.snow-page .ta-header{position:relative!important}@media(max-width:600px){.snow-shell{padding:18px 10px}.snow-heading{display:block}.snow-badge{display:inline-block;margin-top:12px}.snow-heading p{font-size:13px}.snow-hud{gap:20px;padding:12px}.snow-hud progress{width:88px}.snow-hud strong{font-size:17px}.snow-hud button{padding:8px 10px;font-size:12px}.snow-stage{height:56vh;min-height:360px;max-height:600px}.snow-card{padding:23px}.snow-bottom{padding:12px;flex-wrap:wrap;gap:12px}.snow-bottom p{order:3;flex-basis:100%;text-align:center}.snow-bottom>button{margin-left:auto}.snow-game{border-radius:16px}.snow-tip{font-size:10px}}

.snow-shop[hidden]{display:none}.snow-shop{border:0;padding:0;margin:16px 0;text-align:left}.snow-shop legend{font-weight:800;font-size:16px}.snow-card:has(.snow-shop:not([hidden])){max-width:610px}.snow-card{max-height:calc(100% - 10px);overflow-y:auto;overscroll-behavior:contain}.snow-wallet{margin:8px 0!important;font-size:13px!important}.snow-wallet span{font-size:11px}.snow-upgrade-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.snow-upgrade-grid button{text-align:left;padding:12px;background:#eef6fa}.snow-upgrade-grid strong{display:block;font-size:13px}.snow-upgrade-grid span{display:block;font-size:11px;line-height:1.5;margin-top:5px;font-weight:500}.snow-upgrade-grid button[data-owned="true"]{background:#dcf3e9;border-color:#83c7ae}.snow-shop #shop-feedback{font-size:12px;min-height:2.8em;margin:10px 0 0}.snow-gear{text-align:center;font-size:12px;color:#376a79;margin:14px 0 0}@media(max-width:400px){.snow-card{padding:16px}.snow-card h2{font-size:24px}.snow-upgrade-grid{gap:6px}.snow-upgrade-grid button{padding:9px}.snow-wallet span{display:block}}

.snow-difficulty[hidden]{display:none}.snow-difficulty{padding:0;border:0;margin:18px 0;text-align:left}.snow-difficulty legend{font-size:14px;font-weight:800}.snow-difficulty-options{display:flex;gap:8px;margin:8px 0}.snow-difficulty-options label{flex:1;background:#edf5fa;border:1px solid #c5dbe8;border-radius:10px;padding:11px 7px;font-size:13px;font-weight:700;cursor:pointer;text-align:center}.snow-difficulty-options label:has(input:checked){background:#fff0dd;border-color:#ef9e51}.snow-difficulty-options input{accent-color:#d17a2f}.snow-difficulty #difficulty-hint{font-size:12px;line-height:1.45;margin:8px 0}.snow-pattern{color:#426779;font-size:13px;text-align:center;margin:14px 0 0;font-weight:700}

.snow-abilities{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;padding:12px 12px 8px;border-bottom:1px solid #e0eaf2;background:#edf6fb}.snow-abilities button{min-height:44px;min-width:110px}.snow-abilities #snow-burst{background:#d5f2ee;border-color:#8ccfc4}.snow-abilities p{flex-basis:100%;text-align:center;font-size:11px;color:#52677b;margin:2px 0 0}@media(max-width:400px){.snow-abilities button{min-width:0;padding:11px 9px;font-size:12px}.snow-abilities #snow-burst{flex:1}}

/* The upgrade break uses the viewport rather than the canvas height. */
.snow-page:has(.snow-overlay[data-mode="between"]:not([hidden])){overflow:hidden}
.snow-overlay[data-mode="between"]{position:fixed;inset:0;z-index:10000;padding:12px;background:#142a428f;min-height:0}
.snow-overlay[data-mode="between"] .snow-card{width:min(100%,620px);max-width:620px;max-height:none;overflow:visible;padding:20px 24px}
.snow-overlay[data-mode="between"] h2{font-size:26px;margin:6px 0}
.snow-overlay[data-mode="between"] #message{margin:4px 0;font-size:13px;line-height:1.4}
.snow-overlay[data-mode="between"] .snow-shop{margin:12px 0}
.snow-overlay[data-mode="between"] .snow-wallet{margin:5px 0!important}
.snow-overlay[data-mode="between"] #shop-feedback{min-height:1.4em;line-height:1.4;margin:8px 0 0}
.snow-overlay[data-mode="between"] .snow-small{margin:8px 0 0;line-height:1.4}
.snow-overlay[data-mode="between"] button:focus{outline:3px solid #ed8f3c;outline-offset:2px}
@media(max-width:400px){
 .snow-overlay[data-mode="between"] .snow-card{padding:16px}
 .snow-overlay[data-mode="between"] h2{font-size:24px}
 .snow-overlay[data-mode="between"] .snow-wallet span{display:inline}
}
@media(max-height:600px){
 .snow-overlay[data-mode="between"]{padding:8px}
 .snow-overlay[data-mode="between"] .snow-card{padding:10px 16px}
 .snow-overlay[data-mode="between"] #eyebrow{display:none}
 .snow-overlay[data-mode="between"] h2{font-size:20px;margin:0 0 3px}
 .snow-overlay[data-mode="between"] .snow-shop{margin:6px 0}
 .snow-overlay[data-mode="between"] .snow-upgrade-grid{gap:6px}
 .snow-overlay[data-mode="between"] .snow-upgrade-grid button{padding:7px 9px}
 .snow-overlay[data-mode="between"] .snow-upgrade-grid span{margin-top:2px;font-size:10px;line-height:1.25}
 .snow-overlay[data-mode="between"] .snow-primary{padding:10px}
 .snow-overlay[data-mode="between"] #shop-feedback{font-size:11px;margin-top:5px}
 .snow-overlay[data-mode="between"] .snow-small{font-size:10px;margin-top:5px}
}

@media(max-height:420px) and (min-width:500px){.snow-overlay[data-mode="between"] .snow-upgrade-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.snow-overlay[data-mode="between"] .snow-card{width:min(100%,760px);max-width:760px}}

.snow-ability-feedback{position:absolute;top:16px;left:50%;transform:translateX(-50%);max-width:90%;width:max-content;padding:12px 18px;border-radius:12px;background:#15334de8;color:#fff;font-size:14px;font-weight:750;text-align:center;pointer-events:none;box-shadow:0 4px 18px #142a4233}.snow-ability-feedback[hidden]{display:none}.snow-ability-feedback[data-kind="burst"]{background:#08739a;border:2px solid #e4fcff}.snow-abilities #snow-burst[data-ready="true"]{background:#98e6da;border-color:#299a89;box-shadow:inset 0 0 0 1px #299a89}

/* The game is a viewport-sized workspace with one consolidated control row. */
.snow-page{height:100vh;height:100dvh;overflow:hidden}
.snow-shell{width:100%;max-width:none;height:100%;padding:10px 16px;display:grid;grid-template-rows:auto minmax(0,1fr) auto;gap:8px}
.snow-heading{margin:0;gap:12px}
.snow-heading h1{font-size:24px;letter-spacing:-.7px;margin:2px 0}
.snow-heading p,.snow-badge,.snow-note,.snow-footer{display:none}
.snow-heading .snow-label{font-size:9px;letter-spacing:1.4px}
.snow-label a{color:inherit;text-decoration:none}.snow-label a:hover{text-decoration:underline}
.snow-game{min-height:0;min-width:0;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;border-radius:16px}
.snow-hud{padding:9px 16px;gap:28px}
.snow-hud strong{font-size:18px}
.snow-hud>.snow-hud-actions{display:flex;gap:6px;margin-left:auto}
.snow-hud-actions button{margin:0;padding:8px 12px;font-size:12px;min-height:36px}
.snow-stage{height:auto;min-height:0;min-width:0;max-height:none}.snow-stage canvas{position:absolute;inset:0}
.snow-toolbar{display:flex;align-items:center;justify-content:center;gap:20px;padding:8px 12px;background:#edf6fb;border-bottom:1px solid #e0eaf2}
.snow-abilities{padding:0;border:0;background:none;gap:6px}
.snow-abilities p{font-size:10px;margin:0}
.snow-toolbar .snow-controls button{min-width:76px;padding:11px 12px}
.snow-bottom{padding:4px 12px;min-height:24px;display:block}
.snow-bottom p{text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;line-height:16px}
.snow-summary{display:flex;justify-content:center;gap:18px;min-width:0}
.snow-summary p{margin:0;font-size:11px;line-height:16px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.snow-card{padding:18px;max-width:470px}.snow-card h2{font-size:25px;margin:7px 0}.snow-card p{font-size:13px;line-height:1.4;margin:8px 0}
.snow-overlay:not([hidden]){position:fixed;inset:0;z-index:10000;padding:12px;background:#142a4275}
.snow-game:fullscreen{width:100%;height:100%;border:0;border-radius:0;background:#fff}
.snow-game:-webkit-full-screen{width:100%;height:100%;border:0;border-radius:0;background:#fff}
@media(max-width:650px){
 .snow-shell{padding:6px;gap:5px}.snow-heading{display:flex}.snow-heading h1{font-size:20px}.snow-heading .snow-label{font-size:8px}
 .snow-hud{padding:7px 9px;gap:12px}.snow-hud strong{font-size:16px}.snow-hud span{font-size:8px;letter-spacing:1px}.snow-hud progress{width:75px}
 .snow-hud-actions button{padding:7px 8px;font-size:11px}.snow-hud>.snow-hud-actions{gap:4px}
 .snow-toolbar{gap:8px;padding:6px}.snow-toolbar .snow-controls{gap:4px}.snow-toolbar .snow-controls button{min-width:44px;padding:11px 7px;font-size:11px}
 .snow-abilities button{min-width:0;font-size:11px;padding:11px 7px}.snow-abilities{flex:1;flex-wrap:nowrap;gap:4px}.snow-abilities p{display:none}.snow-abilities #snow-burst{flex:1}
 .snow-summary{gap:8px}.snow-summary p{font-size:10px}.snow-ability-feedback{font-size:12px;padding:9px 12px;top:10px}
}
@media(max-width:400px){.snow-hud-actions button{font-size:10px;padding:7px 6px}.snow-hud-actions #fullscreen{font-size:0}.snow-hud-actions #fullscreen::after{content:"Full";font-size:10px}.snow-hud progress{width:60px}.snow-hud{gap:8px}.snow-summary #gear{display:none}}
@media(max-height:500px){
 .snow-heading{display:none}.snow-shell{grid-template-rows:minmax(0,1fr) auto;padding:5px;gap:3px}.snow-hud{padding:5px 10px}.snow-hud strong{font-size:15px}.snow-hud>div{gap:1px}.snow-toolbar{padding:5px}.snow-abilities p{display:none}.snow-bottom{padding:2px 10px;min-height:20px}.snow-tip{bottom:8px;padding:5px 10px}
}

.snow-ability-feedback[data-kind="incoming"]{background:#354775;border:1px solid #adbfe9}.snow-ability-feedback[data-kind="fort"]{background:#92552b;border:1px solid #ffcca0}

.snow-bottom .snow-incoming{color:#37567f;font-weight:750}.snow-incoming[hidden]{display:none}.snow-bottom[data-warning="true"] #status{display:none}

.snow-effects{display:flex;align-items:center;gap:6px;font-size:11px;color:#37516a;white-space:nowrap}.snow-effects input{accent-color:#254d76;width:15px;height:15px}.snow-hud progress[data-hit="true"]{filter:brightness(1.6);outline:2px solid #ffc888;outline-offset:2px}
@media(max-height:500px){.snow-heading{display:flex}.snow-heading h1{font-size:16px}.snow-heading .snow-label{display:none}.snow-shell{grid-template-rows:auto minmax(0,1fr) auto}}

.gear-overlay{position:fixed;inset:0;z-index:10010;background:#142a4299;padding:12px;display:flex;align-items:center;justify-content:center}.gear-overlay[hidden],.gear-overlay [hidden]{display:none!important}.gear-card{background:#f6fbff;color:#19394f;border-radius:20px;padding:20px;width:min(760px,100%);max-height:calc(100dvh - 24px);overflow:auto;box-shadow:0 18px 70px #10283f55}.gear-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.gear-heading h2{margin:4px 0;font-size:26px}.gear-heading>strong{background:#ffe5b8;padding:9px 12px;border-radius:12px;white-space:nowrap}.gear-card button{font:inherit;cursor:pointer;border:1px solid #bdd0df;border-radius:10px;background:#fff;color:#19394f;padding:10px}.gear-card button:disabled{opacity:.5;cursor:default}.gear-card button:focus{outline:3px solid #ed8f3c;outline-offset:2px}.gear-tabs,.gear-supplies,.gear-actions{display:flex;gap:8px}.gear-tabs button{flex:1;font-size:12px}.gear-tabs button[aria-pressed="true"]{background:#254d76;color:white}.gear-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}.gear-grid button{text-align:left;min-height:78px}.gear-grid strong,.gear-grid span{display:block}.gear-grid strong{font-size:13px}.gear-grid span{font-size:11px;line-height:1.4;margin-top:5px}.gear-grid button[data-equipped="true"]{border:2px solid #299a89;background:#e5f8f0}.gear-supplies button{flex:1;font-size:12px}.gear-actions button{flex:1}.gear-card .snow-primary{background:#ef984e;border-color:#ef984e;font-weight:750}.gear-card p{font-size:12px;line-height:1.4;margin:8px 0}.gear-help,.gear-set-label{color:#536c80}.gear-help{text-align:center;font-size:10px!important}#gear-feedback{min-height:1.4em}#review-prompt{font-size:21px;line-height:1.4;margin:12px 0}.review-choices{display:grid;grid-template-columns:1fr 1fr;gap:10px}.review-choices button{min-height:54px;text-align:left}.review-choices button[data-result="correct"]{background:#d9f4e6;border-color:#299a89}.review-choices button[data-result="wrong"]{background:#ffe8d5;border-color:#da9051}#review-feedback{min-height:2.8em}#review-next{width:100%}.snow-hud-actions #snow-gear{background:#ffe5b8;color:#19394f}.snow-hud-actions #snow-gear:disabled{opacity:.5}
@media(max-width:650px){.snow-hud{flex-wrap:wrap}.snow-hud>.snow-hud-actions{gap:4px}.snow-hud-actions #snow-gear{font-size:10px;padding:7px 6px}.gear-card{padding:14px}.gear-heading h2{font-size:21px}.gear-heading>strong{font-size:12px}.gear-grid{grid-template-columns:1fr 1fr}.gear-actions{flex-wrap:wrap}.gear-actions button{min-width:140px}.review-choices{grid-template-columns:1fr}#review-prompt{font-size:18px}}
@media(max-height:620px) and (min-width:651px){.gear-card{padding:12px 18px}.gear-heading h2{font-size:21px}.gear-card p{margin:5px 0}.gear-grid button{min-height:64px;padding:7px}.gear-grid{margin:7px 0}.gear-card button{padding:8px}}

.snow-hud-actions #snow-gear[data-help="true"]{border:2px solid #ef984e;background:#fff0d5;box-shadow:0 0 0 2px #ef984e33}

#topic-choice{width:100%;font:inherit;font-size:14px;border:1px solid #c5dbe8;border-radius:10px;padding:10px;background:#fff;color:#19394f}#topic-picker[hidden],#topic-retry[hidden]{display:none!important}#topic-status{font-size:12px;line-height:1.4;margin:6px 0}.snow-overlay .snow-card{max-height:calc(100dvh - 24px)}
