:root{font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:#24434a;background:#e5f8f1;font-synthesis:none;scroll-behavior:smooth}
*{box-sizing:border-box}body{margin:0;min-width:320px;background:radial-gradient(ellipse at 10% 10%,#c9f6ff 0%,transparent 48%),radial-gradient(ellipse at 85% 90%,#c9efb6 0%,transparent 58%),#e6f9f2}button,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:focus-visible,select:focus-visible{outline:4px solid #ffd95b;outline-offset:3px}button:disabled{cursor:not-allowed;opacity:.55} .app{max-width:1390px;margin:0 auto;padding:15px clamp(10px,2vw,24px) 10px}
.app-header{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:10px 10px 18px}.brand{display:flex;gap:13px;align-items:center}.brand-icon{width:62px;height:62px;display:grid;place-items:center;border-radius:22px;background:#fff9d7;box-shadow:0 6px 0 #bdd4a2;font-size:32px;transform:rotate(-8deg)}.eyebrow{font-weight:900;font-size:.7rem;letter-spacing:2px;color:#288fa4}.brand h1{font-size:clamp(1.25rem,2.1vw,2rem);line-height:1.12;letter-spacing:-.04em;margin:2px 0;color:#294f62;text-shadow:0 2px 0 #fff}.brand h1 span{display:block;color:#c37532;font-size:.67em;letter-spacing:.02em}.header-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}.grade-wrap{display:flex;align-items:center;gap:7px;padding:10px 13px;border:2px solid #d1ebe4;border-radius:16px;background:#fff;box-shadow:0 3px 0 #c4e5d4;font-weight:800}.grade-wrap select{border:0;background:transparent;outline:0;color:#27536b;font-weight:900;font-size:1rem}.icon-btn{width:43px;height:43px;border:2px solid #bfe4d9;border-radius:14px;background:#fff;box-shadow:0 4px 0 #c4e5d4;font-size:1.2rem}
.game-layout{display:grid;grid-template-columns:minmax(340px,1.08fr) minmax(340px,.92fr);gap:20px;align-items:start}.world-panel{display:flex;justify-content:center}.scene-stage{position:relative;overflow:hidden;border:7px solid #fff;border-radius:28px;aspect-ratio:9/13;width:100%;max-width:615px;background:#8be1f5;box-shadow:0 18px 32px #40816b33,0 5px 0 #cfe8db}.scene-stage canvas#sceneCanvas{display:block;width:100%;height:100%}.scene-shade{pointer-events:none;position:absolute;inset:0;background:linear-gradient(to bottom,rgba(48,130,148,.18),transparent 22%,transparent 80%,rgba(5,82,76,.14))}.hud{position:absolute;top:14px;left:13px;display:flex;flex-direction:column;align-items:flex-start;gap:6px;z-index:2}.hud-pill{font-size:clamp(.67rem,1.25vw,.85rem);border:2px solid #704427;border-radius:9px;padding:5px 9px;color:#fff;text-shadow:0 1px 1px #462a19;background:linear-gradient(#ad754a,#86512f);box-shadow:0 3px 0 #603d28;font-weight:850;white-space:nowrap}.hud-pill.energy{display:flex;align-items:center;gap:5px}.energy-meter{width:48px;height:8px;background:#613b2b;border-radius:6px;overflow:hidden;border:1px solid #f3d2a0}.energy-meter i{display:block;width:100%;height:100%;background:#bcf47b;transition:width .25s}.minimap{position:absolute;right:12px;top:13px;width:108px;padding:5px;border:3px solid #956342;border-radius:12px;background:#e5f9f6dd;box-shadow:0 3px 5px #23596f44}.minimap-title{text-align:center;color:#65401d;font-size:.65rem;font-weight:900}.minimap canvas{width:100%;height:auto;display:block;border-radius:7px}
.world-hotspot{position:absolute;z-index:3;display:flex;flex-direction:column;gap:3px;align-items:center;transform:translate(-50%,-50%);border:3px solid #f8efb4;border-radius:20px;background:linear-gradient(160deg,#886044ee,#603e2fed);color:white;box-shadow:0 5px 0 #573926a8,0 4px 14px #0015;min-width:90px;padding:6px 7px;font-size:1.3rem;font-weight:900;transition:transform .15s,background .15s}.world-hotspot span{font-size:clamp(.55rem,1.1vw,.76rem);white-space:nowrap}.world-hotspot:hover,.world-hotspot.active{transform:translate(-50%,-53%) scale(1.06);background:linear-gradient(160deg,#c78d50,#7e5637);border-color:#ffec73}.world-hotspot.complete{background:linear-gradient(160deg,#398f5c,#176d55);border-color:#b9f59b}.world-hotspot.locked{filter:saturate(.4);opacity:.86}.scene-caption{z-index:2;position:absolute;left:14px;bottom:15px;max-width:min(70%,325px);padding:10px 14px;background:#fffcf0ee;border:2px solid #c69f6a;border-radius:14px;box-shadow:0 3px 0 #b18d5c;color:#634626}.scene-caption span{font-size:.76rem;font-weight:900;color:#98622b}.scene-caption p{margin:4px 0 0;font-size:.78rem;font-weight:700;line-height:1.4}
.play-panel{display:flex;flex-direction:column;gap:13px;min-width:0}.progress-card{padding:16px 18px;background:#fff;border:2px solid #d8ebdb;border-radius:20px;box-shadow:0 5px 0 #d4eada}.progress-head{display:flex;justify-content:space-between;gap:10px;font-size:.78rem;font-weight:900;color:#35686b;letter-spacing:.04em}.progress-head strong{color:#c18033;white-space:nowrap}.progress-track{height:13px;margin-top:10px;border-radius:99px;border:2px solid #cfe1d0;background:#e8f4e8;overflow:hidden}.progress-track div{width:0;height:100%;border-radius:99px;background:linear-gradient(90deg,#6cce8b,#b7df50);transition:width .5s}.progress-card p{margin:8px 0 0;font-size:.77rem;color:#64817e}.mission-tabs{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.mission-tab{position:relative;text-align:left;background:#fff;border:2px solid #d8e9e5;border-bottom:5px solid #c9ded9;border-radius:16px;padding:12px 11px;display:flex;gap:10px;align-items:center;min-height:68px;transition:transform .15s,border-color .15s}.mission-tab:hover:not(:disabled){transform:translateY(-2px)}.mission-tab.active{border-color:#edbf65;border-bottom-color:#bb883c;background:#fff9e7}.mission-tab.finished{background:#ecfff1;border-color:#a9dabe}.mission-tab.locked{background:#eef2f0;color:#82928c}.tab-emoji{font-size:1.5rem;flex-shrink:0}.tab-text{min-width:0}.tab-text strong{display:block;font-size:clamp(.77rem,1.3vw,.92rem);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tab-text small{display:block;font-size:.68rem;margin-top:3px;color:#718e84;font-weight:800}.locked-icon{position:absolute;top:7px;right:8px;font-size:.82rem}
.wood-board{position:relative;isolation:isolate;min-height:420px;color:#fff6e9;border:8px solid #875128;border-radius:22px;background:repeating-linear-gradient(0deg,transparent 0,transparent 86px,#42261233 87px,#42261233 90px),linear-gradient(105deg,#a96b3c,#a46a3b 25%,#b87d46 50%,#925a31 74%,#b37542);box-shadow:inset 0 2px 0 #e4aa6a,inset 0 -7px 0 #704324,0 10px 0 #d0bc8f,0 18px 24px #4f675b3c;text-shadow:0 1px 1px #654028}.board-nails{position:absolute;inset:10px;display:flex;justify-content:space-between;pointer-events:none}.board-nails b{width:13px;height:13px;border-radius:50%;border:3px solid #80522e;background:#ebcb92;box-shadow:0 1px 3px #3f2b1d}.board-content{position:relative;padding:24px clamp(13px,3vw,27px);min-height:400px;display:flex;flex-direction:column}.board-kicker{font-size:.75rem;color:#ffeaaa;font-weight:900;text-transform:uppercase;letter-spacing:1.6px}.board-content h2{font-size:clamp(1.4rem,2.6vw,2rem);line-height:1.19;margin:10px 0 12px;letter-spacing:-.025em}.board-content p{line-height:1.55;font-size:.94rem;margin:8px 0}.board-illustration{margin:18px auto 12px;font-size:clamp(3.8rem,8vw,6rem);filter:drop-shadow(0 8px 2px #5b402740)}.board-tagline{color:#ffe2aa;font-size:.88rem}.primary-button{display:inline-flex;justify-content:center;align-items:center;gap:10px;border:2px solid #6c742d;border-bottom-width:5px;border-radius:14px;background:linear-gradient(#f8e789,#f4c94d);color:#69501e;text-shadow:none;font-weight:900;padding:12px 17px;min-height:50px;box-shadow:0 5px 10px #3821103a}.primary-button:hover{filter:brightness(1.05);transform:translateY(-1px)}.board-content .primary-button{margin-top:auto;width:100%}.question-topline{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:.82rem;font-weight:900;color:#ffe6b0}.question-count{background:#6e402a;padding:6px 10px;border:1px solid #d6ad73;border-radius:30px}.question-text{font-size:clamp(1.12rem,2.15vw,1.45rem)!important;line-height:1.38!important;font-weight:800;margin:16px 0!important;min-height:65px}.answers{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px}.answer-btn{min-height:61px;display:flex;gap:10px;align-items:center;text-align:left;padding:10px 11px;border:2px solid #865c36;border-bottom-width:5px;border-radius:12px;background:linear-gradient(#f9e9be,#edd5a4);color:#513b2b;text-shadow:none;font-weight:800;font-size:clamp(.8rem,1.25vw,.93rem);overflow-wrap:anywhere;transition:background .15s,transform .15s}.answer-btn:hover:not(:disabled){background:#fff4cd;transform:translateY(-2px)}.answer-btn strong{flex:none;display:grid;place-items:center;width:28px;height:28px;border-radius:9px;background:#c68b53;color:#fff}.answer-btn.correct{background:#d5f8b0;border-color:#409360;color:#18513a}.answer-btn.wrong{background:#ffc0ae;border-color:#b44d37;color:#762c26}.answer-btn:disabled{opacity:1}.feedback{border-radius:12px;border:2px solid #fff5d0;padding:11px 13px;margin-bottom:14px;background:#5b4635aa}.feedback.good{border-color:#b9f1aa;background:#376f46b3}.feedback.bad{border-color:#ffc3a6;background:#774335a8}.feedback strong{font-size:.95rem}.feedback p{font-size:.81rem;margin:6px 0 0}.next-button{width:100%}.empty-card{text-align:center}.empty-card .board-illustration{display:block}.empty-card h2{margin:10px 0}.empty-card p{font-size:.9rem}.star-row{font-size:2.5rem;letter-spacing:.07em;margin:12px 0}.reward-points{font-size:1.5rem;font-weight:900;color:#ffe17b}
.tips-row{display:flex;justify-content:space-between;align-items:center;gap:10px;color:#75928c;font-weight:750;font-size:.7rem;padding:2px 5px}.tips-row button{border:0;background:transparent;color:#527a78;text-decoration:underline;font-size:.72rem;font-weight:800}.site-footer{padding:20px 10px 6px;text-align:center;font-size:.77rem;font-weight:900;color:#588d7c}.site-footer span{display:block;font-size:.69rem;color:#82a6a0;font-weight:600;margin-top:5px}
.story-dialog{width:min(490px,calc(100vw - 30px));border:5px solid #e4bd75;border-radius:26px;padding:28px;background:#fffced;color:#604834;box-shadow:0 20px 80px #1e526e77;text-align:center}.story-dialog::backdrop{background:#174d62a6;backdrop-filter:blur(6px)}.story-dialog h2{font-size:1.6rem;line-height:1.16;margin:8px 0 18px;color:#86602c}.story-dialog p{text-align:left;line-height:1.55;font-size:.9rem}.story-dialog .eyebrow{text-align:center}.story-art{font-size:3rem}.story-art span{font-size:1.7rem}.story-dialog .primary-button{width:100%;margin-top:12px}
@media(max-width:1020px){.game-layout{grid-template-columns:minmax(330px,1fr) minmax(340px,1fr);gap:13px}.scene-stage{border-width:5px}.app{padding:9px}.world-hotspot{min-width:80px;padding:4px}.board-content{padding:21px 14px}.answer-btn{padding:9px 7px;gap:5px}}
@media(max-width:750px){.app{padding:5px 8px}.app-header{padding:10px 4px 13px}.brand-icon{width:41px;height:41px;font-size:23px;border-radius:14px}.brand{gap:7px}.brand h1{font-size:clamp(.99rem,4.7vw,1.4rem)}.brand h1 span{font-size:.7em}.brand .eyebrow{font-size:.51rem;letter-spacing:1px}.header-actions{gap:5px}.grade-wrap{padding:8px 5px;gap:3px;font-size:.85rem}.grade-wrap span{display:none}.grade-wrap select{font-size:.9rem}.icon-btn{width:34px;height:38px;font-size:.98rem}.game-layout{grid-template-columns:1fr;gap:15px}.scene-stage{max-width:535px;border-radius:20px}.minimap{width:84px;top:10px;right:10px}.hud{top:10px;left:9px}.hud-pill{font-size:.67rem;padding:4px 6px}.energy-meter{width:33px}.world-hotspot{min-width:80px;font-size:1.08rem;border-radius:14px}.world-hotspot span{font-size:.61rem}.scene-caption{padding:8px 10px;bottom:10px;left:10px}.scene-caption p{font-size:.68rem}.play-panel{max-width:535px;width:100%;margin:0 auto}.wood-board{min-height:375px}.board-content{min-height:362px}.answers{gap:9px}.answer-btn{min-height:60px}.tips-row{padding:4px}.site-footer{font-size:.72rem}}
@media(max-width:380px){.app-header{align-items:start}.brand h1{font-size:.99rem}.minimap{width:71px}.world-hotspot{min-width:70px;padding:3px}.world-hotspot span{font-size:.55rem}.scene-caption{max-width:61%}.answers{grid-template-columns:1fr}.answer-btn{min-height:48px}.wood-board{min-height:520px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
/* EduGames integration: session gate, portal navigation, player identity. */
.auth-pending .app{display:none}
.auth-gate{min-height:100dvh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at 20% 15%,#fff9c8,transparent 40%),linear-gradient(145deg,#a0e9f6,#d2f6ce)}
body:not(.auth-pending) .auth-gate{display:none}
.gate-card{background:#fffdf3;border:4px solid #f1d99a;border-radius:26px;padding:26px 26px 34px;box-shadow:0 16px 40px #246c6933;max-width:490px;width:100%;text-align:center}
.gate-card img{width:85px;height:85px;object-fit:contain;border-radius:50%}
.gate-card h2{color:#2d626b;font-size:clamp(1.3rem,4vw,2rem);line-height:1.25}
.gate-card p{color:#527a74;line-height:1.55}
.gate-card a{margin:22px auto 0;text-decoration:none;max-width:340px}
.gate-card a[hidden]{display:none}
.back-portal,.player-tag{font-size:.75rem;font-weight:900;white-space:nowrap;border:2px solid #b3dadd;border-radius:14px;background:#fff;padding:10px;color:#315e65;text-decoration:none}
.back-portal:hover{background:#e1f8e4}
.player-tag{max-width:150px;overflow:hidden;text-overflow:ellipsis;background:#e6f9eb}
@media(max-width:700px){.player-tag{display:none}.back-portal{font-size:.68rem;padding:7px 5px}}

/* Final responsive polish for the unified portal navigation. */
.garden-mascot{height:38px;width:38px;object-fit:contain;flex-shrink:0;filter:drop-shadow(0 3px 4px #316b6540)}
@media(max-width:750px){.app-header{flex-wrap:wrap;gap:8px}.brand{max-width:100%;}.garden-mascot{height:30px;width:30px}.header-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}.back-portal{margin-right:auto}}

/* Brand guide uses original image from existing EduGames asset. */
.guide-heading{display:flex;align-items:center;gap:8px;min-height:34px}
.guide-heading img{width:36px;height:36px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 2px #734b3533)}
.guide-heading span{font-size:.77rem;font-weight:900;color:#985c24}
.scene-caption{max-width:min(78%,355px)}
.story-art{display:flex;justify-content:center;align-items:center;gap:12px;min-height:105px}
.story-art img{width:90px;height:95px;object-fit:contain;filter:drop-shadow(0 5px 4px #503b2733)}
.story-art .explorer-emoji{font-size:2.8rem}
.mascot-victory{display:flex!important;justify-content:center;align-items:center;gap:15px;font-size:2.4rem!important}
.mascot-victory img{width:102px;height:112px;object-fit:contain;filter:drop-shadow(0 5px 3px #52382330)}
@media(max-width:750px){.scene-caption{max-width:min(81%,345px)}.guide-heading img{width:27px;height:27px}.guide-heading span{font-size:.65rem}.story-art img{width:75px;height:85px}}


/* 35-week level map and question timer */
.season-overview{background:linear-gradient(145deg,#e9fff2,#d9f4ff 58%,#fff2d7);border:3px solid #fff;border-radius:25px;box-shadow:0 14px 22px #49857b28,0 4px 0 #bfdfd6;margin:3px 0 20px;padding:18px clamp(12px,2.4vw,25px);color:#305a63}
.season-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}
.season-heading h2{font-size:clamp(1.24rem,2.6vw,2rem);line-height:1.2;margin:4px 0 5px;color:#176879}
.season-heading p{margin:0;color:#557b79;font-size:.83rem;font-weight:700}
.season-eyebrow{font-size:.72rem;letter-spacing:1.5px;font-weight:900;color:#298b7c}
.season-stat{text-align:center;white-space:nowrap;background:#fffcee;border:2px solid #c8e9d4;border-radius:16px;padding:10px 14px}
.season-stat strong{display:block;color:#b86c24;font-size:1.25rem}.season-stat small{font-size:.7rem;color:#4e7272}
.season-week-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px}
.season-week{min-width:0;display:flex;align-items:center;justify-content:center;flex-direction:column;position:relative;gap:3px;background:linear-gradient(#fffdf0,#f6e5af);border:2px solid #a4d5b9;border-bottom:5px solid #86af88;border-radius:13px;min-height:78px;font-weight:900;color:#396b5e;transition:transform .15s,border-color .15s}
.season-week:hover:not(.is-locked){transform:translateY(-2px);border-color:#e9a43c}
.season-week .week-icon{font-size:1.55rem;line-height:1}.season-week strong{font-size:.9rem;line-height:1}
.season-week small{font-size:.62rem;font-weight:850;min-height:11px}
.season-week.is-selected{background:linear-gradient(#ffefb0,#ffdc8e);border-color:#e68c2f;box-shadow:0 0 0 3px #fff8db}
.season-week.is-done{background:linear-gradient(#deffcf,#a6e4c3);border-color:#4fad7e}
.season-week.is-locked{opacity:.55;filter:grayscale(.5);cursor:not-allowed}
.season-week.zone-water:not(.is-locked){border-bottom-color:#59bcd9}
.season-week.zone-forest:not(.is-locked){border-bottom-color:#398762}
.season-week.zone-blossom:not(.is-locked){border-bottom-color:#eaa2b7}
.season-week.zone-sunset:not(.is-locked){border-bottom-color:#e4a051}
.season-week.zone-snow:not(.is-locked){border-bottom-color:#83bbd8}
.season-week.zone-night:not(.is-locked){border-bottom-color:#a3a0e8}
.season-disclaimer{font-size:.67rem;line-height:1.5;color:#6c817d;margin:12px 0 0}
.garden-guide-phrase{display:flex;align-items:center;gap:12px;justify-content:center;background:#fff8d9;color:#3d6665;border:2px solid #eddaa2;padding:8px 12px;border-radius:18px;margin:10px auto 13px;max-width:380px;text-shadow:none;font-size:.9rem;font-weight:850}
.garden-guide-phrase img{width:63px;height:63px;object-fit:contain;flex:none}
.quest-clock{color:#fff5c5;text-shadow:none;font-weight:900;margin:10px 0 -1px}
.clock-track{height:9px;background:#563c2e;border-radius:10px;overflow:hidden;border:1px solid #dca36a;margin:6px 0}
.clock-track i{height:100%;display:block;border-radius:10px;background:linear-gradient(90deg,#8bee90,#eee771);transition:width .24s}
.clock-track i.clock-urgent{background:linear-gradient(90deg,#fd8d52,#f24e64)}
.question-tools{display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:.84rem;font-weight:900}
.question-tools button{background:#fff1c2;color:#6f4e23;border:2px solid #cc9146;border-radius:12px;padding:8px;font-size:.76rem;font-weight:900}
.question-tools button:disabled{opacity:.5;cursor:default}
.feedback-cluster{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.feedback-cluster .garden-guide-phrase{flex:0 0 38%;margin:0;min-width:0}
.feedback-cluster .garden-guide-phrase img{width:43px;height:52px}
.feedback-cluster .garden-guide-phrase span{font-size:.72rem}
.feedback-cluster .feedback{flex:1;margin-bottom:0}
@media(max-width:750px){.season-overview{margin:4px 0 14px;padding:12px}.season-heading{align-items:flex-start;gap:8px}.season-heading h2{font-size:1.18rem}.season-stat{padding:7px;font-size:.75rem}.season-stat strong{font-size:.94rem}.season-week-grid{grid-template-columns:repeat(5,minmax(0,1fr));max-height:332px;overflow-y:auto;gap:5px;padding:2px}.season-week{min-height:61px;border-radius:10px;gap:2px}.season-week .week-icon{font-size:1.15rem}.season-week strong{font-size:.78rem}.season-week small{font-size:.53rem}.season-disclaimer{font-size:.64rem}.feedback-cluster{flex-direction:column}.feedback-cluster .garden-guide-phrase{flex:none;width:100%}}
