/* Flight feedback, readable lessons, and rewards shared with the main game. */
#backdrop{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.mode-flying .balloon,.mode-crashing .balloon{transform:rotate(var(--tilt)) scale(var(--traveler-scale,.82));transform-origin:50% 50%}
.cave-stage.mode-flying .fairy,.cave-stage.mode-crashing .fairy{width:116px;height:157px;top:calc(var(--flight-y) + 8px)}
.cave-stage.mode-flying .fairy.fire,.cave-stage.mode-crashing .fairy.fire{left:224px}.cave-stage.mode-flying .fairy.ice,.cave-stage.mode-crashing .fairy.ice{left:476px}
.mode-crashing .scene{animation:impact-shake .42s ease-out}.mode-crashing .scene:after{content:"";position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 0 120px 30px #f8683d99;animation:impact-flash .7s ease-out both}
@keyframes impact-shake{0%,100%{translate:0}20%{translate:-7px 3px}40%{translate:6px -3px}60%{translate:-4px 1px}80%{translate:2px}}
@keyframes impact-flash{to{opacity:0}}
.stage-intro.foundation{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(920px,94%);padding:28px 30px;z-index:9;max-height:95svh;overflow:auto}
.foundation h2{font-size:32px;margin:10px 0 20px}.learning-points{display:grid;grid-template-columns:1fr 1fr;gap:18px}.learning-points>div{padding:14px;border-radius:20px;border:3px solid #d69462;background:#fff0d6}.learning-points .cold-point{border-color:#6cabc8;background:#e2f5ff}
.learning-points>div>svg{height:48px;width:48px;fill:#f6a145;stroke:#ba5d30;stroke-width:3}.learning-points .cold-point>svg{fill:none;stroke:#418eb7;stroke-width:5}
.learning-points p{font-size:24px;line-height:1.55}.learning-points strong{font-size:29px;color:#b64826}.cold-point strong{color:#26698f}.size-example{display:flex;align-items:center;justify-content:center;gap:20px;height:130px;margin-top:12px}.size-example img{width:62px;height:112px;object-fit:contain}.size-example .small-balloon{width:43px;height:78px}.size-example b{font-size:32px;color:#8d6843}.foundation .learn-release{font-size:23px;margin-top:18px}.foundation .simple-tip{font-size:21px!important}.foundation .wood{width:auto;min-width:65%;font-size:26px;margin-top:15px}.stage-intro .stage-warning{font-size:27px;line-height:1.55;color:#9d422d}.collision-tip{font-size:19px!important;margin-top:16px}
.fork{width:56%;grid-template-rows:minmax(265px,51%) 1fr}.question-board h2{font-size:clamp(24px,2.05vw,30px);line-height:1.5}.sign strong{font-size:clamp(21px,1.8vw,26px);line-height:1.5}.feedback h2{font-size:40px}.feedback p{font-size:24px}.feedback .wood{font-size:24px}.question-figure figcaption{font-size:16px!important}
.final-scene .villain{position:absolute;left:5%;top:31%;width:31%;height:59%;z-index:2}.final-scene .villain img{height:100%;width:100%;object-fit:contain}.final-scene .villain span{font-size:27px;line-height:1.5;left:0;bottom:95%;width:100%;padding:14px;text-align:center;transform:rotate(-3deg)}
.cave-stage.mode-question .flight-controls,.cave-stage.mode-answer .flight-controls,.cave-stage.mode-question .journey,.cave-stage.mode-answer .journey{display:none}
.coin-reward{position:relative;isolation:isolate;overflow:auto;width:min(520px,96%);max-height:94svh;padding:30px 28px;border:3px solid #25284e;border-radius:22px;text-align:center;background:repeating-conic-gradient(from 8deg at 50% 36%,#fff8de 0deg 12deg,#fff 12deg 24deg);box-shadow:0 10px 0 #2023445e;color:#24274b}
.coin-reward h1{font-size:32px;margin:5px 0 20px}.big-coin{display:grid;place-items:center;width:112px;height:112px;border:7px solid #ba8122;border-radius:50%;background:#ffcf63;box-shadow:inset 0 0 0 5px #fff1aa,0 6px #a86a19;color:#b97a1d;font-size:70px;margin:10px auto 20px;animation:coin-pop .6s cubic-bezier(.2,1.5,.5,1)}
@keyframes coin-pop{from{transform:scale(.2) rotateY(220deg);opacity:0}to{transform:scale(1);opacity:1}}
.coin-amount{font-size:23px;color:#ae6b20}.coin-amount b{font-size:67px}.coin-first{display:inline-block;background:#fff0b6;border:1px solid #edcc74;border-radius:30px;padding:10px 17px;color:#9e692c;margin:12px auto}.wallet{font-size:20px;border:1px solid #e0bc67;background:#fffdf1b0;padding:12px 20px;border-radius:40px;width:fit-content;margin:16px auto 8px}.wallet b{font-size:32px}.coin-use{font-size:18px;margin:10px auto 20px}
.reward-button{display:inline-flex;justify-content:center;align-items:center;text-decoration:none;border:2px solid #24274b;border-radius:14px;box-shadow:0 5px #24274b;min-height:59px;padding:12px 18px;font-size:23px;font-weight:900;color:#24274b;cursor:pointer}.reward-button:hover{filter:brightness(1.04)}.reward-button:active{translate:0 3px;box-shadow:0 2px #24274b}.mint{background:#a4e8cf}.yellow{background:#ffe347}.blue{background:#a7eaff}.coin-reward>.reward-button{width:100%;font-size:27px}
.end-board.reward-celebration{background:radial-gradient(ellipse at 26% 50%,#fff0a4,#fffff0 72%);border:4px solid #b8944d;border-radius:28px;box-shadow:0 8px #7b663e75;padding:24px 32px;width:min(1080px,96%);max-height:95svh;color:#225567}
.reward-heading{font-size:30px!important;color:#25284e!important;text-align:left;border-bottom:2px solid #e6cb80;padding-bottom:12px;margin:0 0 22px!important}.reward-layout{display:grid;grid-template-columns:43% 1fr;align-items:center;gap:28px;position:relative;z-index:1}.reward-stage-art{display:grid;place-items:center;perspective:900px}.reward-stage-art>img{height:350px;max-width:100%}.prize-card{width:280px;background:linear-gradient(#477784,#173640);color:#fff9d8;border:8px double #d2b571;border-radius:22px;box-shadow:0 15px 20px #83733b44;transform:rotate(-4deg);padding:12px;animation:card-arrive .65s cubic-bezier(.2,1.1,.5,1)}.prize-card header{display:flex;justify-content:space-between;align-items:center;font-size:15px;padding:3px 2px 12px;border-bottom:1px solid #c5b88a}.prize-art{height:267px;margin:12px 0;border:2px solid #d4be7d;border-radius:10px;background:radial-gradient(#fffbdc,#9ed4d1);overflow:hidden;display:grid;place-items:center}.prize-art img{height:100%;width:100%;object-fit:contain}.tech-card .prize-art img{object-fit:cover}.prize-card>strong{display:block;font-size:24px;line-height:1.4;margin:13px 0}.prize-card>p{font-size:13px;line-height:1.5}.reward-copy{text-align:left}.reward-copy>p:first-child{font-size:20px;color:#668575}.reward-copy h2{font-size:39px;line-height:1.45;margin:12px 0}.prize-new{display:inline-block;background:#ffe594;border:2px solid #d9b654;box-shadow:0 4px #dfbd5b44;border-radius:12px;font-size:25px;color:#ae6724;padding:8px 20px;transform:rotate(-3deg)}.reward-copy h3{font-size:27px;margin:16px 0}.result-score{font-size:17px;margin:14px 0}.reward-copy>.reward-button{width:100%}.reward-copy .end-buttons{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0}.end-buttons .reward-button{font-size:21px;padding:10px}.shop-reward-link{display:block;font-size:17px;text-align:center;margin:17px 0 4px}.reward-copy .next-reward,.reward-copy .save-note{font-size:14px;text-align:center}.celebration-sparkles{position:absolute;inset:0;overflow:hidden;pointer-events:none}.celebration-sparkles i{font-style:normal;position:absolute;left:calc(mod(var(--i)*17,97)*1%);top:calc(mod(var(--i)*29,92)*1%);color:#dfb137;font-size:calc(18px + mod(var(--i),4)*7px);animation:star-float 2s ease-in-out infinite alternate;animation-delay:calc(var(--i)*-.17s)}
@keyframes star-float{to{translate:0 -16px;opacity:.45;rotate:25deg}}@keyframes card-arrive{from{opacity:0;transform:translateY(40px) rotate(-18deg) scale(.7)}to{opacity:1;transform:rotate(-4deg)}}
.sad-suzu img{height:180px;transform:rotate(12deg);filter:saturate(.65)}.defeat .end-board h1{color:#6b5788}.defeat .end-board{background:linear-gradient(#faf4fb,#eee7f6)}
@media(max-width:900px) and (orientation:portrait){
 .stage-intro.foundation{padding:20px 15px;max-height:95svh}.foundation h2{font-size:24px;margin:8px 0 14px}.learning-points{gap:9px}.learning-points>div{padding:10px 5px}.learning-points>div>svg{width:35px;height:35px}.learning-points p{font-size:18px}.learning-points strong{font-size:21px}.size-example{height:100px;gap:7px}.size-example .big-balloon{width:43px;height:90px}.size-example .small-balloon{width:29px;height:62px}.size-example b{font-size:22px}.foundation .learn-release{font-size:19px}.foundation .simple-tip{font-size:18px!important}.foundation .wood{font-size:21px;padding:10px;width:100%}.stage-intro .stage-warning{font-size:23px}
 .mode-question .scene,.mode-answer .scene{height:18svh}.fork{top:clamp(100px,16svh,135px);left:3%;width:94%;bottom:12px;grid-template-rows:minmax(195px,43%) 1fr;gap:10px}.question-board{padding:14px 16px 12px}.question-board .eyebrow{display:none}.question-board h2{font-size:22px;line-height:1.45;margin:3px 0 9px}.question-figure figcaption{font-size:14px!important}.answers{grid-template-columns:1fr;gap:9px;padding:0 4px 8px}.sign{min-height:58px;padding:6px 10px;gap:10px}.sign strong{font-size:20px;line-height:1.35}.sign:after{height:6px;top:100%}.choice-number{font-size:17px;width:27px;height:27px}.feedback h2{font-size:34px}.feedback p{font-size:21px}.feedback .wood{font-size:21px}.mode-question .journey,.mode-answer .journey{display:none}
 .final-scene .villain{left:calc(50% - 76px);top:-52px;width:152px;height:185px}.final-scene .villain span{font-size:18px;left:130px;bottom:45%;width:140px;padding:8px;transform:none}.final-scene{overflow:visible;pointer-events:none}.final-scene .world{overflow:hidden}.cave-stage.mode-question .fork,.cave-stage.mode-answer .fork{top:105px;grid-template-rows:minmax(235px,45%) 1fr}.cave-stage .final-scene .villain{top:-52px;left:calc(50% + 32px);width:100px;height:103px}.cave-stage .final-scene .villain span{display:block;left:-200px;width:190px;bottom:20%;font-size:20px;line-height:1.3}.cave-stage.mode-question .hud,.cave-stage.mode-answer .hud{display:none}.cave-stage.mode-question .answers,.cave-stage.mode-answer .answers{gap:7px;padding-bottom:4px}.cave-stage.mode-question .sign,.cave-stage.mode-answer .sign{padding:4px 10px}.cave-stage.mode-question .sign strong,.cave-stage.mode-answer .sign strong{line-height:1.25}
 .coin-reward{padding:24px 20px}.coin-reward h1{font-size:26px}.coin-amount b{font-size:61px}.coin-use{font-size:17px}.coin-reward>.reward-button{font-size:24px}.end-board.reward-celebration{padding:17px 16px}.reward-heading{font-size:24px!important;margin-bottom:12px!important}.reward-layout{grid-template-columns:1fr;gap:12px}.prize-card{width:176px;padding:7px;border-width:6px;border-radius:15px}.prize-card header{font-size:11px;padding:2px 0 5px}.prize-art{height:137px;margin:7px 0}.prize-card>strong{font-size:17px;margin:7px 0}.prize-card>p{font-size:11px}.reward-copy{text-align:center}.reward-copy>p:first-child{font-size:15px}.reward-copy h2{font-size:24px;line-height:1.3;margin:5px 0}.reward-copy h2 br{display:none}.prize-new{font-size:17px;padding:2px 10px;margin:5px}.reward-copy h3{font-size:22px;margin:6px}.result-score{font-size:14px;margin:8px}.reward-button{min-height:46px;padding:7px 12px;font-size:20px}.reward-copy .end-buttons{margin:10px 0;gap:9px}.end-buttons .reward-button{font-size:18px;padding:7px}.shop-reward-link{font-size:16px;margin-top:13px}.reward-copy .next-reward,.reward-copy .save-note{font-size:12px}.reward-stage-art>img{height:190px}
}
@media(max-height:500px) and (orientation:landscape){
 .stage-intro.foundation{padding:12px 22px;max-width:780px}.foundation h2{font-size:23px;margin:2px 0 8px}.foundation .eyebrow{display:none}.learning-points>div{padding:8px;display:grid;grid-template-columns:36px 1fr 82px;align-items:center}.learning-points>div>svg{width:32px;height:32px}.learning-points p{font-size:18px}.learning-points strong{font-size:20px}.size-example{height:70px;margin:0;gap:3px}.size-example .big-balloon{width:29px;height:65px}.size-example .small-balloon{width:20px;height:45px}.size-example b{font-size:15px}.foundation .learn-release{font-size:18px;margin-top:8px}.foundation .simple-tip{font-size:16px!important}.foundation .wood{font-size:20px;min-height:43px;margin-top:8px;padding:8px 20px}
 .fork{top:78px;width:96%;left:2%;bottom:10px;grid-template-columns:1fr 1.1fr;grid-template-rows:1fr;gap:12px}.question-board{padding:12px 15px}.question-board h2{font-size:21px;line-height:1.35}.question-board .eyebrow{display:none}.question-figure figcaption{font-size:13px!important}.answers{grid-template-columns:1fr;gap:7px;padding-bottom:4px}.sign{min-height:52px;padding:5px 9px;gap:9px}.sign strong{font-size:19px;line-height:1.3}.sign:after{height:5px}.choice-number{font-size:16px;width:25px;height:25px}.feedback{padding:20px 30px}.feedback h2{font-size:29px}.feedback p{font-size:20px;line-height:1.55;margin:10px 0}.result-symbol{font-size:42px}.feedback .wood{font-size:20px;padding:8px 20px;min-height:46px}
 .final-scene{overflow:visible}.final-scene .villain{left:50%;top:0;width:100px;height:110px}.final-scene .villain span{font-size:19px;width:190px;left:-200px;bottom:45%;padding:8px}.cave-stage.mode-question .journey,.cave-stage.mode-answer .journey{display:none}
 .end-board.reward-celebration{padding:15px 25px}.reward-heading{font-size:23px!important;margin-bottom:12px!important}.reward-layout{grid-template-columns:38% 1fr;gap:15px}.prize-card{width:180px;padding:7px;border-width:6px}.prize-card header{font-size:11px;padding:2px 0 5px}.prize-art{height:145px;margin:7px 0}.prize-card>strong{font-size:17px;margin:5px}.reward-copy h2{font-size:26px;margin:5px 0}.reward-copy h2 br{display:none}.reward-copy h3{font-size:21px;margin:6px 0}.prize-new{font-size:16px;padding:4px 10px}.reward-copy>p:first-child{font-size:15px}.reward-copy .reward-button{font-size:18px;min-height:43px;padding:7px}.reward-copy .end-buttons{margin:9px 0}.result-score{font-size:14px;margin:8px 0}.shop-reward-link{font-size:15px;margin:10px 0}.reward-copy .next-reward,.reward-copy .save-note{font-size:12px}
}

/* Keep the first lesson and final challenge legible on a small phone. */
.journey strong{white-space:nowrap}.journey{width:max-content}
@media(max-width:900px) and (orientation:portrait){
 .hud{text-shadow:1px 1px #211b20,-1px -1px #211b20,1px -1px #211b20,-1px 1px #211b20}
 .stage-intro.foundation{padding:16px 12px}.foundation h2{font-size:26px;line-height:1.35;margin:6px 0 12px}
 .learning-points{grid-template-columns:1fr;gap:10px}.learning-points>div{display:grid;grid-template-columns:28px 1fr 76px;gap:6px;align-items:center;padding:10px 7px}.learning-points>div>svg{width:28px;height:28px}.learning-points p{font-size:18px;line-height:1.4}.learning-points strong{font-size:21px;line-height:1.4}.learning-points strong span{display:block}
 .size-example{height:95px;margin:0;gap:3px}.size-example .big-balloon{width:30px;height:85px}.size-example .small-balloon{width:23px;height:55px}.size-example b{font-size:15px}
 .foundation .learn-release{font-size:18px;line-height:1.5;margin-top:13px}.foundation .simple-tip{font-size:18px!important;line-height:1.5;margin-top:8px}.foundation .wood{margin-top:12px;min-height:56px}
 .cave-stage.mode-question .top-actions [data-action="pause"],.cave-stage.mode-answer .top-actions [data-action="pause"]{display:none}
 .cave-stage.mode-question .top-actions,.cave-stage.mode-answer .top-actions{right:8px}.cave-stage.mode-question .question-board:before,.cave-stage.mode-answer .question-board:before{display:none}
}
/* Large, question-specific experiment art; exact measurements remain live text. */
.thermal-diagram{margin:0;width:100%;display:flex;flex-direction:column;gap:4px;min-height:0}
.thermal-diagram figcaption{font-size:16px;font-weight:800;color:#53675a;text-align:center;flex:none}
.experiment-view{display:flex;align-items:stretch;flex:1;min-height:0;gap:10px;background:#fffbef;border-radius:12px;overflow:hidden}
.question-art-button,.question-art-full{position:relative;flex:1;min-height:0;min-width:0;width:100%;display:block;padding:0;border:0;background:#fffbef;border-radius:12px}
.question-art-button{cursor:zoom-in;touch-action:manipulation}
.question-art{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
.art-zoom{position:absolute;right:6px;bottom:6px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;border:2px solid #9b7b4b;color:#574225;background:#fff7dc;font-size:24px;line-height:1}
.image-facts{flex:none;display:flex;justify-content:space-around;align-items:center;gap:5px;text-align:center;color:#405b61;font-size:18px;line-height:1.35;font-weight:900}
.image-facts.has-temperatures{display:block}.temperature-set{display:flex;justify-content:space-around;gap:8px}.temperature-set b{color:#8d522d}.image-facts p{margin:2px 0 0;font-size:16px}
.with-record .question-art-button{flex:0 0 28%;}.experiment-table{border-collapse:collapse;flex:1;width:72%;min-width:0;font-size:clamp(20px,1.7vw,26px);line-height:1.3;color:#304b4e;text-align:center;background:#fffdf5}
.experiment-table .record-number{display:inline-block;white-space:nowrap;font-size:clamp(26px,2.4vw,36px);line-height:1.25;font-variant-numeric:tabular-nums}
.experiment-table td,.experiment-table th{padding:5px;border:1px solid #d4d9bc;font-weight:800}.experiment-table thead{background:#e6edcf}.experiment-table th[scope=row]{background:#f4f3df}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.dialog:has(.question-art-full){width:min(1100px,96vw);text-align:center}.dialog:has(.question-art-full) h2{padding:10px 30px;font-size:26px;line-height:1.5}.dialog:has(.question-art-full) .experiment-view{flex:none;height:min(45vh,380px)}.dialog:has(.question-art-full) .with-record .question-art-full{width:45%;flex:0 0 45%}.dialog:has(.question-art-full) .image-facts{font-size:23px}.dialog:has(.question-art-full) .experiment-table{font-size:23px;width:55%}
@media(max-width:900px) and (orientation:portrait){
 .question-figure figcaption{display:none}.image-facts{font-size:16px}.image-facts p{font-size:15px}.experiment-view{gap:4px}.experiment-table{font-size:18px;line-height:1.25}.experiment-table .record-number{font-size:24px}.experiment-table th,.experiment-table td{padding:4px 3px}.with-record .question-art-button{flex-basis:18%}.experiment-table{width:82%}.experiment-table:has(th:nth-child(3)) .record-number{font-size:22px}.art-zoom{width:26px;height:26px;font-size:21px;right:3px;bottom:3px}
 .dialog:has(.question-art-full) h2{font-size:23px;padding:15px 15px 5px}.dialog:has(.question-art-full) .experiment-view{height:auto;min-height:160px;flex-direction:column}.dialog:has(.question-art-full) .question-art-full{height:180px;flex:none}.dialog:has(.question-art-full) .with-record .question-art-full{width:100%;flex:none;height:140px}.dialog:has(.question-art-full) .experiment-table{width:100%;font-size:20px}.dialog:has(.question-art-full) .image-facts{font-size:20px}
}
@media(max-height:500px) and (orientation:landscape){.image-facts{font-size:15px}.image-facts p{font-size:14px}.experiment-table{font-size:18px}.experiment-table .record-number{font-size:24px}.experiment-table td,.experiment-table th{padding:3px}.experiment-view{gap:4px}}

/* Give complete questions and enlarged measurements enough room. */
@media(min-height:501px){.game .fork:has(.experiment-table){grid-template-rows:minmax(300px,57%) 1fr}}
@media(max-width:900px) and (orientation:portrait){.game .fork:has(.experiment-table){grid-template-rows:minmax(265px,52%) 1fr}}
