:root{color-scheme:light;--jade:#244f45;--ink:#25483f;--paper:#f2e8cf;--gold:#b88b43;--red:#a64e38;font-family:"Microsoft YaHei","PingFang SC",sans-serif;background:#e9dfc5;color:var(--ink)}*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 10% 5%,#fff6de88,transparent 60%),repeating-linear-gradient(12deg,#9c875105 0 1px,transparent 1px 6px);min-height:100svh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;color:inherit;cursor:pointer;border:0}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #cb9753;outline-offset:3px}button:disabled{opacity:.55;cursor:default}[hidden]{display:none!important}.shell{max-width:1160px;margin:auto;padding:16px 24px 20px}.masthead{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:10px}.brand{display:flex;gap:12px;align-items:center;text-decoration:none;color:inherit;font:22px Georgia,"STSong","SimSun",serif;letter-spacing:2px}.seal{display:grid;place-items:center;border:1px solid #d7b578;outline:2px solid #a35e3d;background:#a35e3d;color:#fff0bf;border-radius:5px;width:38px;height:44px;transform:rotate(-5deg);font-size:29px}.brand small{display:block;font:10px sans-serif;letter-spacing:3px;margin-top:6px;color:#7b8166}.head-actions{display:flex;gap:12px;align-items:center}.purse{display:flex;gap:8px;align-items:center;font-size:18px;font-variant-numeric:tabular-nums}.purse i{color:var(--gold);font-size:26px;font-style:normal}.purse b{font-weight:500}.icon{width:44px;height:44px;border:1px solid #9b9c7955;border-radius:50%;background:#f7edcfaa;font-size:19px;flex-shrink:0}.wallet{background:transparent;border:1px solid #69837665;border-radius:25px;padding:9px 15px;min-height:44px;font-size:13px;max-width:180px;overflow:hidden;text-overflow:ellipsis}.stage{position:relative;aspect-ratio:1000/560;isolation:isolate;border-radius:14px;overflow:hidden;background:#b9d0b8;box-shadow:0 15px 35px #324b3b22,0 0 0 1px #2d584e44}.stage:after{content:"";position:absolute;inset:8px;border:1px solid #f0dfaf66;border-radius:8px;pointer-events:none;z-index:7}canvas{display:block;width:100%;height:100%;touch-action:none}.opening{position:absolute;inset:0;background:linear-gradient(90deg,#f1e9ceeb 0%,#f1e9ceb0 30%,transparent 63%);padding:5.8% 6%;display:flex;align-items:center}.opening-copy{z-index:2;max-width:46%}.eyebrow{font-size:11px;letter-spacing:3px;color:#8b7549}.opening h1{font:clamp(26px,4.8vw,58px)/1.3 "STSong","SimSun",serif;letter-spacing:5px;margin:18px 0;color:#234d43;font-weight:400}.opening p{line-height:1.8;font-size:14px;letter-spacing:1px;margin:14px 0 22px}.primary{background:linear-gradient(120deg,#b56342,#9c4836);color:#fff2ce;border:1px solid #e3b475;border-radius:6px 18px 6px 18px;padding:12px 26px;min-height:48px;box-shadow:0 4px 0 #75433133;letter-spacing:3px;font-size:16px}.primary:hover{filter:brightness(1.06)}.primary span{padding-left:32px}.opening small{display:block;font-size:11px;margin-top:18px;color:#79836b}.story-stamp{position:absolute;right:6%;top:10%;border:2px solid #a5513b;outline:1px solid #a5513b;outline-offset:3px;writing-mode:vertical-rl;padding:6px;color:#a5513b;letter-spacing:5px;font:24px "STSong",serif;transform:rotate(5deg);opacity:.8}.hud{position:absolute;left:3%;right:3%;top:4%;display:flex;align-items:start;gap:25px;text-shadow:0 1px 1px #fff5ce}.hud small{display:block;font-size:12px;color:#355b4e;letter-spacing:2px}.hud strong{font-size:28px;font-weight:500;font-variant-numeric:tabular-nums}.hud em{font-size:12px;font-style:normal;margin-left:4px}.run-coins{margin-left:auto;font-size:24px}.run-coins i{font-style:normal;color:#9f6828}.run-coins small{letter-spacing:4px;color:#a9533e;margin-top:5px}.hud .icon{background:#f7edcfaa;width:40px;height:40px}.charge{position:absolute;left:0;top:75px;width:200px;display:flex;gap:8px;align-items:center;font-size:11px}.charge>div{height:5px;flex:1;background:#29534c26;border-radius:4px;overflow:hidden}.charge i{display:block;height:100%;background:linear-gradient(90deg,#cf9046,#fbe9a3);width:0;border-radius:4px}.charge small{font-size:10px;letter-spacing:0}.scene-caption{position:absolute;inset:27% 15% auto;text-align:center;pointer-events:none;font:28px "STSong",serif;letter-spacing:5px;color:#fff6cc;text-shadow:0 2px 8px #224d47;opacity:0;transform:translateY(10px);transition:opacity .2s,transform .3s}.scene-caption.show{opacity:1;transform:translateY(0)}.controls{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:14px 0;touch-action:none}.action{display:flex;align-items:center;gap:14px;background:#244e44;color:#fff1cd;padding:12px 24px;min-width:180px;min-height:60px;border:1px solid #a7ae80;border-radius:8px 20px 8px 20px;font-size:16px;user-select:none;touch-action:none}.action span{font-size:26px;line-height:1}.action small{font-size:10px;opacity:.6}.action:active,.skill:active{transform:translateY(2px)}.skill{border:1px solid #ac824e;background:#f4e4bd;min-width:110px;min-height:60px;border-radius:30px;padding:8px 22px;box-shadow:inset 0 0 0 4px #eadbb7;touch-action:none}.skill span{display:block;font:19px "STSong",serif;letter-spacing:3px}.skill small{font-size:10px;color:#867653}.selection{padding:22px 10px 0}.selection-heading{display:flex;justify-content:space-between;align-items:end}.riders{display:flex;gap:10px;margin-top:9px}.riders button{padding:7px 15px;min-height:44px;border:1px solid #8b9c8466;border-radius:24px;background:transparent;font-family:"STSong",serif;font-size:17px}.riders span{font:10px sans-serif;margin-left:8px;opacity:.6}.riders .selected{background:#284f43;color:#fff0c9;border-color:#284f43}.section-heading-right{text-align:right}.section-heading-right small{display:block;font-size:11px;color:#858a73;margin-top:8px}.mounts{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:16px 0 10px}.mount{position:relative;display:flex;align-items:center;gap:14px;padding:10px 18px 10px 10px;background:linear-gradient(120deg,#fbf3dcaa,#e7dbba55);border:1px solid #87987544;border-radius:8px 25px 8px 25px;text-align:left;min-height:95px;transition:background .2s,transform .2s}.mount:hover{transform:translateY(-3px)}.mount.selected{border-color:#48715a;box-shadow:inset 0 0 0 2px #48715a18;background:linear-gradient(120deg,#dce5c5,#f7edd5)}.mount img{width:76px;height:76px;object-fit:contain;filter:drop-shadow(0 4px 4px #203c3122)}.mount strong{display:block;font:23px "STSong",serif;letter-spacing:3px;font-weight:400}.mount small{display:block;font-size:11px;color:#74846a;margin-top:7px}.mount .owned{position:absolute;right:12px;top:10px;color:#a16d2a;font-size:10px}.selection-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;font-size:12px;line-height:1.7;color:#708166}.text-button{background:transparent;min-height:44px;padding:8px 12px;text-decoration:none;white-space:nowrap;color:#426555;font-size:13px}footer{display:flex;justify-content:space-between;align-items:center;margin:20px 10px 0;border-top:1px solid #ad9d6c3b;padding-top:12px;font-size:11px;color:#8a8e74;letter-spacing:2px}footer button{min-height:36px;background:transparent;font-size:11px;color:#637b66;padding:0 10px;letter-spacing:1px}.overlay{position:absolute;inset:0;display:grid;place-items:center;background:#14392e75;backdrop-filter:blur(5px);z-index:6}.paper-panel{background:#f3e8cb;border:1px solid #c7ad72;border-radius:8px 30px;box-shadow:0 20px 50px #08291d44;width:min(390px,85%);padding:30px;text-align:center}.paper-panel h2{font:30px "STSong",serif;font-weight:400;letter-spacing:3px;margin:18px 0}.paper-panel p{font-size:13px;line-height:1.7}.paper-panel button{display:block;margin:10px auto}.result-stats{display:flex;justify-content:center;gap:42px;margin:20px 0}.result-stats small{display:block;color:#8b8567;font-size:11px}.result-stats strong{display:block;font:29px Georgia,serif;margin-top:8px;color:#ab7440}.save-note{font-size:11px!important;color:#7b856a}.rotate-hint{display:none;font-size:11px;text-align:center;color:#79836e}dialog{width:min(480px,calc(100vw - 32px));border:1px solid #c3a975;border-radius:8px 24px;background:#f4ead2;color:#274c40;padding:34px;box-shadow:0 20px 80px #16382d55}dialog::backdrop{background:#14392e99;backdrop-filter:blur(4px)}dialog h2{font:28px "STSong",serif;letter-spacing:2px;margin:4px 0 22px}dialog p{font-size:14px;line-height:1.9}dialog .dialog-close{position:absolute;right:12px;top:12px;background:transparent;border:0}dialog .primary{display:block;margin:18px auto 0}.rule{display:flex;gap:15px;align-items:center;padding:12px 0;border-bottom:1px solid #ada77844;font-size:13px;line-height:1.6}.rule b{color:#ad6c36;min-width:42px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:13px 20px;border:1px solid #d1b67a;background:#224a41f0;color:#fff2d4;border-radius:8px;z-index:20;max-width:90vw;font-size:13px;line-height:1.6}body.playing .shell{max-width:1240px}body.playing .selection{display:none}@media(min-width:900px){.stage{max-height:68svh}.opening h1{font-size:48px}}@media(max-width:600px){.shell{padding:14px 12px}.masthead{gap:6px;margin-bottom:13px}.brand{font-size:17px;gap:9px;letter-spacing:1px}.brand small{font-size:8px;letter-spacing:2px}.seal{width:30px;height:36px;font-size:24px}.head-actions{gap:6px}.purse{font-size:14px;gap:3px}.purse i{font-size:21px}.wallet{font-size:11px;padding:6px 10px;max-width:124px}.head-actions .icon{width:36px;height:44px;border:0;background:transparent}.opening h1{font-size:27px;line-height:1.24;letter-spacing:2px;margin:10px 0}.opening p{font-size:10px;line-height:1.65;letter-spacing:0;margin:5px 0 9px}.opening .eyebrow{font-size:8px;letter-spacing:1px}.opening .primary{font-size:12px;padding:8px 15px;min-height:40px;letter-spacing:1px}.opening .primary span{padding-left:12px}.opening small{display:none}.story-stamp{font-size:17px}.selection{padding:20px 2px 0}.section-heading-right{font-size:10px}.section-heading-right .eyebrow{font-size:10px}.section-heading-right small{display:none}.riders button{font-size:16px;padding:7px 12px}.mounts{gap:7px}.mount{flex-direction:column;gap:2px;padding:8px 3px 13px;border-radius:6px 18px;text-align:center}.mount img{width:65px;height:65px}.mount strong{font-size:21px}.mount small{font-size:10px}.mount .owned{font-size:8px;top:5px;right:6px}.selection-footer{gap:8px;font-size:11px;align-items:start}.selection-footer .text-button{font-size:11px;padding:0;min-height:32px}.eyebrow{font-size:10px;letter-spacing:2px}.hud{gap:10px}.hud small{font-size:9px;letter-spacing:1px}.hud strong{font-size:17px}.hud em{font-size:9px}.hud .icon{width:36px;height:36px;min-height:36px;font-size:16px}.run-coins{font-size:18px}.run-coins small{margin-top:2px;font-size:10px}.charge{top:45px;width:145px;gap:6px;font-size:9px}.charge small{font-size:8px}.scene-caption{font-size:19px;inset:35% 5% auto}.controls{gap:10px;margin:17px 0}.action{min-width:0;flex:1;padding:10px 14px;justify-content:center;gap:8px;font-size:14px}.action small{display:none}.skill{min-width:92px;padding:8px 12px}.skill span{font-size:17px}.paper-panel{padding:12px 20px}.paper-panel h2{font-size:22px;margin:8px 0}.paper-panel p{font-size:11px;margin:7px 0}.paper-panel .eyebrow{font-size:9px}.paper-panel button{min-height:38px;font-size:12px;margin:5px auto}.result-stats{margin:8px 0;gap:25px}.result-stats strong{font-size:21px;margin-top:3px}.result .save-note{display:none}.result .text-button{min-height:28px}.rotate-hint{display:block}footer{margin-top:15px;font-size:9px;letter-spacing:1px}footer button{font-size:10px;padding:0 6px}.stage:after{inset:5px}}@media(orientation:landscape) and (max-height:520px){.shell{padding:6px 12px}.masthead{margin-bottom:6px}.brand small{display:none}.brand{font-size:16px}.seal{width:27px;height:30px;font-size:22px}.head-actions button{min-height:34px;height:34px}.stage{width:min(100%,calc((100svh - 140px)*1.7857));margin:auto}.controls{max-width:850px;margin:8px auto}.action,.skill{min-height:47px;padding:5px 20px}.action{min-width:140px}footer,body.playing .masthead .purse{display:none}.selection{padding-top:15px}.opening h1{font-size:27px;margin:8px 0}.opening p{font-size:11px;margin:8px 0}.opening small{display:none}.opening .primary{min-height:38px;padding:7px 20px}.rotate-hint{display:none}}@media(prefers-reduced-motion:reduce){.mount,.scene-caption{transition:none}}

/* Keep the bounded landscape stage centered with its controls. */
.stage{margin-inline:auto}.controls{max-width:1000px;margin-inline:auto}.selection{max-width:1000px;margin-inline:auto}@media(min-width:900px){.stage{width:min(100%,calc(68svh * 1.7857));max-height:none}}

/* Results must remain reachable even when the landscape canvas is short on a phone. */
@media(max-width:600px),(max-height:520px){
 .overlay{position:fixed;z-index:15;overflow:auto;padding:20px;inset:0;backdrop-filter:blur(8px)}
 .paper-panel{width:min(390px,100%);max-height:calc(100svh - 40px);overflow:auto;padding:24px}
 .result .save-note{display:block}.paper-panel button{min-height:44px}.paper-panel h2{margin:14px 0}
}
@media(max-width:600px){.opening-copy{max-width:58%}.opening h1{font-size:23px;letter-spacing:1px;margin:7px 0}.opening p{font-size:9px;margin:4px 0 7px}.opening .primary{min-height:42px}}

.overlay{position:fixed;z-index:30;padding:20px;overflow:auto}.paper-panel{max-height:calc(100svh - 40px);overflow:auto}

/* Quality slice: contrast lives in the HUD, not an opaque wash over the scene. */
.hud{top:18px;left:22px;right:22px;color:#fff2c9;text-shadow:0 2px 5px #0d2f2b;z-index:4}
.hud:before{content:"";position:absolute;z-index:-1;inset:-18px -22px -45px;background:linear-gradient(#102f31b8,transparent);pointer-events:none}
.hud small{color:#f4e4b8}.hud strong{font-family:Georgia,"STSong",serif;font-size:29px}
.run-coins{color:#fff3ba}.run-coins i{color:#ffcf65}.run-coins small{color:#f3ab7b;text-shadow:0 1px 3px #482716}
.hud .icon{border:1px solid #eddbac80;background:#173e3e80;color:#fff0c1;text-shadow:none}
.charge{top:67px;width:190px;color:#f8e6b9}.charge>div{background:#091f2d55;border:1px solid #ffe9a735;height:6px}
.charge i{box-shadow:0 0 5px #ffda74}.charge small{color:#fff1bf}.story-stamp{right:4%;top:11%;background:#f4e6c933}
.scene-caption{font-size:25px;text-shadow:0 2px 3px #123e32,0 0 18px #173f39;z-index:5}
@media(max-width:600px){.hud{top:10px;left:12px;right:12px}.hud:before{inset:-10px -12px -30px}.hud strong{font-size:20px}.charge{top:46px;width:138px}.hud .icon{width:36px;height:36px}.scene-caption{font-size:17px}.opening p{font-size:10px}.opening h1{font-size:25px}}
@media(orientation:landscape) and (max-height:520px){
 body.playing{background:#112f2d;overflow:hidden}
 body.playing .shell{padding:0;height:100svh;display:grid;place-items:center}
 body.playing .masthead,body.playing footer,body.playing .rotate-hint{display:none}
 body.playing main{width:100%;height:100svh;display:grid;place-items:center}
 body.playing .stage{width:min(100vw,calc(100svh * 1.785714));height:auto;max-height:none;border-radius:0;box-shadow:none}
 body.playing .controls{position:fixed;inset:auto 20px 12px;z-index:8;margin:0;max-width:none;pointer-events:none;align-items:end}
 body.playing .action,body.playing .skill{pointer-events:auto;background:#163d36c7;border:1px solid #e7c385b0;color:#fff2c9;box-shadow:0 4px 15px #08242155;min-height:58px}
 body.playing .action{min-width:115px;border-radius:18px;padding:10px 16px;font-size:16px}
 body.playing .skill{min-width:95px;border-radius:29px}.skill small{color:#bcae87}
 body.playing .charge{top:60px}.scene-caption{font-size:23px}
}

/* Three lightweight seals, no growing per-frame DOM or extra control panel. */
.power-strip{position:absolute;right:3%;top:24%;display:flex;gap:6px;z-index:4;pointer-events:none;max-width:88%}
.power-badge{position:relative;display:flex;gap:7px;align-items:center;padding:7px 10px 9px;border:1px solid #e1d3a05c;border-radius:4px 12px;background:#173d36d9;color:#fff0c8;box-shadow:0 3px 9px #092d2922;overflow:hidden;font-size:12px;white-space:nowrap}
.power-badge b{font-weight:400;letter-spacing:1px;color:var(--power-color)}.power-badge span{font-variant-numeric:tabular-nums;font-size:11px;opacity:.9}
.power-badge i{position:absolute;left:0;bottom:0;height:2px;width:100%;background:var(--power-color);transform-origin:left}
.power-badge[data-held=true]{opacity:.7}.power-badge[data-ending=true]{animation:power-fade .65s ease-in-out infinite alternate}
.power-strip[data-paused=true] .power-badge{animation-play-state:paused}
@keyframes power-fade{to{border-color:#ffe3a4;box-shadow:0 0 7px #ffe3a440}}
@media(max-width:600px){.power-badge{padding:5px 7px 7px;gap:4px}.power-strip{gap:4px;top:28%;right:3%}}
@media(prefers-reduced-motion:reduce){.power-badge[data-ending=true]{animation:none;border-color:#ffe3a4}}
/* Flying giants need the upper-left air lane; the lamp fits the quiet gap
   between distance and coins on wide stages without covering the rider. */
@media(min-width:700px){body.playing .charge{left:50%;top:8px;transform:translateX(-50%);width:160px}}

/* Mobile quality: the close portrait view keeps physics unchanged. Status and
   thumbs live outside its play lane; landscape retains the complete wide view. */
.mounts{grid-template-columns:repeat(4,minmax(0,1fr))}.mount{gap:8px;padding-right:8px}.mount img{width:64px;height:64px}.mount strong{font-size:21px;letter-spacing:1px}.mount-price{position:absolute;right:10px;bottom:9px;font:12px Georgia,serif;color:#946d38}.mount[data-locked=true]{border-style:dashed}.mount[data-locked=true] small{padding-bottom:14px}
.stable-portrait{position:relative;width:144px;height:144px;margin:6px auto 14px;display:grid;place-items:center;border-radius:50%;background:radial-gradient(circle,#fffbdf 8%,#dce6ca 54%,#c0b37d00 70%)}.stable-portrait:before,.stable-portrait:after{content:"";position:absolute;inset:10px;border:1px solid #ac956955;border-radius:50%}.stable-portrait:after{inset:2px;border-style:dashed;opacity:.45;transform:rotate(15deg)}.stable-portrait img{width:116px;height:116px;object-fit:contain;filter:drop-shadow(0 6px 5px #2a4c3c28)}.stable-portrait span{position:absolute;bottom:-4px;padding:4px 12px;background:#315747;color:#f7e9c8;border:1px solid #b6a677;border-radius:3px;font:11px "STSong",serif;letter-spacing:3px}.stable-portrait+h2{text-align:center;margin:18px 0 12px}.stable-skill{font-size:13px!important;color:#5f745f;text-align:center}.stable-skill b{color:#a06b3d;font-size:16px;letter-spacing:2px}.stable-bank{display:flex;justify-content:space-between;align-items:center;border-block:1px solid #b7a37455;padding:12px 0;font-size:13px}.stable-bank strong{font:22px Georgia,serif;color:#9d7138}.stable-note{font-size:12px!important;color:#7b8168;line-height:1.7!important;margin-bottom:0}#mount-acquire{width:100%;min-height:48px;font-size:16px;letter-spacing:1px}
@media(max-width:800px){.mounts{grid-template-columns:repeat(2,minmax(0,1fr))}.mount{flex-direction:row;text-align:left;padding:9px 9px;min-height:88px}.mount img{width:58px;height:64px;flex-shrink:0}.mount strong{font-size:20px;letter-spacing:0}.mount small{font-size:11px}.mount .owned{position:absolute;top:auto;bottom:4px;right:8px;font-size:10px}.mount-price{bottom:5px;right:8px;font-size:11px}.mount[data-locked=true] small{padding-bottom:12px}}
@media(max-width:360px){.mounts{gap:8px}.mount{gap:6px;padding:8px}.mount img{width:46px;height:58px}.mount strong{font-size:18px;white-space:nowrap}.mount small{font-size:10px}}
:root{--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px);--safe-left:env(safe-area-inset-left,0px);--safe-right:env(safe-area-inset-right,0px);-webkit-text-size-adjust:100%;text-size-adjust:100%}
.shell{padding:calc(16px + var(--safe-top)) max(24px,var(--safe-right)) calc(20px + var(--safe-bottom)) max(24px,var(--safe-left))}
.stage{aspect-ratio:var(--stage-ratio,1000/560)}
.play-status{display:none;max-width:1000px;margin:0 auto 12px;width:100%;background:linear-gradient(110deg,#23483e,#315c4e);border:1px solid #68816a;border-radius:12px 26px 8px 8px;box-shadow:inset 0 0 0 4px #c6b9850b;color:#fff0c9;padding:14px 18px 10px}
body.playing .play-status{display:block}body.playing .masthead,body.playing footer{display:none}body.playing .shell{max-width:1060px}
.hud{position:relative;inset:auto;display:grid;grid-template-columns:1fr auto 44px;align-items:center;gap:8px 20px;text-shadow:none}.hud:before{display:none}.hud small{font-size:12px;color:#dddcba;letter-spacing:1px}.hud strong{font:28px/1.2 Georgia,"STSong",serif}.hud em{font:12px sans-serif;margin-left:5px;color:#d1d4b3}.hud .icon{width:44px;height:44px;min-height:44px}.run-coins{text-align:right;font-size:24px}.run-coins small{font-size:12px;color:#f3ab7b;letter-spacing:4px;margin-top:3px}
.charge,body.playing .charge{position:static;left:auto;top:auto;transform:none;width:auto;grid-column:1/-1;display:flex;gap:10px;font-size:12px}.charge>div{height:5px;flex:1}.charge small{font-size:12px;min-width:38px;text-align:right;letter-spacing:0}
.power-strip{position:static;right:auto;top:auto;max-width:none;display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;min-height:30px}.power-badge{padding:5px 9px 7px;font-size:12px}.power-badge span{font-size:12px}
body.playing>.shell>main>.power-strip{height:30px;flex-shrink:0;max-width:1000px;width:100%;margin:12px auto 0;justify-content:center}
body.playing>.shell>main>.power-strip[hidden]{display:flex!important;visibility:hidden}
.scene-caption{inset:10% 6% auto;font:22px/1.5 "Microsoft YaHei","PingFang SC",sans-serif;letter-spacing:2px}
.controls{gap:18px;margin:16px auto;width:100%;user-select:none;-webkit-user-select:none}.action{justify-content:center;min-height:72px;background:linear-gradient(135deg,#2f6151,#214b40);box-shadow:inset 0 0 0 4px #c9bd8910,0 5px 0 #22423625}.action small,.skill small{font-size:12px}.action[data-held=true],.action:active,.skill:active{transform:translateY(2px);background:#437960;box-shadow:inset 0 0 15px #dacf8238,0 0 14px #c2a46530}.skill{min-height:64px}.skill span{font:18px "Microsoft YaHei","PingFang SC",sans-serif;letter-spacing:1px}
.overlay{padding:max(20px,var(--safe-top)) max(20px,var(--safe-right)) max(20px,var(--safe-bottom)) max(20px,var(--safe-left));background:#14392ea6}
.pause-tools{display:flex;justify-content:center;gap:12px;margin-top:8px;border-top:1px solid #b7a57640;padding-top:8px}.paper-panel .pause-tools button{width:44px;min-height:44px;height:44px;margin:0;display:grid;place-items:center;padding:8px}.pause-tools svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}.pause-tools [aria-pressed=true]{background:#285445;color:#fff0c8}
.paper-panel{position:relative;background:radial-gradient(ellipse at top,#fff6dc,#f3e8cb 65%);border-radius:10px 32px;box-shadow:0 20px 50px #08291d44,inset 0 0 0 6px #b69d6030;max-height:calc(100svh - 40px - var(--safe-top) - var(--safe-bottom));padding:26px}.panel-flower{color:#b38a44;font-size:28px;line-height:1;margin-bottom:10px}.paper-panel h2{font:400 27px/1.45 "Microsoft YaHei","PingFang SC",sans-serif;letter-spacing:1px;margin:16px 0}.paper-panel p{font-size:14px;line-height:1.85;margin:10px 0}.paper-panel button{width:100%;margin:10px auto;min-height:48px;font-size:15px}.paper-panel .eyebrow{font-size:12px}.result-stats{justify-content:space-evenly;gap:18px;margin:20px 0;padding:14px 0;border-block:1px solid #b7a57640}.result-stats small{font-size:12px}.result-stats strong{font-size:30px;margin-top:8px}.save-note{font-size:12px!important;color:#65775d}
dialog{max-height:calc(100svh - 32px - var(--safe-top) - var(--safe-bottom));overflow:auto;padding:32px 26px}dialog h2{font:400 25px/1.5 "Microsoft YaHei","PingFang SC",sans-serif;letter-spacing:1px;margin:12px 0 20px;padding-right:14px}dialog .dialog-close{position:sticky;float:right;inset:0 auto auto;margin:-20px -14px 0 4px;background:#f4ead2;border:1px solid #b8ac7740;z-index:1}.rule{font-size:14px;align-items:start;line-height:1.8}#toast{bottom:calc(24px + var(--safe-bottom));font-size:14px;z-index:40}
@media(min-width:900px){.play-status,.controls{max-width:min(100%,calc(68svh * 1.7857))}}
@media(max-width:600px){
 .shell{padding:calc(12px + var(--safe-top)) max(12px,var(--safe-right)) calc(16px + var(--safe-bottom)) max(12px,var(--safe-left))}.masthead{flex-wrap:wrap;gap:12px}.brand{font-size:18px}.brand small{font-size:12px;letter-spacing:0}.head-actions{margin-left:auto}.wallet{font-size:12px}.head-actions .icon{width:44px}.purse{font-size:15px}.opening p{display:none}.opening .eyebrow{font-size:12px;letter-spacing:0}.opening .primary{min-height:44px;font-size:14px}.opening h1{font-size:clamp(22px,6vw,30px)}.selection .eyebrow{font-size:12px}.riders span,.mount small,.mount .owned{font-size:12px}.mount .owned{position:static}.selection-footer{font-size:12px}.selection-footer .text-button{font-size:12px;min-height:44px;flex-shrink:0}.rotate-hint,footer,footer button{font-size:12px}footer button{min-height:44px}
 body.playing .shell{padding-top:calc(12px + var(--safe-top));padding-bottom:calc(12px + var(--safe-bottom))}body.playing main{min-height:calc(100svh - 24px - var(--safe-top) - var(--safe-bottom));display:flex;flex-direction:column;justify-content:center}.play-status{padding:13px 14px 10px;border-radius:10px 24px 8px 8px;margin-bottom:12px}.hud{gap:8px 14px}.hud strong{font-size:28px}.run-coins{font-size:23px}.stage{flex-shrink:0}.controls{gap:12px;margin:18px 0 12px}.action{padding:16px 8px;gap:7px;font-size:16px;min-height:76px}.skill{min-width:86px;min-height:64px;padding:8px 10px}.skill span{font-size:17px}.scene-caption{font-size:17px;letter-spacing:1px}.rotate-hint{margin:2px 0 0}.paper-panel{padding:22px}.paper-panel h2{font-size:24px}.power-strip{gap:4px}.power-badge{gap:5px;padding:5px 7px 7px}
}
@media(orientation:landscape) and (max-height:520px){
 body.playing .shell{padding:0}body.playing main{min-height:0;display:grid}body.playing .stage{width:min(calc(100vw - var(--safe-left) - var(--safe-right)),calc(100svh * 1.785714))}body.playing .play-status{position:fixed;left:max(22px,var(--safe-left));right:max(22px,var(--safe-right));top:calc(8px + var(--safe-top));width:auto;max-width:none;z-index:8;margin:0;padding:0;background:none;border:0;box-shadow:none;pointer-events:none}.hud{display:flex;gap:18px;align-items:start;text-shadow:0 1px 5px #12362d}.hud strong{font-size:26px}.hud .icon{pointer-events:auto}.run-coins{margin-left:auto}body.playing .charge{position:absolute;left:50%;top:4px;transform:translateX(-50%);width:160px}.power-strip{position:absolute;top:38px;left:50%;transform:translateX(-50%);margin:0;justify-content:center;min-width:280px}.power-badge{background:#173d36e0}.scene-caption{inset:24% 10% auto;font-size:20px}
 body.playing .controls{inset:auto max(20px,var(--safe-right)) calc(10px + var(--safe-bottom)) max(20px,var(--safe-left));width:auto;max-width:none;margin:0}body.playing .action,body.playing .skill{min-height:58px}body.playing .action{min-width:112px;flex:none}body.playing .skill{min-width:96px}.skill small{color:#d9cba6}.paper-panel{padding:18px 26px}.panel-flower{display:none}.paper-panel h2{margin:8px 0}.result-stats{margin:10px 0;padding:10px 0}
 body.playing>.shell>main>.power-strip{position:fixed;left:50%;right:auto;top:calc(48px + var(--safe-top));width:auto;max-width:65%;margin:0;transform:translateX(-50%);z-index:8}
}

.stable-status{font-size:13px!important;line-height:1.7!important;color:#974d37;padding:10px 12px;border:1px solid #b4774c55;background:#efd8b650;border-radius:5px;margin:12px 0 0}

.ending-skip{position:absolute;right:18px;bottom:18px;z-index:9;min-height:44px;padding:10px 18px;border:1px solid #d9c18388;border-radius:6px 18px;background:#224e41df;color:#fff0cb;letter-spacing:1px;font-size:13px;box-shadow:0 4px 15px #10362744}.ending-skip span{padding-left:16px}body.celebrating .controls{visibility:hidden;pointer-events:none}body.celebrating .scene-caption{font-family:"STSong","SimSun",serif;font-size:28px;letter-spacing:6px}body.celebrating .charge{visibility:hidden}
@media(max-width:600px){.ending-skip{right:12px;bottom:12px;padding:8px 13px;font-size:12px}body.celebrating .scene-caption{font-size:22px}}

.result-medallion{position:relative;width:82px;height:82px;margin:0 auto 12px;display:grid;place-items:center;background:radial-gradient(circle,#eac06c55,transparent 72%)}.result-medallion:before{content:"";position:absolute;inset:4px;border:1px solid #b7985666;border-radius:50%}.result-medallion span{display:block;width:76px;height:76px;background:url('./art/webp/lantern-embers-v2.webp') 0 100%/300% 200%;filter:drop-shadow(0 3px 5px #bd8d2740)}[data-outcome=lost] .result-medallion{filter:saturate(.35);opacity:.65}.paper-panel.result h2{margin:10px 0}.paper-panel.result .save-note[data-saved=false]{color:#9a4c36}.paper-panel .result-partner{display:flex;align-items:center;gap:12px;padding:10px 14px;background:#e4e8cb70;border:1px solid #7e9b6a55;border-radius:7px 18px;text-align:left;min-height:70px;letter-spacing:0}.result-partner img{width:46px;height:46px;object-fit:contain}.result-partner>span:nth-child(2){flex:1}.result-partner b{display:block;font:18px "STSong","SimSun",serif;letter-spacing:2px}.result-partner small{display:block;font-size:12px;color:#6a785c;margin:4px 0 6px}.partner-track{display:block;height:3px;background:#526d4522;border-radius:2px;overflow:hidden}.partner-track i{display:block;height:100%;width:100%;background:linear-gradient(90deg,#67865e,#c2a35c);transform-origin:left}.result-partner>span:last-child{color:#7c905f;font-size:19px}
@media(max-height:720px){.result-medallion{width:60px;height:60px;margin-bottom:8px}.result-medallion span{width:58px;height:58px}.paper-panel.result{padding:20px}.paper-panel.result .result-stats{margin:12px 0;padding:10px 0}.paper-panel.result h2{font-size:24px}}

.paper-panel .retry-save{width:auto;display:block;min-height:44px;margin:-6px auto 6px;color:#9a4c36;text-decoration:underline;text-underline-offset:4px;padding:5px 15px}

@media(orientation:landscape) and (max-height:520px){
 .paper-panel.result{display:grid;grid-template-columns:minmax(170px,.85fr) minmax(240px,1.15fr);gap:24px;align-items:center;max-width:720px;width:calc(100vw - 48px);padding:16px 24px}.result-story{padding-right:16px;border-right:1px solid #b7a57640}.result-story .result-medallion{width:72px;height:72px;margin:0 auto 12px}.result-story .result-medallion span{width:68px;height:68px}.paper-panel.result h2{font-size:24px;margin:10px 0}.paper-panel.result p{font-size:12px;line-height:1.7;margin:6px 0}.result-rewards .result-stats{margin:0 0 6px!important;padding:7px 0!important}.result-rewards .result-stats strong{font-size:27px;margin-top:3px}.paper-panel.result button{min-height:44px;margin:5px auto;padding:8px 14px}.paper-panel.result .result-partner{min-height:64px;gap:10px;padding:6px 12px}.result-partner img{width:40px;height:40px}.paper-panel.result .retry-save{margin:0 auto}.result-rewards .text-button{margin-bottom:0!important}
}

.chapter-switch{display:flex;gap:7px;margin:0 auto 14px;max-width:1000px;width:100%;justify-content:center}.chapter-switch button{display:flex;align-items:center;gap:9px;min-height:44px;padding:7px 18px;border:1px solid #ad98624a;background:#f7efd844;border-radius:5px 15px;color:#71806a;font-size:14px;letter-spacing:1px}.chapter-switch i{display:grid;place-items:center;font:18px "STSong",serif;width:26px;height:26px;border:1px solid currentColor;border-radius:50%;font-style:normal}.chapter-switch button.selected{background:#244e40;color:#f1dfad;border-color:#8c9a6b;box-shadow:inset 0 0 0 3px #ddd09a12}.chapter-switch button:not(.selected):hover{background:#e6ddc3}body.playing .chapter-switch{display:none}.paper-panel .next-chapter{color:#45694f;font-size:13px;border:1px solid #869a6a55;border-radius:5px;background:#dfe7ca55}.chapter-switch button:focus-visible{outline:2px solid #a7753b;outline-offset:3px}
.paper-panel.result .text-button{min-height:44px}
@media(orientation:portrait) and (max-height:720px){.paper-panel.result{padding:18px}.result-medallion{width:44px;height:44px;margin-bottom:5px}.result-medallion span{width:44px;height:44px}.paper-panel.result h2{font-size:23px;margin:8px 0}.paper-panel.result .result-stats{margin:8px 0;padding:8px 0}.paper-panel.result button{margin:7px auto}.paper-panel.result .result-partner{min-height:64px;padding:8px 12px}}
@media(max-width:600px){.chapter-switch{margin:0 0 12px;gap:8px}.chapter-switch button{flex:1;justify-content:center;padding:7px 10px;font-size:13px}.chapter-switch i{width:23px;height:23px;font-size:16px}}
@media(max-width:360px){.chapter-switch button{flex-direction:column;gap:3px;padding:6px 4px}.chapter-switch button span{white-space:nowrap}.chapter-switch i{width:20px;height:20px;font-size:14px}}

/* Short, chapter-aware instructions in the existing paper dialog. */
.runner-help h2{margin:8px 0;font-family:"STSong","SimSun",serif;font-size:28px;letter-spacing:3px}
.runner-help .eyebrow{font-size:11px;letter-spacing:1px}.runner-help .help-goal{margin:0 0 18px;color:#788065;font-size:13px;line-height:1.7}.help-goal b{font-weight:500;color:var(--jade)}
.help-section{border-top:1px solid #b4a77c55}.help-section:last-of-type{border-bottom:1px solid #b4a77c55}.help-section summary{display:flex;align-items:center;gap:12px;min-height:52px;list-style:none;cursor:pointer;font-size:15px;font-weight:500;outline-offset:3px}.help-section summary::-webkit-details-marker{display:none}.help-section summary:focus-visible{outline:2px solid #cb9753}.help-section svg,.help-action>svg{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linejoin:round;stroke-linecap:round}.help-section summary>svg{color:#a3814c;width:21px;height:21px}.help-section summary i{margin-left:auto;color:#9b875d;font-style:normal;font-size:20px;transition:transform .15s}.help-section[open] summary i{transform:rotate(180deg)}.help-content{padding:2px 2px 16px}
.help-action{display:flex;gap:13px;padding:9px 0}.help-action>svg{margin-top:3px;color:#6e8b70}.help-action>div{position:relative;flex:1}.help-action b{display:block;font-weight:500;font-size:14px}.help-action p{font-size:13px;line-height:1.6;margin:4px 0 0;color:#6d7865}.help-action kbd{font:10px/1.6 sans-serif;color:#8d896f;border:1px solid #ac9e6d55;border-radius:3px;padding:1px 5px;display:inline-block;margin-top:4px}.runner-help .help-mount{padding:10px 12px;margin:8px 0 0;border-left:2px solid #b9985d;background:#c9d1b526;font-size:12px;line-height:1.8;color:#5e735f}.help-row{display:grid;grid-template-columns:80px 1fr;gap:10px;padding:10px 0;font-size:13px;line-height:1.8}.help-row b{font-weight:500;color:#8c673d}.help-row span{color:#526c5d}.runner-help .help-note,.runner-help .help-foot{font-size:12px;line-height:1.8;color:#788065;margin:10px 0 0}.runner-help .help-note{padding-top:10px;border-top:1px dashed #b4a77c40}.runner-help .help-foot{margin-top:16px}
@media(max-width:600px){.help-action kbd{display:none}.help-row{grid-template-columns:70px 1fr;gap:8px}.runner-help h2{font-size:25px}.help-section summary{min-height:48px}}

dialog.help-dialog{width:min(480px,calc(100vw - 24px));max-width:calc(100vw - 24px);padding:26px 22px}.help-dialog .dialog-close{margin:-14px -10px 0 4px}
@media(max-width:600px){dialog.help-dialog{padding:22px 18px}.help-dialog .dialog-close{margin:-10px -6px 0 4px}.help-action{padding:7px 0}.help-content{padding-bottom:12px}}

@media(max-width:600px){.runner-help .help-goal{margin-bottom:12px}.runner-help .help-foot{margin-top:10px}.help-content{padding-bottom:10px}}

/* Existing combo feedback; fixed height avoids bouncing the play field. */
.charge,body.playing .charge{min-height:22px;align-items:center}.charge>div{min-width:18px}
.light-streak{--streak-flare:0;display:inline-flex;align-items:center;justify-content:center;gap:4px;flex:none;min-width:67px;height:22px;padding:1px 6px;border-radius:4px 10px 4px 10px;border:1px solid #c9ac6255;background:#132f2b88;color:#f1d599;font-size:10px;white-space:nowrap;box-shadow:0 0 calc(var(--streak-flare)*13px) #f7d58d66;transform:scale(calc(1 + var(--streak-flare)*.08));transform-origin:center;position:relative;overflow:hidden}
.light-streak:after{content:"";position:absolute;inset:0;background:linear-gradient(110deg,transparent,#fff4b9bb,transparent);opacity:calc(var(--streak-flare)*.35);pointer-events:none}.light-streak i{font-style:normal;font-size:14px;color:#ecd297}.light-streak b{font:500 14px/1 Georgia,serif;min-width:16px;text-align:right;font-variant-numeric:tabular-nums}.light-streak[data-tier="2"]{border-color:#e1c07999;background:#87623255}.light-streak[data-tier="3"]{border-color:#f4d397;background:#d6ad5936;color:#fff1b2}.light-streak[data-tier="3"] i{color:#fff4b5}
@media(orientation:landscape) and (max-height:520px){body.playing .charge{width:min(260px,42vw)}}

.light-streak{margin-inline:3px}
/* Keep the status, playfield and controls together on shorter desktop windows. */
@media(min-width:601px) and (min-height:521px){
 body.playing main{--play-width:min(100%,calc((100svh - 300px - var(--safe-top) - var(--safe-bottom))*1.785714))}
 body.playing .stage,body.playing .play-status,body.playing .controls{width:var(--play-width);max-width:100%;margin-left:auto;margin-right:auto}
 body.playing .controls .action{min-width:0;flex:1;padding-inline:12px}
}
@media(min-width:601px) and (min-height:521px) and (max-height:650px){
 body.playing .controls .action{white-space:nowrap}
 body.playing .controls .action small{display:none}
}

/* Optional replay goals live outside the active running field. */
.mark-icon{display:inline-grid;place-items:center;width:32px;height:32px;flex:none;border:1px solid #a69a784d;border-radius:50%;color:#9b9d83;background:#eee5cc77;font-style:normal;box-shadow:inset 0 0 0 3px #fff9e51c}
.mark-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.mark-icon.earned{color:#f4dc97;background:linear-gradient(135deg,#476b4b,#274d40);border-color:#c4a25d;box-shadow:inset 0 0 0 3px #e9c97912}
.chapter-marks{display:flex;align-items:center;justify-content:center;gap:6px;width:max-content;max-width:100%;min-height:44px;margin:4px auto 0;padding:3px 8px;border:0;background:none;color:#6d785e;font-size:11px;letter-spacing:1px;box-shadow:none}
.chapter-marks .mark-icon{width:22px;height:22px}.chapter-marks svg{width:14px;height:14px}.chapter-marks span{margin-left:3px}.chapter-marks:focus-visible{outline:2px solid #a87642;outline-offset:2px;border-radius:4px}
.chapter-goals .eyebrow{font-size:12px;letter-spacing:1px}.chapter-goals h2{font-family:"STSong","SimSun",serif;letter-spacing:3px}.goal-rule{display:flex;gap:12px;align-items:center;padding:16px 0;border-top:1px solid #b9aa7d50}.goal-rule>div{flex:1}.goal-rule b{font-size:15px;font-weight:500}.goal-rule p{font-size:12px;line-height:1.7;margin:4px 0 0;color:#6f7b63}.goal-rule>small{font-size:11px;color:#8c7d56;white-space:nowrap}.chapter-goals .goals-note{font-size:12px;line-height:1.8;color:#849073;margin:14px 0 0}
.result-marks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:14px 0 8px}.run-mark{display:grid;justify-items:center;gap:5px;min-width:0;color:#8e937d}.run-mark b{font:15px "STSong","SimSun",serif;letter-spacing:2px}.run-mark small{font-size:10px;line-height:1.5;white-space:nowrap}.run-mark.earned{color:#49684c}.run-mark.earned small{color:#9b7941}
#result-overlay:not([hidden]) .run-mark[data-new=true] .mark-icon{animation:mark-reveal .65s cubic-bezier(.2,.8,.3,1) both}.run-mark:nth-child(2) .mark-icon{animation-delay:.12s}.run-mark:nth-child(3) .mark-icon{animation-delay:.24s}@keyframes mark-reveal{0%{transform:scale(.65) rotate(-12deg);box-shadow:0 0 0 0 #dbb65d99}65%{transform:scale(1.12);box-shadow:0 0 0 10px #dbb65d00}100%{transform:scale(1) rotate(0)}}
@media(max-width:360px){.chapter-marks{gap:4px;margin-top:0;min-height:44px}.chapter-marks span{font-size:10px}.result-marks{gap:4px}.run-mark small{font-size:10px}}
@media(orientation:landscape) and (max-height:520px){.result-marks{margin:6px 0;gap:6px}.run-mark{grid-template-columns:24px 1fr;column-gap:6px;row-gap:2px;text-align:left;justify-items:start}.run-mark .mark-icon{grid-row:span 2;width:24px;height:24px}.run-mark svg{width:15px;height:15px}.run-mark b{font-size:13px}.run-mark small{font-size:9px}}

.chapter-progress{display:flex;justify-content:space-between;align-items:center;gap:12px;max-width:1000px;margin:4px auto 0;color:#778267}.chapter-progress small{font-size:11px;line-height:1.6}.chapter-progress .chapter-marks{margin:0;padding-inline:4px;color:#59725d;flex:none}.chapter-progress .mark-icon:not(.earned){color:#7c826a;background:#f2e8ce;border-color:#a89b7266}body.playing .chapter-progress{display:none}
@media(max-width:360px){.chapter-progress{gap:5px}.chapter-progress small{font-size:10px}.chapter-progress .mark-icon{width:20px;height:20px}.chapter-progress .chapter-marks{gap:3px}}

#charge-number{white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:0}

.paper-panel.result .loss-hint{font-size:13px;line-height:1.8;color:#805b3c;background:#c6b17d19;border-left:2px solid #b49562;padding:9px 12px;margin:12px 0 0;text-align:left}
@media(orientation:landscape) and (max-height:520px){.paper-panel.result .loss-hint{font-size:12px;margin-top:10px;padding:7px 9px}}

/* Endless score stays alongside distance; the road keeps the visual focus. */
.run-score{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}.run-score small{font-size:10px;opacity:.65}.run-score b{font-size:clamp(16px,3.8vw,23px);font-variant-numeric:tabular-nums}.chapter-progress:has(#best-label){justify-content:center}.chapter-progress #best-label{text-align:center}

.hud{grid-template-columns:minmax(0,1fr) minmax(52px,.8fr) auto 44px;gap:8px 12px}.hud .run-coins{white-space:nowrap}.hud .run-score small{font-size:10px;letter-spacing:1px}.hud .run-score b{font-weight:500}.hud .run-coins small{letter-spacing:2px}
@media(max-width:360px){.hud{gap:8px}.hud strong{font-size:23px}.hud .run-coins{font-size:19px}.hud .run-coins small{font-size:10px;letter-spacing:1px}}

.result-secondary{display:flex;justify-content:center;gap:22px}.result-secondary .text-button{min-height:44px}#score-copy{width:100%;min-height:145px;padding:14px;border:1px solid #b8ae87;border-radius:8px;background:#fff8e4;color:var(--ink);font:14px/1.9 inherit;resize:vertical}
