.play-main{max-width:1200px;margin:auto;padding:22px 28px 42px}.play-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.play-heading h1{font-size:2.4rem;line-height:1.1}.play-heading p{font-size:.8rem;margin-top:7px}.play-heading .eyebrow{margin:0 0 8px;font-size:.65rem}.play-home{font-size:.875rem;text-decoration:underline;text-underline-offset:5px}.game-shell{background:#10392b;border:2px solid #b5954b;border-radius:14px;overflow:hidden;box-shadow:0 14px 45px #13321f26}.game-toolbar{display:flex;justify-content:space-between;align-items:center;color:#fff4ca;padding:12px 18px;gap:12px;background:#173e2e}.game-toolbar>div{display:flex;gap:8px}.game-toolbar button{border:1px solid #a9945e;border-radius:7px;background:#214b37;color:white;min-height:40px;padding:7px 14px;font-size:.875rem}.game-score{font-size:.875rem}.game-stage{position:relative;overflow:hidden}.game-stage canvas{display:block;width:100%;height:480px;outline-offset:-4px;image-rendering:pixelated;background:#367c77}.game-overlay{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#102d1f55;backdrop-filter:blur(2px);padding:20px}.game-overlay[hidden]{display:none}.game-overlay-card{width:min(470px,100%);background:#fff9eaf7;border:2px solid #c4a45e;border-radius:15px;padding:30px;text-align:center;box-shadow:0 12px 40px #10251c66}.game-overlay-card h2{font-size:2.7rem;line-height:1.06}.game-overlay-card p{font-size:1rem;margin:18px 0;line-height:1.6}.game-overlay-card .button{width:100%;margin-top:7px}.game-overlay-card small{display:block;font-size:.8rem;margin-top:12px}.game-controls{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:12px 18px;color:#e9e8d3}.game-directions{display:flex;gap:10px}.game-controls button{min-width:64px;min-height:52px;border:1px solid #c7aa62;background:#27593d;color:white;border-radius:10px;font-size:1.3rem;font-weight:700;touch-action:none;user-select:none;-webkit-user-select:none}.game-controls .jump-button{font-size:1rem;min-width:110px;background:#d6b86d;color:#153b28}.game-controls button.held{background:#e3c884;color:#173a29}.game-help{text-align:center;font-size:.8rem;color:#e7eedc}.play-note{font-size:.875rem;margin-top:18px;text-align:center}.game-question{padding:0;border:1px solid #cbb471;border-radius:14px;background:#fffaf0;width:min(760px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;color:#193b2b}.game-question::backdrop{background:#071e17bb;backdrop-filter:blur(4px)}.question-layout{display:grid;grid-template-columns:39% 61%}.question-art{position:relative;min-height:430px;background:url('/play/assets/background.webp') center/cover;display:flex;align-items:center;justify-content:center;overflow:hidden}.game-question .question-art img{width:90%;height:auto;max-height:none;object-fit:contain;margin:0;border-radius:0;image-rendering:pixelated;filter:drop-shadow(0 10px 8px #122d2155)}.question-content{padding:34px 28px 26px;position:relative}.question-content .eyebrow{margin-bottom:12px;font-size:.75rem}.question-content h2{font-size:2.2rem;line-height:1.06;margin-bottom:18px}.question-content p{font-size:1rem;line-height:1.65}.question-content label{display:block;font-size:.875rem;margin:22px 0 6px}.question-content input{width:100%;border:1px solid #a6bda4;background:white;border-radius:7px;min-height:48px;padding:10px 12px;font-size:1.05rem;color:#193b2b}.question-content .button{width:100%;margin-top:16px}.question-feedback{min-height:26px;margin-top:13px}.question-feedback.correct{color:#236334;font-weight:600}.question-feedback.retry{color:#89531d}.question-skip{display:block;border:0;background:transparent;text-decoration:underline;padding:12px 0;margin:auto;font-size:.875rem}.game-question[open]{animation:question-in .22s ease-out}.game-footer-note{color:#617561;font-size:.8rem;margin-top:9px}.game-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}@keyframes question-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@media(max-width:760px){.play-main{padding:16px 12px 30px}.play-heading{padding:0 4px}.play-heading h1{font-size:1.9rem}.play-heading p{font-size:.75rem}.play-home{font-size:.75rem}.game-stage canvas{height:min(52dvh,430px);min-height:280px}.game-toolbar{padding:10px 12px}.game-toolbar button{padding:6px 10px}.game-score{font-size:.8rem}.game-controls{padding:12px;gap:8px}.game-help{display:none}.game-controls button{min-width:58px}.game-overlay-card{padding:23px 20px}.game-overlay-card h2{font-size:2.1rem}.game-overlay-card p{font-size:.875rem;margin:12px 0}.question-layout{grid-template-columns:1fr}.question-art{min-height:0;height:110px}.game-question .question-art img{height:115px;width:auto;position:relative;top:6px}.question-content{padding:22px}.question-content h2{font-size:1.9rem}.question-content p{font-size:1rem}.question-content label{margin-top:16px}.play-note{font-size:.8rem}}
@media(max-height:500px) and (orientation:landscape){.play-heading{display:none}.play-main{padding:8px}.game-stage canvas{height:270px}.question-layout{grid-template-columns:30% 70%}.question-art{height:100%;min-height:0}.game-question .question-art img{height:auto;width:100%}}
.game-question [hidden]{display:none!important}
#answer-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.answer-fieldset{border:0;padding:0;margin:20px 0 0;min-width:0}.answer-fieldset legend{font-size:.875rem;margin-bottom:9px}.question-content .answer-choice{position:relative;display:flex;align-items:center;flex-direction:column;justify-content:center;text-align:center;gap:8px;margin:0;padding:12px 6px;min-width:0;min-height:80px;overflow-wrap:anywhere;border:1px solid #b8c6ad;border-radius:9px;background:#fffdf7;color:#214c3b;font-size:1rem;cursor:pointer}.question-content .answer-choice input{position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0;margin:0;opacity:0;z-index:1;cursor:pointer;touch-action:manipulation}.choice-marker{display:flex;align-items:center;justify-content:center;width:27px;height:27px;flex:none;border:1px solid #9dae8d;border-radius:50%;font-size:.8rem}.question-content .answer-choice:has(input:checked){background:#214c3b;color:white;border-color:#c7a257;box-shadow:inset 0 0 0 1px #c7a257}.question-content .answer-choice:has(input:checked) .choice-marker{background:#e2c474;color:#173b29;border-color:#e2c474}.answer-choice:has(input:focus-visible){outline:3px solid #bb8e3b;outline-offset:3px}#check-answer:disabled{opacity:.5;cursor:default;transform:none;box-shadow:none}
@media(prefers-reduced-motion:reduce){.game-question[open]{animation:none}}

#question-title:focus{outline:none}

.question-content .answer-choice{touch-action:manipulation;-webkit-tap-highlight-color:transparent;user-select:none}.answer-spark{position:absolute;pointer-events:none;z-index:5;border-radius:50%;background:#ffdc75;box-shadow:0 0 7px 2px #e8b33bb3}.question-content{isolation:isolate;overflow:hidden}@media(hover:none){.question-content .button:hover{transform:none}}

/* Five connected forest chapters; existing gameplay and question controls retained. */
.level-progress{display:flex;list-style:none;gap:0;padding:10px 16px;margin:0;background:#102f24;color:#b3c7ae;justify-content:space-between}.level-progress li{flex:1;text-align:center}.level-progress span{display:block;border-bottom:2px solid #3c5943;padding:4px;font-size:.8rem}.level-progress .current{color:#fff0b4;border-color:#e3bc65}.level-progress .done{color:#d6e8c6;border-color:#749c65}.game-toolbar .level-status{display:flex;flex-direction:column;gap:1px}.level-status strong{font-size:.85rem;font-weight:600}.game-score{font-size:.75rem}.game-overlay{z-index:2}.game-overlay.intro .game-overlay-card{display:grid;grid-template-columns:48% 52%;width:min(790px,100%);padding:0;overflow:hidden;text-align:left}.game-overlay.intro .overlay-content{padding:24px}.game-overlay.intro .game-overlay-card h2{font-size:2.2rem}.game-overlay.intro .game-overlay-card p{font-size:.95rem;line-height:1.5;margin:14px 0}.game-overlay.intro #overlay-illustration{width:100%;height:100%;object-fit:contain;background:#142f24;image-rendering:pixelated}.game-overlay-card #overlay-illustration[hidden]{display:none}.level-veil{position:absolute;inset:0;background:#102c22;opacity:0;pointer-events:none;z-index:4;transition:opacity .45s ease}.level-veil.covered{opacity:1;pointer-events:auto}.farewell-note{position:absolute;left:5%;right:5%;top:24px;text-align:center;background:#fff7deed;border:1px solid #d9b764;border-radius:10px;padding:12px 16px;color:#214c3b;font-weight:600;box-shadow:0 5px 22px #102e2540;pointer-events:none}.farewell-note[hidden]{display:none}
@media(max-width:600px){.level-progress{padding:7px 7px}.level-progress span{font-size:.75rem}.game-toolbar{gap:6px}.game-toolbar button{padding:6px 8px}.level-status strong{font-size:.75rem}.game-score{font-size:.7rem}.game-stage:has(.game-overlay.intro:not([hidden])) canvas{height:490px;min-height:490px}.game-overlay.intro{padding:12px}.game-overlay.intro .game-overlay-card{grid-template-columns:1fr;max-width:430px}.game-overlay.intro #overlay-illustration{height:190px}.game-overlay.intro .overlay-content{padding:17px 20px}.game-overlay.intro .game-overlay-card h2{font-size:1.9rem}.game-overlay.intro .game-overlay-card p{font-size:.875rem;margin:10px 0}.game-overlay.intro .button{min-height:48px;padding:10px}.game-overlay.intro small{font-size:.75rem;margin-top:8px}}
@media(max-height:500px) and (orientation:landscape){.game-overlay.intro .game-overlay-card{grid-template-columns:40% 60%;max-width:760px}.game-overlay.intro .overlay-content{padding:15px}.game-overlay.intro #overlay-illustration{height:100%}.game-overlay.intro .game-overlay-card h2{font-size:1.7rem}.game-overlay.intro .game-overlay-card p{font-size:.85rem;margin:9px 0}.game-overlay.intro .button{padding:8px;min-height:42px}.game-stage:has(.game-overlay.intro:not([hidden])) canvas{height:300px;min-height:300px}}
@media(prefers-reduced-motion:reduce){.level-veil{transition:none}}

.game-stage:has(.game-overlay.intro:not([hidden])) canvas{display:none}.game-overlay.intro:not([hidden]){position:relative;min-height:380px}@media(max-width:600px){.game-overlay.intro:not([hidden]){min-height:0}}

.item-tracker{display:flex;align-items:center;gap:6px;font-size:.75rem;color:#ffe4a1}.item-tracker img{width:20px;height:20px;object-fit:contain;image-rendering:pixelated}.game-toolbar .level-status{min-width:0}.level-status strong{overflow-wrap:anywhere}@media(max-width:600px){.item-tracker{font-size:.7rem}.game-toolbar>div:last-child{flex-shrink:0}}

/* One illustrated welcome screen, followed by the existing playable trail. */
.game-shell:has(.game-overlay.welcome:not([hidden]))>.level-progress,.game-shell:has(.game-overlay.welcome:not([hidden]))>.game-toolbar,.game-shell:has(.game-overlay.welcome:not([hidden]))>.game-controls{display:none}
.game-stage:has(.game-overlay.welcome:not([hidden])) canvas{display:none}
.game-overlay.welcome:not([hidden]){position:relative;display:block;padding:0;aspect-ratio:16/9;min-height:380px;background:#173e2e url('/play/assets/forest-welcome.webp') center/cover no-repeat;backdrop-filter:none}
.game-overlay.welcome .game-overlay-card{position:absolute;inset:0;display:block;width:100%;max-width:none;padding:0;background:transparent;border:0;border-radius:0;box-shadow:none}
.game-overlay.welcome #overlay-illustration{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:none;image-rendering:auto}
.game-overlay.welcome .overlay-content{position:absolute;inset:auto 0 0;padding:60px 20px 32px;display:flex;justify-content:center;background:linear-gradient(transparent,#08251aaa)}
.game-overlay.welcome #overlay-title,.game-overlay.welcome #overlay-copy,.game-overlay.welcome #overlay-hint{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;margin:0}
.game-overlay.welcome #start-game{width:min(270px,80%);min-height:64px;border:2px solid #e0be72;outline:1px solid #a78040;outline-offset:4px;border-radius:12px;background:linear-gradient(#315f43,#173e2b);box-shadow:0 7px 25px #071d17aa,inset 0 0 0 3px #d7b46d22;font:600 1.7rem Georgia,serif;color:#fff2cb;letter-spacing:.06em}
.game-overlay.welcome #start-game:disabled{font-size:1rem;opacity:.9;cursor:wait}
.game-directions{display:grid;grid-template-columns:repeat(3,48px);grid-template-rows:repeat(3,44px);gap:3px}
.game-directions button{min-width:44px;min-height:44px;padding:0}
.game-directions [data-control=up]{grid-column:2;grid-row:1}.game-directions [data-control=left]{grid-column:1;grid-row:2}.game-directions [data-control=right]{grid-column:3;grid-row:2}.game-directions [data-control=down]{grid-column:2;grid-row:3}
@media(max-width:600px){.game-overlay.welcome:not([hidden]){aspect-ratio:4/5;min-height:350px}.game-overlay.welcome .overlay-content{padding-bottom:28px}.game-overlay.welcome #overlay-illustration{object-position:left center}.game-overlay.welcome{background-position:left center}.game-controls .jump-button{min-width:88px}.game-directions{grid-template-columns:repeat(3,44px)}}
@media(max-height:500px) and (orientation:landscape){.game-overlay.welcome:not([hidden]){aspect-ratio:16/7;min-height:260px}.game-overlay.welcome .overlay-content{padding-bottom:20px}.game-overlay.welcome #start-game{min-height:48px}}

/* Shared layout for every character trail, including the future 80-character collection. */
.game-directions [hidden]{display:none}
.game-shell.trail-immersive{position:relative}
.trail-immersive>.level-progress,.trail-immersive #level-name,.trail-immersive #game-score{display:none}
.trail-immersive>.game-toolbar{position:absolute;inset:16px 16px auto;z-index:3;padding:0;background:none;pointer-events:none;align-items:flex-start}
.trail-immersive .game-toolbar>div{pointer-events:auto}
.trail-immersive .item-tracker,.trail-immersive .game-toolbar button{min-height:46px;border:1px solid #ddbd70;border-radius:12px;background:linear-gradient(145deg,#244d3aee,#102f25f5);box-shadow:inset 0 0 0 3px #dab86a22,0 3px 9px #071d1866;color:#fff2cc}
.trail-immersive .item-tracker{padding:7px 14px;font-size:.875rem;font-weight:600;gap:9px}
.trail-immersive .item-tracker img{width:30px;height:30px;filter:drop-shadow(0 1px 3px #e4bc6488)}
.trail-immersive .game-toolbar button{padding:8px 16px;font-weight:600;cursor:pointer}
.trail-immersive .game-toolbar button:disabled{opacity:.55;cursor:default}
.trail-immersive .game-toolbar button:focus-visible{outline:3px solid #fff1b3;outline-offset:3px}
.trail-immersive .game-toolbar button:hover:not(:disabled){background:#326045}
.trail-immersive .game-stage canvas{height:680px}
.trail-immersive .game-controls{padding:8px 16px;gap:12px}
.trail-immersive .game-directions{display:flex;gap:6px}
.trail-immersive .game-directions [data-control=left]{order:0}
.trail-immersive .game-directions [data-control=right]{order:1}
.trail-immersive .game-directions [data-control=up]{order:2}
.trail-immersive .game-controls button{min-width:48px;min-height:44px}
.trail-immersive .game-controls .jump-button{min-width:100px}
.trail-immersive .game-help{margin:0;line-height:1.45}
.trail-immersive:has(.game-overlay.intro:not([hidden]))>.game-toolbar,.trail-immersive:has(.game-overlay.welcome:not([hidden]))>.game-toolbar{visibility:hidden}
.trail-immersive .farewell-note{top:78px}
@media(max-width:760px){
 .trail-immersive .game-stage canvas{height:min(66dvh,620px);min-height:380px}
 .trail-immersive>.game-toolbar{inset:10px 10px auto;gap:8px}
 .trail-immersive .item-tracker{padding:6px 9px;font-size:.875rem;gap:5px}
 .trail-immersive .item-tracker img{width:24px;height:24px}
 .trail-immersive .game-toolbar button{padding:7px 10px;font-size:.875rem}
 .trail-immersive .game-controls{padding:7px 10px}
}
@media(max-height:500px) and (orientation:landscape){
 .trail-immersive .game-stage canvas{height:calc(100dvh - 82px);min-height:240px}
 .trail-immersive .game-controls{padding:5px 12px}
}

.trail-immersive .game-toolbar .level-status{flex-direction:row;flex-wrap:wrap;gap:6px;flex:1;min-width:0}
.trail-immersive .game-toolbar>div:last-child{flex-shrink:0}
.trail-immersive .item-tracker{white-space:nowrap}
@media(max-width:420px){
 .trail-immersive>.game-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:6px}
 .trail-immersive .game-toolbar .level-status{order:0;align-items:flex-start}
 .trail-immersive .game-toolbar>div:last-child{margin-left:0;gap:5px}
 .trail-immersive .item-tracker{padding:6px 7px;gap:4px}
 .trail-immersive .game-toolbar button{padding:7px 8px}
}

.game-admin-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:14px;margin-bottom:16px;border:1px solid #b5954b;border-radius:12px;background:#fff9ea;color:#173e2e}
.game-admin-tools label{font-weight:600}
.game-admin-tools select,.game-admin-tools button{min-height:44px;padding:8px 12px;border:1px solid #9a844e;border-radius:8px;font:inherit}
.game-admin-tools select{min-width:0;max-width:100%;background:white;color:#173e2e}
.game-admin-tools button{background:#214b37;color:#fff4ca}
.game-admin-tools p{flex-basis:100%;margin:0;font-size:.875rem}
.game-admin-tools a{margin-left:auto;font-size:.875rem;text-decoration:underline}

/* Five gold-framed trail markers fill only when an answer is correct. */
.quiz-progress-wrap{margin:0 0 18px;padding:10px 12px 12px;border:1px solid #b99a54;border-radius:12px;background:linear-gradient(135deg,#fff9e9,#efe3c4);box-shadow:inset 0 0 0 3px #fffaf077}
.quiz-progress-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;font-size:.875rem;color:#214734}
.quiz-progress-heading strong{font-variant-numeric:tabular-nums;color:#214734}
.quiz-progress-meter{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px}
.quiz-progress-step{display:flex;align-items:center;justify-content:center;height:30px;border:1px solid #ae8b43;border-radius:8px;background:#fffaf0;color:#6b623f;font-size:.875rem;font-weight:700;box-shadow:inset 0 0 0 2px #dfcd9d66;transition:background .25s,color .25s,box-shadow .25s}
.quiz-progress-step.earned{background:linear-gradient(135deg,#376447,#153e2b);color:#fff0b5;border-color:#c6a04d;box-shadow:inset 0 0 0 2px #e0bd6777,0 1px 4px #76603133}
.quiz-progress-step.just-earned{animation:trail-marker-fill .45s ease-out}
@keyframes trail-marker-fill{0%{transform:scale(.9);box-shadow:0 0 0 0 #e2ba5d99}55%{transform:scale(1.07);box-shadow:0 0 0 5px #e2ba5d33}100%{transform:scale(1);box-shadow:inset 0 0 0 2px #e0bd6777,0 1px 4px #76603133}}
@media(max-width:600px){.quiz-progress-wrap{padding:8px 10px 10px;margin-bottom:14px}.quiz-progress-meter{gap:6px}}
@media(prefers-reduced-motion:reduce){.quiz-progress-step{transition:none}.quiz-progress-step.just-earned{animation:none}}
