/* Shared child-facing hierarchy and response panels. */
.task-header{align-items:flex-start;gap:16px}.task-header>div{min-width:0;flex:1}.task-header .game-instruction,.game-instruction{font-size:16px;font-weight:600;line-height:1.6;color:#476657;margin:8px 0}.task-header h1.game-question,.game-question{font-size:clamp(24px,2.6vw,34px);font-weight:900;line-height:1.65;color:#163f34;background:#fff8d6;border:3px solid #dcaf45;border-radius:18px;padding:18px 22px;margin:12px 0;letter-spacing:.025em;overflow-wrap:anywhere}.game-question .letter-prompt{font-size:clamp(30px,3.8vw,44px);line-height:1.5;color:#214f75}.game-question small{display:block;font-size:18px}.task-header .round-reward-rule{font-size:13px;margin-bottom:7px}.task-header .eyebrow{font-size:14px}.listen{flex-shrink:0}.game-top>.quiet,.water-bar [data-water=exit]{min-height:48px;white-space:nowrap}.drill-room>.game-top h1{font-size:24px}.drill-question{margin:20px 0 8px}.drill-instruction{font-size:19px}.question-rescue .water-heading{border-bottom:0;gap:18px;padding:20px;background:#fff8d6;border:3px solid #dcaf45;border-radius:18px;margin:12px}.water-heading h1{font-size:clamp(25px,3vw,38px);line-height:1.5;color:#163f34}.water-heading p{font-size:17px;line-height:1.6}.water-expression{font-size:clamp(27px,3vw,38px)}.water-bar>span{margin-right:auto}.water-bar{gap:10px}.water-bar>button{flex:0 0 auto}.water-bar small{display:block}.diner>small{font-size:16px;line-height:1.5}.plate-actions{gap:8px}.plate-actions button{font-size:18px;min-height:50px}.drill-choices button span{font-size:17px;line-height:1.5}.drill-feedback{font-size:19px;line-height:1.7}.hint-row .feedback{font-size:18px;line-height:1.65}
dialog.child-answer-dialog,dialog.retry-dialog.child-answer-dialog{width:min(760px,calc(100vw - 28px));max-height:calc(100dvh - 32px);padding:26px;border:3px solid #ddb453;border-radius:24px;overflow:auto;background:#fffdf1;color:#173f35;text-align:center;box-sizing:border-box}dialog.child-answer-dialog::backdrop{background:#153a35a6;backdrop-filter:blur(3px)}dialog.child-answer-dialog h2{font-size:clamp(29px,4vw,38px);margin:6px 0 12px;line-height:1.4}dialog.child-answer-dialog p,dialog.child-answer-dialog #mistake-reason{font-size:clamp(20px,2.3vw,25px);line-height:1.75;margin:12px 0;color:#284e40}dialog.child-answer-dialog .retry-reassurance{font-size:18px}dialog.child-answer-dialog button{font-size:22px;min-height:58px;min-width:180px;margin-top:16px}.answer-symbol,.child-answer-dialog .retry-icon{font-size:37px;color:#92671d;background:#fff0b6;width:62px;height:62px;border-radius:50%;display:grid;place-items:center;margin:0 auto}.answer-correct .answer-symbol{background:#d4efc5;color:#287342}.answer-correct{border-color:#73ac66!important}.math-explanation{background:#f2f7e7;border:2px solid #b6d0a4;border-radius:18px;padding:15px;margin:16px 0}.math-equation{font-size:clamp(24px,3vw,33px);font-weight:900;line-height:1.7;color:#205c50}.math-row{display:flex;justify-content:center;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0}.math-row>b{font-size:28px}.quantity{background:white;border:2px solid #bfceb5;border-radius:12px;padding:8px;flex:0 1 150px;min-width:70px}.quantity-label{display:block;font-size:17px;font-weight:800}.quantity-blocks{display:flex;flex-wrap:wrap;justify-content:center;gap:4px;max-width:160px;margin:8px auto;min-height:18px}.quantity-block{display:inline-flex;align-items:center;justify-content:center;font-style:normal;background:#e6a642;border:1px solid #996823;width:13px;height:13px;border-radius:50%;color:#1c483b;font-size:14px;font-weight:800}.unit-10{width:30px;height:18px;border-radius:4px;background:#8ccabf}.unit-100{width:33px;height:30px;border-radius:4px;background:#b3c6eb}.taken-away{background:#fff5e8}.taken-away .quantity-block{position:relative;opacity:.7}.taken-away .quantity-block:after{content:'';position:absolute;left:-2px;right:-2px;top:50%;border-top:2px solid #a23823;transform:rotate(-30deg)}.quantity strong{display:block;font-size:25px}.math-groups{display:flex;justify-content:center;gap:9px;flex-wrap:wrap;margin:12px 0}.math-groups .quantity{flex:0 1 105px}.math-arrow{display:block;font-size:24px;margin:10px}.math-explanation small{font-size:16px;line-height:1.7}.child-answer-dialog .math-explanation p{font-size:20px}.feedback-pattern{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin:20px 0}.feedback-pattern>span{width:70px;min-height:70px;display:grid;place-items:center;border:2px solid #c4d4bd;border-radius:12px;background:#f2f7e7;font-size:28px;font-weight:900}.feedback-pattern svg{width:60px;height:60px}.feedback-pattern .pattern-answer{border:4px solid #d5a128;background:#fff1bd}
.learning-settings{grid-template-columns:repeat(2,minmax(0,1fr))}.learning-setting{grid-template-columns:1fr;min-width:0}.learning-setting>*{min-width:0}.learning-setting select{width:100%;grid-column:1/-1;font-size:17px}.learning-setting label{font-size:18px;font-weight:800}.learning-setting small{font-size:14px}
.mission-card .art{background-size:cover;background-position:center;isolation:isolate}.mission-card .art>svg{filter:drop-shadow(0 2px 3px #fff)}.mission-card .art[data-scene=picnic]{background-image:url('assets/learning-v023/orchard.webp')}.mission-card .art[data-scene=bridge]{background-image:url('assets/scenes/bridge-canyon.webp')}.mission-card .art[data-scene=post]{background-image:url('assets/learning-v023/sky.webp')}.mission-card .art[data-scene=water]{background-image:url('assets/learning-v023/river.webp')}.mission-card .art[data-scene=drill]{background-image:url('assets/learning-v023/mine.webp')}
.water-nozzle.water-crew{bottom:4px;height:96px;width:136px}.water-crew+.aim-ring+.hold-cue{bottom:108px}.is-expanded .water-nozzle.water-crew{bottom:3px;height:74px;width:100px}.is-expanded .water-crew+.aim-ring+.hold-cue{bottom:83px}
@media(max-height:520px) and (orientation:landscape){.is-expanded .water-nozzle.water-crew{bottom:2px;height:50px;width:68px}.is-expanded .water-crew+.aim-ring+.hold-cue{bottom:4px;left:8px;right:auto}}
/* A continuous walking surface: bank tops and plank tops share --surface. */
.free-bridge{--bank-width:25%;--arrival:76%;padding:0;overflow:hidden}.free-bridge .bridge-world{--surface:215px;height:340px;overflow:hidden}.free-bridge .left-shore,.free-bridge .right-shore{position:absolute;left:0;top:var(--surface);bottom:0;width:25%;background:linear-gradient(#8eb75c 0 10px,#a87b46 10px,#735535 95%);border:0;border-radius:0;z-index:3;box-shadow:inset 0 3px #d9ed9e}.free-bridge .right-shore{left:75%}.free-bridge .left-shore>span,.free-bridge .right-shore>span{position:absolute;top:48px;left:50%;right:auto;transform:translateX(-50%);margin:0;display:block;white-space:nowrap;background:#fff4cb;padding:6px 12px;border-radius:10px;color:#254833;font-size:18px;font-weight:800}.free-bridge .channel-space{top:var(--surface);bottom:0;left:25%;right:auto;width:var(--channel-width);background:none;z-index:4}.free-bridge .river-grid{inset:0}.free-bridge .river-unit.land{background:transparent}.free-bridge .river-unit.water{background:#63b4d746;border-right:1px dashed #e9f9ff7d}.free-bridge .wood-row{top:0;left:0;right:0;height:34px;filter:drop-shadow(0 5px 3px #173e4d55)}.free-bridge .wood{height:34px;border-radius:4px;border-width:2px;padding:0;pointer-events:auto}.free-bridge .bank-line{left:calc(100% * var(--fraction));top:0;bottom:0;border:0}.free-bridge .bank-line>span{display:none}.free-bridge .bridge-water-zone{inset:0 auto 0 0;width:calc(100% * var(--fraction));border:2px dashed #eefaff99;border-radius:0}.free-bridge .bridge-water-zone:after{top:65px;font-size:17px}.free-bridge .water-gap{margin-top:62px;font-size:24px}.free-bridge .crossing-beaver{top:auto;bottom:calc(100% - var(--surface));left:1%;width:23%;height:190px;z-index:8;filter:drop-shadow(0 2px 1px #fff);transform:translateY(3px)}.free-bridge .crossing-beaver:before{display:none}.free-bridge .crossing-beaver svg{width:100%;height:100%}.free-bridge.crossed .crossing-beaver{left:76%;animation:child-crossing 1.8s ease-in-out both}.free-bridge .bridge-meter{position:relative;inset:auto;padding:16px 12px 8px;margin:0;background:#f1f5e5}.free-bridge .bridge-meter strong{font-size:18px}.free-bridge .bridge-drop{position:relative;inset:auto;margin:0;padding:12px;font-size:18px;line-height:1.6;border:0;background:#f1f5e5}.free-bridge .bridge-submit{padding:10px 14px 20px;margin:0;background:#f1f5e5}.free-bridge .bridge-submit button{font-size:18px;min-height:54px}.free-bridge .crossing-banner{position:relative;inset:auto;font-size:22px;padding:18px;background:#eff7da}.market-order p{display:none}.market-order strong{font-size:clamp(26px,4vw,40px)}
@keyframes child-crossing{from{left:1%}to{left:76%}}@media(prefers-reduced-motion:reduce){.free-bridge.crossed .crossing-beaver{animation:none}}
@media(max-width:600px){.task-header{padding:16px;gap:8px;flex-wrap:wrap}.task-header>div{flex-basis:100%}.task-header .listen{margin:0 0 0 auto;min-height:48px;width:auto;padding:9px 14px}.task-header .listen-text{display:inline}.task-header h1.game-question,.game-question{font-size:24px;padding:14px;line-height:1.6}.game-question .letter-prompt{font-size:30px}.task-header .round-reward-rule{font-size:12px}.free-bridge .bridge-world{--surface:155px;height:260px;background-size:cover}.free-bridge .crossing-beaver{height:140px}.free-bridge .wood-row,.free-bridge .wood{height:30px}.free-bridge .left-shore>span,.free-bridge .right-shore>span{font-size:16px;padding:5px 8px}.free-bridge .bridge-submit{flex-wrap:wrap}.free-bridge .bridge-submit button{font-size:17px;padding:10px 8px;flex:1 1 135px}.free-bridge .bridge-water-zone:after{font-size:15px}.free-bridge .bridge-meter strong{font-size:16px}.free-bridge .bridge-meter>span{width:9px;height:9px}.free-bridge .bridge-drop{font-size:17px}.water-heading{flex-direction:column}.question-rescue .water-heading{padding:14px;margin:8px}.water-bar{flex-wrap:wrap}.water-bar>span{flex:1 1 100%;font-size:20px}.water-bar>button{font-size:15px}.water-bar [data-water=fullscreen]{margin-left:auto}.water-heading h1{font-size:27px}.water-heading .question-visual{max-width:100%}.drill-room>.game-top h1{font-size:21px}.drill-choices button{flex-basis:calc(50% - 8px)}.drill-choices button span{font-size:18px}.child-answer-dialog .math-row{gap:7px}.quantity{flex-basis:100px;min-width:65px}.quantity-label{font-size:16px}.quantity-blocks{max-width:100px}.quantity-block{width:10px;height:10px}.quantity-block.unit-10{width:26px;height:19px}.quantity-block.unit-100{width:32px;height:28px}dialog.child-answer-dialog,dialog.retry-dialog.child-answer-dialog{padding:18px}.math-explanation{padding:10px}.math-groups .quantity{flex-basis:85px}.learning-setting{padding:10px;gap:7px}.learning-setting label{font-size:16px}.learning-setting select{font-size:16px}.learning-setting span{font-size:14px}.learning-setting small{font-size:13px}}

.question-rescue>.hold-cue{position:static;padding:12px 10px;font-size:17px;line-height:1.6;background:#eef7e4;color:#214c3f;text-align:center}.is-expanded .question-rescue>.hold-cue{font-size:14px;padding:5px}

/* v0.25: walking surface follows the grass edges in the original landscape. */
.free-bridge{container-type:inline-size;--bank-width:29.8%;--arrival:72%}
.free-bridge .bridge-world{--surface:24.25cqw;height:min(470px,66.642857cqw);background:none;overflow:hidden}
.bridge-landscape{position:absolute;inset:0 auto auto 0;width:100%;height:auto;max-width:none;pointer-events:none;user-select:none}
.free-bridge .channel-space{left:29.8%;top:var(--surface);width:var(--channel-width);bottom:0}
.free-bridge .river-grid{background:none}.free-bridge .river-unit.water{background:transparent;border-right-color:#ffffff45}
.free-bridge .river-unit.land{background:transparent}.free-bridge .water-gap{opacity:.65}
.free-bridge .bridge-water-zone{border:0;border-top:2px dashed #fff9}.free-bridge .bridge-water-zone:after{background:#e7f8f3e8;color:#225c60;border-radius:9px;padding:5px 9px;top:48px;white-space:nowrap}
.free-bridge .wood-row{height:26px;top:0;filter:drop-shadow(0 5px 3px #173e4d55)}.free-bridge .wood{height:26px;border-radius:3px}
.free-bridge .crossing-beaver{left:5%;bottom:calc(100% - var(--surface));height:min(210px,24cqw);width:24%;transform:translateY(3px)}
.free-bridge.crossed .crossing-beaver{left:72%;animation:grass-crossing 1.8s ease-in-out both}
@keyframes grass-crossing{from{left:5%}to{left:72%}}
@media(max-width:600px){.free-bridge .bridge-world{height:66.642857cqw;--surface:24.25cqw}.free-bridge .crossing-beaver{height:24cqw}.free-bridge .wood-row,.free-bridge .wood{height:18px}.free-bridge .bridge-water-zone:after{top:32px;font-size:13px}.free-bridge .water-gap{margin-top:54px}}
@media(prefers-reduced-motion:reduce){.free-bridge.crossed .crossing-beaver{animation:none}}
.weapon-inline{grid-template-rows:minmax(0,1fr) auto!important}.weapon-inline .weapon-scene{min-height:260px}.weapon-inline .weapon-controls{margin-top:0}.summon-exit{position:absolute;right:12px;top:12px;z-index:5}

/* Spatial bridge: a transparent silhouette lies on the actual grass-level deck. */
.bridge-blueprint{position:absolute;left:0;top:0;width:100%;height:30px;display:flex;pointer-events:none;z-index:6;transform:translateY(-7px)}.bridge-blueprint span{height:36px;flex:none;border:2px dashed #fff4a3;border-right:4px solid #754322;background:#fff8c21a;position:relative}.bridge-blueprint span b{position:absolute;top:-30px;right:-13px;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#fff4c5;color:#533a26;font-size:15px;box-shadow:0 1px 4px #30271f55}.bridge-blueprint .matched{border-color:#bdf294}.bridge-aligned{font-size:1.3rem;font-weight:800;text-align:center}.plank-tray .timber-art{max-width:100%;width:calc(25px * var(--plank-length,2))}.timber-art.wood-1{--plank-length:1}.timber-art.wood-2{--plank-length:2}.timber-art.wood-3{--plank-length:3}.timber-art.wood-4{--plank-length:4}.timber-art.wood-5{--plank-length:5}.ore-matrix{display:grid!important;grid-template-columns:repeat(3,minmax(0,90px));gap:8px;justify-content:center;margin:auto}.ore-matrix .ore-tile{width:100%;max-width:90px}.feedback-pattern.ore-matrix{max-width:330px}.drill-choices{grid-template-columns:repeat(4,minmax(0,1fr))}.drill-choices button span{font-size:.85rem}.drill-sequence:not(.ore-matrix){flex-wrap:nowrap}.drill-sequence:not(.ore-matrix) .ore-tile{min-width:0;flex:1;max-width:100px}
@media(max-width:600px){.bridge-blueprint{height:18px;transform:translateY(-5px)}.bridge-blueprint span{height:25px}.bridge-blueprint span b{font-size:12px;width:20px;height:20px;top:-23px;right:-10px}.plank-tray .timber{min-width:0;flex:1;padding:8px 2px}.plank-tray .timber-art{width:calc(12px * var(--plank-length,2))}.drill-choices{grid-template-columns:repeat(2,minmax(0,1fr))}.drill-sequence:not(.ore-matrix){gap:3px}.drill-sequence:not(.ore-matrix) .ore-tile{border-radius:5px}.ore-matrix{grid-template-columns:repeat(3,minmax(0,70px))}}


.wood-4{background:#85beb2}.wood-5{background:#deb77a}

.diner-art{aspect-ratio:1;display:grid;place-items:center}.diner-art>svg[data-art-fit],.market-host>svg[data-art-fit],.harvest-leader>svg[data-art-fit],.drill-car>svg[data-art-fit],.postman>svg[data-art-fit]{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;transform:none}.market-host{aspect-ratio:1}.bridge-companion>svg[data-art-fit]{width:100%;height:auto;aspect-ratio:1}.point-art>svg[data-art-fit],.sticker-choice>svg[data-art-fit]{object-fit:contain;transform:none}

.harvest-leader>svg[data-art-fit]{width:150px;height:150px;flex:0 0 150px}.diner-art{height:auto;aspect-ratio:1}@media(max-width:600px){.harvest-leader>svg[data-art-fit]{width:110px;height:110px;flex-basis:110px}}
