/* Sky Post: the selected sculpted enamel / floating postal town direction. */
:root{--ink:#123c49;--muted:#537578;--accent:#179e83;--paper:#fff8e9;--gold:#ffbe26;background:#2699df;color:#123c49}
#app[data-world="2"],#app[data-world="3"]{--ink:#123c49;--muted:#537578;--accent:#179e83}
.screen-grain{opacity:.016}
.brand{color:#164859;text-shadow:0 1px #fff6da}
.brand-icon{border:2px solid #fff9ed;background:linear-gradient(135deg,#fffdf5,#f0d6ac);box-shadow:0 3px 0 #d2b187,0 7px 15px #23485d25}
.brand-icon svg{fill:#2e8078;stroke:#fffae9}
.icon-button{background:linear-gradient(145deg,#fffef6,#eed8b7);border:2px solid #fff9ed;color:#1c4e55;box-shadow:0 3px 0 #c6a37c,0 5px 10px #1c587d25}
.icon-button:hover{background:#fffdf4}
.home-screen:before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(237,249,255,.76),rgba(232,249,255,.35) 37%,transparent 61%);pointer-events:none}
.hero-copy h1{color:#fffdf0;text-shadow:0 3px 0 #1f648b,0 8px 22px #153d6d66;-webkit-text-stroke:1.5px #236482;letter-spacing:-2px}
.hero-copy h1 span{color:#fff2c3;-webkit-text-stroke:1.5px #1b6d74}
.hero-copy .eyebrow{color:#2e6070;text-shadow:0 1px 2px #fff;letter-spacing:1.6px}
.hero-description{color:#234f60;text-shadow:0 1px 2px #fff;font-weight:600}
.hero-meta{color:#2c5c6a;text-shadow:0 1px 2px #fff}
.home-bottom{color:#245367;text-shadow:0 1px 3px #fff}
.scene-caption{background:#fff9e9d9;border:2px solid #fffdf0;border-radius:13px;padding:12px 17px;box-shadow:0 4px 0 #bba38066;color:#477270;backdrop-filter:blur(8px)}
.scene-caption b{color:#184e56}
.caption-line{display:none}
.button{border-radius:18px}
.button.primary{border:2px solid #cef4df;background:linear-gradient(150deg,#7bd3bc 0%,#289c86 50%,#176e62 100%);color:#fffdf0;text-shadow:0 2px 1px #174e45;box-shadow:inset 0 2px 0 #c8f7d8,inset 0 -3px 4px #12584666,0 5px 0 #105449,0 8px 0 #ddc4a2,0 13px 25px #12445930}
.button.primary:hover{background:linear-gradient(150deg,#88ddc5,#2baf91 55%,#237f6b)}
.button.secondary{border:2px solid #fffdf0;background:linear-gradient(145deg,#fffef6,#f1dec1);color:#174d53;box-shadow:inset 0 -2px 2px #dec3a3,0 4px 0 #c5a47e,0 8px 15px #294b6820}
.button.secondary:hover{background:linear-gradient(145deg,#fffefb,#f5e6cc)}
.home-actions .secondary span{color:#547773}
.home-actions{gap:17px}

/* Main HUD: all values remain live DOM text. */
#app[data-screen="play"] .masthead{display:none}
.game-top{left:50%;right:auto;top:calc(14px + var(--safe-top));transform:translateX(-50%);width:min(840px,calc(100% - 32px));height:76px;display:grid;grid-template-columns:minmax(0,1fr) 174px minmax(0,1fr);gap:22px;color:#133e4c;align-items:center}
#app[data-world="2"] .game-top,#app[data-world="3"] .game-top{color:#133e4c}
.level-badge{position:relative;min-width:0;display:flex;gap:10px;align-items:center;justify-self:start;height:56px;padding:7px 15px 7px 0;border-radius:15px;background:linear-gradient(145deg,#fffdf4,#f0dec4);border:2px solid #fff9ea;box-shadow:0 4px 0 #c4a17b,0 7px 12px #154b6f30}
.level-badge:after{content:"";position:absolute;left:70px;right:12px;bottom:5px;height:4px;background:repeating-linear-gradient(120deg,#3790ad 0 9px,#fff4df 9px 15px,#e97860 15px 24px,#fff4df 24px 30px);border-radius:4px;opacity:.75}
.level-badge>span{position:relative;display:grid;place-items:center;flex-shrink:0;width:61px;height:68px;margin-left:-3px;background:linear-gradient(135deg,#fff6de,#e6bf86);border:4px double #fffaf0;outline:2px solid #bb946b;outline-offset:-8px;border-radius:16px;color:#593a23;box-shadow:0 4px 0 #d0ae83,0 0 0 2px #fff6de;text-shadow:0 2px 0 #fff7df;font-size:37px;font-weight:850;font-family:"Arial Rounded MT Bold",system-ui,sans-serif;letter-spacing:-2px}
.level-badge small{font-size:20px;letter-spacing:0;line-height:1.2;color:#513c2f;white-space:nowrap;font-weight:850;margin:0 0 3px}
.level-badge strong{display:none}
.clock{position:relative;inset:auto;transform:none;display:flex;flex-direction:column;justify-content:center;align-items:center;height:79px;width:174px;border:3px solid #fffdf5;border-radius:44% 44% 31% 31% / 35% 35% 31% 31%;background:radial-gradient(ellipse at 50% 0,#fffdf5,#f6e9d4 80%);box-shadow:inset 0 -3px 0 #e2cdb0,0 4px 0 #c8a57f,0 8px 15px #235f812b;text-shadow:0 2px 0 #fff;color:#103e4c}
.clock:before,.clock:after{content:"❧";position:absolute;bottom:13px;font-size:30px;color:#c4ad8c;opacity:.6}
.clock:before{left:8px;transform:rotate(45deg)}
.clock:after{right:8px;transform:scaleX(-1) rotate(45deg)}
.clock>span{font-size:53px;line-height:1;letter-spacing:-2px;font-weight:900;font-family:"Arial Rounded MT Bold",system-ui,sans-serif;position:relative;z-index:1;font-style:italic}
.clock>span>span{font-size:inherit;opacity:1;font-weight:inherit;letter-spacing:inherit}
.clock small{order:-1;font-size:13px;letter-spacing:1px;line-height:1;margin:0 0 3px;color:#274b50;opacity:1;font-weight:800}
.clock.urgent{color:#c34830}
.hud-actions{display:flex;justify-content:flex-end;align-items:center;gap:14px;min-width:0}
#hearts{height:50px;min-width:111px;display:flex;align-items:center;justify-content:center;border:2px solid #fffdf4;border-radius:16px;padding:0 12px;background:linear-gradient(135deg,#fffdf8,#f0ddbf);box-shadow:0 4px 0 #c4a17b,0 8px 12px #0f52792b;color:#f25b53;white-space:nowrap;letter-spacing:0;font-size:29px;line-height:1;text-shadow:0 2px 0 #ba423a,0 -1px 0 #ffd7bd}
.pause-button{margin:0;width:52px;height:52px;flex-shrink:0}
.pause-button svg{width:23px;height:23px;stroke-width:4}
.route-status{top:calc(107px + var(--safe-top));left:50%;right:auto;transform:translateX(-50%);width:min(840px,calc(100% - 32px));height:42px;display:grid;grid-template-columns:auto minmax(30px,1fr) auto;align-items:center;gap:16px;padding:5px 17px;border:2px solid #fffefa;border-radius:24px;background:linear-gradient(180deg,#fffefaee,#e9f5f9ed);box-shadow:0 3px 0 #d1c3aa99,0 7px 14px #13638925}
.route-meta{margin:0;display:block;white-space:nowrap;color:#123e50;font-size:16px;letter-spacing:0;font-weight:800}
.route-meta b{font-size:20px;color:inherit;font-style:italic}
.route-progress{height:15px;border:2px solid #fff8df;border-radius:20px;background:#7fa6bf66;box-shadow:inset 0 2px 3px #37739733;overflow:hidden}
#app[data-world="2"] .route-progress,#app[data-world="3"] .route-progress{background:#7fa6bf66}
.route-progress>span{background:linear-gradient(180deg,#ffdc58,#ffb719 70%,#fba513);box-shadow:inset 0 2px 0 #fff6aa,0 0 0 1px #e6aa36;min-width:0;border-radius:20px}
.mission-pill,#app[data-world="2"] .mission-pill,#app[data-world="3"] .mission-pill{position:static;display:flex;align-items:center;gap:6px;padding:0 0 0 14px;border:0;border-left:2px solid #b0c9d3;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;color:#123e50;white-space:nowrap;min-width:0;max-width:none;font-size:15px;font-weight:800}
.mission-symbol{color:#ffc443;font-size:23px;text-shadow:0 1px 0 #c78b19;line-height:1}
.mission-pill b,#app[data-world="2"] .mission-pill b,#app[data-world="3"] .mission-pill b{color:#123e50;font-size:15px;margin-left:1px}
.mission-pill.done{border-color:#9dbaa8;background:transparent}
.mission-pill.done .mission-symbol{color:#28a97e;text-shadow:0 1px 0 #15705d}
.combo-display{left:max(28px,calc(50% - 415px));right:auto;top:calc(174px + var(--safe-top));transform:rotate(-5deg);display:flex;flex-direction:row;gap:7px;align-items:center;padding:5px 22px 7px 16px;color:#fff8dc;background:linear-gradient(105deg,#f3a04d,#d85438 60%,#bd5544);border:3px solid #fff4d3;border-radius:18px 13px 18px 13px;box-shadow:0 3px 0 #ae6734,0 7px 12px #0c517329;text-shadow:0 2px 0 #9a4027}
.combo-display:after{content:"";position:absolute;right:-13px;top:3px;width:6px;height:19px;border:2px solid #fff3ca;border-radius:5px;background:#efb83d;transform:rotate(34deg)}
.combo-display b{font-size:48px;line-height:1;font-weight:900;font-style:italic;color:#ffe4a1;-webkit-text-stroke:1px #fff4cc}
.combo-display span{font-size:22px;letter-spacing:0;font-weight:850;margin:0;transform:rotate(-1deg)}
.game-toast{top:calc(165px + var(--safe-top));background:#fff9e8f2;border:2px solid #fffdf4;border-radius:20px;color:#265666;text-shadow:0 1px 0 #fff;font-size:13px;box-shadow:0 3px 0 #c6a47c,0 7px 18px #1b5d8b22}
.collapse-warning{bottom:calc(203px + var(--safe-bottom));border:2px solid #fff3d4;background:#ffebc6;border-radius:14px;box-shadow:0 3px 0 #bd8046;color:#984329}

/* Raised enamel controls mirror the reference while staying separate live buttons. */
.play-controls{left:50%;right:auto;transform:translateX(-50%);bottom:calc(24px + var(--safe-bottom));width:min(680px,calc(100% - 30px));text-align:center}
.control-row{display:grid;grid-template-columns:minmax(0,1fr) 118px minmax(0,1fr);gap:22px;align-items:center}
.control-hint,#app[data-world="2"] .control-hint,#app[data-world="3"] .control-hint{position:relative;left:auto;right:auto;bottom:auto;display:table;margin:0 auto 20px;max-width:95%;padding:7px 19px;line-height:1.3;background:linear-gradient(180deg,#fffdf0,#f3dfc1);border:2px solid #fffdfa;border-radius:22px;color:#204c5c;font-size:14px;font-weight:750;letter-spacing:.5px;box-shadow:0 3px 0 #c9ac88,0 7px 12px #22546b18;text-shadow:0 1px 0 #fff}
.jump-button{position:relative;isolation:isolate;display:flex;flex-direction:column;justify-content:center;gap:0;width:100%;height:116px;border:3px solid #fff8e9;border-radius:43px;background:radial-gradient(ellipse at 36% 12%,#fffdf8,#f7ead3 72%,#eacba1);color:#215b5b;box-shadow:inset 0 3px 0 #fffef8,inset 0 -5px 0 #ddba8f,0 5px 0 #bc9266,0 9px 0 #f0d6b0,0 14px 20px #0a4d723d;transition:transform .1s,filter .1s;overflow:hidden}
.jump-button:before{content:"";position:absolute;inset:5px;border:1px solid #b38c5a44;border-top-color:#fffdf6;border-radius:35px;pointer-events:none}
.jump-button:after{content:"";position:absolute;left:13px;right:13px;top:8px;height:34%;border-radius:70%;background:linear-gradient(#ffffff55,transparent);pointer-events:none;z-index:-1}
.jump-button svg{width:40px;height:34px;stroke:#1f5251;stroke-width:2;fill:#26716b;filter:drop-shadow(0 1px 0 #fff9e5)}
.jump-button span{font-size:31px;letter-spacing:1px;font-weight:900;line-height:1.15;text-shadow:0 2px 0 #fff8e7}
.jump-button.right{border-color:#e3f3c5;background:radial-gradient(ellipse at 35% 5%,#8fdcc3,#35ae91 52%,#167b6b 85%,#116254);color:#fffdf1;box-shadow:inset 0 3px 0 #d0f1d5,inset 0 -5px 0 #146757,0 5px 0 #164f44,0 9px 0 #d8c69d,0 14px 20px #0a4d723d}
.jump-button.right:before{border-color:#daf1c155;border-top-color:#eaffcd}
.jump-button.right svg{fill:#21776a;stroke:#165749;filter:drop-shadow(0 1px 0 #c0edce)}
.jump-button.right span{text-shadow:0 2px 0 #19493e,1px 0 #19493e,-1px 0 #19493e}
.jump-button kbd{bottom:11px;right:15px;font-size:10px;opacity:.5}
.jump-button.pressed,.jump-button:active:not(:disabled){transform:translateY(5px);filter:brightness(.97);box-shadow:inset 0 -3px 0 #ddba8f,0 2px 0 #bc9266,0 6px 0 #f0d6b0,0 9px 12px #0a4d7225}
.jump-button.right.pressed,.jump-button.right:active:not(:disabled){box-shadow:inset 0 -3px 0 #146757,0 2px 0 #164f44,0 6px 0 #d8c69d,0 9px 12px #0a4d7225}
.dash-button{width:112px;height:112px;justify-self:center;isolation:isolate;border:4px solid #fff5b9;background:radial-gradient(circle at 38% 20%,#fff2a6,#ffc331 58%,#f5a51d 86%);box-shadow:inset 0 0 0 2px #d89312,inset 0 -4px 0 #d99b16,0 5px 0 #b9861e,0 8px 13px #bd6b1e38;color:#75441d;overflow:visible}
.dash-button:after{content:"";position:absolute;inset:5px;border-radius:50%;border:1px solid #fff8c1;pointer-events:none}
.dash-button svg{width:37px;height:37px;fill:#c77c11;stroke:#95530b;stroke-width:.8;filter:drop-shadow(0 2px 0 #fff9c0)}
.dash-button>span:not(.energy-ring){font-size:23px;line-height:1.1;font-weight:900;margin-top:0;text-shadow:0 1px 0 #fff4bd}
.dash-button small{position:absolute;bottom:-15px;font-size:12px;font-weight:800;padding:5px 12px;line-height:1;white-space:nowrap;color:#82562d;background:linear-gradient(#fffdf0,#f2ddb2);border:2px solid #fff7dc;border-radius:11px;box-shadow:0 3px 0 #bd9256;opacity:1;letter-spacing:0}
.energy-ring{inset:-10px;background:conic-gradient(#fff5b2 calc(var(--energy,0)*1turn),#8c6f3a55 0);mask:radial-gradient(transparent 66%,#000 67%,#000 72%,transparent 73%);-webkit-mask:radial-gradient(transparent 66%,#000 67%,#000 72%,transparent 73%);filter:drop-shadow(0 0 5px #f8bd3b);z-index:0;pointer-events:none}
.dash-button:disabled{background:radial-gradient(circle at 38% 20%,#ffefb4,#ddb66b 65%,#b58d49);border-color:#f5e5b7;box-shadow:inset 0 0 0 2px #ad8749,inset 0 -4px 0 #ad8543,0 5px 0 #9c793d,0 8px 13px #bd6b1e2b;color:#765f3d}
.dash-button:disabled svg{fill:#937447;stroke:#856639}
.dash-button.ready{background:radial-gradient(circle at 38% 20%,#fff2a6,#ffc331 58%,#f5a51d 86%);animation:sky-charge 1.6s ease-in-out infinite}
.play-controls>p,#app[data-world="2"] .play-controls>p,#app[data-world="3"] .play-controls>p{margin-top:24px;font-size:10px;color:#255b6c;font-weight:600;text-shadow:0 1px 2px #fff6df,0 0 5px #fff6df}
@keyframes sky-charge{50%{box-shadow:inset 0 0 0 2px #d89312,inset 0 -4px 0 #d99b16,0 5px 0 #b9861e,0 0 27px #ffdc63a6}}

.map-screen{background:#eaf7f2e8;backdrop-filter:blur(17px)}
.chapter-tabs{background:#d1e6df;border:2px solid #fafff1;box-shadow:0 3px 0 #97b9b0}
.chapter-tab[aria-selected="true"]{background:linear-gradient(#fffdf4,#efddbc);color:#285f58;box-shadow:0 3px 0 #c7a67e}
.level-card{background:linear-gradient(#fffdf5,#f5e7d2);border:2px solid #fffbee;box-shadow:0 4px 0 #c8ad89,0 8px 17px #2c7f8a1c}
.level-card:hover{border-color:#6dbc9d}
.level-card-body{color:#214d55}
.level-art,.level-art.world-0,.level-art.world-1,.level-art.world-2,.level-art.world-3{background-color:#75c2e9;background-size:cover;background-repeat:no-repeat;background-position:center 42%;box-shadow:inset 0 -1px 0 #fff6dc66}
.level-art.world-0{background-image:url("assets/sky-post-background.webp")}
.level-art.world-1{background-image:url("assets/sky-post-sunset.webp")}
.level-art.world-2{background-image:url("assets/sky-post-forest.webp")}
.level-art.world-3{background-image:url("assets/sky-post-orbit.webp")}
.level-art:before,.level-art .mini-stair{display:none}
.level-art .mini-star{top:auto;left:auto;right:10px;bottom:10px;display:grid;place-items:center;width:30px;height:30px;border:1.5px solid #fff8dd;border-radius:50%;background:#fff3c8cf;box-shadow:0 2px 0 #b9904e66,0 3px 7px #17425629;color:#d49a24;font-size:20px;line-height:1;text-shadow:0 1px 0 #fffbe5}
.modal{background:radial-gradient(ellipse at 50% 0,#fffdf6,#f8ecd7);border:3px solid #fffaf0;box-shadow:0 7px 0 #c7aa81,0 24px 100px #0d353f38;color:#1d4d53}
.modal h2{text-shadow:0 2px 0 #fffaf0}
.modal-intro,.lesson-grid p{color:#6e7768}
.modal-stamp{color:#ae8b61}
.lesson-icon{background:#e4ebd3;border:1px solid #fff8e8;box-shadow:0 3px 0 #b3c6a2}
.result-emblem{background:linear-gradient(#ffec9c,#edba46);color:#b6781d;border:2px solid #fff7c5;box-shadow:0 5px 0 #c18c35}
.global-toast{background:#fff8e7f2;border:2px solid #fffef4;color:#225767;box-shadow:0 3px 0 #c3a07b}
.asset-loader{position:absolute;inset:0;z-index:60;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;padding:30px;background:#dceef8e6;backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);color:#1b4c5d;text-align:center}
.asset-loader-mark{display:grid;place-items:center;width:84px;height:84px;margin-bottom:8px;border:3px solid #fffdf0;border-radius:27px;background:linear-gradient(145deg,#fffdf2,#f0d9b2);box-shadow:inset 0 -4px 0 #daba8d,0 5px 0 #c5a076,0 10px 25px #35779326;color:#d96b4e;font-size:47px;text-shadow:0 1px #fff}
.asset-loader strong{font-size:22px;letter-spacing:1px;font-weight:800}.asset-loader p{margin:0;color:#5b7a7d;font-size:13px;line-height:1.6}
.asset-loader-track{width:min(180px,60vw);height:11px;margin-top:9px;overflow:hidden;border:2px solid #fffdf1;border-radius:8px;background:#87adbc55;box-shadow:inset 0 1px 3px #23536822}
.asset-loader-track>i{display:block;width:5%;height:100%;border-radius:8px;background:linear-gradient(#ffe474,#ffbc27);box-shadow:inset 0 1px 0 #fff4aa;transition:width .3s ease;animation:sky-loading 1.25s ease-in-out infinite alternate}
@keyframes sky-loading{from{filter:brightness(1)}to{filter:brightness(1.13)}}

@media(max-width:760px){
 .home-screen:before{background:linear-gradient(100deg,#e6f5ff88,transparent 76%)}
 .masthead{top:calc(18px + var(--safe-top));left:19px;right:19px}
 .hero-copy{left:24px;top:17%;width:calc(100% - 48px)}
 .hero-copy h1{font-size:54px;line-height:1.1;-webkit-text-stroke:1px #236482}
 .hero-copy h1 span{-webkit-text-stroke:1px #1b6d74}
 .hero-description{font-size:13px;line-height:1.8}
 .home-actions{left:24px;right:24px;gap:15px;bottom:calc(87px + var(--safe-bottom))}
 .home-actions .button{min-height:53px}
 .hero-meta{bottom:calc(58px + var(--safe-bottom));left:24px;font-size:11px}
 .scene-caption{padding:7px 10px;right:18px;bottom:29%;border-radius:10px;font-size:10px}
 .scene-caption b{font-size:10px}
 .game-top{top:calc(12px + var(--safe-top));width:calc(100% - 24px);height:61px;grid-template-columns:minmax(0,1.08fr) 99px minmax(0,1fr);gap:9px}
 .level-badge{height:43px;gap:5px;padding:5px 7px 5px 0;border-radius:11px}
 .level-badge:after{left:41px;right:5px;bottom:5px;height:3px}
 .level-badge>span{width:39px;height:53px;border-radius:12px;font-size:27px;border-width:3px;outline-offset:-6px;outline-width:1.5px;letter-spacing:-1px}
 .level-badge small{font-size:13px;letter-spacing:0;line-height:1.2}
 .clock{width:99px;height:64px;border-width:2px}
 .clock small{font-size:11px;line-height:1.15;margin-bottom:1px;letter-spacing:0}
 .clock>span{font-size:38px;letter-spacing:-1.4px}
 .clock:before,.clock:after{font-size:18px;bottom:11px}
 .clock:before{left:3px}.clock:after{right:3px}
 .hud-actions{gap:6px}
 #hearts{height:37px;min-width:0;width:65px;flex-shrink:0;padding:0 4px;border-radius:12px;font-size:18px;letter-spacing:-1px;border-width:2px;box-shadow:0 3px 0 #c4a17b,0 5px 8px #0f52792b}
 .pause-button{width:35px;height:35px;border-width:2px}
 .pause-button svg{width:16px;height:16px;stroke-width:3.5}
 .route-status{top:calc(89px + var(--safe-top));width:calc(100% - 24px);height:34px;padding:4px 10px;gap:8px;grid-template-columns:auto minmax(25px,1fr) auto;border-width:1.5px}
 .route-meta{font-size:12px}.route-meta b{font-size:14px}
 .route-progress{height:12px;border-width:1.5px}
 .mission-pill,#app[data-world="2"] .mission-pill,#app[data-world="3"] .mission-pill{font-size:11px;padding:0 0 0 8px;gap:4px;border-left-width:1px}
 .mission-pill b,#app[data-world="2"] .mission-pill b,#app[data-world="3"] .mission-pill b{font-size:11px}
 .mission-symbol{font-size:17px}
 .combo-display{left:15px;top:calc(145px + var(--safe-top));padding:4px 15px 5px 10px;gap:4px;border-width:2px;border-radius:13px 9px 13px 9px}
 .combo-display b{font-size:36px}.combo-display span{font-size:18px}
 .combo-display:after{right:-10px;width:4px;height:12px;border-width:1.5px}
 .game-toast{top:calc(134px + var(--safe-top));font-size:11px;padding:8px 12px;max-width:80vw;white-space:normal;line-height:1.4}
 .play-controls{width:calc(100% - 28px);bottom:calc(30px + var(--safe-bottom))}
 .control-row{grid-template-columns:minmax(0,1fr) 82px minmax(0,1fr);gap:12px}
 .control-hint,#app[data-world="2"] .control-hint,#app[data-world="3"] .control-hint{font-size:11px;letter-spacing:0;padding:6px 12px;margin-bottom:17px;max-width:100%;line-height:1.3}
 .jump-button{height:88px;border-radius:32px;border-width:2.5px;gap:0}
 .jump-button:before{inset:4px;border-radius:25px}
 .jump-button svg{width:29px;height:28px}
 .jump-button span{font-size:24px;letter-spacing:0;line-height:1.05}
 .jump-button kbd{display:none}
 .dash-button{width:78px;height:78px;border-width:3px}
 .dash-button svg{width:25px;height:25px}
 .dash-button>span:not(.energy-ring){font-size:18px;line-height:1.1}
 .dash-button small{bottom:-13px;font-size:10px;padding:4px 8px;border-width:1.5px;border-radius:9px}
 .energy-ring{inset:-8px}
 .play-controls>p,#app[data-world="2"] .play-controls>p,#app[data-world="3"] .play-controls>p{display:none}
 .collapse-warning{bottom:calc(185px + var(--safe-bottom));font-size:11px;padding:8px 13px}
 .modal{padding:25px 22px}
 .map-heading h2{color:#245965}
 .chapter-heading h3{font-size:20px;line-height:1.35}
 .chapter-heading>span{white-space:nowrap;margin-left:12px}
 .level-card-body{padding:14px 15px}
}
@media(max-width:360px){
 .game-top{width:calc(100% - 20px);grid-template-columns:minmax(0,1.05fr) 86px minmax(0,1fr);gap:6px}
 .level-badge{gap:4px;padding-right:5px;height:40px}
 .level-badge>span{width:34px;height:48px;font-size:24px}
 .level-badge small{font-size:11px}
 .level-badge:after{left:36px;right:4px;height:2px}
 .clock{width:86px;height:59px}.clock>span{font-size:34px}.clock small{font-size:10px}
 .clock:before,.clock:after{display:none}
 .hud-actions{gap:4px}#hearts{width:57px;padding:0 2px;font-size:17px;height:34px;letter-spacing:-1px}.pause-button{width:31px;height:31px}.pause-button svg{width:14px;height:14px}
 .route-status{width:calc(100% - 20px);padding:4px 7px;gap:6px}
 .route-meta{font-size:11px}.route-meta b{font-size:12px}
 .mission-pill,#app[data-world="2"] .mission-pill,#app[data-world="3"] .mission-pill{font-size:10px;padding-left:6px;gap:3px}
 .mission-pill b,#app[data-world="2"] .mission-pill b,#app[data-world="3"] .mission-pill b{font-size:10px}.mission-symbol{font-size:15px}
 .play-controls{width:calc(100% - 24px)}.control-row{grid-template-columns:minmax(0,1fr) 70px minmax(0,1fr);gap:9px}
 .jump-button{height:79px;border-radius:28px}.jump-button:before{border-radius:22px}.jump-button span{font-size:22px}.jump-button svg{width:25px;height:25px}
 .dash-button{width:67px;height:67px}.dash-button>span:not(.energy-ring){font-size:16px}.dash-button svg{width:22px;height:22px}.dash-button small{font-size:9px;padding:4px 7px}
 .control-hint,#app[data-world="2"] .control-hint,#app[data-world="3"] .control-hint{font-size:10px;padding:6px 9px}
}
@media(max-height:700px) and (max-width:760px){
 .hero-copy{top:16%}.hero-copy h1{font-size:45px;margin:13px 0 11px}.hero-description{font-size:11px}
 .home-actions{bottom:calc(75px + var(--safe-bottom));gap:13px}.home-actions .button{min-height:47px;padding:11px 17px;font-size:14px}
 .hero-meta{bottom:calc(48px + var(--safe-bottom));font-size:10px}
 .play-controls{bottom:calc(24px + var(--safe-bottom))}.control-hint,#app[data-world="2"] .control-hint,#app[data-world="3"] .control-hint{margin-bottom:13px}
 .jump-button{height:75px}.jump-button span{font-size:22px}.jump-button svg{height:24px;width:25px}
 .dash-button{width:68px;height:68px}.dash-button svg{width:23px;height:23px}.dash-button>span:not(.energy-ring){font-size:16px}.dash-button small{font-size:9px}
 .collapse-warning{bottom:calc(160px + var(--safe-bottom))}
 .combo-display{top:calc(141px + var(--safe-top))}.combo-display b{font-size:31px}.combo-display span{font-size:16px}
}
@media(orientation:landscape) and (max-height:540px){
 .masthead{top:15px;left:23px;right:23px}.brand{font-size:14px}
 .hero-copy{top:min(24%,84px);left:6%;width:330px}.hero-copy h1{font-size:43px;margin:10px 0}.hero-copy h1 br{display:none}.hero-description{font-size:11px}
 .home-actions{position:static;max-width:246px;margin-top:17px;gap:11px}.home-actions .button{min-height:40px;padding:8px 16px;font-size:13px}
 .hero-meta{position:static;font-size:9px;margin-top:13px}.home-bottom{bottom:11px}.scene-caption{bottom:15%;padding:7px 11px}
 .game-top{top:calc(9px + var(--safe-top));width:min(720px,calc(100% - 40px));height:49px;grid-template-columns:minmax(0,1fr) 109px minmax(0,1fr);gap:20px}
 .level-badge{height:36px;gap:7px;padding:4px 11px 4px 0;border-radius:10px}.level-badge>span{width:42px;height:46px;font-size:26px;border-radius:11px;border-width:3px;outline-offset:-6px}.level-badge small{font-size:15px}.level-badge:after{left:48px;height:3px;bottom:4px}
 .clock{width:109px;height:49px;border-width:2px}.clock>span{font-size:32px;letter-spacing:-1px}.clock small{display:block;font-size:9px;letter-spacing:0;margin-bottom:0}.clock:before,.clock:after{font-size:17px;bottom:8px}
 .hud-actions{gap:11px}#hearts{min-width:85px;height:37px;font-size:22px;padding:0 10px;border-radius:12px}.pause-button{width:37px;height:37px}.pause-button svg{width:18px;height:18px}
 .route-status{top:calc(68px + var(--safe-top));width:min(720px,calc(100% - 40px));height:29px;grid-template-columns:auto minmax(40px,1fr) auto;padding:3px 12px;gap:12px;border-width:1.5px}
 .route-meta{font-size:11px}.route-meta b{font-size:14px}.route-progress{height:11px}
 .mission-pill,#app[data-world="2"] .mission-pill,#app[data-world="3"] .mission-pill{font-size:11px;padding-left:10px;gap:5px}.mission-pill b,#app[data-world="2"] .mission-pill b,#app[data-world="3"] .mission-pill b{font-size:11px}.mission-symbol{font-size:17px}
 .combo-display{top:calc(112px + var(--safe-top));left:26px;padding:3px 13px 5px 9px;border-width:2px}.combo-display b{font-size:32px}.combo-display span{font-size:16px}
 .game-toast,.game-toast.visible{top:calc(108px + var(--safe-top));left:auto;right:20px;max-width:135px;transform:none;font-size:11px;padding:7px 12px}
 .play-controls{left:24px;right:24px;transform:none;width:auto;bottom:calc(19px + var(--safe-bottom))}
 .control-row{display:flex;justify-content:space-between;align-items:center;gap:24px}.jump-button{width:143px;height:71px;flex-direction:row;gap:8px;border-radius:29px;border-width:2px}.jump-button:before{border-radius:23px}.jump-button span{font-size:24px}.jump-button svg{width:28px;height:28px}.jump-button kbd{display:none}
 .dash-button{width:65px;height:65px;border-width:3px}.dash-button svg{width:23px;height:23px}.dash-button>span:not(.energy-ring){font-size:16px}.dash-button small{font-size:9px;padding:3px 8px;bottom:-12px;border-radius:8px}
 .control-hint,#app[data-world="2"] .control-hint,#app[data-world="3"] .control-hint{position:absolute;left:50%;bottom:91px;transform:translateX(-50%);width:max-content;max-width:55vw;font-size:10px;line-height:1.3;padding:5px 12px;margin:0;white-space:normal}
 .play-controls>p,#app[data-world="2"] .play-controls>p,#app[data-world="3"] .play-controls>p{display:none}
 .collapse-warning{bottom:calc(153px + var(--safe-bottom));font-size:10px;padding:6px 10px}
 .modal{padding:19px}.map-screen{padding:20px 30px}.chapter-heading h3{font-size:18px}
}
@media(prefers-reduced-motion:reduce){.dash-button.ready,.asset-loader-track>i{animation:none}.asset-loader-track>i{transition:none}}

.home-mode-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.home-mode-row .button{min-width:0;padding-left:16px;padding-right:16px;font-size:15px;gap:7px}
.home-mode-row #home-stars{font-size:11px;white-space:nowrap}
.home-mode-row .free-mode{background:linear-gradient(135deg,#fff4c4,#ead08c);color:#66502c;border-color:#fff9dc}
.free-mode>span{display:flex;flex-direction:column;gap:3px;text-align:left}
.free-mode small{font-size:10px;font-weight:500;letter-spacing:0;color:#7e6b43}
.free-mode b{font-size:30px;font-weight:700;line-height:1}
#app[data-mode="free"] .clock>span{letter-spacing:0;line-height:.85}
@media(max-width:760px){.home-mode-row{gap:11px}.home-mode-row .button{font-size:13px;padding:8px 13px}.home-mode-row #home-stars{font-size:10px}.free-mode small{font-size:9px}.free-mode b{font-size:28px}.hero-meta{gap:8px}}
@media(max-width:360px){.home-mode-row{gap:9px}.home-mode-row .button{font-size:12px;padding:8px 10px}.hero-meta{font-size:9px}}
@media(orientation:landscape) and (max-height:540px){.home-mode-row{gap:9px}.home-mode-row .button{font-size:11px;padding:6px 9px}.home-mode-row #home-stars{font-size:9px}.free-mode small{font-size:8px}.free-mode b{font-size:25px}}
@media(orientation:landscape) and (max-height:380px){
 .hero-copy{top:64px}.hero-copy h1{font-size:34px;margin:6px 0}.hero-description{font-size:10px;line-height:1.5}
 .home-actions{margin-top:10px;gap:9px}.home-actions .button{min-height:40px}.home-mode-row .button{padding:4px 9px}
 .hero-meta{margin-top:10px}
}

/* Each chapter teaches a rule, combines it, then gives it a short challenge. */
.card-focus{display:flex;align-items:center;gap:7px;margin:0 0 10px;color:#477367;font-size:12px;line-height:1.4;font-weight:650}
.stage-badge{display:inline-flex;align-items:center;flex-shrink:0;padding:3px 8px;border-radius:6px;border:1px solid #b0d2b9;background:#e3eed9;color:#38694c;font-size:10px;font-weight:800;letter-spacing:.5px}
.level-card[data-stage="combine"] .stage-badge{background:#e1eef2;border-color:#b0cdd9;color:#366c82}
.level-card[data-stage="challenge"] .stage-badge{background:#fae3cf;border-color:#e5ba97;color:#9a583b}
.level-card .card-commission{color:#637d70}
.level-card-body{min-width:0}.level-card h4,.card-focus>span:last-child,.level-card p{overflow-wrap:anywhere}
.campaign-brief{max-height:calc(100dvh - 40px - var(--safe-top) - var(--safe-bottom));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.campaign-brief .modal-stamp{letter-spacing:1.1px;color:#779181}
.brief-status{display:inline-block;margin-left:8px;padding:3px 7px;border-radius:20px;background:#e4ecd6;color:#5a7758;letter-spacing:0;font-size:10px}
.campaign-brief .modal-intro{color:#5b786d}
.campaign-brief .lesson-grid p{color:#667b6c}
.campaign-brief .lesson-grid strong{line-height:1.4}
.campaign-brief .tutorial-keyboard{color:#83907a}
.campaign-brief .lesson-grid>div:last-child .lesson-icon{color:#c6932c;background:#f5e8b8;border-color:#fff7d2;box-shadow:0 3px 0 #dbbf81}
.control-hint[data-kind="fork"],#app[data-world="2"] .control-hint[data-kind="fork"],#app[data-world="3"] .control-hint[data-kind="fork"]{color:#805536;background:linear-gradient(#fff9e9,#f5dfb6);border-color:#fff7d5}
.control-hint[data-kind="charge"],#app[data-world="2"] .control-hint[data-kind="charge"],#app[data-world="3"] .control-hint[data-kind="charge"]{color:#345f69;background:linear-gradient(#effff6,#dceee0);border-color:#f7ffe6}
.dash-button.charging .energy-ring{filter:drop-shadow(0 0 5px #affbd1)}
.dash-button.charging small{color:#456b55;background:linear-gradient(#f6ffe9,#dbe8bf);border-color:#f3ffdc}
@media(max-width:760px){
 .card-focus{gap:5px;font-size:11px;margin:0 0 8px}.stage-badge{font-size:9px;padding:2px 6px;letter-spacing:0}
 .level-card .card-commission{font-size:10px}
 .campaign-brief{max-height:calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom))}
 .campaign-brief .lesson-grid{gap:15px;margin:19px 0}.campaign-brief .lesson-grid>div{padding-left:48px}
 .campaign-brief .lesson-icon{width:36px;height:36px;font-size:19px;border-radius:11px}
 .campaign-brief .lesson-grid>div:first-child .lesson-icon{font-size:11px;letter-spacing:0}
 .campaign-brief .lesson-grid p{font-size:11px;line-height:1.6;margin-top:4px}
 .campaign-brief .lesson-grid strong{font-size:13px}
}
@media(max-width:360px){
 .level-card{grid-template-columns:82px minmax(0,1fr)}.level-card-body{padding:12px}
 .card-focus{font-size:10px;gap:4px}.stage-badge{padding:2px 5px}.card-stars{letter-spacing:1px}
}
@media(max-height:700px) and (max-width:760px){
 .campaign-brief{padding:18px}.campaign-brief .modal-stamp{margin-bottom:9px;font-size:8px}.brief-status{font-size:9px}
 .campaign-brief h2{font-size:21px;line-height:1.25}.campaign-brief .modal-intro{font-size:11px;line-height:1.55;margin:8px 0 13px}
 .campaign-brief .lesson-grid{gap:11px;margin:15px 0}.campaign-brief .lesson-grid>div{padding-left:43px}
 .campaign-brief .lesson-icon{width:32px;height:32px;font-size:17px}.campaign-brief .lesson-grid strong{font-size:12px}
 .campaign-brief .lesson-grid p{font-size:10.5px;line-height:1.55;margin-top:3px}
 .campaign-brief .button{min-height:44px;padding:10px;font-size:13px}.campaign-brief .tutorial-keyboard{margin-top:11px;font-size:9px}
}
@media(orientation:landscape) and (max-height:540px){
 .level-card{display:block}.level-card-body{padding:12px}.card-focus{font-size:10px;gap:5px;margin-bottom:6px}.stage-badge{font-size:8px;padding:2px 5px}
 .campaign-brief{width:min(680px,100%);padding:15px 20px;max-height:calc(100dvh - 24px)}
 .campaign-brief .modal-stamp{margin-bottom:6px;font-size:8px}.campaign-brief h2{font-size:21px}
 .campaign-brief .modal-intro{font-size:10px;line-height:1.5;margin:6px 0 10px}
 .campaign-brief .lesson-grid{flex-direction:row;gap:14px;margin:10px 0 13px}.campaign-brief .lesson-grid>div{padding:0;min-width:0;text-align:left}
 .campaign-brief .lesson-icon{display:none}.campaign-brief .lesson-grid strong{font-size:11px}.campaign-brief .lesson-grid p{font-size:10px;line-height:1.5;margin-top:4px}
 .campaign-brief .button{min-height:38px;padding:8px;font-size:13px}.campaign-brief .tutorial-keyboard{font-size:8px;margin-top:8px}
}

/* Free-delivery postcards: progress stays quiet; a new record gets one flourish. */
.free-status{position:absolute;left:50%;top:calc(157px + var(--safe-top));transform:translateX(-50%);width:min(840px,calc(100% - 32px));display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:29px;padding:4px 13px;border:1px solid #fffaf0b3;border-radius:10px;background:#f4fbf0c7;box-shadow:0 2px 0 #9ba99b25;color:#496b67;font-size:12px;line-height:1.4;backdrop-filter:blur(8px);pointer-events:none}
.free-status>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#record-chase{flex:1;color:#496d70;font-weight:650}
#station-status{flex:0 1 auto;max-width:54%;color:#8c6840;text-align:right;font-weight:650}
#app[data-mode="free"] .combo-display{top:calc(199px + var(--safe-top))}
#app[data-mode="free"] .game-toast{top:calc(200px + var(--safe-top))}
.record-celebration{position:absolute;left:50%;bottom:calc(248px + var(--safe-bottom));transform:translateX(-50%);width:max-content;max-width:min(360px,calc(100% - 44px));z-index:5;display:flex;flex-direction:column;align-items:center;gap:5px;padding:17px 28px 15px;border:2px solid #fff8d9;border-radius:24px;background:radial-gradient(ellipse at 50% 0,#fffdf4,#f6dfab);box-shadow:inset 0 -3px 0 #e4c184,0 4px 0 #c79b52,0 10px 25px #1f56732b;color:#72542b;text-align:center;pointer-events:none}
.record-celebration:before,.record-celebration:after{content:"✧";position:absolute;color:#fff3aa;text-shadow:0 2px 0 #c7983d;font-size:25px;top:18px}
.record-celebration:before{left:-23px;transform:rotate(-12deg)}.record-celebration:after{right:-23px;transform:rotate(12deg)}
.record-seal{position:absolute;top:-19px;left:50%;transform:translateX(-50%);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:linear-gradient(#ffe994,#e6b24d);border:2px solid #fff6cb;box-shadow:0 3px 0 #b28a40;color:#fff7c8;font-size:25px;text-shadow:0 1px 0 #aa7b27}
#record-celebration-title{font-size:23px;line-height:1.25;font-weight:850;letter-spacing:.5px;text-shadow:0 1px 0 #fffdf2}
#record-celebration-detail{font-size:12px;line-height:1.5;color:#8c7349}
.record-celebration:not([hidden]){animation:postal-record 2.5s ease both}
@keyframes postal-record{0%{opacity:0;scale:.88;translate:0 12px}12%{opacity:1;scale:1.035;translate:0 0}22%,82%{opacity:1;scale:1;translate:0 0}100%{opacity:0;scale:1;translate:0 -9px}}

.station-modal{width:min(510px,100%);padding:29px;max-height:calc(100dvh - 36px - var(--safe-top) - var(--safe-bottom));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}
.station-modal .modal-stamp{margin-bottom:9px;color:#9d8051;letter-spacing:1.4px;font-size:10px}
.station-modal h2{font-size:29px;color:#305b59}
.station-modal .modal-intro{margin:10px 0 20px;color:#74816c;font-size:13px;line-height:1.6}
.station-rewards{display:grid;grid-template-columns:1fr;gap:12px}
.reward-option{position:relative;display:flex;align-items:center;gap:16px;width:100%;min-height:86px;padding:16px 18px;border:2px solid #fffdf0;border-radius:19px;background:linear-gradient(130deg,#fffdf5,#f1e4cc);box-shadow:inset 0 -2px 0 #e2c7a0,0 4px 0 #c5a783,0 6px 12px #4c694415;color:#3c6158;text-align:left;transition:transform .12s,box-shadow .12s,filter .12s;touch-action:manipulation}
.reward-option:not(:disabled):hover{filter:brightness(1.035);transform:translateY(-2px)}
.reward-option:not(:disabled):active{transform:translateY(3px);box-shadow:inset 0 -2px 0 #e2c7a0,0 1px 0 #c5a783,0 3px 5px #4c694415}
.reward-option:focus-visible{outline:3px solid #338f7c;outline-offset:4px}
.reward-icon{display:grid;place-items:center;flex-shrink:0;width:48px;height:48px;border-radius:15px;border:2px solid #fff5da;background:linear-gradient(145deg,#ffe7c9,#f4bd99);box-shadow:inset 0 -2px 0 #dea27f,0 2px 0 #d9b18b;color:#e66a58;text-shadow:0 2px 0 #a84b3b;font-size:31px;font-weight:850;line-height:1}
.reward-energy .reward-icon{color:#b77f27;background:linear-gradient(145deg,#fff6c5,#efca69);box-shadow:inset 0 -2px 0 #d9af49,0 2px 0 #d1b474}
.reward-icon svg{width:28px;height:28px;fill:#d49c2b;stroke:#a8731c;stroke-width:1.1;filter:drop-shadow(0 1px 0 #fff6c2)}
.reward-double{background:linear-gradient(135deg,#f3fae8,#dcead2);border-color:#fbffe9;box-shadow:inset 0 -2px 0 #bdd4ad,0 4px 0 #9cb68b,0 6px 12px #4c694415}
.reward-double .reward-icon{color:#4e8a70;background:linear-gradient(145deg,#e0f6d6,#a8d6b0);border-color:#f5ffdc;box-shadow:inset 0 -2px 0 #8cbb91,0 2px 0 #9bb88c;text-shadow:0 1px 0 #f0ffdf;font-size:26px;letter-spacing:-1px}
.reward-copy{display:flex;flex-direction:column;min-width:0;gap:6px}
.reward-copy strong{font-size:16px;line-height:1.3;font-weight:800}
.reward-copy small{font-size:12px;line-height:1.5;color:#7d826c;overflow-wrap:anywhere}
.reward-option:disabled{cursor:not-allowed;background:linear-gradient(#f1eee2,#e8e1d2);box-shadow:inset 0 -2px 0 #d8cdb8,0 3px 0 #c7bda7;color:#8d9585;filter:saturate(.4)}
.reward-option:disabled .reward-icon{opacity:.62}.reward-option:disabled .reward-copy small{color:#939887}
#reward-heart:disabled:after,#reward-energy:disabled:after{content:"已满";position:absolute;top:8px;right:9px;padding:2px 5px;border-radius:5px;background:#d9dfcd;color:#7f8c76;font-size:9px;line-height:1.2}
.station-footer{display:flex;flex-direction:column;gap:4px;margin-top:19px;font-size:10px;line-height:1.5;color:#8c927d}
.station-footer>span:first-child{color:#5c8471;font-weight:650}
.result-record-feedback{margin:15px 0;padding:10px 13px;border:1px solid #e4c995;border-radius:12px;background:linear-gradient(120deg,#fff5d7,#f4e9c9);color:#8b754c;font-size:11px;line-height:1.55;text-align:left}
.result-record-feedback>strong{display:block;font-size:13px;line-height:1.5}
.result-record-feedback>span{display:block;margin-top:4px;font-size:11px;line-height:1.5}
.result-record-feedback>div,.result-record-feedback .record-feedback-row{display:flex;align-items:baseline;justify-content:space-between;gap:9px;flex-wrap:wrap}
.result-record-feedback>div+div{margin-top:5px}.result-record-feedback strong,.result-record-feedback b{color:#8c6326;font-weight:800}
.result-record-feedback p{margin:3px 0}.result-record-feedback small{font-size:10px;color:#9c8b66}.result-record-feedback .record-improved{color:#267f66}
.result-modal{max-height:calc(100dvh - 36px - var(--safe-top) - var(--safe-bottom));overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}

@media(max-width:760px){
 .free-status{top:calc(129px + var(--safe-top));width:calc(100% - 24px);min-height:25px;padding:4px 9px;gap:9px;border-radius:8px;font-size:10px}
 #app[data-mode="free"] .combo-display{top:calc(167px + var(--safe-top));padding:3px 12px 4px 8px}
 #app[data-mode="free"] .combo-display b{font-size:30px}#app[data-mode="free"] .combo-display span{font-size:15px}
 #app[data-mode="free"] .game-toast,#app[data-mode="free"] .game-toast.visible{top:calc(165px + var(--safe-top));left:auto;right:12px;max-width:calc(100% - 150px);transform:none;font-size:10px;line-height:1.4;padding:7px 9px}
 .record-celebration{bottom:calc(210px + var(--safe-bottom));max-width:calc(100% - 54px);padding:16px 20px 12px;border-radius:20px}
 #record-celebration-title{font-size:20px}#record-celebration-detail{font-size:11px}
 .station-modal{padding:24px;max-height:calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom))}
 .station-modal h2{font-size:26px}.station-modal .modal-intro{font-size:12px;margin:9px 0 17px}
 .reward-option{min-height:82px;padding:14px;gap:12px;border-radius:17px}.reward-icon{width:43px;height:43px;font-size:28px;border-radius:13px}
 .reward-copy strong{font-size:14px}.reward-copy small{font-size:11px;line-height:1.5}.reward-copy{gap:4px}
 .reward-double .reward-icon{font-size:24px}.station-footer{margin-top:17px}
 .result-record-feedback{font-size:10px;margin:12px 0;padding:9px 11px}
}
@media(max-width:360px){
 .free-status{width:calc(100% - 20px);gap:6px;font-size:9px;padding:4px 8px}
 .record-celebration{bottom:calc(190px + var(--safe-bottom));padding:15px 16px 11px}#record-celebration-title{font-size:18px}#record-celebration-detail{font-size:10px}
 .station-modal{padding:18px}.station-modal h2{font-size:24px}.station-modal .modal-intro{font-size:11px;margin:8px 0 14px}
 .station-rewards{gap:10px}.reward-option{min-height:72px;padding:12px 11px;gap:10px}.reward-icon{width:37px;height:37px;font-size:26px;border-radius:11px}
 .reward-icon svg{width:24px;height:24px}.reward-double .reward-icon{font-size:21px}.reward-copy strong{font-size:13px}.reward-copy small{font-size:10px}
 .station-footer{font-size:9px;margin-top:15px;gap:3px}.result-record-feedback{padding:8px 9px;font-size:10px}
 .result-record-feedback>strong{font-size:11px}.result-record-feedback>span{font-size:10px}
}
@media(max-height:700px) and (max-width:760px){
 .station-modal{padding:18px}.station-modal .modal-stamp{font-size:9px;margin-bottom:7px}.station-modal h2{font-size:24px}
 .station-modal .modal-intro{margin:8px 0 14px}.reward-option{min-height:72px;padding:12px}.station-rewards{gap:10px}
 .station-footer{margin-top:15px}.result-modal{max-height:calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom))}
}
@media(orientation:landscape) and (max-height:540px){
 .free-status{top:calc(102px + var(--safe-top));width:min(720px,calc(100% - 40px));min-height:21px;padding:0;font-size:9px;border:0;background:none;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
 .free-status>span{max-width:calc(50% - 84px);padding:4px 9px;border-radius:7px;background:#fff8e6ef;border:1px solid #fff9e9;box-shadow:0 2px 0 #c5ad8466}
 .free-status #record-chase{flex:0 1 auto}.free-status #station-status{max-width:calc(50% - 84px)}
 #app[data-mode="free"] .combo-display{top:calc(135px + var(--safe-top));left:26px;padding:3px 11px 4px 8px}
 #app[data-mode="free"] .combo-display b{font-size:27px}#app[data-mode="free"] .combo-display span{font-size:14px}
 #app[data-mode="free"] .game-toast,#app[data-mode="free"] .game-toast.visible{top:calc(135px + var(--safe-top));right:20px;left:auto;max-width:120px;transform:none;font-size:9px;padding:6px 8px}
 .record-celebration{top:8px;bottom:auto;transform:translateX(-50%);width:max-content;max-width:250px;padding:8px 14px;border-radius:17px;gap:3px}
 .record-seal{width:26px;height:26px;top:-17px;font-size:20px}.record-celebration:before,.record-celebration:after{font-size:20px;top:15px}.record-celebration:before{left:-18px}.record-celebration:after{right:-18px}
 #record-celebration-title{font-size:17px}#record-celebration-detail{font-size:9px;line-height:1.4}
 .record-celebration .record-seal,.record-celebration:before,.record-celebration:after{display:none}
 .station-modal{width:min(660px,100%);padding:16px 20px;max-height:calc(100dvh - 24px)}
 .station-modal .modal-stamp{font-size:8px;letter-spacing:1px;margin-bottom:5px}.station-modal h2{font-size:23px}
 .station-modal .modal-intro{font-size:10px;line-height:1.5;margin:6px 0 12px}
 .station-rewards{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 .reward-option{min-height:119px;flex-direction:column;justify-content:center;text-align:center;gap:8px;padding:12px 8px;border-radius:15px}
 .reward-icon{width:35px;height:35px;border-radius:11px;font-size:24px}.reward-icon svg{width:23px;height:23px}.reward-double .reward-icon{font-size:21px}
 .reward-copy{gap:4px;align-items:center}.reward-copy strong{font-size:12px;line-height:1.3}.reward-copy small{font-size:10px;line-height:1.4}
 .station-footer{flex-direction:row;justify-content:center;flex-wrap:wrap;gap:3px 12px;font-size:9px;margin-top:13px}
 .result-modal{max-height:calc(100dvh - 24px)}.result-record-feedback{margin:9px 0;padding:7px 10px;font-size:10px}.result-record-feedback>div+div{margin-top:3px}
}
@media(prefers-reduced-motion:reduce){.record-celebration:not([hidden]){animation:none}.reward-option{transition:none}.reward-option:not(:disabled):hover,.reward-option:not(:disabled):active{transform:none}}

/* Special-route notice shares the toast's side slot; the app gives feedback priority. */
.special-route{--special-ink:#92652f;--special-paper:#fff4cf;--special-edge:#e6bd69;--special-icon:#ffe4a0;position:absolute;right:max(28px,calc(50% - 415px));top:calc(200px + var(--safe-top));z-index:4;display:grid;grid-template-columns:25px minmax(0,1fr);align-items:center;gap:5px 7px;width:190px;max-width:calc(100% - 150px);padding:10px 11px;border:1.5px solid #fffdf0;border-left:4px solid var(--special-edge);border-radius:13px;background:var(--special-paper);box-shadow:inset 0 -1px 0 #bda16c20,0 3px 0 #b6a37a80,0 6px 14px #23596d1c;color:var(--special-ink);text-align:left;pointer-events:none}
.special-route[data-type="forks"]{--special-ink:#386e64;--special-paper:#e9f5e5;--special-edge:#8bbca4;--special-icon:#c7e7bf}
.special-route[data-type="sprint"]{--special-ink:#995536;--special-paper:#ffead6;--special-edge:#e6a476;--special-icon:#ffd0a3}
#special-route-icon{display:grid;place-items:center;width:25px;height:25px;border:1px solid #fff8e3;border-radius:8px;background:var(--special-icon);box-shadow:0 2px 0 #a27b3e25;font-size:18px;line-height:1;font-weight:800;color:var(--special-ink)}
#special-route-title{min-width:0;font-size:14px;line-height:1.35;font-weight:800;overflow-wrap:anywhere}
#special-route-detail{grid-column:1 / -1;min-width:0;font-size:11px;line-height:1.5;overflow-wrap:anywhere;color:var(--special-ink)}
.special-route[data-phase="preview"]{background:#fff9ebed;border-left-color:#c9c8ad;box-shadow:0 2px 0 #b6a37a55,0 4px 10px #23596d12;opacity:.9}
.special-route[data-phase="preview"] #special-route-icon{background:#e9e9d8;color:#8b947c;box-shadow:none}
.special-route[data-phase="preview"] #special-route-detail{color:#7f8972}
.special-route[data-phase="active"]{border-bottom-color:var(--special-edge)}
@media(max-width:760px){
 .special-route{top:calc(165px + var(--safe-top));right:12px;width:164px;max-width:calc(100% - 150px);grid-template-columns:22px minmax(0,1fr);gap:4px 6px;padding:8px 9px;border-radius:11px;border-left-width:3px}
 #special-route-icon{width:22px;height:22px;font-size:16px;border-radius:7px}#special-route-title{font-size:12px;line-height:1.35}#special-route-detail{font-size:10px;line-height:1.45}
}
@media(max-width:360px){
 .special-route{right:10px;width:156px;padding:7px 8px;gap:4px 5px}#special-route-title{font-size:11px}#special-route-detail{font-size:9px;line-height:1.5}
}
@media(orientation:landscape) and (max-height:540px){
 .special-route{top:calc(135px + var(--safe-top));right:20px;width:132px;max-width:145px;grid-template-columns:19px minmax(0,1fr);gap:4px 5px;padding:7px 8px;border-radius:10px;border-left-width:3px}
 #special-route-icon{width:19px;height:19px;font-size:14px;border-radius:6px}#special-route-title{font-size:10px;line-height:1.35}#special-route-detail{font-size:9px;line-height:1.4}
}
