*,:before,:after{box-sizing:border-box;margin:0;padding:0}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;text-size-adjust:100%;touch-action:manipulation;height:100%;font-size:16px}body{color:#e8e8f0;overscroll-behavior:none;-webkit-tap-highlight-color:transparent;background:linear-gradient(135deg,#0f0c29,#302b63,#24243e) fixed;min-height:100dvh;font-family:Segoe UI,PingFang SC,Microsoft YaHei,system-ui,-apple-system,sans-serif}#root{flex-direction:column;min-height:100dvh;display:flex}kbd{color:#e0d0ff;background:#ffffff1f;border:1px solid #ffffff40;border-radius:4px;padding:1px 6px;font-family:Cascadia Code,Fira Code,JetBrains Mono,monospace;font-size:.85em}button{cursor:pointer;border:none;outline:none;font-family:inherit}button:disabled{cursor:not-allowed;opacity:.4}.app{height:100dvh;padding-top:max(clamp(12px, 1.8vh, 20px), env(safe-area-inset-top));padding-bottom:max(clamp(12px, 1.8vh, 20px), env(safe-area-inset-bottom));padding-left:max(clamp(16px, 2.5vw, 36px), env(safe-area-inset-left));padding-right:max(clamp(16px, 2.5vw, 36px), env(safe-area-inset-right));flex-direction:column;gap:clamp(10px,1.5vh,18px);display:flex;overflow:hidden}.app-header{flex-wrap:wrap;flex:none;justify-content:space-between;align-items:center;gap:12px 24px;display:flex}.app-title{min-width:0}.app-header h1{color:#f0e6ff;white-space:nowrap;text-shadow:0 0 20px #aa3bff66;font-size:clamp(1.3rem,.5rem + 1.1vw,1.9rem);font-weight:700;line-height:1.2}.app-subtitle{color:#9888b0;margin-top:2px;font-size:clamp(.8rem,.75rem + .2vw,.95rem)}.app-main{flex-direction:column;flex:auto;gap:clamp(10px,1.5vh,18px);width:100%;max-width:1400px;min-height:0;margin:0 auto;display:flex}.stage{flex:auto;grid-template-columns:minmax(0,1fr) clamp(220px,25vw,320px);gap:clamp(12px,1.6vw,24px);min-height:0;display:grid}.score-panel{align-items:stretch;gap:clamp(8px,1vw,14px);display:flex}.score-item{background:#ffffff0f;border:1px solid #ffffff1a;border-radius:12px;flex-direction:column;justify-content:center;align-items:center;min-width:clamp(76px,7vw,104px);padding:6px 14px;display:flex}.score-label{color:#9888b0;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap;font-size:.7rem}.score-value{color:#f0e6ff;font-size:clamp(1.15rem,1.6vw,1.5rem);font-weight:700;line-height:1.2}.score-value.streak{color:#fbbf24}.btn-settings{color:#b9aed0;cursor:pointer;-webkit-tap-highlight-color:transparent;background:#ffffff0f;border:1px solid #ffffff26;border-radius:12px;flex-shrink:0;justify-content:center;align-items:center;width:clamp(46px,4.4vw,56px);height:auto;min-height:46px;font-size:1.3rem;transition:all .2s;display:flex}.btn-settings:hover{color:#e4dcf5;background:#ffffff1f}.btn-settings:active{transform:scale(.96)}.feedback-banner{text-align:center;border-radius:14px;justify-content:center;align-items:center;width:100%;min-height:76px;padding:18px;transition:background .3s,border-color .3s;display:flex}.feedback-banner.feedback-idle{background:#ffffff0a;border:1px dashed #ffffff1f}.feedback-banner.feedback-correct{background:#22c55e26;border:1px solid #22c55e4d;animation:.5s pulse-green}.feedback-banner.feedback-wrong{background:#ef444426;border:1px solid #ef44444d;animation:.4s shake}.feedback-text{word-break:break-word;font-size:clamp(1rem,.9rem + .35vw,1.2rem);font-weight:600;line-height:1.4}.feedback-text.idle{color:#9888b0}.feedback-text.correct{color:#4ade80}.feedback-text.wrong{color:#f87171}.feedback-text.hint{color:#fbbf24}@keyframes pulse-green{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes shake{0%,to{transform:translate(0)}20%{transform:translate(-6px)}40%{transform:translate(6px)}60%{transform:translate(-4px)}80%{transform:translate(4px)}}.staff-section{background:#fffffff2;border-radius:16px;justify-content:center;align-items:center;min-width:0;min-height:0;padding:clamp(12px,2vh,24px);display:flex;box-shadow:0 8px 32px #0000004d}.staff-display{justify-content:center;align-items:center;width:100%;height:100%;display:flex}.staff-container{justify-content:center;align-items:center;max-width:100%;max-height:100%;display:flex}.staff-container svg{max-width:100%;max-height:100%;display:block}.side-panel{flex-direction:column;justify-content:center;gap:clamp(14px,3vh,28px);min-width:0;display:flex}.controls{flex-direction:column;gap:12px;width:100%;display:flex}.btn{touch-action:manipulation;-webkit-tap-highlight-color:transparent;border-radius:12px;min-height:52px;padding:12px 20px;font-size:1rem;font-weight:600;transition:all .2s}.btn:hover:not(:disabled){transform:translateY(-1px)}.btn:active:not(:disabled){transform:translateY(0)scale(.98)}.btn-skip{color:#d0c8e8;background:#ffffff1a;border:1px solid #ffffff26}.btn-skip:hover:not(:disabled){background:#ffffff2e}.btn-hint{color:#fbbf24;background:#facc1526;border:1px solid #facc1540}.btn-hint:hover:not(:disabled){background:#facc1540}.keyboard-section{flex:none;width:100%}.piano-keyboard{width:100%}.piano-keys-scroll{touch-action:pan-x;overscroll-behavior-x:contain;width:100%;padding-bottom:6px;overflow:auto hidden}.piano-keys-scroll::-webkit-scrollbar{height:6px}.piano-keys-scroll::-webkit-scrollbar-track{background:#ffffff0f;border-radius:3px}.piano-keys-scroll::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.piano-keys-scroll::-webkit-scrollbar-thumb:hover{background:#ffffff59}.piano-keys{height:clamp(180px,29dvh,270px);display:flex;position:relative}.piano-key{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation;border-radius:0 0 8px 8px;justify-content:center;align-items:flex-end;padding:0 0 10px;transition:transform 80ms,background .1s,box-shadow .15s;display:flex;position:relative}.piano-key:active{transform:scale(.97)}.white-key{width:var(--white-key-w,56px);flex:0 0 var(--white-key-w,56px);z-index:1;color:#606070;background:linear-gradient(#f8f8fa 0%,#e4e4e8 100%);border:1px solid #c0c0c8;border-top:3px solid #d0d0d8;height:100%;margin:0 1px}.white-key:hover{background:linear-gradient(#e8e8ff 0%,#d4d4f0 100%)}.white-key:active{background:linear-gradient(#d4d4e8 0%,#c0c0d8 100%)}.black-key{width:var(--black-key-w,36px);z-index:2;color:#ccc;background:linear-gradient(#3a3a4a 0%,#1a1a28 100%);border:2px solid #0a0a14;border-top:none;border-radius:0 0 6px 6px;height:62%;margin:0;position:absolute}.black-key:hover{background:linear-gradient(#4a4a5a 0%,#2a2a38 100%)}.black-key:active{background:linear-gradient(#2a2a38 0%,#1a1a28 100%)}.key-label{font-size:max(10px, calc(var(--white-key-w,56px) * .16));pointer-events:none;white-space:nowrap;font-weight:600}.black-key .key-label{font-size:max(9px, calc(var(--black-key-w,36px) * .28))}.key-label-c4{color:#ef4444!important;font-size:max(9px, calc(var(--white-key-w,56px) * .13))!important}.key-correct{color:#14532d!important;background:linear-gradient(#86efac 0%,#22c55e 100%)!important;border-color:#16a34a!important}.key-wrong{animation:.4s shake;color:#7f1d1d!important;background:linear-gradient(#fca5a5 0%,#ef4444 100%)!important;border-color:#dc2626!important}.key-target-hint{z-index:3;box-shadow:0 0 0 3px #facc15,0 0 22px #facc15cc}.settings-overlay{z-index:1000;background:#0000008c;justify-content:center;align-items:center;padding:16px;display:flex;position:fixed;inset:0}.settings-panel{background:#1e1630;border:1px solid #ffffff1f;border-radius:16px;width:100%;max-width:460px;max-height:85dvh;overflow-y:auto;box-shadow:0 16px 48px #00000080}.settings-panel-wide{max-width:720px}.settings-header{border-bottom:1px solid #ffffff14;justify-content:space-between;align-items:center;padding:16px 20px;display:flex}.settings-header h2{color:#f0e6ff;font-size:1.15rem;font-weight:700}.settings-close{color:#b9aed0;-webkit-tap-highlight-color:transparent;background:#ffffff14;border-radius:10px;justify-content:center;align-items:center;width:40px;height:40px;font-size:1.05rem;display:flex}.settings-close:hover{color:#e4dcf5;background:#ffffff26}.settings-body{flex-direction:column;gap:16px;padding:18px 20px 22px;display:flex}.settings-group{flex-direction:column;gap:8px;display:flex}.settings-label{color:#9888b0;font-size:.85rem;font-weight:600}.settings-divider{background:#ffffff14;height:1px;margin:2px 0}.settings-check{cursor:pointer;color:#d0c8e8;-webkit-tap-highlight-color:transparent;align-items:center;gap:12px;min-height:44px;font-size:.95rem;display:flex}.settings-check input[type=checkbox]{accent-color:#aa3bff;cursor:pointer;flex-shrink:0;width:20px;height:20px}.settings-note{color:#8879a0;font-size:.78rem;line-height:1.5}.settings-reset{color:#f87171;-webkit-tap-highlight-color:transparent;background:#ef44441a;border:1px solid #ef44444d;border-radius:10px;min-height:44px;font-size:.9rem;font-weight:600;transition:background .2s}.settings-reset:hover{background:#ef44442e}.config-options{flex-wrap:wrap;gap:8px;display:flex}.config-btn{color:#b9aed0;white-space:nowrap;-webkit-tap-highlight-color:transparent;background:#ffffff0f;border:1px solid #ffffff26;border-radius:10px;min-height:42px;padding:8px 16px;font-size:.9rem;transition:all .2s}.config-btn:hover{color:#e4dcf5;background:#ffffff1f}.config-btn-active{color:#e0d0ff;background:#aa3bff33;border-color:#aa3bff66}.note-picker{flex-direction:column;gap:8px;display:flex}.note-picker-meta{color:#b9aed0;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;font-size:.78rem;display:flex}.note-picker-hint{color:#7d7194}.note-picker-scroll{overscroll-behavior-x:contain;padding-bottom:4px;overflow-x:auto}.note-picker-scroll::-webkit-scrollbar{height:6px}.note-picker-scroll::-webkit-scrollbar-thumb{background:#fff3;border-radius:3px}.note-row{grid-template-columns:46px minmax(0,1fr);align-items:center;gap:8px;min-width:620px;display:grid}.note-row+.note-row{margin-top:6px}.note-row-label{color:#9888b0;-webkit-tap-highlight-color:transparent;background:0 0;border:1px dashed #ffffff2e;border-radius:8px;min-height:44px;font-size:.78rem;font-weight:700;transition:all .2s}.note-row-label:hover{color:#e0d0ff;border-color:#aa3bff59}.note-row-label-active{color:#e0d0ff;background:#aa3bff24;border-style:solid;border-color:#aa3bff80}.note-row-notes{grid-template-columns:repeat(12,minmax(0,1fr));gap:5px;display:grid}.note-chip{color:#b9aed0;white-space:nowrap;-webkit-tap-highlight-color:transparent;background:#ffffff0f;border:1px solid #ffffff26;border-radius:8px;min-height:44px;padding:0 2px;font-size:.82rem;font-weight:600;transition:background .15s,border-color .15s,color .15s}.note-chip-black{color:#9a8db0;background:#00000047}.note-chip:hover{color:#e4dcf5;background:#ffffff24}.note-chip-selected{color:#fff;background:#aa3bff61;border-color:#aa3bff;box-shadow:inset 0 0 0 1px #aa3bff8c}.note-chip-selected:hover{color:#fff;background:#aa3bff80}.settings-check-disabled{opacity:.55;cursor:not-allowed}.settings-check-disabled input[type=checkbox]{cursor:not-allowed}@media (width<=860px){.app{height:auto;min-height:100dvh;overflow:visible}.app-header{text-align:center;flex-direction:column;align-items:stretch;margin-top:auto}.app-header h1{white-space:normal}.score-panel{justify-content:center}.app-main{flex:none;width:100%;max-width:760px;margin-bottom:auto}.stage{flex-direction:column;gap:14px;display:flex}.staff-section{min-height:clamp(180px,28vh,240px)}.staff-display{height:auto}.side-panel{justify-content:flex-start;gap:12px}.controls{flex-direction:row}.controls .btn{flex:1 1 0}.piano-keys{height:clamp(170px,26vh,230px)}}@media (height<=560px){.app{height:auto;min-height:100dvh;overflow:visible}.app-subtitle{display:none}.app-main{flex:none}.staff-section{min-height:170px}}
