@charset "UTF-8";
:root{--paper:#ede9d5;--white:#fffdf0;--ink:#293c40;--muted:#71847c;--coral:#d76850;--line:#d1d3b9;--soft:#f4f0da;font-family:"Hiragino Kaku Gothic ProN","Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}
*{box-sizing:border-box}
body{margin:0}
button,input,select{font:inherit}
button,a,input,select{-webkit-tap-highlight-color:transparent}
button{color:inherit;cursor:pointer;transition:transform .15s,background .15s}
button:active:not(:disabled){transform:translateY(2px)}
button:disabled{opacity:.4;cursor:default}
button,select{touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--coral);outline-offset:4px}
[hidden]{display:none!important}
.shell{max-width:1080px;padding:0 28px;margin:auto}
.header{height:68px;display:flex;align-items:center;gap:22px}
.brand{display:flex;align-items:center;position:relative;color:var(--ink);text-decoration:none;font-size:32px;font-weight:1000;letter-spacing:-.13em;line-height:1;padding-right:7px;transform:rotate(-3deg)}
.brand span:nth-child(2){transform:translateY(-2px)}
.brand span:nth-child(3){transform:translateY(-5px) rotate(-5deg)}
.brand span:nth-child(4){color:var(--coral);transform:translateY(-8px) rotate(6deg)}
.brand-dot{display:none}
.header-note{color:var(--muted);font-size:10px;letter-spacing:.03em}
.help-button{margin-left:auto;min-width:40px;min-height:38px;padding:8px 12px;border:1px solid var(--line);border-radius:7px;background:white;font-size:15px;font-weight:700}
.help-button span{font-size:10px;margin-left:5px}
.help-button:hover{background:var(--soft)}
.play-layout{display:flex;flex-direction:column;gap:12px}
.game-card{width:100%;min-width:0;background:white;border:2px solid var(--ink);border-radius:9px;overflow:hidden}
.stage-top{height:43px;display:flex;align-items:center;justify-content:space-between;background:var(--ink);color:white;padding:0 18px}
.stage-title,.stage-actions{display:flex;align-items:center;gap:12px}
.stage-tag{font:700 10px Arial,sans-serif;letter-spacing:.08em;color:#f5cf75}
.stage-title strong{font-size:10px;letter-spacing:.05em}
.mode-badge{font:8px Arial,sans-serif;letter-spacing:.08em;color:#c0cbdc}
.icon-button{width:32px;height:35px;border:0;border-radius:5px;background:transparent;color:white;font-size:20px}
.icon-button:hover{background:#ffffff18}
.pitch-bar{display:flex;align-items:center;gap:25px;height:69px;padding:0 22px;background:#fff}
.small-label{display:block;font-size:9px;color:var(--muted);margin-bottom:2px}
.pitch-reading,.target-reading{min-width:125px}
.pitch-reading strong,.target-reading strong{font-size:25px;font-weight:900}
.pitch-reading #frequency{font:9px Arial,sans-serif;color:var(--muted);margin-left:9px}
.pitch-divider{height:30px;width:1px;background:var(--line)}
.target-reading{min-width:170px}
.target-reading strong{color:var(--coral)}
.target-reading strong span{font:10px Arial,sans-serif;color:var(--muted)}
.listen-button{min-height:32px;margin-left:14px;border:1px solid var(--line);border-radius:6px;background:white;font-size:15px;padding:4px 9px}
.listen-button span{font-size:10px}
.voice-meter{position:relative;width:5px;height:30px;background:var(--soft);margin-left:auto;border-radius:3px;overflow:hidden}
.voice-meter i{position:absolute;bottom:0;display:block;width:100%;background:var(--coral);transition:height .1s}
.canvas-wrap{position:relative;height:390px;background:#f5faff;border-top:1px solid var(--line);isolation:isolate}
canvas{display:block;width:100%;height:100%;image-rendering:pixelated;image-rendering:crisp-edges}
.court-label{position:absolute;top:10px;left:16px;font-size:8px;letter-spacing:.05em;color:#849ab2}
.overlay{position:absolute;inset:0;z-index:2;display:grid;place-items:center}
.overlay-panel{width:310px;max-width:calc(100% - 28px);padding:22px;text-align:center;background:#fffef9;border:2px solid var(--ink);border-radius:10px}
#welcomePanel{width:345px;padding:12px 20px 7px;background:transparent;border:0;border-radius:0}
.title-logo{display:flex;align-items:center;justify-content:center;gap:0;margin:10px 0 7px;font-size:78px;font-weight:1000;line-height:1.18;letter-spacing:-.13em;padding-right:15px;color:var(--ink);transform:rotate(-4deg)}
.title-logo span{display:inline-block;animation:logo-pop .6s cubic-bezier(.2,.7,.3,1.35) both}
.title-logo span:nth-child(2){animation-delay:.07s;position:relative;top:-4px}
.title-logo span:nth-child(3){animation-delay:.14s;position:relative;top:-10px;transform:rotate(-5deg)}
.title-logo span:nth-child(4){animation-delay:.21s;position:relative;top:-18px;color:var(--coral);transform:rotate(7deg)}
@keyframes logo-pop{from{opacity:0;translate:0 13px}to{opacity:1;translate:0 0}}
.panel-kicker,.section-number{font:700 8px Arial,sans-serif;letter-spacing:.13em;color:var(--muted)}
.overlay h2{font-size:25px;margin:10px 0;line-height:1.5}
.overlay p{font-size:11px;line-height:1.8;color:var(--muted);margin:0 0 17px}
#welcomePanel .welcome-call{font-size:16px;font-weight:800;color:var(--ink);letter-spacing:.08em;margin:0 0 9px}
#welcomePanel .welcome-guide{font-size:10px;margin:0 0 17px}
.primary-button{display:flex;align-items:center;justify-content:center;gap:9px;width:100%;min-height:48px;padding:13px 17px;background:var(--coral);border:0;border-bottom:3px solid #cf5448;border-radius:8px;color:#fff;font-size:13px;font-weight:800}
.primary-button:hover{background:#e56050}
.primary-button>span{margin-left:auto;font-size:19px;line-height:1}
.primary-button svg{height:18px;width:18px;fill:none;stroke:currentColor;stroke-width:1.8}
.demo-button{width:100%;border:0;background:transparent;padding:12px 0 5px;font-size:10px;text-decoration:underline;text-underline-offset:4px}
.demo-button span{margin-left:7px}
.privacy-note{display:block;font-size:8px;color:var(--muted);margin-top:11px}
.game-bottom{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 20px 12px;border-top:1px solid var(--line)}
.hint-block{display:flex;align-items:center;gap:11px}
.hint-icon{width:24px;text-align:center;color:var(--coral);font-size:24px;flex-shrink:0}
.hint-block strong{display:block;font-size:12px;margin-bottom:4px}
.hint-block div>span{display:block;font-size:9px;line-height:1.6;color:var(--muted)}
.hold-indicator{position:relative;width:37px;height:37px;flex-shrink:0}
.hold-indicator svg{height:100%;width:100%;transform:rotate(-90deg)}
.hold-indicator circle{fill:none;stroke:var(--line);stroke-width:3}
.hold-indicator #holdArc{stroke:var(--coral);stroke-dasharray:113.1;stroke-dashoffset:113.1;stroke-linecap:round}
.hold-indicator>span{position:absolute;inset:0;display:grid;place-items:center;font:9px Arial,sans-serif;color:var(--muted)}
.progress-row{display:flex;align-items:center;justify-content:space-between;margin:0 20px;padding:11px 0 14px;border-top:1px solid var(--line)}
.progress-dots{display:flex;gap:8px}
.progress-dot{width:7px;height:7px;border-radius:50%;background:#dce5ef}
.progress-dot.done{background:var(--coral)}
.progress-dot.current{background:var(--ink)}
.progress-row>span{font:9px Arial,sans-serif;letter-spacing:.06em;color:var(--muted)}
.progress-row strong{color:var(--ink)}
.toast{position:absolute;z-index:4;bottom:15px;left:50%;transform:translateX(-50%);width:max-content;max-width:90%;padding:11px 15px;background:var(--ink);color:white;font-size:10px;text-align:center;line-height:1.7;border-radius:7px}
.side-panel{order:-1;width:100%}
.setup-details{border:1px solid var(--line);border-radius:7px;background:white}
.setup-details>summary{list-style:none;cursor:pointer;padding:12px 16px;font-size:10px;font-weight:700}
.setup-details>summary::-webkit-details-marker{display:none}
.setup-details>summary span{float:right;font-size:15px;line-height:1}
.setup-details[open]>summary{border-bottom:1px solid var(--line)}
.setup-details[open]>summary span{transform:rotate(45deg)}
.settings{padding:19px 20px 21px;max-width:550px;margin:auto}
.settings h2{font-size:17px;margin:10px 0 21px}
.field-label{display:flex;justify-content:space-between;font-size:10px;font-weight:700;margin:17px 0 8px}
.field-label>span{font-weight:400;color:var(--muted);font-size:9px}
select{height:42px;width:100%;padding:0 10px;border:1px solid #bdcddd;border-radius:6px;background:white;color:var(--ink);font-size:12px}
select:disabled{opacity:.5}
.field-help{font-size:9px;line-height:1.7;color:var(--muted);margin:8px 0}
input[type=range]{width:100%;height:24px;margin:0;accent-color:var(--coral);cursor:pointer;touch-action:pan-y}
.sound-row{display:flex;align-items:center;justify-content:space-between;font-size:11px;padding-top:17px;margin-top:17px;border-top:1px solid var(--line)}
.toggle{width:36px;height:22px;border:0;border-radius:14px;background:#c7d3df;padding:3px}
.toggle>span{display:block;width:16px;height:16px;border-radius:50%;background:white;transition:transform .2s}
.toggle[aria-checked=true]{background:var(--coral)}
.toggle[aria-checked=true]>span{transform:translateX(14px)}
.headphone-note{font-size:9px;color:var(--muted);margin:12px 0 0}
.mini-guide{display:none}
.clear-star{font-size:28px;color:#efb950;line-height:1;margin-bottom:7px}
.clear-panel h2{font-size:36px;margin:8px 0}
.clear-panel p{font-size:10px;margin-bottom:9px}
.clear-result{display:flex;align-items:center;justify-content:center;gap:13px;margin:8px 0 15px}
.clear-result strong{font:800 29px Arial,sans-serif;color:var(--coral)}
.clear-result strong span{font:13px Arial,sans-serif;color:var(--muted)}
.clear-result>span{font:8px Arial,sans-serif;letter-spacing:.08em;color:var(--muted)}
.game-card .sim-controls{padding:10px 20px 8px;border-top:1px solid var(--line);background:#f6f9fc}
.sim-heading{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
.sim-heading .section-number{display:none}
.sim-heading h2{font-size:10px;margin:0 0 8px}
.secondary-button{padding:4px 8px;min-height:27px;background:white;border:1px solid #cedae6;border-radius:5px;font-size:8px}
.piano{display:grid;grid-template-columns:repeat(8,1fr);gap:5px}
.piano-key{height:43px;min-width:0;padding:0;white-space:nowrap;border:1px solid #bcccdc;border-bottom:3px solid #aabfd2;border-radius:5px;background:white;font-size:12px;touch-action:none;user-select:none;-webkit-user-select:none}
.piano-key small{display:block;font:7px Arial,sans-serif;color:var(--muted);margin-top:3px}
.piano-key.active{background:#ffe2da;border-color:var(--coral);transform:translateY(2px)}
.slider-row{display:flex;align-items:center;gap:12px;margin-top:7px}
.slider-row>span{font-size:8px;color:var(--muted);white-space:nowrap}
.slider-row input{height:17px}
.sim-controls>p{font-size:8px;line-height:1.8;color:var(--muted);margin:4px 0 0}
footer{display:flex;align-items:center;gap:13px;padding:20px 0 23px;font-size:8px;color:var(--muted)}
.footer-brand{font-size:14px;letter-spacing:-.08em;font-weight:900;color:var(--ink)}
.local-badge{margin-left:auto;display:flex;align-items:center;gap:5px}
.local-badge i{width:4px;height:4px;border-radius:50%;background:var(--coral)}
dialog{position:relative;max-width:470px;width:calc(100% - 32px);padding:34px 27px;border:2px solid var(--ink);border-radius:10px;background:var(--paper);color:var(--ink)}
dialog::backdrop{background:#26364e77}
.dialog-close{position:absolute;right:10px;top:7px;width:40px;height:40px;border:0;background:transparent;font-size:26px}
dialog h2{font-size:22px;margin:13px 0 24px}
dialog ol{padding-left:20px}
dialog li{font-size:12px;margin:20px 0;padding-left:5px}
dialog li p{font-size:11px;line-height:1.9;color:var(--muted);margin:7px 0}
.dialog-tip{font-size:10px;line-height:1.9;color:var(--muted);border-top:1px solid var(--line);padding-top:14px}
.is-playing .side-panel{display:none}
.is-playing .header{height:59px}
.is-playing .canvas-wrap{height:clamp(280px,calc(100svh - 290px),450px)}
.is-playing.is-demo .canvas-wrap{height:clamp(230px,calc(100svh - 410px),390px)}
.is-playing .overlay-panel{max-height:calc(100% - 14px);overflow-y:auto}
@media(max-width:760px){
 .shell{padding:0 13px}
 .header{height:61px;gap:17px}
 .brand{font-size:29px}
 .header-note{font-size:8px}
 .help-button{min-width:36px;min-height:36px;padding:7px 10px}
 .help-button span{display:none}
 .play-layout{gap:10px}
 .setup-details>summary{padding:11px 13px}
 .game-card{border-radius:8px}
 .stage-top{height:41px;padding:0 11px}
 .stage-title,.stage-actions{gap:7px}
 .stage-title strong{font-size:9px}
 .stage-tag{font-size:9px}
 .mode-badge{font-size:7px}
 .icon-button{width:27px;height:33px;font-size:18px}
 .pitch-bar{height:65px;padding:0 13px;gap:15px}
 .small-label{font-size:8px}
 .pitch-reading{min-width:96px}
 .pitch-reading strong,.target-reading strong{font-size:24px}
 .pitch-reading #frequency{display:block;margin:0;font-size:8px}
 .target-reading{min-width:135px}
 .target-reading strong span{font-size:9px}
 .listen-button{min-height:30px;margin-left:7px;padding:4px 7px}
 .voice-meter{display:none}
 .canvas-wrap{height:350px}
 .court-label{font-size:7px;top:9px;left:11px}
 #welcomePanel{width:273px;padding:7px 12px}
 .title-logo{font-size:63px;margin:11px 0 9px}
 #welcomePanel .welcome-call{font-size:14px;margin-bottom:8px}
 #welcomePanel .welcome-guide{font-size:9px;line-height:1.7;margin-bottom:15px}
 .primary-button{min-height:46px;padding:12px 15px;font-size:12px}
 .privacy-note{font-size:7px;margin-top:13px}
 .overlay-panel{width:278px;padding:18px}
 .overlay h2{font-size:23px}
 .overlay p{font-size:10px}
 .game-bottom{padding:12px 12px 11px}
 .hint-block{gap:8px}
 .hint-block strong{font-size:10px}
 .hint-block div>span{font-size:8px}
 .hint-icon{width:21px;font-size:21px}
 .hold-indicator{width:34px;height:34px}
 .progress-row{margin:0 14px;padding:11px 0 13px}
 .progress-dots{gap:7px}
 .progress-row>span{font-size:8px}
 .game-card .sim-controls{padding:10px 12px 8px}
 .piano{gap:4px}
 .piano-key{height:42px;font-size:11px}
 .sim-controls>p{font-size:7px}
 .is-playing .header{height:55px}
 .is-playing .canvas-wrap{height:clamp(250px,calc(100svh - 285px),420px)}
 .is-playing.is-demo .canvas-wrap{height:clamp(230px,calc(100svh - 410px),390px)}
 .clear-star{display:none}
 .clear-panel h2{font-size:31px;margin:5px 0}
 .clear-panel p{font-size:9px;line-height:1.7;margin:5px 0 8px}
 .clear-result{margin:6px 0 12px}
 .clear-result strong{font-size:25px}
 .clear-panel .primary-button{min-height:42px;padding:11px 14px}
 .clear-panel .demo-button{padding:10px 0 3px}
 footer{font-size:7px;gap:10px;padding:17px 0 20px}
 .footer-brand{font-size:13px}
 .local-badge{font-size:7px}
}
@media(max-width:360px){
 .shell{padding:0 10px}
 .header{gap:12px}
 .header-note{font-size:7px}
 .pitch-bar{padding:0 10px;gap:11px}
 .pitch-reading{min-width:87px}
 .target-reading{min-width:127px}
 #welcomePanel{width:250px}
 .title-logo{font-size:57px}
 .progress-dots{gap:6px}
 .progress-dot{width:6px;height:6px}
 .local-badge{display:none}
}
@media(prefers-reduced-motion:reduce){
 button,.voice-meter i,.toggle>span{transition:none}
 .title-logo span{animation:none}
}


/* Pixel edition: square frames, a restrained cartridge palette and hard edges. */
.game-card{border:3px solid var(--ink);border-radius:0;background:var(--white);box-shadow:5px 5px 0 #b5bda0}
.canvas-wrap{background:#f4f0da}
.pitch-bar{background:var(--white)}
.brand,.title-logo{transform:none;letter-spacing:-.06em;font-family:"MS Gothic","Hiragino Kaku Gothic ProN",monospace}
.brand span:nth-child(n){transform:none}
.title-logo{font-size:68px;text-shadow:3px 3px 0 #c6b58b}
.title-logo span:nth-child(3),.title-logo span:nth-child(4){transform:none}
#welcomePanel .welcome-call{letter-spacing:.04em}
.overlay-panel{border-radius:0;background:var(--white);box-shadow:4px 4px 0 #b5bda0}
.help-button,.listen-button,.icon-button,.primary-button,.setup-card,select,.piano button,.sim-controls,.secondary-button{border-radius:0!important}
.help-button,.listen-button,select,.piano button{background:var(--white);border-color:var(--line)}
.primary-button{border:2px solid var(--ink);border-bottom-width:4px;box-shadow:3px 3px 0 #b5bda0}
.primary-button:hover{background:#bf5c49}
.game-bottom,.progress-row,.sim-controls{background:var(--white)}
.progress-dot{border-radius:0}
.court-label{color:#71847c}
.stage-tag{color:#e3b958}
.voice-meter{border-radius:0}
.footer{color:var(--muted)}
@media(max-width:600px){.title-logo{font-size:58px}.game-card{box-shadow:3px 3px 0 #b5bda0}}

.gimmick-status{position:absolute;right:10px;top:25px;max-width:calc(100% - 20px);padding:4px 6px;background:#fffdf0e8;color:#6b7148;font-size:9px;font-weight:700;line-height:1.5;pointer-events:none}.gimmick-status:empty{display:none}.progress-row .melody-count{color:#8c6c32;white-space:nowrap}.melody-count b{font-size:16px;color:#aa813c;margin-right:2px}
.course-position{position:absolute;bottom:7px;left:10px;right:10px;display:flex;align-items:center;gap:8px;font-size:8px;color:#293c40;background:#f4f0dad9;padding:3px 5px;pointer-events:none}.course-position>span:first-child{white-space:nowrap}.course-position>span:last-child{min-width:26px;text-align:right;font:8px monospace}.course-position progress{flex:1;min-width:0;width:0;height:5px;border:0;appearance:none;background:#c6c9a9}.course-position progress::-webkit-progress-bar{background:#c6c9a9}.course-position progress::-webkit-progress-value{background:#6d845c}.course-position progress::-moz-progress-bar{background:#6d845c}
