/* Final pages keep their actions in the viewport rather than extending the page. */
#app.final{height:var(--app-height);min-height:0;display:flex;flex-direction:column;overflow:hidden}
#app.final .final-scene{flex:1;min-height:0;overflow:auto;padding:14px 3vw}
#app.final .final-panel{padding:16px}
#app.final .final-record-grid .evidence-symbol{height:56px}
#app.final .saved-evidence .secondary{font-size:18px}
#app.final .final-actions{margin:12px 0 0}
#app.final .certificate{padding:20px;border-width:6px}
#app.final .certificate h1{font-size:clamp(32px,2.3vw,44px);margin-bottom:8px}
#app.final .certificate p{margin:8px 0;line-height:1.45}
#app.final .certificate input{margin:10px auto;min-height:48px}
#app.final .certificate strong{font-size:20px}
#app.final .certificate small{font-size:16px}
#app.final .certificate-tools{margin-top:14px;padding-bottom:5px}
@media(min-width:900px){
 dialog .concept-player{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(260px,1fr);gap:14px}
 dialog.learning-dialog.concept-dialog .concept-visual{grid-column:1;grid-row:1 / span 2;max-height:none;align-self:center}
 dialog .concept-caption{grid-column:2;align-self:center}
 dialog .concept-summary{grid-column:2;align-self:center}
 dialog .concept-actions,dialog .concept-error{grid-column:1 / -1}
}
.dialog-body .saved-evidence p,.dialog-body .bag-grid article p{font-size:var(--body-size)}
/* Palette -> roles -> readable classroom components. */
:root{--geo-forest:#294f41;--geo-cream:#fff8e8;--geo-sand:#d1b984;--geo-gold:#f3cc76;--ui-text:var(--geo-forest);--ui-panel:var(--geo-cream);--ui-line:var(--geo-sand);--ui-action:var(--geo-gold);--body-size:clamp(20px,1.35vw,27px);--title-size:clamp(28px,2vw,38px);--label-size:clamp(16px,1.05vw,21px);--space:clamp(12px,1.1vw,22px);--panel-radius:22px}
button:focus-visible,input:focus-visible{outline:4px solid #3d8d9c;outline-offset:4px}
.secondary,.text-button{font-size:var(--label-size)}.eyebrow,.small{font-size:16px;letter-spacing:.02em}
.atlas-page:before,dialog::backdrop{backdrop-filter:none}.atlas-footer p{font-size:var(--body-size);line-height:1.45}.atlas-title .eyebrow,.welcome-scroll span{font-size:16px}.atlas-title h1{font-size:var(--title-size)}.pin-sign small{font-size:16px}.pin-sign{font-size:clamp(20px,1.5vw,28px)}.atlas-route-help,.atlas-core small{font-size:16px}.welcome-scroll p{font-size:20px}.welcome-scroll{max-width:540px}.mission-reward span{font-size:18px}.mission-reward b{font-size:21px}
/* Balanced native dialogs; scroll only the body if a collection really needs it. */
dialog.learning-dialog{position:fixed;inset:0;margin:auto;width:min(720px,calc(100vw - 40px));max-width:none;max-height:calc(var(--app-height) - 40px);padding:0;border:2px solid var(--ui-line);border-radius:var(--panel-radius);overflow:hidden;box-shadow:0 22px 70px #14372f66}
dialog.learning-dialog[open]{display:flex;flex-direction:column}dialog::backdrop{background:#183c35b0}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 24px 14px;border-bottom:1px solid #daccaa;flex:none;background:var(--ui-panel)}.dialog-heading h2{font-size:var(--title-size);line-height:1.2;margin:0;padding:0;flex:1;text-wrap:balance}.dialog-heading .dialog-close{position:static;flex:none}
.dialog-body{overflow:auto;overscroll-behavior:contain;min-height:0;padding:18px 24px 24px;scrollbar-gutter:stable}.dialog-body p{font-size:var(--body-size);line-height:1.5;margin:12px 0}.dialog-body .small{font-size:20px}.dialog-body h3{font-size:24px}.dialog-body>.primary{display:flex;margin:18px 0 4px auto;min-width:190px}
.dialog-body .mission-preview{height:clamp(120px,21vh,210px);margin:0 0 14px}.dialog-body .mission-reward{padding:12px}.dialog-body .mission-reward>img{width:68px;height:68px}
dialog.wide-dialog{width:min(1120px,calc(100vw - 40px))}.bag-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.bag-grid article{opacity:1;padding:16px}.bag-grid article p{font-size:18px}.bag-grid article h3{font-size:24px}.evidence-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.saved-evidence p{font-size:18px}.saved-evidence strong{font-size:20px}.evidence-image,.evidence-image svg{max-height:180px}.preview-links strong{font-size:23px;margin:8px 0 0}.preview-links button{font-size:20px}
.setting-row{font-size:22px;padding:16px 0;min-height:64px}.setting-row input{width:54px;height:48px;cursor:pointer}.dialog-body .record-list li{font-size:20px;line-height:1.5;margin:10px 0}.reward-reveal{height:160px}.reward-partner{height:160px}.reward-item{height:145px}
.assist-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.assist-grid>button{font-size:19px;min-height:60px;line-height:1.35;padding:12px}.assist-feedback{font-size:20px;color:#3c7257}
.hint-card{display:flex;align-items:center;gap:22px;min-height:160px}.hint-card img{width:125px;height:170px;object-fit:contain}.hint-card>div{flex:1}.hint-card #hint-copy{font-size:clamp(23px,1.8vw,32px);line-height:1.5}.hint-card #hint-progress{font-size:16px;color:#65745e}.hint-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;margin-top:12px}.hint-actions .text-button{font-size:18px}
/* Auxiliary buttons never cover draggable objects or labels in the scene. */
#app.adventure .adventure-side-tools{position:static;max-width:none;width:100%;order:0;flex-direction:row;justify-content:flex-end;gap:8px}
.adventure-toolbar>.controls{order:1}.adventure-toolbar>#next{order:2}.adventure-toolbar>#next:disabled{display:none}
/* One goal at the top, the companion and next action at the bottom. */
.adventure-heading{height:auto;min-height:76px;padding:10px 22px;flex:none}.task-copy .eyebrow{font-size:16px}.task-copy h1{font-size:clamp(25px,1.9vw,36px)}.phase-node{font-size:16px;min-width:48px;min-height:48px}.phase-node>span{width:36px;height:36px;font-size:18px}.phase-path{max-width:42%}
.adventure-footer{height:auto;min-height:116px;padding:10px 20px;gap:20px}.river-narrator{min-width:0;gap:12px}.river-narrator p{font-size:var(--body-size);line-height:1.4;max-width:760px}.river-narrator>div>span{font-size:16px;font-family:inherit;color:#687257}
.narrator-help{position:relative;flex:none;display:flex;align-items:center;flex-direction:column;justify-content:center;width:78px;height:92px;border:1px solid #c1ab78;border-radius:18px;background:#f3ebcf;padding:0 5px 4px;color:#365f48}.narrator-help img{height:65px;width:65px;object-fit:contain}.narrator-help span{font-size:17px;line-height:1}.narrator-help:hover{background:#ffe7ad}
.adventure-toolbar{max-width:49%;gap:10px;flex-shrink:0}.adventure-toolbar .controls{border:0;background:none;padding:0;min-height:0}.adventure-toolbar .primary,.adventure-toolbar .secondary{font-size:18px;min-height:50px;padding:10px 14px}.adventure-toolbar #next{font-size:21px;min-width:146px}.adventure-toolbar #next.ready{outline:3px solid #fcdfa4;outline-offset:4px}.adventure-toolbar:has(#next.ready) .action-buttons{display:none}
.adventure-range{display:flex;align-items:center;gap:8px;font-size:17px;max-width:none;flex-wrap:wrap}.adventure-range>span{flex-basis:100%;text-align:center}.adventure-range input{width:140px;min-height:48px;height:48px}.adventure-range .range-jump{min-width:56px;padding:8px;font-size:17px}
.adventure-side-tools{top:auto;bottom:132px;left:12px;gap:8px;flex-direction:row;align-items:center;max-width:75%}.compact-tool{min-width:64px;padding:10px;font-size:16px;background:#fff8e9f2}.earned-tool{width:auto;min-width:62px;flex-direction:row;padding:4px 9px;gap:6px;min-height:48px}.earned-tool>img{width:36px;height:36px}.earned-tool>span{font-size:16px}.discovery-total{display:none}
.quest-meter{top:12px;right:14px;max-width:45%;min-height:48px}.quest-meter>span{font-size:17px}.quest-meter>strong{font-size:26px}.quest-meter small{font-size:17px}.discovery-pop{bottom:auto;top:14px;right:14px;padding:8px 14px;z-index:4}.discovery-pop>img{height:62px;width:46px}.discovery-pop b{font-size:26px}.discovery-pop span{font-size:18px}
/* Reserve enough room for captions and the primary action, even for long concepts. */
dialog.concept-dialog .concept-visual{max-height:min(48vh,calc(var(--app-height) - 460px))}
/* DOM captions keep text crisp and large at every video resolution. */
dialog.concept-dialog{width:min(1120px,calc(100vw - 40px))}.concept-player{display:flex;flex-direction:column;gap:12px}.concept-visual{position:relative;aspect-ratio:16/9;max-height:48vh;overflow:hidden;border-radius:16px;border:1px solid var(--ui-line);background:#e7f1e1}.concept-visual video{width:100%;height:100%;object-fit:contain;display:block}.concept-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);min-width:180px}.concept-play:active:enabled{transform:translate(-50%,-48%)}
.concept-labels{position:absolute;left:3%;right:3%;bottom:4%;display:flex;align-items:center;justify-content:space-around;gap:10px}.concept-labels span{font-size:clamp(18px,1.5vw,28px);font-weight:700;color:#486550;background:#fff8e8f2;border:2px solid #ccb889;border-radius:12px;padding:8px 15px}.concept-labels span.active{background:#ffe2a1;color:#563c16;border-color:#ad7c2e}
.dialog-body .concept-caption{font-size:clamp(23px,1.8vw,34px);font-family:GeoDisplay,sans-serif;line-height:1.4;margin:0;min-height:2.8em;text-align:center;display:grid;align-content:center}.dialog-body .concept-summary{font-size:var(--body-size);line-height:1.45;background:#edf0da;padding:12px 16px;border-radius:12px;margin:0}.concept-actions{display:flex;justify-content:space-between;gap:14px;align-items:center;padding-bottom:5px}.concept-actions button{font-size:21px}.concept-error{color:#8c4e32}
.final-scene{min-height:calc(var(--app-height) - 64px);padding:20px 3vw;background-attachment:fixed}.final-scene>h1{font-size:clamp(30px,2.4vw,46px);margin-bottom:10px}.final-scene>p{font-size:var(--body-size);margin-bottom:18px}.final-panel{padding:20px;max-width:1400px;margin:auto}.final-record-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.final-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:14px;margin-top:18px}.certificate p{font-size:var(--body-size)}
@media(min-width:1600px){.adventure-footer{min-height:140px}.adventure-side-tools{bottom:154px;top:auto}.adventure-toolbar .primary,.adventure-toolbar .secondary{font-size:23px;min-height:58px}.adventure-toolbar #next{font-size:26px}.phase-node{font-size:20px}.compact-tool{font-size:21px}.earned-tool>span{font-size:20px}.atlas-footer{height:100px}.atlas-strip{height:82px}.atlas-title h1{font-size:34px}.rack-item{width:60px;height:65px}.river-narrator>div>span{font-size:20px}}
@media(max-width:1100px){.adventure-heading{padding:8px 16px;min-height:78px;gap:10px}.task-copy h1{font-size:25px}.adventure-footer{min-height:120px;padding:8px 14px;gap:14px}.river-narrator p{font-size:20px}.river-narrator>div>span{font-size:16px}.narrator-help{width:64px;height:84px}.narrator-help img{height:58px;width:58px}.adventure-toolbar{max-width:44%}.adventure-toolbar #next{font-size:20px;min-width:140px}.adventure-side-tools{bottom:134px;top:auto}.phase-node.current b{max-width:100px}.bag-grid{grid-template-columns:1fr 1fr}.adventure-range input{width:110px}.adventure-range>span{display:none}.quest-meter{max-width:44%}}
@media(max-height:740px) and (min-width:900px){.dialog-heading{padding:14px 20px 10px}.dialog-body{padding:12px 20px 18px}.dialog-body .mission-preview{height:130px}.dialog-body p{margin:10px 0}.concept-visual{max-height:40vh}.concept-player{gap:8px}.dialog-body .concept-caption{font-size:23px;min-height:2.8em}.dialog-body .concept-summary{font-size:20px;padding:10px 12px}.concept-actions button{font-size:20px}.adventure-heading{min-height:70px}.adventure-footer{min-height:115px}.adventure-side-tools{bottom:129px}.hint-card img{height:140px}}
@media(max-width:800px){.brand-logo{width:210px}.phase-path{max-width:100%}.adventure-heading{gap:4px;min-height:110px;flex-wrap:wrap}.task-copy{flex-basis:100%}.adventure-toolbar{width:100%;max-width:none;justify-content:flex-end}.adventure-footer{flex-wrap:wrap;min-height:175px;gap:8px}.river-narrator{flex-basis:100%}.adventure-side-tools{bottom:190px;top:auto}.adventure-toolbar .controls{margin-right:auto}.task-copy h1{font-size:23px}.phase-node.current b{max-width:none}.atlas-title h1{font-size:25px}.atlas-stars{font-size:16px}.evidence-list,.final-record-grid{grid-template-columns:1fr 1fr}.hint-card{gap:12px}.hint-card img{width:80px;height:130px}.dialog-body .concept-caption{font-size:22px}.concept-labels span{font-size:16px;padding:6px}.concept-visual{max-height:40vh}.dialog-heading h2{font-size:26px}.final-scene{padding:18px}.atlas-footer p{font-size:20px}}
@media(max-width:540px){.topbar{padding:5px 8px;gap:5px}.brand-logo{width:132px}.nav-group{gap:4px}.brand strong{font-size:18px}.dialog-heading{padding:12px}.dialog-heading h2{font-size:24px}.dialog-body{padding:12px}.dialog-body p{font-size:20px}.bag-grid,.evidence-list,.final-record-grid,.assist-grid{grid-template-columns:1fr}.hint-card img{display:none}.concept-actions button{font-size:18px;padding:9px 12px}.concept-labels{gap:4px}.concept-labels span{font-size:14px;padding:4px}.atlas-footer{padding:8px 12px}.atlas-footer p{font-size:18px}.welcome-scroll{padding-left:90px}.welcome-scroll .welcome-river{width:100px}.welcome-scroll p{font-size:18px}.atlas-route-help{display:none}.pin-sign small{font-size:13px}.pin-sign{font-size:17px;min-width:98px}.narrator-help{width:58px}}
