/* Original pixel-adventure map. The learning controls remain native HTML. */
.game-welcome h1{font-size:29px;letter-spacing:0}.game-welcome h1,.game-welcome p{color:#f5f7ff}.game-world{position:relative;overflow:hidden;border:3px solid #352c53;border-radius:18px;background:#f9eed3;color:#24243e;box-shadow:0 16px 36px #070b153d}.world-heading{display:flex;justify-content:space-between;gap:16px;position:relative;z-index:2;padding:23px 28px;background:#342b58;color:#fff}.world-label{font-size:11px;color:#f8d774;font-weight:700;letter-spacing:.08em}.world-heading h2{font-size:24px;margin:5px 0 2px}.world-heading p{font-size:12px;margin:0;color:#e5def4}.world-score{min-width:75px;text-align:right;align-self:center}.world-score span{display:block;font-size:11px;color:#ddd4ef}.world-score strong{font-size:26px;color:#ffdb70}.world-score small{font-size:13px;color:#fff}.game-sky{height:155px;position:relative;overflow:hidden;background:linear-gradient(#79c8f1,#bdeaf5)}.cloud{position:absolute;width:92px;height:24px;border-radius:20px;background:#fff;box-shadow:0 5px 0 #d3edf4}.cloud:before,.cloud:after{content:'';position:absolute;bottom:5px;background:#fff;border-radius:50%}.cloud:before{left:14px;width:35px;height:35px}.cloud:after{left:42px;width:45px;height:45px}.cloud-one{left:10%;top:42px}.cloud-two{right:14%;top:30px;transform:scale(.7)}.pixel-sun{position:absolute;right:32%;top:22px;width:33px;height:33px;background:#ffdc68;box-shadow:0 0 0 6px #fff1a4;border-radius:50%}.hill{position:absolute;bottom:15px;width:180px;height:70px;background:#8acb82;border-radius:90px 90px 0 0}.hill:after{content:'';position:absolute;width:8px;height:8px;background:#4d9e75;left:48px;top:33px;box-shadow:45px 12px #4d9e75,80px -4px #4d9e75}.hill-one{left:20%}.hill-two{right:8%;height:52px;width:140px;background:#6dbb7d}.sky-block{position:absolute;top:65px;display:grid;place-items:center;width:32px;height:32px;background:#f5bf4d;border:3px solid #a96531;box-shadow:inset 0 0 0 2px #ffe69b;color:#874d26;font-weight:900}.block-one{left:43%}.block-two{left:calc(43% + 39px)}.game-ground{position:absolute;bottom:0;left:0;right:0;height:20px;background:repeating-linear-gradient(90deg,#bd7650 0 23px,#9d5b3e 23px 26px);border-top:7px solid #55a969}.world-content{position:relative;padding:22px 28px 18px}.world-intro{display:flex;align-items:center;justify-content:space-between;gap:18px}.world-stage{font-size:10px;font-weight:800;letter-spacing:.12em;color:#95602f}.world-intro h3{font-size:21px;margin:5px 0 3px;color:#302a48}.world-intro p{color:#655b67;font-size:12px;margin:0}.game-go{background:#ef7155;color:#fff;min-height:46px;box-shadow:0 4px 0 #a73d36}.game-go:hover{background:#db5944}.game-path{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 12px;padding:38px 0 18px}.game-level{background:none;display:flex;flex-direction:column;align-items:center;text-align:center;min-width:0;padding:0;color:#302a48}.game-level:focus-visible{outline:3px solid #d15b36;outline-offset:5px;border-radius:8px}.game-platform{height:67px;width:92px;position:relative;display:flex;justify-content:center;align-items:flex-start;border-bottom:10px solid #a65f3e;background:linear-gradient(to bottom,transparent 52px,#60af66 52px 58px,#d59360 58px);border-radius:0 0 6px 6px}.level-square{width:44px;height:44px;display:grid;place-items:center;color:#fff;background:#e99b4a;border:4px solid #ab613d;font-weight:900;font-size:15px;box-shadow:inset 0 0 0 2px #ffd58a}.level-square svg{width:19px;height:19px}.done .level-square{background:#70b77c;border-color:#3d8961}.locked .level-square{background:#99a3aa;border-color:#6f7984}.game-level:hover .level-square{transform:translateY(-4px)}.game-level.current .level-square{animation:level-bob 2.6s ease-in-out infinite}.level-text{padding-top:9px;display:block;width:100%;line-height:1.4}.level-text strong{display:block;font-size:12px;overflow-wrap:anywhere}.level-text small{display:block;font-size:11px;color:#6c6064;margin-top:4px}.game-player{position:absolute;right:-10px;bottom:5px;width:25px;height:40px;animation:player-hop 2.6s ease-in-out infinite;image-rendering:pixelated}.game-player i{position:absolute;display:block}.game-player .hat{width:18px;height:7px;top:0;left:3px;background:#d95343;box-shadow:4px 4px #d95343}.game-player .face{width:15px;height:10px;top:8px;left:5px;background:#ffd49b;box-shadow:inset -3px 0 #533b37}.game-player .body{width:18px;height:13px;top:18px;left:3px;background:#e75c48;border-bottom:5px solid #3a70a0}.game-player .feet{width:7px;height:5px;top:36px;left:2px;background:#493b3a;box-shadow:13px 0 #493b3a}.world-foot{border-top:1px dashed #c8b49a;display:flex;justify-content:space-between;gap:10px;padding-top:14px;color:#786450;font-size:11px}.world-foot span:first-child{color:#a56737;font-weight:700}.game-note{color:#a9b7c7;font-size:11px;line-height:1.6}.game-empty{color:#625c67;font-size:13px}.game-world~.game-note{margin-top:14px}@keyframes player-hop{0%,75%,100%{transform:translateY(0)}85%{transform:translateY(-9px)}}@keyframes level-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}
@media(max-width:700px){.game-welcome h1{font-size:24px}.world-heading{padding:18px}.world-heading h2{font-size:20px}.game-sky{height:115px}.cloud-one{left:6%;top:36px;transform:scale(.8)}.cloud-two{right:5%;top:25px;transform:scale(.55)}.sky-block{top:47px}.world-content{padding:19px 18px}.world-intro{align-items:stretch;flex-direction:column}.world-intro h3{font-size:19px}.game-go{width:100%}.game-path{grid-template-columns:1fr;gap:0;padding:20px 0 8px}.game-level{flex-direction:row;text-align:left;gap:17px;padding:9px 0}.game-platform{width:75px;height:60px;flex:none;background:linear-gradient(to bottom,transparent 45px,#60af66 45px 51px,#d59360 51px)}.level-text{padding:0}.level-text strong{font-size:13px}.world-foot{flex-wrap:wrap}.hill-one{left:9%}.hill-two{right:0}}
.preview-shell .game-welcome h1{font-size:24px}.preview-shell .world-heading{padding:18px}.preview-shell .world-heading h2{font-size:20px}.preview-shell .game-sky{height:115px}.preview-shell .world-content{padding:19px 18px}.preview-shell .world-intro{align-items:stretch;flex-direction:column}.preview-shell .game-go{width:100%}.preview-shell .game-path{grid-template-columns:1fr;gap:0;padding:20px 0 8px}.preview-shell .game-level{flex-direction:row;text-align:left;gap:17px;padding:9px 0}.preview-shell .game-platform{width:75px;height:60px;flex:none;background:linear-gradient(to bottom,transparent 45px,#60af66 45px 51px,#d59360 51px)}.preview-shell .level-text{padding:0}.preview-shell .level-text strong{font-size:13px}.preview-shell .world-foot{flex-wrap:wrap}@media(prefers-reduced-motion:reduce){.game-player,.game-level.current .level-square{animation:none}}

/* Full-stage adventure world: map content sits inside the illustrated level. */
.game-world{border:4px solid #53391f;border-radius:12px;background:#75c5f0}.world-heading{padding:18px 24px;background:#183c63;color:#fff;border-bottom:5px solid #0c2d4b}.world-heading h2{font-size:26px}.world-label{color:#ffd360}.world-heading p,.world-score span{color:#e4f4ff}.game-sky{height:260px;background:#8dd5fb url('/ledger-world.png') center 45% / cover no-repeat;image-rendering:pixelated}.game-sky>*{display:none}.world-content{padding:0;background:#91d9f4 url('/ledger-world.png') center top / 100% auto repeat-y;image-rendering:pixelated}.world-intro{position:relative;align-items:center;padding:19px 25px;background:#173b61ed;border-bottom:4px solid #ffe49a;color:#fff}.world-stage{color:#ffe083}.world-intro h3{color:#fff;margin:4px 0;font-size:21px}.world-intro p{color:#e8f6ff}.game-go{background:#ed5b3c;border:3px solid #ad3327;border-radius:7px;box-shadow:0 4px 0 #7e2d24;min-width:130px}.game-path{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:52px 25px 32px;min-height:310px}.game-level{position:relative;justify-content:flex-end;min-height:160px;padding:0;background:transparent;align-items:center}.game-platform{width:115px;height:82px;flex:none;background:linear-gradient(to bottom,transparent 59px,#6db640 59px 68px,#b86c34 68px);border-bottom:8px solid #864521;border-radius:0}.level-square{position:relative;width:60px;height:60px;background:#f8b936;border:5px solid #ac5b26;color:#683613;font-size:21px;box-shadow:inset 0 0 0 3px #ffe083,0 4px 0 #773b1e}.locked .level-square{background:#a4b0ad;border-color:#70827e}.done .level-square{background:#82c95a;border-color:#40883d}.game-player{width:106px;height:106px;right:-64px;bottom:6px;background:url('/ledger-explorer.png') center bottom / contain no-repeat;filter:drop-shadow(0 5px 2px #2d485259);animation:player-hop 3s ease-in-out infinite}.game-level.advancing .game-player{animation:player-arrive 1.1s cubic-bezier(.2,.75,.25,1) both,player-hop 3s 1.1s ease-in-out infinite}.level-text{display:block;margin-top:10px;min-height:68px;padding:9px 12px;background:#fff9dfed;border:3px solid #9d683a;border-radius:6px;box-shadow:0 4px 0 #6b4a2c;width:min(100%,260px);text-align:left;color:#352c22}.level-text strong{font-size:13px;line-height:1.4}.level-text small{color:#665a49}.level-kicker{display:block;color:#ac4e27;font-weight:800;font-size:10px;margin-bottom:3px}.world-foot{padding:14px 20px;background:#173b61;color:#eff6ff;border-top:4px solid #ecbc60}.world-foot span:first-child{color:#ffe083}.game-note{color:#b7c6d4}.game-level:focus-visible{outline-color:#fff}.game-level:hover .level-square{transform:translateY(-5px)}@keyframes player-arrive{0%{transform:translate(-125px,-55px);opacity:0}30%{opacity:1;transform:translate(-85px,-75px)}100%{transform:translate(0,0);opacity:1}}
@media(max-width:700px){.game-sky{height:210px;background-position:center 38%}.world-heading{padding:15px 18px}.world-heading h2{font-size:21px}.world-intro{padding:17px;align-items:stretch}.game-path{grid-template-columns:1fr;gap:14px;padding:25px 16px 32px}.game-path:before{content:'';position:absolute;left:54px;top:65px;bottom:70px;border-left:4px dashed #fff5c1bb}.game-level{min-height:128px;display:flex;flex-direction:row;align-items:end;gap:14px;padding:0}.game-platform{width:90px;height:78px;background:linear-gradient(to bottom,transparent 57px,#6db640 57px 65px,#b86c34 65px);z-index:1}.game-player{width:95px;height:95px;right:-51px;bottom:6px}.level-text{width:auto;flex:1;margin:0 0 3px;min-height:70px;padding:8px 10px}.level-text strong{font-size:13px}.game-level.current .level-text{border-color:#c55129}.world-foot{font-size:10px}.game-go{width:100%}@keyframes player-arrive{0%{transform:translate(-20px,-125px);opacity:0}35%{opacity:1;transform:translate(20px,-75px)}100%{transform:translate(0,0);opacity:1}}}
.preview-shell .game-sky{height:210px;background-position:center 38%}.preview-shell .world-heading{padding:15px 18px}.preview-shell .world-intro{padding:17px;align-items:stretch}.preview-shell .game-path{grid-template-columns:1fr;gap:14px;padding:25px 16px 32px}.preview-shell .game-path:before{content:'';position:absolute;left:54px;top:65px;bottom:70px;border-left:4px dashed #fff5c1bb}.preview-shell .game-level{min-height:128px;display:flex;flex-direction:row;align-items:end;gap:14px;padding:0}.preview-shell .game-platform{width:90px;height:78px;background:linear-gradient(to bottom,transparent 57px,#6db640 57px 65px,#b86c34 65px)}.preview-shell .game-player{width:95px;height:95px;right:-51px;bottom:6px}.preview-shell .level-text{width:auto;flex:1;margin:0 0 3px;min-height:70px;padding:8px 10px}.preview-shell .level-text strong{font-size:13px}.preview-shell .game-go{width:100%}@media(prefers-reduced-motion:reduce){.game-level.advancing .game-player{animation:none}}
@media(max-width:700px){.game-level.current{padding-top:46px}.game-level.current .game-player{width:66px;height:66px;right:auto;left:10px;bottom:60px}.game-path{gap:10px}}
.preview-shell .game-level.current{padding-top:46px}.preview-shell .game-level.current .game-player{width:66px;height:66px;right:auto;left:10px;bottom:60px}.preview-shell .game-path{gap:10px}

/* A consistent adventure shell for learning, including navigation and quizzes. */
body{background:#77c9ec;color:#18334b}body::selection{background:#ffe17a;color:#233950}.app{background:linear-gradient(180deg,#79cdf2 0,#c3ecfa 420px,#9ad8ef 100%);min-height:100vh}.sidebar{background:#153f65;border-right:5px solid #0b2c4d}.brand{color:#fff}.brand-mark{background:#f6c44e;color:#683817;border:3px solid #aa5e2a;border-radius:4px}.brand-mark span{color:#d94d32}.brand small,.nav-label,.sidebar-foot{color:#c7e8f7}.sidebar .nav-item{color:#def2ff;border-radius:6px}.sidebar .nav-item:hover{background:#29618c}.sidebar .nav-item.active{background:#f9ca55;color:#583713;box-shadow:inset 0 -4px #d79835}.topbar{background:#174870;border-bottom:4px solid #123758;color:#fff}.breadcrumbs,.breadcrumbs strong,.mobile-brand{color:#fff}.breadcrumbs span{color:#a7d6ed}.topbar .energy{color:#fff;background:#0c3559;border:2px solid #397da5;padding:5px 9px;border-radius:5px}.energy svg{color:#ffda5d}.profile{color:#fff}.avatar{background:#f4c44c;color:#5b3819;border:2px solid #ba762a}.demo-tag{color:#e4f7ff;background:#285c81;border-color:#5587a5}.game-welcome h1{color:#173f62;text-shadow:0 2px 0 #e9f7ff}.game-welcome p{color:#234c64}.welcome-time{color:#234c64}.subject-tabs{background:#17517a;border:3px solid #113b5e;border-radius:7px;padding:4px}.subject-tabs button{color:#eaf7ff;border-radius:4px}.subject-tabs button span{color:#c5e9f4}.subject-tabs button.active{background:#f6ca57;color:#573717;box-shadow:inset 0 -4px #d89b37}.subject-tabs button.active span{color:#664725}.preview-chapters .chapter-heading label,.preview-chapters .chapter-heading span{color:#163e5d}.preview-chapters .chapter-picker select{background:#fff8dc;color:#493a2b;border:3px solid #986538;border-radius:5px;box-shadow:0 4px 0 #754822}.preview-chapters .chapter-picker>svg{color:#93612f}.preview-chapters .chapter-indicator{border-color:#654323}.game-world{border-color:#8e5029;box-shadow:0 10px 0 #74411f,0 18px 30px #254b5d55}.world-heading{background:#17618a;border-bottom-color:#0e456c}.game-sky{height:220px;background-position:center 57%}.world-content{background-color:#82d2f2}.game-path{padding-top:38px}.game-path:after{content:'';position:absolute;inset:0;pointer-events:none;border-top:6px solid #f4d47f}.game-level{z-index:1}.game-note{color:#254a5c}.page-footer{color:#214d61}.mobile-nav{background:#174870;border-top:4px solid #ffcc57}.mobile-nav button{color:#cbe8f7}.mobile-nav button.active{color:#ffe26d}.mobile-nav button.active svg{filter:drop-shadow(0 2px 0 #6d401f)}.backdrop{background:#0c2844d9}.modal{background:#fef4d9;color:#283749;border:4px solid #9a5a2e;border-radius:10px}.modal h2{color:#263747}.modal p,.modal .quiz-footer small{color:#536174}.modal .close{color:#70472e}.modal .question{color:#243545!important}.modal .quiz-meta,.modal .question-type-row{color:#704625}.modal .option{background:#fffdf3;color:#273b4b;border:2px solid #c6ae86}.modal .option b{border-color:#a68359}.modal .option.selected{background:#fff0b1;border-color:#c7842c}.modal .option.correct{background:#d6efb7;border-color:#5d9c46}.modal .option.wrong{background:#ffe0d6;border-color:#ca624c}.modal .explanation{background:#e2eccc;color:#304e3b}.modal .explanation strong{color:#315f2e}.modal .primary{background:#e95939;color:#fff}.modal .primary:hover{background:#c63c28}.modal .secondary{background:#d9e6e8;color:#274052}.modal .progress-track{background:#cfbea0}.modal .quiz-meta span:last-child,.modal .question-type-row #quiz-time{color:#6b533e}.modal input[type=tel],.modal input[type=text],.modal input[type=password]{background:#fff;color:#243b4a;border-color:#b99b73}.modal .agreement,.modal .auth-hint{color:#465360}.modal .auth-hint{background:#e6eadc}.modal .form-error{color:#9b2d24}.result-adventure{height:140px;position:relative;overflow:hidden;border:3px solid #8a542c;border-radius:5px;background:#72c6ef url('/ledger-world.png') center 65% / cover;image-rendering:pixelated}.result-ground{position:absolute;bottom:0;left:0;right:0;height:20px;border-top:7px solid #56a53e;background:repeating-linear-gradient(90deg,#b36c38 0 22px,#8c4e2b 22px 25px)}.result-flag{position:absolute;right:18%;bottom:19px;width:5px;height:78px;background:#f9f0d3}.result-flag:after{content:'';position:absolute;top:0;left:5px;width:32px;height:19px;background:#ee5740;clip-path:polygon(0 0,100% 0,75% 50%,100% 100%,0 100%)}.result-runner{position:absolute;bottom:16px;left:calc(78% - 58px);width:65px;height:80px;background:url('/ledger-explorer.png') center / contain no-repeat;image-rendering:pixelated;animation:result-run 1.8s cubic-bezier(.25,.7,.25,1) both}.game-result .result-scores strong{color:#c4582f}.game-result .result-scores small{color:#526170}.game-result .secondary{color:#3c5d72!important}@keyframes result-run{0%{left:4%;transform:translateY(0)}28%{transform:translateY(-22px)}50%{transform:translateY(0)}75%{transform:translateY(-18px)}100%{left:calc(78% - 58px);transform:translateY(0)}}
@media(max-width:700px){.app{background:linear-gradient(#79cdf2,#c3ecfa 360px,#8dd1ea)}.topbar{background:#174870}.mobile-brand span{color:#ffdc65}.game-welcome h1{font-size:23px}.game-welcome p{font-size:12px}.subject-tabs button{font-size:12px}.subject-tabs button span{display:none}.game-sky{height:168px;background-position:center 65%}.world-heading{padding:13px 16px}.world-heading h2{font-size:21px}.world-intro{padding:14px 16px}.game-path{padding-top:20px}.page-footer{color:#234c61}.modal{padding:25px 20px}.modal h2{font-size:21px}}
.preview-shell .game-sky{height:168px;background-position:center 65%}.preview-shell .subject-tabs button span{display:none}.preview-shell .world-heading{padding:13px 16px}.preview-shell .world-intro{padding:14px 16px}.preview-shell .game-path{padding-top:20px}.preview-shell .game-welcome h1{font-size:23px}@media(prefers-reduced-motion:reduce){.result-runner{animation:none}.game-level.advancing .game-player{animation:none}}
.welcome h1{color:#173f62}.welcome p{color:#28516a}.resume-strip{background:#155b83;border:3px solid #0b446d;color:#fff;box-shadow:0 4px 0 #0b375b}.resume-strip strong{color:#fff}.resume-strip p{color:#e2f3fa}.resume-strip .primary,main .primary{background:#e85b3e;color:#fff}.resume-strip .primary:hover,main .primary:hover{background:#c9402c}.resume-strip .secondary{background:#e7f2f2;color:#254659}.game-result .close{color:#6e4937}
/* The trail climbs from the first stage at the bottom to the final stage above. */
.game-path{grid-template-columns:1fr;gap:8px;padding-top:36px}.game-path:before{content:'';position:absolute;top:55px;bottom:70px;left:50%;border-left:4px dashed #fff7bbbe;pointer-events:none}.game-level{width:min(68%,400px);justify-self:start}.game-level:nth-child(even){justify-self:end}.game-actions{display:flex;align-items:center;gap:12px;flex:none}.game-locate{min-height:44px;padding:9px 13px;border:2px solid #f4d27a;background:#174870;color:#fff;border-radius:5px;font-weight:700;font-size:12px}.game-locate:hover{background:#225e86}.game-locate:focus-visible{outline:3px solid #fff;outline-offset:2px}.game-locate:disabled{opacity:.5;cursor:not-allowed}
@media(max-width:700px){.game-path{gap:10px}.game-path:before{left:54px}.game-level,.game-level:nth-child(even){width:100%;justify-self:stretch}.game-actions{display:flex;width:100%;gap:8px}.game-actions .game-locate{flex:1}.game-actions .game-go{width:auto;flex:1}}
.preview-shell .game-path{gap:10px}.preview-shell .game-path:before{left:54px}.preview-shell .game-level,.preview-shell .game-level:nth-child(even){width:100%;justify-self:stretch}.preview-shell .game-actions{display:flex;width:100%;gap:8px}.preview-shell .game-actions .game-locate{flex:1}.preview-shell .game-actions .game-go{width:auto;flex:1}
/* JavaScript drives the single stage-to-stage jump; avoid replaying a CSS jump on landing. */
.game-level.advancing .game-player{animation:none;transform-origin:center bottom;will-change:transform}
.world-tools{display:flex;align-items:center;gap:16px}.game-sound{min-height:38px;padding:7px 10px;background:#0d4169;color:#fff;border:2px solid #80bedc;border-radius:5px;font-size:11px;font-weight:700;white-space:nowrap}.game-sound[aria-pressed="false"]{background:#4f6170;color:#fff;border-color:#aebcc7}.game-sound:focus-visible{outline:3px solid #ffe57a;outline-offset:3px}@media(max-width:700px){.world-tools{gap:8px}.game-sound{min-height:38px;padding:7px 8px}}

/* Quiz scene and feedback share the adventure map's visual language. */
.modal.quiz-modal{padding:0 25px 20px;overflow-y:auto;background:#fff6dd;border:4px solid #8d512b;border-radius:10px;scrollbar-color:#bb8b54 #f5e4bd}.quiz-modal .close{z-index:3;top:12px;right:12px;width:34px;height:34px;line-height:30px;background:#123f61e8;color:white;border:2px solid #cbeaf4;border-radius:5px}.quiz-scene{position:relative;height:100px;margin:0 -25px;overflow:hidden;background:#7fcaf1 url('/ledger-world.png') center 67% / cover no-repeat;image-rendering:pixelated;border-bottom:4px solid #9a582e}.quiz-scene-ground{position:absolute;bottom:0;left:0;right:0;height:17px;border-top:6px solid #58a646;background:repeating-linear-gradient(90deg,#b8723c 0 22px,#96542d 22px 25px)}.quiz-scene-player{position:absolute;bottom:14px;left:18%;width:58px;height:70px;background:url('/ledger-explorer.png') center bottom / contain no-repeat;transform-origin:center bottom}.quiz-scene-block{position:absolute;bottom:24px;left:44%;display:grid;place-items:center;width:40px;height:40px;background:#f8bd3d;color:#6c3b16;border:4px solid #a85c29;box-shadow:inset 0 0 0 2px #ffe18a;font-size:23px;line-height:1;font-weight:900}.quiz-scene-correct .quiz-scene-block{background:#a7da68;color:#27562a;border-color:#568c3a}.quiz-scene-wrong .quiz-scene-block{background:#f2a06c;color:#73352a;border-color:#aa593a}.quiz-hud{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0 10px;color:#694724;font-size:11px;font-weight:800;letter-spacing:.05em}.quiz-sound{padding:6px 10px;min-height:36px;border:2px solid #8f6a46;border-radius:5px;background:#fffdf1;color:#563a24;font-size:11px;font-weight:700}.quiz-sound[aria-pressed='false']{background:#e2ded2;color:#4d4a42}.quiz-sound:focus-visible{outline:3px solid #d65436;outline-offset:2px}.quiz-modal .quiz-meta{margin-right:0;color:#174868;font-size:12px;font-weight:700}.quiz-modal .quiz-meta span:last-child{color:#6d5139;font-variant-numeric:tabular-nums}.quiz-modal .progress-track{height:8px;background:#dfc99e;border:1px solid #b99a70;border-radius:3px;margin:10px 0}.quiz-modal .progress-track i{background:#65aa48!important;border-radius:0}.quiz-modal .question-type-row{margin-top:14px;color:#6b533d;font-size:12px;font-weight:650}.quiz-modal .question-heading{align-items:flex-start}.quiz-modal .question{font-size:19px!important;line-height:1.55;margin:13px 0 16px;color:#1f3443!important}.quiz-modal .favorite-toggle{margin-top:13px;color:#805927}.quiz-modal .options{gap:8px;margin-bottom:12px}.quiz-modal .option{min-height:52px;padding:10px 12px;border-radius:6px}.quiz-modal .option b{width:29px;height:29px;border-radius:4px;background:#f7e7bd;color:#654520}.quiz-modal .option.selected{background:#fff0b0;border-color:#c38928}.quiz-modal .option.correct{background:#d9efc2;border-color:#528b40;color:#244224}.quiz-modal .option.wrong{background:#ffdfd4;border-color:#c35c45;color:#5f2f26}.quiz-modal .explanation{line-height:1.6;border:2px solid #9ab976;border-radius:6px;margin:12px 0;color:#304d31}.quiz-modal .explanation.feedback-wrong{background:#ffeadb;border-color:#d19972;color:#633c2e}.quiz-modal .explanation.feedback-wrong strong{color:#993d28}.quiz-modal .quiz-footer{margin-top:16px}.quiz-modal .quiz-footer small{font-size:11px;line-height:1.5}.quiz-modal .sync-attempt{color:#755330}.quiz-scene-correct.quiz-feedback-new .quiz-scene-player{animation:quiz-win-jump .7s cubic-bezier(.2,.75,.3,1)}.quiz-scene-wrong.quiz-feedback-new .quiz-scene-player{animation:quiz-miss-wobble .55s ease-in-out}.quiz-scene.quiz-feedback-new .quiz-scene-block{animation:quiz-block-bump .55s cubic-bezier(.2,.8,.3,1)}.options.quiz-feedback-new .correct{animation:quiz-answer-pop .45s ease-out}.options.quiz-feedback-new .wrong{animation:quiz-answer-shake .45s ease-in-out}.explanation.quiz-feedback-new{animation:quiz-explain-in .35s ease-out}@keyframes quiz-win-jump{0%,100%{transform:translateY(0) scale(1)}18%{transform:translateY(3px) scale(1.1,.9)}50%{transform:translateY(-24px) scale(.95,1.05)}80%{transform:translateY(0) scale(1.08,.92)}}@keyframes quiz-miss-wobble{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px) rotate(-5deg)}50%{transform:translateX(7px) rotate(5deg)}75%{transform:translateX(-3px)}}@keyframes quiz-block-bump{0%,100%{transform:translateY(0)}45%{transform:translateY(-9px)}}@keyframes quiz-answer-pop{0%{transform:scale(.98)}50%{transform:scale(1.015)}100%{transform:scale(1)}}@keyframes quiz-answer-shake{0%,100%{transform:translateX(0)}25%{transform:translateX(-4px)}55%{transform:translateX(4px)}80%{transform:translateX(-2px)}}@keyframes quiz-explain-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}@media(max-width:700px){.modal.quiz-modal{padding:0 17px 17px;max-height:88dvh}.quiz-modal .quiz-scene{height:80px;margin:0 -17px}.quiz-modal .quiz-scene-player{height:57px;width:47px}.quiz-modal .quiz-scene-block{width:34px;height:34px;font-size:19px}.quiz-modal .quiz-hud{margin:10px 0 8px}.quiz-modal .question{font-size:17px!important;line-height:1.55}.quiz-modal .quiz-footer{align-items:stretch}.quiz-modal .quiz-footer .primary{min-height:44px}}
.preview-shell .modal.quiz-modal{padding:0 17px 17px}.preview-shell .quiz-modal .quiz-scene{height:80px;margin:0 -17px}.preview-shell .quiz-modal .quiz-scene-player{height:57px;width:47px}.preview-shell .quiz-modal .quiz-scene-block{width:34px;height:34px;font-size:19px}.preview-shell .quiz-modal .question{font-size:17px!important}@media(prefers-reduced-motion:reduce){.quiz-scene.quiz-feedback-new .quiz-scene-player,.quiz-scene.quiz-feedback-new .quiz-scene-block,.options.quiz-feedback-new .option,.explanation.quiz-feedback-new{animation:none}}
.quiz-modal .favorite-toggle{background:#fffdf1;border:2px solid #b18a55;border-radius:5px;color:#624222;min-height:36px}.quiz-modal .favorite-toggle.active{background:#fbe0a2;border-color:#a66c23;color:#603c14}.quiz-modal .favorite-toggle:focus-visible{outline:3px solid #d65436;outline-offset:2px}

/* Stage-clear reward screen: real server reward, with decorative pixel-game motion. */
.modal.reward-modal{width:min(100%,510px);padding:0;overflow-y:auto;border:4px solid #80502d;border-radius:10px;background:#fff3d3;max-height:90dvh;scrollbar-color:#bb8b54 #f6e5bd}.reward-modal .close{z-index:4;top:11px;right:11px;width:34px;height:34px;line-height:29px;color:white;background:#113e60e8;border:2px solid #e4f4f7;border-radius:5px}.reward-result{text-align:center;padding:0}.reward-scene{height:135px;position:relative;overflow:hidden;background:#76c9f0 url('/ledger-world.png') center 67% / cover no-repeat;image-rendering:pixelated;border-bottom:4px solid #8e4d29}.reward-scene-ground{position:absolute;bottom:0;left:0;right:0;height:19px;border-top:6px solid #58a646;background:repeating-linear-gradient(90deg,#b46d37 0 22px,#8d4e29 22px 25px)}.reward-hero{position:absolute;bottom:15px;left:18%;width:62px;height:75px;background:url('/ledger-explorer.png') center bottom / contain no-repeat;transform-origin:center bottom;animation:reward-hero-hop 1s .15s cubic-bezier(.2,.7,.2,1) both}.reward-chest{position:absolute;bottom:18px;left:57%;width:66px;height:56px;transform-origin:center bottom;animation:reward-chest-bounce .8s .2s ease-out both}.reward-chest i{position:absolute;display:block}.chest-lid{top:2px;left:0;width:66px;height:24px;border:4px solid #683516;background:#c97835;border-radius:9px 9px 2px 2px;box-shadow:inset 0 4px #efb05a;transform-origin:left bottom;animation:reward-chest-open .55s .65s ease-out both}.chest-body{bottom:0;width:66px;height:32px;background:#ae5e29;border:4px solid #683516;box-shadow:inset 0 4px #e49a47}.chest-lock{left:27px;bottom:13px;width:13px;height:14px;background:#ffcf57;border:2px solid #874d20}.reward-coin{position:absolute;bottom:46px;left:64%;width:17px;height:22px;border:3px solid #a76520;border-radius:50%;background:#ffd855;opacity:0}.coin-a{animation:reward-coin-a 1s .72s ease-out both}.coin-b{animation:reward-coin-b 1s .82s ease-out both}.coin-c{animation:reward-coin-c 1s .92s ease-out both}.reward-sky-star{position:absolute;width:7px;height:7px;background:#fff4ab;transform:rotate(45deg);animation:reward-sparkle .8s .7s ease-out both}.star-a{top:22px;left:37%}.star-b{top:29px;left:77%}.star-c{top:58px;left:83%}.reward-content{padding:15px 25px 19px}.reward-banner{display:inline-flex;align-items:center;gap:8px;color:#884923;font-size:11px;font-weight:800;letter-spacing:.12em}.reward-banner svg{width:15px;height:15px;fill:#f3be42;stroke:#9e6323}.reward-result h2{font-size:25px;margin:5px 0 3px;color:#263c49}.reward-result .reward-level{margin:0;color:#6e5b46;font-size:12px}.reward-stats{display:flex;justify-content:center;gap:0;margin:15px 0 12px}.reward-stats>div{min-width:120px;padding:0 15px}.reward-stats>div+div{border-left:1px solid #ddc79d}.reward-stats strong{display:block;color:#bf5530;font-size:26px;line-height:1.2;font-variant-numeric:tabular-nums}.reward-stats strong small{font-size:15px;color:#805e43}.reward-stats span{display:block;color:#705f51;font-size:11px;margin-top:3px}.reward-earned{display:flex;align-items:center;gap:12px;padding:10px 13px;text-align:left;border:2px solid #d2a34c;border-radius:6px;background:#fff5d5;animation:reward-earned-in .45s .7s ease-out both}.energy-coin{display:grid;place-items:center;width:40px;height:40px;flex:none;border:3px solid #c57b23;border-radius:50%;background:#ffda64;color:#a5581d}.energy-coin svg{width:19px;height:19px;fill:#a5581d}.reward-earned-text{flex:1;min-width:0}.reward-earned-text strong,.reward-earned-text small{display:block}.reward-earned-text strong{color:#654124;font-size:12px}.reward-earned-text small{color:#7e644d;font-size:11px;margin-top:2px}.reward-earned b{color:#ba512c;font-size:25px;font-variant-numeric:tabular-nums}.reward-result .auto-advance-note,.reward-result .reward-finish-note{margin:10px 0 0;color:#695b4c;font-size:11px;line-height:1.4}.reward-result .primary{margin-top:11px;min-height:45px}.reward-result .result-map{display:block;margin:6px auto 0;padding:8px 16px;background:none;color:#405d6b!important;font-size:11px}.reward-result .result-map:focus-visible{outline:3px solid #d65436;outline-offset:2px}@keyframes reward-hero-hop{0%,100%{transform:translateY(0)}20%{transform:translateY(2px) scale(1.07,.93)}55%{transform:translateY(-15px)}}@keyframes reward-chest-bounce{0%{transform:translateY(30px) scale(.8);opacity:0}75%{transform:translateY(-5px) scale(1.05)}100%{transform:translateY(0) scale(1);opacity:1}}@keyframes reward-chest-open{from{transform:rotate(0)}to{transform:rotate(-26deg)}}@keyframes reward-coin-a{0%{opacity:0;transform:translate(0,0)}20%{opacity:1}100%{opacity:0;transform:translate(-38px,-55px)}}@keyframes reward-coin-b{0%{opacity:0;transform:translate(0,0)}20%{opacity:1}100%{opacity:0;transform:translate(0,-75px)}}@keyframes reward-coin-c{0%{opacity:0;transform:translate(0,0)}20%{opacity:1}100%{opacity:0;transform:translate(38px,-55px)}}@keyframes reward-sparkle{0%{opacity:0;transform:rotate(45deg) scale(.3)}35%{opacity:1;transform:rotate(45deg) scale(1.3)}100%{opacity:0;transform:rotate(45deg) scale(.6)}}@keyframes reward-earned-in{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@media(max-width:700px){.modal.reward-modal{max-height:88dvh}.reward-scene{height:110px}.reward-content{padding:12px 17px 14px}.reward-result h2{font-size:22px}.reward-stats{margin:10px 0}.reward-stats>div{min-width:105px}.reward-earned{padding:8px 10px}.reward-result .primary{min-height:43px}}.preview-shell .modal.reward-modal{max-height:88dvh}.preview-shell .reward-scene{height:110px}.preview-shell .reward-content{padding:12px 17px 14px}.preview-shell .reward-result h2{font-size:22px}.preview-shell .reward-stats{margin:10px 0}.preview-shell .reward-stats>div{min-width:105px}.preview-shell .reward-earned{padding:8px 10px}@media(prefers-reduced-motion:reduce){.reward-hero,.reward-chest,.chest-lid,.reward-coin,.reward-sky-star,.reward-earned{animation:none}.reward-coin,.reward-sky-star{display:none}}

/* A gentle checkpoint for an unsuccessful attempt. */
.modal.fail-modal{width:min(100%,510px);max-height:90dvh;padding:0;overflow-y:auto;background:#fff4db;border:4px solid #82532f;border-radius:10px;scrollbar-color:#bb8b54 #f6e5bd}.fail-modal .close{z-index:4;top:11px;right:11px;width:34px;height:34px;line-height:29px;color:#fff;background:#113e60e8;border:2px solid #e4f4f7;border-radius:5px}.retry-result{text-align:center;padding:0}.retry-scene{height:135px;position:relative;overflow:hidden;background:#92c9e1 url('/ledger-world.png') center 67% / cover no-repeat;image-rendering:pixelated;border-bottom:4px solid #8e4d29}.retry-scene:before{content:'';position:absolute;inset:0;background:#335b7650}.retry-scene-ground{position:absolute;bottom:0;left:0;right:0;height:19px;border-top:6px solid #5b9e4b;background:repeating-linear-gradient(90deg,#b46d37 0 22px,#8d4e29 22px 25px)}.retry-hero{position:absolute;bottom:15px;left:26%;width:62px;height:75px;background:url('/ledger-explorer.png') center bottom / contain no-repeat;transform-origin:center bottom;animation:retry-hero-stumble 1.1s cubic-bezier(.2,.7,.3,1) both}.retry-block{position:absolute;bottom:23px;left:59%;display:grid;place-items:center;width:48px;height:48px;background:#edab5d;color:#6e391d;border:4px solid #9c542a;box-shadow:inset 0 0 0 2px #ffd38e;font-size:27px;font-weight:900;animation:retry-block-bump .65s .25s ease-out both}.retry-dust{position:absolute;bottom:17px;width:9px;height:9px;border-radius:2px;background:#fff5d2;opacity:0}.dust-a{left:24%;animation:retry-dust-left .7s .2s ease-out both}.dust-b{left:38%;animation:retry-dust-right .7s .2s ease-out both}.retry-content{padding:15px 25px 19px}.retry-label{display:inline-block;padding:4px 10px;border:2px solid #d3a168;border-radius:4px;background:#fff0cd;color:#865125;font-size:11px;font-weight:800}.retry-result h2{font-size:24px;margin:8px 0 3px;color:#273e4b}.retry-result .retry-level{margin:0;color:#6d5a49;font-size:12px}.retry-stats{display:flex;justify-content:center;gap:0;margin:16px 0 12px}.retry-stats>div{min-width:125px;padding:0 15px}.retry-stats>div+div{border-left:1px solid #dec9a8}.retry-stats strong{display:block;color:#ad4e2e;font-size:26px;line-height:1.2;font-variant-numeric:tabular-nums}.retry-stats strong small{font-size:15px;color:#805e43}.retry-stats span{display:block;color:#6c5f52;font-size:11px;margin-top:3px}.retry-message{display:flex;align-items:flex-start;gap:11px;padding:11px 13px;text-align:left;border:2px solid #d5b47c;border-radius:6px;background:#fff8e4}.retry-message-icon{display:grid;place-items:center;flex:none;width:35px;height:35px;border:2px solid #b97c35;border-radius:50%;background:#ffe097;color:#a35823}.retry-message-icon svg{width:17px;height:17px;fill:#a35823}.retry-message strong{display:block;color:#634522;font-size:13px}.retry-result .retry-message p{margin:4px 0 0;color:#675744;font-size:12px;line-height:1.55}.retry-result .primary{margin-top:14px;min-height:45px}.retry-result .retry-map{display:block;margin:6px auto 0;padding:8px 16px;background:none;color:#405d6b!important;font-size:11px}.retry-result .retry-map:focus-visible{outline:3px solid #d65436;outline-offset:2px}@keyframes retry-hero-stumble{0%{transform:translateY(-15px)}35%{transform:translateY(0) rotate(-8deg) scale(1.08,.92)}65%{transform:translateY(0) rotate(5deg)}100%{transform:translateY(0) rotate(0)}}@keyframes retry-block-bump{0%,100%{transform:translateY(0)}45%{transform:translateY(-6px)}}@keyframes retry-dust-left{0%{opacity:0;transform:translate(0,0)}20%{opacity:.9}100%{opacity:0;transform:translate(-20px,-8px)}}@keyframes retry-dust-right{0%{opacity:0;transform:translate(0,0)}20%{opacity:.9}100%{opacity:0;transform:translate(20px,-8px)}}@media(max-width:700px){.modal.fail-modal{max-height:88dvh}.retry-scene{height:110px}.retry-content{padding:12px 17px 14px}.retry-result h2{font-size:21px}.retry-stats{margin:12px 0 10px}.retry-stats>div{min-width:100px}.retry-message{padding:9px 10px}.retry-result .primary{min-height:43px}}.preview-shell .modal.fail-modal{max-height:88dvh}.preview-shell .retry-scene{height:110px}.preview-shell .retry-content{padding:12px 17px 14px}.preview-shell .retry-result h2{font-size:21px}.preview-shell .retry-stats{margin:12px 0 10px}.preview-shell .retry-stats>div{min-width:100px}.preview-shell .retry-message{padding:9px 10px}@media(prefers-reduced-motion:reduce){.retry-hero,.retry-block,.retry-dust{animation:none}.retry-dust{display:none}}

/* Failed-attempt analysis always uses the submitted attempt snapshot. */
.failed-question-panel{margin:13px 0 0;padding:10px 12px;text-align:left;border:2px solid #d7bd91;border-radius:6px;background:#fffaf0}.retry-result .failed-summary,.retry-result .failed-loading{margin:0;color:#594b3c;font-size:12px;line-height:1.5}.failed-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:9px}.failed-actions .secondary,.failed-question-panel .secondary{display:flex;align-items:center;justify-content:center;min-height:41px;padding:8px;border:2px solid #9b744a;border-radius:5px;background:#fffdf1;color:#51391f;font-size:12px;font-weight:700;line-height:1.35}.failed-actions .secondary:hover,.failed-question-panel .secondary:hover{background:#ffebbb}.failed-actions .secondary:disabled{opacity:.55;cursor:wait}.modal.failed-analysis-modal{width:min(100%,680px);max-height:90dvh;padding:25px;background:#fff4db;border:4px solid #82532f;border-radius:10px;scrollbar-color:#bb8b54 #f6e5bd}.failed-analysis .analysis-header{padding-right:28px}.analysis-header>span{font-size:11px;font-weight:800;color:#865125}.failed-analysis .analysis-header h2{margin:4px 0 6px;color:#263e4c;font-size:24px}.failed-analysis .analysis-header p,.failed-analysis .analysis-footer p{margin:0;color:#5a564c;font-size:12px;line-height:1.6}.analysis-list{display:grid;gap:12px;margin:18px 0}.analysis-card{padding:15px;border:2px solid #d8bd91;border-radius:7px;background:#fffdf4;text-align:left}.analysis-card-meta{color:#865125;font-size:11px;font-weight:700}.analysis-card h3{margin:8px 0 12px;color:#273e4a;font-size:15px;line-height:1.6;overflow-wrap:anywhere}.analysis-material{margin:8px 0;color:#344d59;font-size:12px;line-height:1.6}.analysis-material summary{cursor:pointer;font-weight:700}.failed-analysis .analysis-material p{margin:6px 0;color:#344d59;white-space:pre-wrap;overflow-wrap:anywhere}.analysis-answer{display:flex;gap:10px;padding:8px 10px;margin:6px 0;border-radius:5px;font-size:12px;line-height:1.5}.analysis-answer strong{flex:none}.analysis-answer span{overflow-wrap:anywhere}.analysis-yours{background:#ffeadf;color:#773d2b}.analysis-correct{background:#e1f1d4;color:#315a31}.analysis-explanation{margin-top:10px;color:#354c51;font-size:12px;line-height:1.6}.analysis-explanation strong{color:#25505d}.failed-analysis .analysis-explanation p{margin:4px 0 0;color:#354c51;white-space:pre-wrap;overflow-wrap:anywhere}.analysis-footer{display:grid;gap:8px}.analysis-footer .primary{width:100%;margin:0}.analysis-footer .secondary{width:100%;background:#e6ead9;color:#364c4a}.analysis-footer .primary:focus-visible,.analysis-footer .secondary:focus-visible,.failed-actions button:focus-visible{outline:3px solid #c65732;outline-offset:2px}@media(max-width:700px){.failed-actions{grid-template-columns:1fr}.modal.failed-analysis-modal{padding:18px;max-height:88dvh}.failed-analysis .analysis-header h2{font-size:21px}.analysis-card{padding:12px}.analysis-card h3{font-size:14px}}.preview-shell .failed-actions{grid-template-columns:1fr}.preview-shell .modal.failed-analysis-modal{padding:18px;max-height:88dvh}

/* Collection and stats surfaces retain light text on their dark panels. */
#main:is([data-view='errors'],[data-view='favorites'],[data-view='stats']) .collection-summary{color:#264f63;font-size:12px;line-height:1.5}
#main:is([data-view='errors'],[data-view='favorites']) .error-entry{background:#173c58;border:2px solid #2a6582;color:#f4f8fb}
#main:is([data-view='errors'],[data-view='favorites']) .error-entry h3{color:#fff;font-size:15px;line-height:1.6}
#main:is([data-view='errors'],[data-view='favorites']) .error-entry p{color:#e2edf4;line-height:1.7}
#main:is([data-view='errors'],[data-view='favorites']) .collection-heading small{color:#cfeaff}
#main:is([data-view='errors'],[data-view='favorites']) .collection-heading .text-action{color:#ffe17a;font-weight:700}
#main[data-view='favorites'] .favorite-actions .secondary{background:#eaf5fb;color:#173f5c;font-weight:700}
#main:is([data-view='errors'],[data-view='favorites'],[data-view='stats']) .empty-state{background:#173c58;color:#f4f8fb;border:2px dashed #5492aa}
#main:is([data-view='errors'],[data-view='favorites'],[data-view='stats']) .empty-state h2{color:#fff}
#main:is([data-view='errors'],[data-view='favorites'],[data-view='stats']) .empty-state p{color:#d8eaf4}
#main:is([data-view='errors'],[data-view='favorites'],[data-view='stats']) .empty-state>svg{color:#ffe17a}
#main[data-view='stats'] .learning-metrics>div,#main[data-view='stats'] .stats-panel{background:#173c58;border:2px solid #2a6582;color:#f4f8fb}
#main[data-view='stats'] .learning-metrics strong{color:#fff}#main[data-view='stats'] .learning-metrics span,#main[data-view='stats'] .learning-metrics small{color:#d9edf7}
#main[data-view='stats'] .stats-panel h2,#main[data-view='stats'] .subject-stat strong{color:#fff}#main[data-view='stats'] .stats-panel .section-line>span,#main[data-view='stats'] .subject-stat span,#main[data-view='stats'] .subject-stat small,#main[data-view='stats'] .stats-panel .field-help{color:#d9edf7}
#main[data-view='stats'] .day-column,#main[data-view='stats'] .day-column>span{color:#e8f5fb}#main[data-view='stats'] .day-track{background:#345c72}#main[data-view='stats'] .day-track i{background:#f4cb56}#main[data-view='stats'] .subject-stat .progress-track{background:#345c72}#main[data-view='stats'] .subject-stat .progress-track i{background:#a7d46e}
#main[data-view='stats']>.field-help,#main[data-view='stats'] .stats-loading{color:#234d63;font-size:12px;line-height:1.6}

/* Completion feedback for focused wrong-question practice. */
.modal.review-modal{width:min(100%,510px);padding:0;max-height:90dvh;overflow-y:auto;background:#fff4db;border:4px solid #82532f;border-radius:10px;scrollbar-color:#bb8b54 #f6e5bd}.review-modal .close{z-index:4;top:11px;right:11px;width:34px;height:34px;line-height:29px;color:#fff;background:#113e60e8;border:2px solid #e4f4f7;border-radius:5px}.review-result{text-align:center;padding:0}.review-scene{height:130px;position:relative;overflow:hidden;background:#76c9f0 url('/ledger-world.png') center 67% / cover no-repeat;image-rendering:pixelated;border-bottom:4px solid #8e4d29}.review-scene-progress:before{content:'';position:absolute;inset:0;background:#335b7630}.review-ground{position:absolute;bottom:0;left:0;right:0;height:19px;border-top:6px solid #58a646;background:repeating-linear-gradient(90deg,#b46d37 0 22px,#8d4e29 22px 25px)}.review-hero{position:absolute;bottom:15px;left:26%;width:62px;height:75px;background:url('/ledger-explorer.png') center bottom / contain no-repeat;transform-origin:center bottom}.review-scene-win .review-hero{animation:review-win-hop .85s .15s ease-out both}.review-block{position:absolute;bottom:23px;left:60%;display:grid;place-items:center;width:48px;height:48px;background:#a6d66b;color:#315b26;border:4px solid #608f37;box-shadow:inset 0 0 0 2px #d8ef9f;font-size:23px;font-weight:900}.review-scene-win .review-block{animation:review-block-pop .65s .3s ease-out both}.review-scene-progress .review-block{background:#f1bb6e;border-color:#a36a33;color:#6e4423}.review-content{padding:17px 25px 20px}.review-kicker{display:inline-block;color:#5b772b;font-size:11px;font-weight:800;letter-spacing:.08em}.review-scene-progress+.review-content .review-kicker{color:#945c2b}.review-result h2{margin:6px 0;color:#263e4c;font-size:24px}.review-result .review-description{margin:0;color:#5c5c4d;font-size:12px;line-height:1.6}.review-score{margin:14px auto;padding:10px;border-top:1px solid #dfc79d;border-bottom:1px solid #dfc79d}.review-score strong{display:block;color:#548334;font-size:29px;line-height:1.2;font-variant-numeric:tabular-nums}.review-score strong small{color:#6c6250;font-size:16px}.review-score span{display:block;margin-top:3px;color:#665d4d;font-size:11px}.review-result .review-detail,.review-result .review-unavailable{margin:10px 0;color:#655b4e;font-size:11px;line-height:1.6}.review-result .review-unavailable{color:#9a4a2b}.review-content .primary,.review-content .review-return{width:100%;min-height:44px;margin:10px 0 0}.review-content .review-return.secondary{background:#e4ead6;color:#2c4d45}.review-content .review-map{display:block;margin:5px auto 0;padding:8px 16px;background:none;color:#405d6b!important;font-size:11px}.review-content button:focus-visible{outline:3px solid #d65436;outline-offset:2px}@keyframes review-win-hop{0%,100%{transform:translateY(0)}20%{transform:translateY(2px) scale(1.08,.92)}55%{transform:translateY(-22px) scale(.96,1.04)}}@keyframes review-block-pop{0%,100%{transform:translateY(0) scale(1)}45%{transform:translateY(-9px) scale(1.08)}}@media(max-width:700px){.modal.review-modal{max-height:88dvh}.review-scene{height:105px}.review-content{padding:13px 17px 15px}.review-result h2{font-size:21px}.review-score{margin:10px auto;padding:8px}}.preview-shell .modal.review-modal{max-height:88dvh}.preview-shell .review-scene{height:105px}.preview-shell .review-content{padding:13px 17px 15px}.preview-shell .review-result h2{font-size:21px}.preview-shell .review-score{margin:10px auto;padding:8px}@media(prefers-reduced-motion:reduce){.review-scene-win .review-hero,.review-scene-win .review-block{animation:none}}

/* Achievement cards stay legible before and after they are earned. */
#main[data-view='achievements'] .badge{background:#173c58;border:2px solid #2a6582;color:#fff;opacity:1}
#main[data-view='achievements'] .badge h3{color:#fff;font-weight:700}
#main[data-view='achievements'] .badge p{color:#dcecf5;font-size:12px;line-height:1.6}
#main[data-view='achievements'] .badge svg{color:#ffdb65}
#main[data-view='achievements'] .badge .status{display:inline-block;background:#f6ca57;color:#54350f;font-weight:700}
#main[data-view='achievements'] .badge.locked{background:#274b60;border-color:#50798c;opacity:1}
#main[data-view='achievements'] .badge.locked svg{color:#c2e0ec}
#main[data-view='achievements'] .badge.locked .status{background:#436477;color:#f2f9fc;font-weight:700}

/* A newly unlocked achievement overlays, rather than replaces, the stage result. */
.achievement-backdrop{position:fixed;inset:0;z-index:95;display:grid;place-items:center;padding:16px;background:#071d35d9;overscroll-behavior:contain}.achievement-popup{width:min(100%,390px);max-height:90dvh;overflow:auto;background:#fff4dc;color:#263e4c;border:4px solid #82512c;border-radius:10px;box-shadow:0 18px 60px #07152880;text-align:center;animation:achievement-enter .4s cubic-bezier(.2,.8,.2,1) both}.achievement-sky{height:100px;position:relative;overflow:hidden;background:#78c9ef url('/ledger-world.png') center 67% / cover no-repeat;border-bottom:4px solid #8e4d29;image-rendering:pixelated}.achievement-ground{position:absolute;bottom:0;left:0;right:0;height:17px;border-top:6px solid #58a646;background:repeating-linear-gradient(90deg,#b46d37 0 22px,#8d4e29 22px 25px)}.achievement-hero{position:absolute;bottom:12px;left:15%;width:58px;height:70px;background:url('/ledger-explorer.png') center bottom / contain no-repeat;animation:achievement-hero-hop .9s .15s ease-out both}.achievement-spark{position:absolute;width:9px;height:9px;background:#fff3a6;transform:rotate(45deg);animation:achievement-sparkle 1.1s .3s ease-out both}.spark-one{left:45%;top:20px}.spark-two{left:70%;top:34px}.spark-three{left:82%;top:14px}.achievement-content{padding:18px 22px 22px}.achievement-kicker{color:#985b21;font-size:12px;font-weight:800;letter-spacing:.08em}.achievement-medal{display:grid;place-items:center;width:78px;height:78px;margin:12px auto 10px;background:#ffda69;color:#7d4c1a;border:5px solid #b67527;border-radius:50%;box-shadow:inset 0 0 0 4px #ffe99c,0 5px 0 #8a531e;animation:achievement-medal-pop .7s .2s cubic-bezier(.2,.8,.2,1) both}.achievement-medal svg{width:38px;height:38px;stroke-width:1.8}.achievement-popup h2{margin:10px 0 6px;color:#263e4c;font-size:24px}.achievement-popup p{margin:0 0 17px;color:#5d5a4d;font-size:13px;line-height:1.6}.achievement-popup .achievement-continue{width:100%;min-height:46px;background:#e95939;color:#fff}.achievement-popup .achievement-continue:focus-visible{outline:3px solid #a6422a;outline-offset:3px}@keyframes achievement-enter{from{opacity:0;transform:translateY(14px) scale(.96)}to{opacity:1;transform:translateY(0) scale(1)}}@keyframes achievement-medal-pop{0%{transform:translateY(12px) scale(.65);opacity:0}65%{transform:translateY(-5px) scale(1.08);opacity:1}100%{transform:translateY(0) scale(1);opacity:1}}@keyframes achievement-hero-hop{0%,100%{transform:translateY(0)}20%{transform:translateY(2px) scale(1.08,.92)}55%{transform:translateY(-18px)}}@keyframes achievement-sparkle{0%{opacity:0;transform:rotate(45deg) scale(.3)}35%{opacity:1;transform:rotate(45deg) scale(1.4)}100%{opacity:0;transform:rotate(45deg) scale(.5)}}@media(max-width:600px){.achievement-popup{width:min(100%,365px)}.achievement-sky{height:82px}.achievement-content{padding:14px 18px 18px}.achievement-medal{width:68px;height:68px}.achievement-medal svg{width:32px;height:32px}.achievement-popup h2{font-size:21px}}@media(prefers-reduced-motion:reduce){.achievement-popup,.achievement-medal,.achievement-hero,.achievement-spark{animation:none}.achievement-spark{display:none}}
/* Celebration stays isolated in one canvas; text and actions remain interactive. */
.achievement-effects{position:absolute;inset:0;width:100%;height:100%;z-index:2;pointer-events:none;contain:strict}
.achievement-popup{position:relative;z-index:1}
.achievement-award{position:relative;isolation:isolate;display:flow-root}
.achievement-aura{position:absolute;left:50%;top:50%;width:180px;height:180px;z-index:-1;pointer-events:none;background:repeating-conic-gradient(from 0deg,#f6bd4845 0deg 9deg,transparent 9deg 30deg);border-radius:50%;mask-image:radial-gradient(circle,#000 12%,transparent 68%);animation:achievement-rays 2s .35s ease-out both}
.achievement-medal{position:relative;overflow:hidden}
.achievement-medal:after{content:'';position:absolute;inset:-30%;background:linear-gradient(110deg,transparent 35%,#fff8d9cc 48%,transparent 62%);transform:translateX(-110%);animation:achievement-shine .65s .65s ease-out both;pointer-events:none}
@keyframes achievement-rays{0%{opacity:0;transform:translate(-50%,-50%) rotate(-18deg) scale(.65)}25%{opacity:1}75%{opacity:.7}100%{opacity:0;transform:translate(-50%,-50%) rotate(30deg) scale(1.1)}}
@keyframes achievement-shine{to{transform:translateX(110%)}}
@media(prefers-reduced-motion:reduce){.achievement-effects,.achievement-aura{display:none}.achievement-medal:after{animation:none;display:none}}
/* Stage completion uses the same bounded coins/fireworks renderer as achievements. */
.backdrop.result-celebration-host{backdrop-filter:none;-webkit-backdrop-filter:none}
.result-celebration-host .reward-modal{z-index:1}
.result-celebration-host .reward-scene>.reward-coin{display:none}
/* Collected coins count toward the displayed server reward; no extra rewards are issued. */
.reward-count{display:inline-block;min-width:3ch;text-align:right;font-variant-numeric:tabular-nums}
.reward-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.reward-collecting .energy-coin{animation:reward-absorb .35s 1.4s 3 ease-out}
@keyframes reward-absorb{0%,100%{transform:scale(1)}35%{transform:scale(1.14)}65%{transform:scale(.98)}}
@media(prefers-reduced-motion:reduce){.reward-collecting .energy-coin{animation:none}}
/* The close control belongs to the cream result area, leaving the scene uninterrupted. */
.reward-content{position:relative}
.reward-modal .reward-content>.close{top:0;right:3px;display:grid;place-items:center;width:44px;height:44px;line-height:1;margin:0;background:transparent;border:0;border-radius:50%;color:#795638;font-size:24px}
.reward-modal .reward-content>.close:hover{background:#f2dfba;color:#4d321f}
.reward-modal .reward-content>.close:focus-visible{outline:2px solid #9e6323;outline-offset:-6px}
.reward-modal .reward-banner{max-width:calc(100% - 56px)}

/* Fit the map screen to the viewport; only the vertical adventure trail scrolls. */
body.map-viewport{height:100dvh;overflow:hidden;padding-bottom:0}
.map-viewport .app{height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.map-viewport .topbar{height:60px;min-height:60px;flex:none;padding:0 24px}
.map-viewport #main{width:100%;max-width:1540px;margin:0 auto;min-height:0;flex:1;display:flex;flex-direction:column;gap:10px;padding:12px 24px 16px}
.map-viewport .game-welcome,.map-viewport .game-note,.map-viewport .page-footer,.map-viewport .game-sky,.map-viewport .world-foot{display:none}
.map-viewport .map-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,340px);align-items:center;gap:16px;flex:none}
.map-viewport .subject-tabs{margin:0;width:100%;padding:3px;min-width:0}
.map-viewport .subject-tabs button{flex:1;min-width:0;justify-content:center;min-height:42px;padding:7px 12px}
.map-viewport .preview-chapters{margin:0;display:block;min-width:0}
.map-viewport .chapter-control{width:100%}
.map-viewport .chapter-heading{display:none}
.map-viewport .chapter-picker select{min-height:44px;padding-top:7px;padding-bottom:7px;font-size:13px;box-shadow:none}
.map-viewport .resume-strip{margin:0;padding:7px 12px;gap:12px;flex:none;box-shadow:none;flex-wrap:nowrap}
.map-viewport .resume-strip>div:first-child{min-width:0}
.map-viewport .resume-strip strong{font-size:12px}
.map-viewport .resume-strip p{margin:0;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-viewport .resume-actions{flex:none;gap:6px}
.map-viewport .resume-actions button{min-height:40px;padding:6px 10px;font-size:12px}
.map-viewport .game-world{flex:1;min-height:0;display:flex;flex-direction:column;box-shadow:0 4px 0 #74411f}
.map-viewport .world-heading{padding:8px 16px;flex:none;align-items:center;gap:8px}
.map-viewport .world-heading h2{margin:0;font-size:18px;line-height:1.4}
.map-viewport .world-heading p,.map-viewport .world-label{display:none}
.map-viewport .world-score{display:flex;align-items:center;gap:8px;min-width:0}
.map-viewport .world-score strong{font-size:20px;line-height:1.2}
.map-viewport .world-content{flex:1;min-height:0;display:flex;flex-direction:column;padding:0}
.map-viewport .world-intro{flex:none;display:flex;flex-direction:row;align-items:center;padding:8px 14px;gap:12px;border-bottom-width:3px}
.map-viewport .world-intro>div:first-child{min-width:0;flex:1}
.map-viewport .world-stage,.map-viewport .world-intro h3{display:none}
.map-viewport .world-intro p{font-size:12px;line-height:1.5}
.map-viewport .game-actions{display:flex;gap:8px;flex:none}
.map-viewport .game-actions button{min-height:44px;padding:8px 12px;font-size:12px;white-space:nowrap}
.map-viewport .game-go{width:auto}
.map-viewport .game-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-color:#a96d35 #c7e8ef;touch-action:pan-y;outline-offset:-4px}
.map-viewport .game-path{padding-top:56px;padding-bottom:48px;min-height:100%}
.map-viewport .game-scroll:focus-visible{outline:3px solid #ffe08b}
.map-viewport.preview-shell .app{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
.map-viewport.preview-shell .topbar{height:54px;min-height:54px;padding:0 12px}
.map-viewport.preview-shell #main{padding:8px 10px 10px;gap:8px}
.map-viewport.preview-shell .map-controls{grid-template-columns:1fr;gap:6px}
.map-viewport.preview-shell .subject-tabs button span{display:none}
.map-viewport.preview-shell .subject-tabs button{padding:6px;min-height:40px}
.map-viewport.preview-shell .world-heading{padding:5px 10px}
.map-viewport.preview-shell .world-heading h2{font-size:15px}
.map-viewport.preview-shell .world-score span{display:none}
.map-viewport.preview-shell .world-intro{padding:6px 10px;flex-direction:column;gap:6px}
.map-viewport.preview-shell .world-intro>div:first-child{display:none}
.map-viewport.preview-shell .game-actions{width:100%}
.map-viewport.preview-shell .game-actions button{flex:1}
.map-viewport.preview-shell .resume-strip{padding:5px 8px;gap:6px}
.map-viewport.preview-shell .resume-strip p{display:none}
.map-viewport.preview-shell .resume-actions button{padding:5px 7px}
@media(max-width:700px){
 .map-viewport .app{padding-bottom:calc(66px + env(safe-area-inset-bottom))}
 .map-viewport .topbar{height:54px;min-height:54px;padding:0 12px}
 .map-viewport #main{padding:8px 10px 10px;gap:8px}
 .map-viewport .map-controls{grid-template-columns:1fr;gap:6px}
 .map-viewport .subject-tabs button span{display:none}
 .map-viewport .subject-tabs button{padding:6px;min-height:40px}
 .map-viewport .world-heading{padding:5px 10px}
 .map-viewport .world-heading h2{font-size:15px}
 .map-viewport .world-score span{display:none}
 .map-viewport .world-intro{padding:6px 10px;flex-direction:column;gap:6px}
 .map-viewport .world-intro>div:first-child{display:none}
 .map-viewport .game-actions{width:100%}
 .map-viewport .game-actions button{flex:1}
 .map-viewport .resume-strip{padding:5px 8px;gap:6px}
 .map-viewport .resume-strip p{display:none}
 .map-viewport .resume-actions button{padding:5px 7px}
}
@media(max-height:500px){
 .map-viewport #main{overflow-y:auto}
 .map-viewport .game-world{flex:0 0 300px}
}
.map-viewport .resume-strip>div:first-child{flex:1;min-width:0}
.map-viewport .resume-strip strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-viewport .resume-actions{display:flex;width:auto;white-space:nowrap}
.map-viewport .resume-actions .primary,.map-viewport .resume-actions .secondary{width:auto;flex:none}
/* Desktop stages form one continuous side-scrolling landscape. */
.map-viewport .game-scroll[data-axis="x"]{overflow-x:auto;overflow-y:hidden;touch-action:pan-x pan-y;scrollbar-gutter:auto;background:#75cced url('/ledger-world.png') center 65% / cover no-repeat}
.map-viewport .game-scroll[data-axis="x"] .game-path{display:flex;align-items:center;gap:58px;width:max-content;min-width:100%;height:100%;min-height:340px;padding:90px 70px 55px;background:none}
.map-viewport .game-scroll[data-axis="x"] .game-path:before{left:70px;right:70px;top:50%;bottom:auto;border-left:0;border-top:4px dashed #fff4b2;transform:translateY(18px)}
.map-viewport .game-scroll[data-axis="x"] .game-path:after{inset:auto 0 0;height:26px;border-top:7px solid #6eb543;background:repeating-linear-gradient(90deg,#b8733d 0 28px,#89502c 28px 31px)}
.map-viewport .game-scroll[data-axis="x"] .game-level{width:240px;flex:0 0 240px;min-height:0;padding:0;gap:0;flex-direction:column;align-items:center;align-self:center;position:relative}
.map-viewport .game-scroll[data-axis="x"] .game-platform{flex:none}
.map-viewport .game-scroll[data-axis="x"] .level-text{width:240px;min-height:90px;margin:20px 0 0;padding:12px 15px;text-align:left}
.map-viewport .game-scroll[data-axis="x"] .level-text strong{font-size:14px;line-height:1.5}
.map-viewport .game-scroll[data-axis="x"] .game-empty{width:calc(100vw - 420px);min-width:260px}
.map-viewport .game-scroll[data-axis="x"] .level-text{height:106px}
/* Rolling desktop terrain: each stage and its label move as one platform. */
.map-viewport .game-scroll[data-axis="x"]{container-type:size}
.map-viewport .game-scroll[data-axis="x"] .game-level{--terrain-step:clamp(12px,calc((100cqh - 300px) / 5),48px);transform:translateY(calc(var(--platform-tier,0) * var(--terrain-step)))}
.map-viewport .game-scroll[data-axis="x"] .game-path:before{display:none}
.terrain-route{position:absolute;inset:0;overflow:visible;pointer-events:none;z-index:0}
.terrain-route path{fill:none;stroke:#fff2a9;stroke-width:4;stroke-dasharray:5 9;stroke-linecap:round;filter:drop-shadow(0 2px 1px #78572980)}
.map-viewport .game-scroll[data-axis="x"] .game-level:last-child .game-platform:after{content:'';position:absolute;left:-22px;bottom:8px;width:34px;height:82px;border-left:4px solid #fff4ce;background:linear-gradient(#ee5841,#ee5841) 0 0 / 30px 22px no-repeat;filter:drop-shadow(2px 2px 0 #72502e)}
/* Mobile climbs upward, alternating left and right platforms in level order. */
.map-viewport .game-scroll[data-axis="y"] .game-path{gap:28px;padding:58px 12px 40px}
.map-viewport .game-scroll[data-axis="y"] .game-path:before{display:none}
.map-viewport .game-scroll[data-axis="y"] .game-level{width:100%;min-height:150px;padding:42px 0 0;display:flex;flex-direction:row;align-items:flex-end;gap:14px;justify-self:stretch;transform:none}
.map-viewport .game-scroll[data-axis="y"] .game-level[data-side="right"]{flex-direction:row-reverse}
.map-viewport .game-scroll[data-axis="y"] .game-platform{width:82px;flex:0 0 82px;height:78px}
.map-viewport .game-scroll[data-axis="y"] .level-text{flex:1;min-width:0;width:auto;min-height:80px;margin:0 0 3px;padding:9px 10px;text-align:left}
.map-viewport .game-scroll[data-axis="y"] .game-player{width:66px;height:66px;left:8px;right:auto;bottom:60px}
.map-viewport .game-scroll[data-axis="y"] .game-level[data-side="right"] .game-player{left:8px}
/* Turn the sprite independently of its flight transform, so landing cannot flip it back. */
.game-player{background:none;transform-origin:center bottom}
.game-player:before{content:'';position:absolute;inset:0;background:url('/ledger-explorer.png') center bottom / contain no-repeat;image-rendering:pixelated;transform:scaleX(1)}
.game-player[data-facing="left"]:before{transform:scaleX(-1)}
/* Server-backed pipe adventure. Full option text stays visible for long/material questions. */
.modal.pipe-quiz{padding-top:18px}.pipe-quiz .quiz-hud{padding-right:36px}.pipe-quiz .pipe-mission{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;margin:10px 0 14px;background:#f7dda4;border:2px solid #c39757;border-radius:5px;color:#654721}.pipe-mission strong{font-size:13px;display:block}.pipe-mission small{font-size:11px;display:block;line-height:1.5;margin-top:4px}.pipe-mission>b{font-size:17px;white-space:nowrap}.pipe-mission>b svg{width:18px;height:18px;vertical-align:middle}.pipe-play-scene{position:relative;height:250px;margin:16px 0 12px;overflow:hidden;isolation:isolate;background:#7ccdf0 url('/ledger-world.png') center 48%/cover;border:3px solid #ae783b;border-radius:7px}.pipe-instruction{position:absolute;top:8px;left:8px;right:8px;padding:6px 8px!important;margin:0!important;background:#143d5de8;color:#fff!important;border-radius:4px;text-align:center;font-size:12px!important;line-height:1.5!important;z-index:3}.pipe-avatar{position:absolute;bottom:137px;left:15px;width:49px;height:61px;background:url('/ledger-explorer.png') center bottom/contain no-repeat;image-rendering:pixelated;transform-origin:center bottom;z-index:3}.pipe-floor{position:absolute;left:0;right:0;bottom:58px;height:16px;border-top:6px solid #77b44b;background:repeating-linear-gradient(90deg,#ad7138 0 24px,#88532b 24px 27px)}.pipe-portals{position:absolute;bottom:0;left:7px;right:7px;display:grid;grid-template-columns:repeat(var(--pipe-count),minmax(0,1fr));gap:6px}.pipe-quiz .pipe-option{display:flex;flex-direction:column;align-items:center;gap:0;background:none!important;border:0!important;box-shadow:none!important;padding:0!important;min-width:0;transform:none!important;animation:none!important;opacity:1!important;position:relative}.pipe-quiz .pipe-option>b{position:relative;flex:none;display:grid;place-items:start center;padding-top:14px;width:48px;height:77px;border:4px solid #256b2f;border-top:0;border-radius:0;background:linear-gradient(90deg,#2f8738 0 18%,#85da5b 18% 31%,#49a83d 31% 80%,#2f8738 80%);color:#fffbd5;font-size:22px}.pipe-quiz .pipe-option>b:before{content:'';position:absolute;left:-7px;right:-7px;top:-10px;height:20px;background:linear-gradient(90deg,#3a9537,#94e367 30%,#419d39);border:4px solid #286d30}.pipe-quiz .pipe-option>span{display:block;min-height:58px;width:100%;margin:0;padding:7px 3px;background:#fff8e5;border-top:3px solid #b68a4c;color:#234352;font-size:12px;line-height:1.45;text-align:center;overflow-wrap:anywhere}.pipe-quiz .pipe-option.selected>b{filter:drop-shadow(0 -4px #ffe476)}.pipe-quiz .pipe-option.selected>span{background:#ffe194;color:#624118}.pipe-quiz .pipe-option.correct>span{background:#e0f0c8;color:#31572c}.pipe-quiz .pipe-option.wrong>span{background:#ffe1d2;color:#833f28}.pipe-miss .pipe-option.selected:after{content:'••';position:absolute;top:-30px;background:#925731;color:#fff;border:3px solid #58321f;width:32px;height:26px;border-radius:10px 10px 3px 3px;letter-spacing:5px;text-align:center;z-index:4}.pipe-tunnel{display:none;position:absolute;inset:43px 9px 12px;background:#163f5cf5;border:3px solid #b78742;border-radius:6px;z-index:6;overflow:hidden;color:#ffe28a;text-align:center;padding-top:15px}.pipe-tunnel.visible{display:block}.pipe-tunnel strong{font-size:15px}.pipe-tunnel:after{content:'';position:absolute;left:0;right:0;bottom:21px;height:18px;border-top:6px solid #78ad43;background:repeating-linear-gradient(90deg,#ac6e38 0 22px,#875029 22px 25px)}.pipe-traveler{position:absolute;bottom:39px;left:12%;width:48px;height:60px;background:url('/ledger-explorer.png') center/contain no-repeat;z-index:2}.pipe-tunnel>b{position:absolute;right:20%;bottom:64px;font-size:30px;color:#ffda57}.pipe-practice{margin:10px 0;padding:10px 12px;border:1px solid #c49b65;border-radius:5px;background:#fff4d9}.pipe-practice p{font-size:12px;color:#6c5132;line-height:1.6;margin:0 0 8px}.pipe-practice .secondary{min-height:40px;background:#e4eddf;color:#33543e}.pipe-quiz .options[hidden]{display:none}.pipe-quiz .quiz-footer{flex-wrap:wrap}.pipe-quiz .quiz-footer .primary{min-height:46px;max-width:100%;white-space:normal}.pipe-quiz .pipe-long-options{height:250px}.pipe-long-options .pipe-avatar{bottom:137px}
@media(max-width:700px){.modal.pipe-quiz{padding-top:15px}.pipe-quiz .pipe-play-scene{margin-inline:-7px}.pipe-quiz .pipe-option>b{width:42px}.pipe-quiz .pipe-portals{gap:4px}.pipe-quiz .pipe-option>span{font-size:11px}.pipe-quiz .pipe-mission{padding:8px}.pipe-quiz .question-heading{gap:7px}.pipe-quiz .pipe-avatar{width:45px;height:57px}}
.preview-shell .modal.pipe-quiz{padding-top:15px}.preview-shell .pipe-quiz .pipe-play-scene{margin-inline:-7px}
/* Collected keys and the final gate use the same real pass result as settlement. */
.pipe-avatar{background:none}.pipe-avatar:before{content:'';position:absolute;inset:0;background:url('/ledger-explorer.png') center bottom/contain no-repeat;image-rendering:pixelated}.pipe-avatar[data-facing="left"]:before{transform:scaleX(-1)}
.pipe-loot-key{width:30px;height:30px;display:block}.pipe-loot-key svg,.pipe-collected-key svg{width:100%;height:100%}.pipe-collected-key{position:fixed;width:30px;height:30px;color:#ffce56;filter:drop-shadow(0 2px 1px #80521d);z-index:10000;pointer-events:none}.pipe-mission>b{transform-origin:center}
.castle-scene .reward-chest{left:46%}.reward-castle{position:absolute;bottom:20px;right:6%;width:78px;height:89px;isolation:isolate}.castle-tower{position:absolute;bottom:0;width:22px;height:74px;background:#dfc08c;border:3px solid #9b713e;border-top:8px dashed #866036}.tower-left{left:0}.tower-right{right:0}.castle-wall{position:absolute;left:17px;right:17px;bottom:0;height:56px;background:#ebcc92;border:3px solid #a47743;border-top:8px dashed #9c713c}.castle-door{position:absolute;left:26px;bottom:0;width:26px;height:36px;border:2px solid #754b2d;border-radius:13px 13px 0 0;overflow:hidden;background:#ffde8f;perspective:100px}.castle-door b{position:absolute;top:0;bottom:0;width:50%;background:repeating-linear-gradient(90deg,#8e542b 0 7px,#c08648 7px 9px);border:1px solid #754b2d;animation:castle-unlock .85s .25s ease-out both}.castle-door b:first-child{left:0;transform-origin:left}.castle-door b:last-child{right:0;transform-origin:right;--door-turn:-100deg}.castle-flag{position:absolute;left:38px;top:-4px;height:25px;border-left:3px solid #fff2c5}.castle-flag:after{content:'';display:block;width:23px;height:14px;background:#ef6744;clip-path:polygon(0 0,100% 0,75% 50%,100% 100%,0 100%)}@keyframes castle-unlock{from{transform:rotateY(0)}to{transform:rotateY(var(--door-turn,100deg))}}
@media(max-width:700px){.reward-castle{transform:scale(.82);transform-origin:right bottom;right:4%;bottom:17px}.castle-scene .reward-chest{left:44%}}
.preview-shell .reward-castle{transform:scale(.82);transform-origin:right bottom;right:4%;bottom:17px}.preview-shell .castle-scene .reward-chest{left:44%}
@media(prefers-reduced-motion:reduce){.castle-door b{animation:none;transform:rotateY(var(--door-turn,100deg))}}

/* Keep privacy actions readable against the light game-dialog surface. */
.modal .privacy-link{color:#17517a;text-decoration:underline;text-underline-offset:3px;font-weight:600}
.modal .privacy-link:hover{color:#103957}
.modal .privacy-link:focus-visible{outline:2px solid #17517a;outline-offset:3px;border-radius:2px}

/* Approved ledger-island art direction; keep animation anchors and transforms intact. */
.game-world{border-color:#aa8544;background:#d4f0ed}.world-heading,.world-foot{background:#0d5262;color:#fff4d4;border-color:#bb934f}.world-heading h2{color:#fff4d4}
.world-content,.map-viewport .game-scroll[data-axis="y"]{background:#b6e4e8 url('/ledger-world.png') center/cover no-repeat;background-attachment:local}
.game-path:after,.map-viewport .game-scroll[data-axis="x"] .game-path:after{display:none}
.game-sky .sky-block,.game-sky .hill,.game-sky .game-ground{display:none}
.game-platform,.preview-shell .game-platform,.map-viewport .game-scroll[data-axis="y"] .game-platform{background:transparent!important;border:0!important;isolation:isolate}
.game-platform:before{content:'';position:absolute;z-index:-1;left:-38%;right:-38%;top:35%;height:115px;background:url('/ledger-platform.png') center/contain no-repeat;pointer-events:none}
.map-viewport .game-scroll[data-axis="x"] .game-platform:before{height:135px;left:-50%;right:-50%}
.map-viewport .game-scroll[data-axis="x"] .game-level:last-child .game-platform:after{display:none}
.game-level .level-square{border:3px solid #b98d45;border-radius:10px;background:#eee2bf;color:#214958;box-shadow:inset 0 0 0 2px #fff4d4,0 3px 4px #354e5340;font-size:19px}
.game-level.current .level-square{background:#117e8a;color:#fff6d8;border-color:#e8bc60}.game-level.done .level-square{background:#33896b;color:#fff7dc;border-color:#d2b56b}
.game-level.locked .level-square{background:#526874;color:#fff6e2;border-color:#b8b5a4}
.level-text{background:#fff5ddf5!important;border-color:#b0915c!important;box-shadow:0 4px 8px #1f5e6a25!important;color:#264650!important;border-radius:10px!important}.level-kicker{color:#226d70}.level-text small{color:#54656a}
.terrain-route path{stroke:#ffdf81;filter:drop-shadow(0 1px 1px #86652c)}
.game-player:before,.pipe-avatar:before,.reward-hero,.retry-hero,.review-hero,.achievement-hero,.quiz-scene-player,.result-runner,.pipe-traveler{image-rendering:auto}
.pipe-quiz .pipe-option>b{width:50px;border:4px solid #a98748;border-radius:25px 25px 5px 5px;background:radial-gradient(ellipse at center,#dcffff,#64d1de 45%,#19728f 80%);color:#163e52;text-shadow:0 1px #fff;box-shadow:inset 0 0 0 2px #d7f8ed;padding-top:15px}
.pipe-quiz .pipe-option>b:before{left:-5px;right:-5px;top:auto;bottom:-3px;height:8px;border:2px solid #a98748;background:#f2e4bd;border-radius:4px}
.pipe-quiz .pipe-option.selected>b{border-color:#ffd166;filter:drop-shadow(0 0 5px #ffe395)}
.pipe-floor,.pipe-tunnel:after,.quiz-scene-ground,.reward-ground,.retry-ground,.review-ground,.achievement-ground{border-top-color:#c5ab6d;background:linear-gradient(#fff3d5,#c5dfd1)!important}
.pipe-miss .pipe-option.selected:after{content:'×';background:#ecd5ba;color:#974633;border-color:#bb835a;letter-spacing:0;border-radius:50%}
.pipe-tunnel{background:#134e63f5;border-color:#c8a45b}.pipe-play-scene,.reward-scene,.retry-scene,.review-scene,.quiz-scene,.achievement-sky{border-color:#b09662}
.quiz-scene-block{border-radius:50%;background:#c5f1ed;border-color:#af985f;color:#1c6778}
.reward-castle{background:radial-gradient(ellipse at center,#d8ffff,#74cbe4 35%,#1b6480 65%);border:6px solid #c6aa6c;border-radius:45% 45% 5px 5px}.castle-tower,.castle-wall,.castle-flag{display:none}.castle-door{left:20px;background:#a1ecf2;border-color:#e4ce98}.castle-door b{background:#3c8090}
.reward-chest{background:#704f2e;border-color:#d5ae5c}.reward-chest:before{border-color:#d5ae5c}
@media(max-width:700px){.game-platform:before{height:98px;top:30%}.map-viewport .game-scroll[data-axis="y"] .level-text{position:relative;z-index:2}.game-player:before{background-size:contain}}
.preview-shell .game-platform:before{height:98px;top:30%}

.map-viewport .game-scroll[data-axis='x'] .level-text{margin-top:78px;position:relative;z-index:2}.map-viewport .game-scroll[data-axis='y']{background-size:auto 800px;background-repeat:repeat-y;background-attachment:scroll}.world-content{background-size:auto 800px}.game-world .primary,.pipe-quiz .primary{background:#f2ca69;color:#294651;border-color:#b48b43}.game-level .game-player{z-index:3}

