:root{color-scheme:dark;--cy:#a5ecef;--pk:#e9afca;--ye:#f4d99e;--bg:#080d1c;--panel:#0c1428;--ink:#f4f4ef;--muted:#9eaec7;--line:rgba(182,209,225,.16);--field:min(100vw,520px);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}
html,body{margin:0;width:100%;height:100%;overflow:hidden;background:var(--bg);color:var(--ink);font-family:"Avenir Next","Hiragino Kaku Gothic ProN","Hiragino Sans","Yu Gothic",system-ui,sans-serif;overscroll-behavior:none}
body{position:fixed;inset:0;isolation:isolate;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;background:radial-gradient(ellipse at 16% 48%,#182b36 0,transparent 42%),radial-gradient(ellipse at 90% 70%,#192138 0,transparent 42%),#080d1c}
body:before{content:"";position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle at 15px 22px,#b5d9e8 0 1px,transparent 1.6px),radial-gradient(circle at 81px 98px,#dfc692 0 .7px,transparent 1.3px);background-size:173px 187px,239px 223px;opacity:.14;z-index:-1}
button{font:inherit;touch-action:manipulation;cursor:pointer}
button:focus-visible,a:focus-visible{outline:2px solid var(--ye);outline-offset:5px}
canvas{position:fixed;left:50%;top:0;transform:translateX(-50%);width:var(--field);height:100%;display:block;touch-action:none;z-index:0}
.game-frame{position:fixed;inset:0 auto 0 50%;transform:translateX(-50%);width:var(--field);box-shadow:0 0 0 1px #bad2db1a,0 0 100px #0008;z-index:-1;pointer-events:none}
.hud-shade{position:fixed;left:50%;top:0;transform:translateX(-50%);width:var(--field);height:calc(var(--safe-top) + 174px);background:linear-gradient(#080d1ced,#080d1cb3 65%,#080d1c00);pointer-events:none;z-index:1;transition:opacity .3s}
#hud{position:fixed;left:50%;top:calc(var(--safe-top) + 18px);transform:translateX(-50%);width:var(--field);padding:0 24px;display:flex;align-items:center;gap:24px;pointer-events:none;z-index:2;transition:opacity .3s}
.stat small{display:block;color:var(--muted);font-size:9px;font-weight:650;line-height:1.6;letter-spacing:.18em}
.stat b{display:block;line-height:1.15;font-size:17px;font-weight:650;font-variant-numeric:tabular-nums;letter-spacing:.01em}
#score{font-size:38px;line-height:1.05;font-weight:650;letter-spacing:-.04em;transform-origin:left center;color:var(--ink)}
.hud-records{display:flex;align-items:center;gap:15px;padding-top:10px}
.star-stat small span{font-size:10px;color:var(--ye);letter-spacing:0}
#stars{color:var(--ye)}
.stat-divider{width:1px;height:22px;background:var(--line)}
#best{color:#c4cfe1}
#btns{position:fixed;top:calc(var(--safe-top) + 17px);left:calc(50% + min(50vw,260px) - 115px);display:flex;gap:7px;z-index:6}
#btns button{display:grid;place-items:center;width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:50%;color:#d0e0e8;background:#0b1424b3;font-size:18px;transition:background .16s,border-color .16s,transform .16s;box-shadow:inset 0 1px 0 #ffffff04}
#btns button:hover{background:#203044;border-color:#a5ecef80}
#btns button:active{transform:scale(.94)}
#btns button[aria-pressed="false"]{color:#8d9ab2}
#btns svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#zone{position:fixed;left:calc(50% - min(50vw,260px) + 24px);top:calc(var(--safe-top) + 85px);max-width:calc(var(--field) - 48px);font-size:10px;letter-spacing:.1em;line-height:1.4;color:#bdcbdc;pointer-events:none;z-index:2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition:opacity .3s}
#journey-bar{position:fixed;left:50%;top:calc(var(--safe-top) + 108px);transform:translateX(-50%);width:var(--field);padding:0 24px;z-index:2;pointer-events:none;transition:opacity .3s}
.journey-line{display:flex;align-items:center;justify-content:space-between;margin-bottom:7px;color:#ccd8e2;font-size:10px;font-weight:500;letter-spacing:.07em}
.moon-mark{font-size:18px;color:var(--ye);line-height:10px;margin-right:-2px}
.progress-track{height:2px;width:100%;overflow:hidden;background:#cbdbe01f;border-radius:2px}
#progress{height:100%;max-width:100%;background:linear-gradient(90deg,#a5ecef,var(--ye));border-radius:2px;transition:width .45s ease-out;box-shadow:0 0 9px #a5ecef44}
#status-items{position:fixed;left:calc(50% - min(50vw,260px) + 24px);top:calc(var(--safe-top) + 151px);display:flex;gap:6px;z-index:2;pointer-events:none}
#status-items:empty{display:none}
#status-items span,.status-badge{padding:5px 9px;border:1px solid #a5ecef3b;border-radius:100px;background:#0a1424d9;color:var(--cy);font-size:10px;line-height:1.2}
#combo{position:fixed;right:calc(50% - min(50vw,260px) + 24px);top:calc(var(--safe-top) + 151px);max-width:220px;color:var(--ye);font-size:11px;font-weight:750;letter-spacing:.08em;z-index:2;pointer-events:none;opacity:0;transform:translateY(-5px);transition:opacity .2s,transform .2s;text-shadow:0 2px 10px #080d1c}
#combo.on{opacity:1;transform:translateY(0)}
#hint{position:fixed;left:50%;bottom:calc(var(--safe-bottom) + 27px);transform:translate(-50%,8px);width:max-content;max-width:min(calc(100vw - 36px),420px);padding:11px 17px;border:1px solid #d2e1e426;border-radius:12px;background:#0a1229eb;box-shadow:0 8px 36px #0003;color:#edf0ed;font-size:12px;font-weight:500;line-height:1.7;text-align:center;opacity:0;transition:opacity .25s,transform .25s;pointer-events:none;z-index:4}
#hint.on{opacity:1;transform:translate(-50%,0)}
#overlay{position:fixed;inset:0 auto 0 50%;transform:translateX(-50%);width:var(--field);display:grid;place-items:center;padding:calc(var(--safe-top) + 26px) 22px calc(var(--safe-bottom) + 24px);background:#080d1c9c;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:5;overflow-y:auto;overscroll-behavior:contain}
#overlay.low{place-items:end center;background:linear-gradient(180deg,#080d1c00 15%,#080d1c30 38%,#080d1cf0 72%,#080d1c 100%);backdrop-filter:none;-webkit-backdrop-filter:none}
.panel{position:relative;width:100%;max-width:422px;padding:27px 25px 24px;border:1px solid var(--line);border-radius:24px;background:linear-gradient(150deg,#162235ef,#0a1225f5 74%);text-align:center;box-shadow:0 20px 70px #0003,inset 0 1px 0 #ffffff06;overflow-wrap:anywhere;flex-shrink:0}
body.title:not(.help) #overlay.low{padding:0 30px calc(var(--safe-bottom) + 23px)}
body.title:not(.help) .panel{max-width:420px;padding:0;border:0;border-radius:0;background:none;box-shadow:none}
.eyebrow{margin:0 0 12px;color:var(--ye);font-size:9px;font-weight:650;letter-spacing:.25em;line-height:1.5;text-transform:uppercase}
.title-mark{display:inline-block;color:var(--ye);font-size:15px;line-height:1;margin-bottom:13px}
h1{margin:8px 0 12px;color:var(--ink);font-size:29px;font-weight:650;line-height:1.35;letter-spacing:.025em}
body.title:not(.help) h1{margin:6px 0 12px;font-family:"Avenir Next",Futura,"Century Gothic",sans-serif;font-size:clamp(56px,16vw,82px);font-weight:700;line-height:.83;letter-spacing:.035em;color:#f5f3e7}
body.title:not(.help) h1 span{display:inline-block;margin-top:5px;color:var(--cy);letter-spacing:.04em}
body.title:not(.help) h1 br{display:block}
.sub{margin:5px 0 15px;color:#b6c4d4;font-size:11px;font-weight:500;letter-spacing:.16em}
.panel p{margin:9px 0;color:#b9c8db;font-size:13px;line-height:1.85;font-weight:450}
.panel .title-copy{margin:13px 0 20px;color:#c8d4dd;font-size:13px;line-height:1.8;letter-spacing:.025em}
.hl{color:var(--ye);font-weight:600}
.title-meta{display:flex;align-items:center;justify-content:center;gap:9px;margin:12px 0;color:#a6bacb;font-size:10px;letter-spacing:.07em}
.title-meta>span+span:before{content:"·";margin-right:9px;color:#60738c}
.mission-pill{display:inline-flex;align-items:center;gap:7px;margin:8px 0 13px;border:1px solid #f4d99e33;border-radius:100px;padding:6px 12px;color:var(--ye);font-size:10px;line-height:1.5;letter-spacing:.07em;background:#f4d99e08}
.cta{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:56px;margin:14px 0 0;padding:13px 20px;border:1px solid #e6f8f5;border-radius:15px;background:linear-gradient(120deg,#dcf8f0,#a6e2e5);box-shadow:inset 0 1px 0 #ffffffb3,0 5px 20px #74bbd015;color:#102435;font-size:15px;font-weight:750;line-height:1.5;letter-spacing:.06em;transition:transform .15s,filter .15s,box-shadow .15s}
.cta:after{content:"";width:18px;height:18px;flex:0 0 18px;background:currentColor;opacity:.8;--arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 19 19 5M5 5h14v14' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");-webkit-mask:var(--arrow) center/contain no-repeat;mask:var(--arrow) center/contain no-repeat}
.cta:hover{filter:brightness(1.07);box-shadow:inset 0 1px 0 #ffffffb3,0 5px 28px #74bbd02e}
.cta:active{transform:translateY(2px);filter:brightness(.97)}
.cta2{min-height:48px;border-color:#b1cad02e;background:#b1cad009;box-shadow:none;color:#c7d6e2;font-size:13px;font-weight:600}
.cta2:after{display:none}
.text-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;margin:7px 0 0;padding:8px 14px;border:0;border-radius:8px;background:none;color:#adbdce;font-size:11px;letter-spacing:.06em;text-underline-offset:4px;transition:color .16s,background .16s}
.text-button:hover{background:#c5e5ef09;color:#eff8f6}
.keys{margin:5px 0 0;color:#8093ab;font-size:9px;font-weight:450;line-height:1.5;letter-spacing:.05em}
.keys kbd{font-family:inherit;padding:2px 5px;border:1px solid #7e94ab33;border-radius:4px;margin:0 3px;color:#becada}
.record-strip{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px 17px;margin:14px 0 7px;color:#8fa4ba;font-size:10px;letter-spacing:.06em}
.record-strip b{font-size:12px;font-weight:650;color:var(--ye);font-variant-numeric:tabular-nums;margin-left:5px}
.big{margin:7px 0 4px;color:#f6f1e2;font-size:68px;font-weight:600;line-height:1.1;letter-spacing:-.05em;font-variant-numeric:tabular-nums}
.rank{margin:7px 0 14px;color:var(--ye);font-size:11px;font-weight:600;letter-spacing:.08em}
.new{display:inline-block;padding:4px 9px;margin:2px 0 7px;border:1px solid #f4d99e55;border-radius:5px;background:#f4d99e0d;color:var(--ye);font-size:8px;font-weight:750;letter-spacing:.16em;line-height:1.4}
.results-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;margin:20px 0 22px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:14px 0}
.result-cell{padding:2px 6px}
.result-cell+.result-cell{border-left:1px solid var(--line)}
.result-label{display:block;margin:0 0 7px;color:#8da3ba;font-size:9px;font-weight:500;letter-spacing:.06em;line-height:1.3}
.result-value{display:block;color:#e4ecee;font-size:18px;font-weight:600;line-height:1.3;font-variant-numeric:tabular-nums;letter-spacing:-.015em}
.rows{display:flex;justify-content:center;flex-wrap:wrap;gap:8px 16px;margin:16px 0;color:#9cafc3;font-size:11px;line-height:1.6}
.rows b{margin-left:4px;color:var(--ye);font-weight:650}
.why{padding:11px 12px;margin:13px 0 7px;border-radius:9px;background:#e9afca0a;color:#d9b9c4;font-size:12px;line-height:1.7}
.howto{counter-reset:howto;display:grid;gap:10px;margin:20px 0;text-align:left}
.howto-step{position:relative;min-height:53px;padding:12px 13px 12px 43px;border:1px solid var(--line);border-radius:11px;background:#d0e8f005;color:#dce5e9;font-size:12px;line-height:1.7;counter-increment:howto}
.howto-step:before{content:counter(howto,decimal-leading-zero);position:absolute;left:13px;top:14px;color:var(--ye);font-size:10px;font-weight:700;letter-spacing:.05em}
.howto-step strong{display:block;color:#edf4f1;font-weight:650}
.howto-step small{color:#9eb2c7;font-size:11px}
.help-card{margin:14px 0;padding:13px 14px;text-align:left;border:1px solid #f4d99e2e;border-radius:12px;background:#f4d99e05;color:#c8d5de;font-size:12px;line-height:1.8}
.help-card b,.help-card strong{color:var(--ye);font-weight:600}
.settings-row{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:49px;padding:10px 0;border-bottom:1px solid var(--line);text-align:left;color:#d1deea;font-size:12px;line-height:1.6}
.settings-row:last-child{border-bottom:0}
.setting-toggle{min-width:68px;min-height:44px;padding:7px 12px;border:1px solid #a5ecef40;border-radius:100px;color:var(--cy);background:#a5ecef0a;font-size:11px;font-weight:650;flex-shrink:0}
.setting-toggle[aria-pressed="false"]{border-color:var(--line);color:#8296ae;background:#8296ae08}
.panel-actions{display:grid;gap:8px;margin-top:18px}
.panel-actions .cta{margin:0}
.t26{font-size:25px}.t30{font-size:29px}.t34{font-size:31px}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
body.title #hud,body.title #zone,body.title #journey-bar,body.title #status-items,body.title #combo,body.title .hud-shade{opacity:0;visibility:hidden}
body.title #pause{display:none}
body.title #btns{left:calc(50% + min(50vw,260px) - 64px)}
.desktop-notes,.desktop-map{display:none;position:fixed;z-index:-1;pointer-events:none}
@media(min-width:1120px){
 .desktop-notes{display:flex;flex-direction:column;align-items:flex-start;left:max(38px,calc(50% - 560px));top:22%;width:240px;color:#d4dfdf}
 .side-brand{font-size:9px;font-weight:650;letter-spacing:.26em;color:#a4b7c0}
 .side-title{position:relative;margin-top:29px;font-family:"Avenir Next",Futura,sans-serif;font-size:53px;font-weight:650;line-height:.94;letter-spacing:.03em;color:#e6e9e0}
 .side-star{position:absolute;left:157px;top:36px;color:var(--ye);font-size:28px;font-weight:400}
 .side-copy{margin-top:31px;font-size:10px;line-height:1.9;letter-spacing:.18em;color:#91a9b8}
 .side-rule{margin-top:48px;width:36px;height:1px;background:#a5ecef44}
 .side-foot{margin-top:18px;font-size:10px;letter-spacing:.09em;color:#7592a3}
 .desktop-map{display:block;right:max(28px,calc(50% - 560px));top:23%;width:230px;text-align:center;color:#a9c4ce52}
 .desktop-map svg{display:block;width:210px;margin:10px auto;stroke:currentColor;stroke-width:1}
 .map-label,.map-foot{display:block;font-size:8px;font-weight:600;letter-spacing:.2em;color:#7e99a5}
 .map-foot{font-size:7px;color:#688493}
}
@media(max-width:419px){
 #hud{padding-left:18px;gap:14px}.stat small{font-size:8px}.stat b{font-size:15px}#score{font-size:34px}
 .hud-records{position:absolute;left:18px;top:51px;gap:14px;padding:0}.hud-records .stat{display:flex;align-items:center;gap:6px}.hud-records .stat small{line-height:1}.hud-records .stat b{line-height:1}.stat-divider{height:12px}
 #btns{left:calc(50% + min(50vw,260px) - 111px)}#zone{left:calc(50% - min(50vw,260px) + 18px);top:calc(var(--safe-top) + 94px);font-size:9px}#journey-bar{padding:0 18px;top:calc(var(--safe-top) + 117px)}
 #overlay{padding-left:16px;padding-right:16px}body.title:not(.help) #overlay.low{padding-left:25px;padding-right:25px}.panel{padding:24px 19px 20px}
 .panel .title-copy{font-size:12px}body.title:not(.help) h1{font-size:56px}.results-grid{margin:15px 0}.result-label{font-size:8px}.result-value{font-size:16px}
}
@media(max-height:730px){
 body.title:not(.help) h1{font-size:57px}body.title:not(.help) .eyebrow{margin-bottom:7px}.title-mark{margin-bottom:7px}body.title:not(.help) .sub{margin-bottom:8px}
 .panel .title-copy{margin:9px 0 13px;font-size:12px}.title-meta{margin:8px 0}.record-strip{margin:8px 0 4px}.cta{min-height:51px;margin-top:10px}.text-button{min-height:44px;margin-top:3px}.keys{margin-top:2px;font-size:8px}body.title:not(.help) #overlay.low{padding-bottom:calc(var(--safe-bottom) + 16px)}
}
@media(max-height:580px){
 #overlay{align-items:start;padding-top:calc(var(--safe-top) + 18px);padding-bottom:calc(var(--safe-bottom) + 18px)}
 #overlay.low{place-items:start center}body.title:not(.help) #overlay.low{padding-top:calc(var(--safe-top) + 16px);background:linear-gradient(180deg,#080d1c80,#080d1cf5 38%)}
 .panel{margin:auto 0}body.title:not(.help) .panel{padding-top:10px}body.title:not(.help) h1{font-size:46px;line-height:.85}body.title:not(.help) h1 br{display:none}body.title:not(.help) h1 span{margin-left:.1em;margin-top:0}
 .title-mark{display:none}.title-meta{margin:6px 0}.panel .title-copy{font-size:12px;line-height:1.7}.mission-pill{margin:5px 0 8px}.big{font-size:52px}.results-grid{margin:13px 0;padding:10px 0}.rank{margin-bottom:8px}.keys{display:none}
 .desktop-notes,.desktop-map{display:none}
}
@media(prefers-reduced-motion:no-preference){
 .bump{animation:score-pop .23s ease-out}@keyframes score-pop{40%{transform:scale(1.1)}}
 .panel{animation:panel-enter .3s ease-out}@keyframes panel-enter{from{opacity:0;translate:0 9px}to{opacity:1;translate:0 0}}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-height:580px){
 body.title:not(.help) #overlay.low{place-items:end center;background:linear-gradient(180deg,#080d1c00 18%,#080d1c00 30%,#080d1cd9 65%,#080d1c 100%)}
 body.title:not(.help) .panel{margin:0;padding-top:0}
 body.title:not(.help) h1{font-size:40px;white-space:nowrap;letter-spacing:0}
 body.title:not(.help) h1 span{letter-spacing:.015em}
}
canvas:focus-visible{outline:1px solid #a5ecef44;outline-offset:-3px}

body.ended #pause{display:none}body.ended #btns{left:calc(50% + min(50vw,260px) - 64px)}
.result-mascot{position:static;display:block;width:68px;height:64px;margin:0 auto 1px;transform:none;}
.cta:disabled{opacity:.6;cursor:wait}

.music-setting{align-items:center;flex-wrap:wrap;gap:5px 12px}
.music-setting label{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%}
.music-setting output{color:var(--cy);font-size:11px;font-variant-numeric:tabular-nums}
.music-setting input{accent-color:var(--cy);width:100%;min-height:44px;margin:0;cursor:pointer}

.language-switch{display:flex;justify-content:center;gap:5px;margin:11px auto 8px;max-width:240px;padding:3px;border:1px solid var(--line);border-radius:100px;background:#080d1c66}
.language-switch button{flex:1;min-height:44px;padding:8px 12px;border:1px solid transparent;border-radius:100px;background:none;color:#9eb2c6;font-size:12px;font-weight:600;line-height:1.3}
.language-switch button[aria-pressed="true"]{border-color:#a5ecef4d;background:#a5ecef12;color:var(--cy)}
.language-switch button:hover{color:var(--ink);background:#a5ecef12}
.settings-row .language-switch{margin:0;flex:0 1 210px;min-width:165px}
.language-setting>span{flex:0 0 auto;white-space:nowrap}
html[lang="en"] .journey-line{letter-spacing:.015em}
html[lang="en"] .panel .title-copy{letter-spacing:0;line-height:1.7}
html[lang="en"] .howto-step{line-height:1.6}
html[lang="en"] .cta{letter-spacing:.015em}
@media(max-height:730px){body.title:not(.help) .language-switch{margin-top:6px;margin-bottom:5px}}
@media(max-height:580px){body.title:not(.help) .language-switch{position:absolute;right:0;top:-52px;width:165px;margin:0}.settings-row .language-switch{min-width:150px}}
