:root{color-scheme:dark;font-family:system-ui,sans-serif;background:#101725;color:#f3f7ff;--accent:#c7ff52}
*{box-sizing:border-box}body{margin:0;min-height:100dvh;display:grid;place-items:center;padding:20px}main{width:min(1120px,100%);border:1px solid #34435a;border-radius:24px;overflow:hidden;background:#192437;box-shadow:0 24px 80px #0007}
header,footer{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px}.brand{display:flex;align-items:center;gap:12px}.logo{display:inline-block;width:24px;height:24px;background:#edf5ff;transform:rotate(-14deg);clip-path:polygon(evenodd,0 0,100% 0,100% 100%,0 100%,0 0,35% 35%,35% 65%,65% 65%,65% 35%,35% 35%)}footer{color:#bfcce2;font-size:14px;flex-wrap:wrap}kbd{background:#293850;padding:2px 5px;border-radius:4px}
.world{position:relative;background:#9edbf9}canvas{display:block;width:100%;height:auto;touch-action:none}.station{position:absolute;transform:translate(-50%,-100%);white-space:nowrap;background:#172638ed;border:1px solid #fff8;font-size:14px;padding:7px 11px}.toast{position:absolute;left:50%;bottom:4%;transform:translateX(-50%);margin:0;background:#142134;color:white;padding:10px 16px;border-radius:12px;text-align:center;width:max-content;max-width:92%;border:1px solid #b9ef5a}
button{font:inherit;font-weight:760;cursor:pointer;background:#2c3c56;color:#fff;border:1px solid #465773;border-radius:10px;padding:9px 14px}button:focus-visible{outline:3px solid #fff;outline-offset:3px}.primary{background:var(--accent);color:#172606;border-color:#e2ffad}button:not(:disabled):hover{filter:brightness(1.15)}button:disabled{cursor:default}#count{color:var(--accent);margin-left:5px}
dialog{border:1px solid #536683;border-radius:23px;background:#19263b;color:#f3f7ff;width:min(92vw,480px);max-height:90dvh;text-align:center;padding:26px;box-shadow:0 22px 70px #060b1dbb}dialog::backdrop{background:#0f1c3885}h1,h2{margin:10px 0}h1{font-size:clamp(24px,5vw,34px);letter-spacing:-.055em}p{color:#c4d0e3}.intro-icon{display:grid;place-items:center;margin:0 auto 14px;width:66px;height:66px;border-radius:18px;background:var(--accent);box-shadow:0 5px 0 #7da52e}.intro-icon .logo{width:34px;height:34px;background:#243717}.world-name{font-weight:800;color:var(--accent);margin:0}.choices{display:flex;gap:10px;margin-top:20px}.choices button{flex:1}#curse{background:#3e294d;color:#ffcee8;padding:12px;border-radius:10px}.close{position:absolute;right:12px;top:12px;padding:2px 10px;font-size:22px}progress{width:88%;accent-color:#ff5e68}#monster{display:block;background:transparent;border:0;margin:8px auto;padding:0}#monster img{display:block;width:155px;height:130px;object-fit:contain}#monster.hit{animation:hit .22s ease-out}@keyframes hit{50%{transform:scale(.88) rotate(6deg);filter:brightness(1.7)}}.pads{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:18px 0}.pads button{min-height:57px;color:#111b2a;border:2px solid transparent}.red{background:#ff6976}.blue{background:#68b7ff}.green{background:#6df49b}.yellow{background:#ffe16d}.pads .lit{border-color:#fff;filter:brightness(1.27);box-shadow:0 0 17px #fffb;transform:scale(1.05)}#items{padding:0;list-style:none;text-align:left}#items li{padding:10px 12px;background:#25354d;border-radius:8px;margin:6px 0}
@media(max-width:600px){body{padding:8px}header,footer{padding:10px}.station{font-size:12px;padding:4px 6px}.brand{font-size:14px;gap:6px}.logo{width:20px;height:20px}.world canvas{min-height:255px}header button{padding:6px;font-size:13px}}

[hidden]{display:none!important}
.chapter main{max-width:1040px}
.chapter-label{color:#c7d5ed;text-align:right;font-size:14px;font-weight:700}
.scene{min-height:clamp(560px,72vh,780px);display:grid;place-items:center;padding:32px 16px;position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(160deg,var(--sky,#426dd2),#101b36 85%)}
.scene::before,.scene::after{content:"";position:absolute;z-index:-1;pointer-events:none}
.scene::before{width:142%;height:64%;bottom:-32%;left:-20%;background:repeating-conic-gradient(from 90deg,#ffffff1a 0 25%,transparent 0 50%) 0 0 / 104px 104px,var(--ground,#6bae59);transform:rotate(-14deg) skew(24deg);box-shadow:0 0 0 15px #ffffff16}
.scene::after{width:90px;height:75px;top:15%;right:12%;border-radius:12px;transform:rotate(17deg);background:var(--ground,#6bae59);box-shadow:-12px 14px 0 #06153069, -720px 100px 0 -10px #ffffff28, -630px -32px 0 -20px #ffffff33}
.chapter.intro{--sky:#53abed;--ground:#6fb865}
.chapter.battle{--sky:#5d488d;--ground:#7355a6}
.chapter.rhythm{--sky:#34648c;--ground:#348795}
.chapter.ending{--sky:#7961af;--ground:#d28a6c}
.story-card{width:min(100%,520px);padding:clamp(20px,5vw,38px);border:1px solid #8db0dc6b;border-radius:24px;text-align:center;background:#142139f5;box-shadow:0 24px 60px #05091c70}
.story-card p,.garden-intro p{line-height:1.55}
.story-card .intro-icon{font-size:30px}
.next{display:inline-block;border-radius:10px;padding:10px 14px;font-weight:800;text-decoration:none}
.next:focus-visible{outline:3px solid #fff;outline-offset:3px}
.next:hover{filter:brightness(1.12)}
.garden-intro{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 20px;background:#23334c}
.garden-intro h1,.garden-intro p{margin:3px 0}
.garden-intro button{white-space:nowrap}
.signature{font-weight:800;color:#c7ff52}
.rewards{list-style:none;margin:14px 0 24px;padding:0;display:grid;gap:6px;text-align:left}
.rewards li{padding:8px 10px;border-radius:8px;background:#263852}
@media(max-width:600px){.garden-intro{align-items:flex-start;flex-direction:column;padding:12px}.chapter-label{font-size:12px}.scene{min-height:min(620px,80dvh)}}

#monster{display:grid;width:min(100%,320px);height:clamp(165px,32vh,270px)}
#monster img{grid-area:1/1;width:100%;height:100%;min-height:0}
#monster .hit-sprite{visibility:hidden}
#monster.hit img:first-child{visibility:hidden}
#monster.hit .hit-sprite{visibility:visible}
.coupon-overlay{position:fixed;inset:0;z-index:5;display:grid;place-items:center;padding:22px;background:#10132ca8}
.coupon-card{--piece:#ffc0df;--ink:#59173a;--shine:#fff0f8;position:relative;isolation:isolate;display:grid;justify-items:center;align-content:center;text-align:center;width:min(94vw,400px);min-height:310px;padding:38px 28px;color:var(--ink);background:radial-gradient(ellipse at top,var(--shine),var(--piece));border:3px solid var(--shine);border-radius:26px;box-shadow:0 0 42px #fff6,0 18px 55px #0007;animation:coupon-in .25s ease-out both}
.coupon-card[data-coupon="pass"]{--piece:#bcb5ff;--ink:#28205f;--shine:#f5eeff}
.coupon-card[data-coupon="joy"]{--piece:#ffcf72;--ink:#583502;--shine:#fff6cf}
.puzzle-piece{width:158px;height:158px;filter:drop-shadow(0 8px 0 #24204742) drop-shadow(0 0 13px var(--shine))}
.puzzle-piece path{fill:var(--piece);stroke:var(--ink);stroke-width:4;stroke-linejoin:round}
#coupon-icon{position:absolute;top:87px;font-size:34px}
.coupon-card p{color:inherit;font-weight:760;margin:4px 0 7px}
.coupon-card strong{font-size:clamp(21px,5vw,30px);line-height:1.25;overflow-wrap:anywhere}
@keyframes coupon-in{from{opacity:0;transform:translateY(20px) scale(.85)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.coupon-card,#monster.hit{animation:none}}

.guitar-letter{color:#553659;border:2px solid #eed7dd;background:repeating-linear-gradient(transparent 0 27px,#efdbe0 27px 28px) top / 100% 100%,#fff8ed;padding:18px 24px 25px}
.guitar-letter img{display:block;width:min(100%,230px);height:min(30dvh,220px);object-fit:contain;margin:0 auto 10px;filter:drop-shadow(0 6px 5px #5f345530)}
.guitar-letter h2{font-size:clamp(21px,5vw,28px);line-height:1.4;margin:8px 0 20px;text-wrap:balance}
.guitar-letter .next{background:#56366b;color:#fff}
.guitar-letter .next:focus-visible{outline-color:#56366b}
.combine-choices{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:12px;margin-top:14px}
.combine-choices #combine-yes{min-width:72px}
.runway{position:relative;height:112px}
#combine-no{position:absolute;transition:transform .14s ease-out;top:0;left:0;min-width:74px;white-space:nowrap}
#combine-no[data-spot="1"]{top:auto;bottom:0;left:auto;right:0}
#combine-no[data-spot="2"]{left:auto;right:0}
#combine-no[data-spot="3"]{top:auto;bottom:0}
.moon-letter img{width:min(100%,320px);height:min(40dvh,300px)}
.moon-letter h1{margin:12px 0 24px;line-height:1.35;text-wrap:balance}
