@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800;900&family=Noto+Sans+JP:wght@400;500;600;700;800;900&display=swap');
:root{font-family:'Noto Sans JP',sans-serif;color:#f5f4ff;background:#0b0c1a;font-synthesis:none;color-scheme:dark;--purple:#9873ff;--muted:#9695b2;--line:#29293c}
*{box-sizing:border-box}body{margin:0;background:radial-gradient(ellipse at 60% 30%,#18152c 0,transparent 62%),#0b0c1a;min-height:100dvh}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer}button:focus-visible,a:focus-visible,canvas:focus-visible{outline:3px solid #c9b6ff;outline-offset:5px}button:disabled{cursor:wait}button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.app-shell{max-width:1440px;margin:auto;padding:0 48px}.topbar{height:102px;display:flex;align-items:center;justify-content:space-between}.brand{display:flex;gap:12px;align-items:center;color:inherit;text-decoration:none}.brand-mark{color:#aa8bff;font-size:38px;line-height:1}.brand-word{font-family:'Barlow Condensed',Impact,sans-serif;font-size:32px;line-height:.92;letter-spacing:2px;font-weight:800}.brand-sub{font-family:'Noto Sans JP',sans-serif;display:block;margin-top:7px;font-size:9px;letter-spacing:2px;font-weight:600;color:#a5a2bd}.top-actions{display:flex;gap:20px}.tool-button{padding:8px 0;background:none;border:0;color:#aaa8c3;font-size:13px;display:flex;gap:8px;align-items:center}.tool-button:hover{color:#fff}.tool-button .sound-waves{display:none}.tool-button[aria-pressed=true] .sound-waves{display:block}.tool-button[aria-pressed=true] .sound-cross{display:none}.game-frame{isolation:isolate;position:relative;aspect-ratio:16/9;width:100%;overflow:hidden;border:1px solid #3a3454;border-radius:18px;background:#1c173d;box-shadow:0 24px 100px #0005;user-select:none;-webkit-user-select:none;touch-action:none}.game-frame canvas{display:block;width:100%;height:100%;outline:none;object-fit:contain}.game-vignette{position:absolute;inset:0;pointer-events:none;box-shadow:inset 0 35px 85px #090b2a88,inset 0 -10px 45px #06082033;z-index:1}.hud{position:absolute;inset:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:28px 30px;gap:16px;z-index:4;pointer-events:none}.stage-info{display:flex;flex-direction:column;gap:5px;text-shadow:0 1px 8px #0b0b29}.eyebrow{font-family:'Barlow Condensed',sans-serif;font-size:14px;font-weight:600;letter-spacing:2.2px;color:#c5b8f2}.stage-info strong{font-size:15px;font-weight:600;letter-spacing:.03em}.hud-counters{display:flex;align-items:center;gap:24px}.collectible{display:flex;align-items:center;gap:9px;font-size:20px;font-variant-numeric:tabular-nums;font-weight:700;text-shadow:0 1px 8px #090a24}.coin-symbol{display:grid;place-items:center;width:24px;height:24px;border:2px solid #ffc970;border-radius:50%;font-size:15px;background:#c57f253b;color:#ffcd79;box-shadow:0 0 14px #f3b04744}.gem-symbol{color:#73edea;font-size:25px;text-shadow:0 0 15px #1bd5dc88}.counter-total{font-size:14px;color:#b9b2d4;font-weight:500}.hearts{display:flex;gap:5px;color:#e5acfa;font-size:21px}.hearts .empty{opacity:.2}.pause-button{pointer-events:auto;display:grid;place-items:center;border:1px solid #a89ad142;border-radius:11px;background:#16133188;color:#d8cdf2;width:38px;height:38px;backdrop-filter:blur(12px)}.pause-button:disabled{opacity:.3;cursor:default}.start-screen{position:absolute;inset:0;background:linear-gradient(90deg,#10132cea 0%,#15143691 42%,#11122909 85%);z-index:3;display:flex;align-items:center}.start-copy{padding:40px 0 0 7.2%;width:61%;position:relative;z-index:2}.adventure-label{display:flex;align-items:center;gap:10px;font-family:'Barlow Condensed',sans-serif;font-size:13px;letter-spacing:2.5px;color:#c5b6ec;font-weight:600}.adventure-label span{width:22px;height:2px;background:#aa87ff}.start-copy h1{margin:11px 0 20px;font-family:'Barlow Condensed',Impact,sans-serif;line-height:.9;font-size:clamp(80px,9.4vw,145px);font-weight:800;letter-spacing:4px;color:#faf9ff;text-shadow:0 5px 30px #ab8afa14}.start-copy h1>span{display:block;color:#b398ff;font-size:.26em;letter-spacing:.23em;line-height:1.4;margin-top:8px}.start-copy p{font-size:15px;line-height:1.85;color:#c0b9d9;margin:0 0 26px;font-weight:500}.primary-button{border:1px solid #c1aaff69;border-radius:10px;color:white;background:linear-gradient(110deg,#8c61ed,#6b45d8);min-height:54px;padding:13px 24px;display:flex;align-items:center;justify-content:center;gap:30px;box-shadow:0 5px 24px #7544dc38,inset 0 1px 0 #ffffff20;font-size:15px;font-weight:700;transition:transform .15s,filter .15s}.primary-button:hover:not(:disabled){transform:translateY(-2px);filter:brightness(1.12)}.primary-button:active:not(:disabled){transform:translateY(1px)}.primary-button:disabled{opacity:.65}.start-hint{display:block;margin-top:17px;font-size:12px;letter-spacing:.03em;color:#a9a0c3}.start-hint i{font-style:normal;margin:0 6px;color:#8069a7}.start-character{position:absolute;right:5%;top:22%;height:65%;width:36%;display:flex;align-items:center;justify-content:center}.start-character img{height:94%;width:100%;object-fit:contain;filter:drop-shadow(0 25px 18px #08071d9c);animation:hero-float 4s ease-in-out infinite;position:relative}.character-glow{position:absolute;width:95%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle,#9d82ff3b 0,#8665ee11 53%,transparent 70%)}.character-note{position:absolute;bottom:-8px;color:#e3d9ff;transform:rotate(-6deg);font-size:13px;letter-spacing:.04em;background:#221a42c4;border:1px solid #79649e66;padding:8px 14px;border-radius:8px;box-shadow:0 4px 15px #0002}.start-bottom{position:absolute;bottom:24px;left:30px;right:30px;display:flex;justify-content:space-between;font-family:'Barlow Condensed',sans-serif;color:#c1b9d5a8;font-size:12px;letter-spacing:2px}.progress-track{position:absolute;bottom:0;left:0;right:0;height:3px;background:#13132c;z-index:5}.progress-track>div{height:100%;width:0;background:linear-gradient(90deg,#9b75ff,#74e5e3);box-shadow:0 0 10px #75d8ff;transition:width .15s linear}.game-footer{display:flex;align-items:center;justify-content:space-between;padding:25px 2px;border-bottom:1px solid #232335;gap:16px}.keyboard-guide{display:flex;gap:26px;align-items:center}.keyboard-guide>span{display:flex;gap:6px;align-items:center;font-size:12px;color:#a6a2be}.keyboard-guide small{color:#746f8c;font-size:12px;margin-left:3px}kbd{font:500 11px 'Noto Sans JP',sans-serif;min-width:23px;line-height:24px;padding:0 6px;border:1px solid #39364c;border-bottom:2px solid #454057;background:#1c1a2b;border-radius:4px;text-align:center;color:#c8c3db}.footer-mission{font-size:12px;color:#8f88a6;display:flex;gap:8px;align-items:center}.footer-mission>span{color:#b899ff;font-size:18px}.page-bottom{font-family:'Barlow Condensed',sans-serif;font-size:12px;color:#555066;letter-spacing:2px;display:flex;justify-content:space-between;padding:28px 2px}.page-bottom>span:nth-child(2){font-family:'Noto Sans JP',sans-serif;font-size:11px;letter-spacing:.07em}.page-bottom>span:last-child{color:#9072bd}.hidden{display:none!important}.modal-scrim{position:absolute;inset:0;z-index:10;display:grid;place-items:center;background:#0e0a258a;backdrop-filter:blur(12px)}.game-modal{text-align:center;width:min(420px,90%);padding:30px}.modal-eyebrow{color:#c0a4ff;font-family:'Barlow Condensed',sans-serif;font-size:14px;letter-spacing:3px}.modal-icon{font-size:48px;color:#c7aaff;line-height:1.2;margin:14px 0 8px;text-shadow:0 0 30px #9f76ff66}.game-modal h2{margin:6px 0 12px;font-size:29px;font-weight:800;letter-spacing:.03em}.game-modal p{font-size:14px;color:#c4b9db;line-height:1.9;margin:0 0 23px}.game-modal .primary-button{width:100%}.secondary-button{border:0;background:none;color:#b4a4d0;font-size:13px;padding:16px 0 0}.secondary-button:hover{color:white}.result-stats{display:flex;justify-content:center;gap:30px;margin:0 0 22px}.result-stats>span{font-size:21px;font-weight:800;color:#f3d48b}.result-stats>span:nth-child(2){color:#91e8e9}.result-stats small{display:block;font-size:11px;color:#beb1d1;font-weight:400;margin-top:3px}.game-toast{position:absolute;z-index:7;top:95px;left:50%;transform:translate(-50%,-10px);border:1px solid #b699ff50;background:#21183ee6;backdrop-filter:blur(10px);color:#e7daff;border-radius:24px;padding:10px 20px;font-size:13px;white-space:nowrap;opacity:0;transition:opacity .2s,transform .2s;pointer-events:none}.game-toast.visible{opacity:1;transform:translate(-50%,0)}.touch-controls,.mobile-note{display:none}.load-error{padding:18px;background:#492540;border-radius:12px;color:#ffe3f0;margin-top:16px;font-size:14px}.load-error button{margin-left:12px;padding:8px 14px;border:1px solid #e0b4d4;border-radius:8px;background:#794365;color:white}.game-frame:fullscreen{border:0;border-radius:0;background:#070815;display:flex;align-items:center;justify-content:center;height:100dvh;width:100vw;aspect-ratio:auto}.game-frame:fullscreen canvas{max-height:100dvh;object-fit:contain}.game-frame:fullscreen .hud{padding:25px 35px}.game-frame:fullscreen .start-copy{padding-top:0}.game-frame.immersive{position:fixed;inset:0;border:0;border-radius:0;z-index:100;height:100dvh;width:100vw;aspect-ratio:auto}.game-frame.immersive canvas{object-fit:contain}.exit-immersive{position:fixed;right:15px;bottom:15px;z-index:101;border:1px solid #9382b8;background:#221937dd;color:white;padding:10px;border-radius:9px}.in-fullscreen .touch-controls{position:fixed;bottom:max(18px,env(safe-area-inset-bottom));left:22px;right:22px;z-index:110;background:none;border:0;padding:0;pointer-events:none}.in-fullscreen .touch-controls button{pointer-events:auto;opacity:.82}.in-fullscreen .touch-tip{display:none}.in-fullscreen .exit-immersive{bottom:auto;top:85px}@keyframes hero-float{0%,100%{transform:translateY(0) rotate(-2deg)}50%{transform:translateY(-9px) rotate(0)}}
@media(min-width:1450px){.app-shell{padding-top:15px}.topbar{height:110px}}
@media(max-width:1100px){.app-shell{padding:0 26px}.topbar{height:85px}.hud{padding:22px}.hud-counters{gap:17px}.start-copy{padding-top:38px}.start-copy h1{font-size:10vw;margin-bottom:14px}.adventure-label{font-size:11px;letter-spacing:1.5px}.start-copy p{font-size:14px;line-height:1.7;margin-bottom:20px}.start-hint{font-size:11px;margin-top:12px}.start-character{top:24%;height:62%}.start-bottom{bottom:18px;left:22px;right:22px;font-size:11px}.primary-button{min-height:48px;font-size:14px;padding:11px 19px;gap:22px}.keyboard-guide{gap:14px}.keyboard-guide small{display:none}.footer-mission{font-size:11px}}
@media(pointer:coarse){.touch-controls{display:flex;align-items:center;justify-content:space-between;padding:18px 3px 8px;gap:12px;touch-action:none;user-select:none;-webkit-user-select:none}.move-controls,.action-controls{display:flex;gap:12px;align-items:center}.touch-button{height:58px;border:1px solid #514463;border-radius:14px;color:#cfc3e8;background:linear-gradient(#292239,#201b30);box-shadow:0 3px 0 #0e0c19;font-weight:700;touch-action:none;-webkit-user-select:none;user-select:none}.touch-button.direction{width:65px;font-size:21px}.touch-button.dash{width:65px;font-family:'Barlow Condensed',sans-serif;font-size:15px;letter-spacing:1px}.touch-button.jump{display:flex;align-items:center;justify-content:center;gap:10px;width:106px;background:linear-gradient(130deg,#8e67e7,#6943c4);border-color:#ad8cf7;color:#fff;font-family:'Barlow Condensed',sans-serif;font-size:17px;letter-spacing:1px}.touch-button.jump span{font-size:26px}.touch-button.pressed{filter:brightness(1.4);transform:translateY(2px);box-shadow:none}.touch-tip{text-align:center;font-size:11px;color:#827891;line-height:1.8}.keyboard-guide{display:none}.game-footer{justify-content:center;padding:15px 0}.mobile-note{display:block;text-align:center;color:#827992;font-size:11px;padding:14px 0 0}.page-bottom{padding-top:22px}}
@media(max-width:700px){.app-shell{padding:0 16px}.topbar{height:78px}.brand-mark{font-size:29px}.brand-word{font-size:26px}.brand-sub{font-size:8px;letter-spacing:1.2px}.top-actions{gap:16px}.tool-button{font-size:12px}.tool-button svg{width:18px}.game-frame{aspect-ratio:4/3;border-radius:14px}.game-frame canvas{object-fit:cover}.hud{padding:16px 14px;align-items:flex-start;gap:7px}.eyebrow{font-size:11px;letter-spacing:1.3px}.stage-info{gap:4px}.stage-info strong{font-size:12px}.hud-counters{gap:11px}.collectible{gap:5px;font-size:15px}.coin-symbol{width:19px;height:19px;font-size:11px}.gem-symbol{font-size:19px}.counter-total{font-size:11px}.hearts{font-size:15px;gap:2px}.pause-button{width:27px;height:27px;border-radius:7px}.pause-button svg{width:15px;height:15px}.start-copy{padding:38px 0 0 6%;width:66%}.adventure-label{font-size:9px;letter-spacing:1px;white-space:nowrap}.adventure-label span{width:12px}.start-copy h1{font-size:16vw;margin:9px 0 14px;letter-spacing:1px}.start-copy h1>span{font-size:.26em;letter-spacing:.14em;margin-top:5px}.start-copy p{font-size:12px;line-height:1.7;margin-bottom:16px}.primary-button{min-height:42px;font-size:12px;padding:9px 15px;gap:15px;border-radius:8px}.primary-button svg{width:16px}.start-hint{font-size:9px;white-space:nowrap;margin-top:10px;letter-spacing:0}.start-character{right:0;top:29%;height:52%;width:40%}.character-note{font-size:8px;padding:5px 6px;bottom:0;transform:rotate(-7deg);white-space:nowrap;right:0}.start-bottom{bottom:15px;left:16px;right:16px;font-size:9px;letter-spacing:1.1px}.start-bottom-right{display:none}.page-bottom{font-size:10px;letter-spacing:1px}.page-bottom>span:nth-child(2){font-size:10px}.game-modal{padding:20px}.modal-icon{font-size:33px;margin:8px 0 0}.game-modal h2{font-size:23px;margin:4px 0 10px}.modal-eyebrow{font-size:11px;letter-spacing:2px}.game-modal p{font-size:12px;margin-bottom:16px}.game-modal .primary-button{max-width:260px;margin:auto}.secondary-button{font-size:11px;padding-top:12px}.result-stats{margin-bottom:14px;gap:20px}.result-stats>span{font-size:18px}.game-toast{top:65px;font-size:11px;padding:8px 13px}.touch-controls{padding-top:18px;gap:8px}.move-controls,.action-controls{gap:8px}.touch-button.direction{width:54px;height:56px}.touch-button.dash{width:53px;height:50px;font-size:12px}.touch-button.jump{width:85px;height:60px;font-size:15px;gap:6px}.touch-tip{font-size:9px}.footer-mission{font-size:11px}.game-frame.immersive canvas{object-fit:contain}}
@media(max-width:370px){.app-shell{padding:0 10px}.hud-counters{gap:7px}.hearts{font-size:13px}.stage-info strong{font-size:10px}.start-copy p{font-size:11px}.touch-tip{display:none}.start-hint{font-size:8px}}
@media(max-height:550px) and (orientation:landscape){.app-shell{padding:0 16px}.topbar{height:52px}.brand-word{font-size:22px}.brand-mark{font-size:25px}.brand-sub{font-size:7px;margin-top:4px}.game-frame{aspect-ratio:16/9;max-height:calc(100dvh - 130px);width:auto;margin:auto}.game-frame canvas{object-fit:contain}.hud{padding:12px 16px}.stage-info strong{font-size:12px}.eyebrow{font-size:10px}.collectible{font-size:16px}.hearts{font-size:16px}.pause-button{width:28px;height:28px}.start-copy{padding-top:18px}.start-copy h1{font-size:60px;margin:6px 0 9px}.start-copy p{font-size:11px;line-height:1.6;margin-bottom:11px}.adventure-label{font-size:9px}.start-hint{font-size:9px;margin-top:8px}.start-character{top:22%;height:64%}.character-note{font-size:9px}.start-bottom{bottom:11px;font-size:9px}.primary-button{min-height:35px;padding:7px 15px;font-size:12px}.touch-controls{padding:10px 5px 0}.touch-button.direction{height:43px;width:63px}.touch-button.dash{height:40px;width:60px}.touch-button.jump{height:46px;width:90px}.game-footer,.page-bottom,.mobile-note{display:none}.game-modal{padding:12px}.modal-icon{font-size:26px;margin:5px 0 0}.game-modal h2{font-size:21px;margin:4px 0 6px}.game-modal p{font-size:12px;margin-bottom:10px}.result-stats{margin-bottom:10px}.game-frame.immersive{max-height:none;width:100vw}.game-frame:fullscreen{max-height:none;width:100vw}.game-frame.immersive .start-copy,.game-frame:fullscreen .start-copy{padding-top:0}.game-frame.immersive .start-copy h1,.game-frame:fullscreen .start-copy h1{font-size:90px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
/* Keep regular instructions readable on narrow touch screens. */
@media(max-width:370px){.start-hint{display:none}}
.start-copy p{font-size:16px}.tool-button,.stage-info strong,.primary-button,.keyboard-guide>span,.footer-mission{font-size:14px}.start-hint,.keyboard-guide small,.mobile-note{font-size:12px}
@media(max-width:700px){.start-copy p{font-size:14px}.start-hint{font-size:11px;white-space:normal;max-width:210px;line-height:1.7}.primary-button{font-size:14px}.tool-button{font-size:12px}.stage-info strong{font-size:12px}.footer-mission{font-size:12px}.game-modal p{font-size:14px}.secondary-button{font-size:13px}.game-toast{font-size:12px}.touch-tip{font-size:11px}.character-note{font-size:10px}.adventure-label{display:none}}
@media(max-width:500px) and (orientation:portrait){.game-frame{aspect-ratio:1/1}.start-copy{padding-top:28px;width:65%}.start-copy h1{font-size:19vw}.start-character{height:56%;top:27%;right:-2%;width:42%}.start-bottom{font-size:10px}.character-note{bottom:-12px;right:4px}.touch-tip{display:none}.stage-info{max-width:130px}.hud-counters{gap:8px}.hearts{font-size:14px}.game-modal{padding:22px}.game-toast{max-width:92%;white-space:normal;text-align:center}}
@media(max-height:550px) and (orientation:landscape){.start-copy p{font-size:12px}.start-hint{font-size:11px;white-space:nowrap;max-width:none}.tool-button{font-size:12px}.stage-info strong{font-size:12px}.primary-button{font-size:13px}.start-copy{padding-top:10px}.start-character{height:61%}.character-note{font-size:10px}}
