:root{font-family:system-ui,-apple-system,BlinkMacSystemFont,'Hiragino Kaku Gothic ProN','Yu Gothic',sans-serif;color:#25332e;background:#f5f6f1;font-synthesis:none;--ink:#25332e;--muted:#78847e;--green:#527a67;--green-dark:#3e6553;--mint:#e4eee7;--coral:#df8a6d;--cream:#fffefa;--line:#e5e9e3;--shadow:0 14px 40px rgba(43,69,56,.08);--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}body{margin:0;min-height:100dvh;background:radial-gradient(ellipse at 18% 12%,#edf3eb 0,transparent 36%),#f5f6f1}button,select,input{font:inherit}button{cursor:pointer;color:inherit}button:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #86ad95;outline-offset:3px}.app-shell{min-height:100dvh;padding:calc(10px + var(--safe-top)) max(20px,env(safe-area-inset-right)) calc(14px + var(--safe-bottom)) max(20px,env(safe-area-inset-left));max-width:1220px;margin:auto;display:flex;flex-direction:column}.topbar{height:48px;display:flex;align-items:center;justify-content:space-between;flex:none}.brand{display:flex;align-items:center;gap:9px;text-decoration:none;color:var(--ink);font-weight:900;font-size:16px;letter-spacing:.02em}.brand-mark{display:grid;place-items:center;width:29px;height:29px;background:#e5eee6;color:var(--green);border-radius:10px;font-size:20px}.icon-button{border:0;background:transparent;font-size:21px;width:42px;height:42px;border-radius:50%;color:#718078}.icon-button:hover{background:#eaf0e9}.screen{flex:1}.home-screen{display:grid;grid-template-columns:minmax(260px,.8fr) minmax(430px,1.15fr);align-items:center;gap:clamp(28px,7vw,92px);padding:24px clamp(10px,5vw,64px) 48px}.eyebrow{text-transform:uppercase;letter-spacing:.14em;color:var(--green);font-size:12px;font-weight:800;margin:0 0 12px}.welcome-copy h1,.result-screen h1{font-size:clamp(36px,5vw,60px);line-height:1.27;letter-spacing:-.04em;margin:0;font-weight:900}.home-intro{max-width:350px;line-height:1.9;color:var(--muted);font-size:15px;margin-top:22px}.home-controls{width:100%}.level-picker{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:14px;color:#63716a;font-size:13px;font-weight:700}.level-picker select{border:1px solid #dfe5df;background:#fffefa;border-radius:12px;padding:10px 36px 10px 13px;color:var(--ink);font-weight:700;max-width:62%;}.mode-cards{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mode-card{position:relative;min-height:205px;text-align:left;border:1px solid #e7ebe5;border-radius:22px;padding:20px;background:var(--cream);box-shadow:0 8px 28px rgba(43,69,56,.04);transition:transform .18s,box-shadow .18s}.mode-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.practice-card{background:#edf4ed;border-color:#e4ece4}.test-card{background:#fbf0e9;border-color:#f4e8df}.mode-icon{display:grid;place-items:center;width:41px;height:41px;border-radius:14px;background:#fffefa;color:var(--green);font-size:24px;margin-bottom:19px}.test-card .mode-icon{color:#bd765d}.mode-name{display:block;font-size:21px;font-weight:900;margin-bottom:7px}.mode-desc{display:block;font-size:12px;line-height:1.8;color:#738079}.mode-arrow{position:absolute;right:19px;bottom:18px;font-size:20px;color:var(--green)}.test-card .mode-arrow{color:#bd765d}.home-progress{margin-top:20px;color:var(--muted);font-size:13px;text-align:center}.quiz-screen{display:flex;flex-direction:column;min-height:0}.quiz-toolbar{display:grid;grid-template-columns:1fr 1fr 1fr;align-items:center;min-height:50px;border-bottom:1px solid var(--line);flex:none}.text-button{border:0;background:transparent;padding:10px 0;text-align:left;color:#64746b;font-size:13px;font-weight:700}.session-label{text-align:center;font-size:13px;font-weight:800}.separator{padding:0 9px;color:#a9b3ac}.score-chip{justify-self:end;border-radius:99px;background:#eaf1eb;padding:8px 13px;font-size:12px;font-weight:800;color:var(--green)}.quiz-content{flex:1;display:grid;grid-template-rows:minmax(190px,1fr) minmax(165px,.9fr);gap:13px;min-height:0;padding:14px 0 8px}.staff-card,.keyboard-card{border-radius:19px;background:var(--cream);border:1px solid #e9ede7;box-shadow:0 7px 22px rgba(43,69,56,.035);min-height:0}.staff-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:8px 18px 23px}.staff-caption{position:absolute;top:13px;left:17px;color:#87928b;font-size:12px;font-weight:700}.staff-wrap{width:min(100%,650px);height:100%;max-height:230px;display:flex;align-items:center;justify-content:center}.staff-wrap svg{width:100%;height:100%;overflow:visible}.feedback{position:absolute;bottom:7px;min-height:20px;font-size:13px;font-weight:800;color:var(--green)}.feedback.incorrect{color:#bf765e}.keyboard-card{padding:11px 14px 8px;display:flex;flex-direction:column}.keyboard-heading{display:flex;justify-content:space-between;align-items:center;font-weight:800;font-size:12px;color:#68756e;margin-bottom:6px}.range-label{color:#a0aaa3;font-size:11px;font-weight:600}.keyboard-viewport{position:relative;display:flex;flex:1;min-height:112px;max-height:185px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;touch-action:pan-x}.keyboard{position:relative;display:flex;flex:none;height:100%;min-height:112px;max-height:185px;touch-action:pan-x;user-select:none;margin:auto}.key{position:relative;flex:0 0 62px;width:62px;min-width:62px;border:1px solid #d5dcd5;border-top:0;border-radius:0 0 7px 7px;background:linear-gradient(#fff 0%,#fff 80%,#f3f4f0 100%);box-shadow:0 3px 0 #dfe3de;display:flex;align-items:flex-end;justify-content:center;padding:0 0 7px;font-size:10px;color:#89958d;z-index:1;-webkit-tap-highlight-color:transparent}.key.active{background:#dcebe0;box-shadow:0 2px 0 #adc4b3}.key.correct{background:#b9d8c2;box-shadow:0 2px 0 #86b296}.key.wrong{background:#f5d9cd;box-shadow:0 2px 0 #d9a58f}.key.black{position:absolute;top:0;height:62%;z-index:2;flex:none;min-width:0;transform:translateX(-50%);border:1px solid #28352e;border-radius:0 0 5px 5px;background:linear-gradient(90deg,#445149,#1e2923 30%,#354138);box-shadow:0 3px 0 #142019;padding:0}.key.black::after{content:"";position:absolute;inset:0 -8px}.key.black.active{background:#667d6e}.key.black.correct{background:#7da58a}.keyboard-footer{display:flex;justify-content:space-between;align-items:center;color:#9aa49d;font-size:10px;padding-top:7px}.keyboard-footer .audio-warning{color:#bd765d;font-weight:700}.sound-button{border:0;background:transparent;color:var(--green);font-size:11px;font-weight:800;padding:5px 8px;border-radius:9px}.sound-button:hover{background:var(--mint)}.practice-tools{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;flex:none}.hint-panel{color:#718078;font-size:12px;min-height:20px}.tool-buttons{display:flex;gap:8px}.secondary-button,.primary-button,.danger-button{border:1px solid #dce4dd;background:#fffefa;color:#5e7065;border-radius:12px;padding:10px 16px;font-weight:800;font-size:12px}.secondary-button:hover{background:#edf3ee}.primary-button{border:0;background:var(--green);color:white;padding:12px 24px;font-size:14px;box-shadow:0 4px 11px rgba(66,111,85,.18)}.primary-button:hover{background:var(--green-dark)}.quiz-bottom{min-height:45px;display:flex;align-items:center;justify-content:space-between;flex:none}.gentle-note{color:#a1aaa3;font-size:11px}.quiz-bottom .primary-button{padding:10px 19px}.result-screen{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:18px}.result-illustration{display:grid;place-items:center;width:68px;height:68px;border-radius:24px;background:#e6efe7;color:var(--green);font-size:39px;margin-bottom:19px}.result-screen h1{font-size:clamp(30px,4vw,43px)}.result-subtitle{color:var(--muted);margin:10px 0 22px}.result-stats{display:grid;grid-template-columns:repeat(3,minmax(100px,145px));gap:10px;width:min(100%,480px)}.stat-card{background:#fffefa;border:1px solid #e8ece6;border-radius:16px;padding:15px 8px}.stat-value{font-size:24px;font-weight:900;color:var(--green)}.stat-label{font-size:11px;color:#89948d;margin-top:4px}.missed-notes{margin-top:16px;color:#77847c;font-size:12px}.result-actions{display:flex;gap:10px;margin-top:25px}.settings-dialog{border:0;padding:0;background:transparent;width:min(430px,calc(100% - 28px));max-width:none}.settings-dialog::backdrop{background:rgba(35,48,40,.28);backdrop-filter:blur(3px)}.settings-card{border:1px solid #e5ebe5;border-radius:23px;background:var(--cream);padding:23px;box-shadow:var(--shadow)}.dialog-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.dialog-heading h2{font-size:21px;margin:0}.setting-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 0;border-bottom:1px solid var(--line);font-size:13px;font-weight:700}.setting-row input[type=range]{width:40%;accent-color:var(--green)}.setting-row input[type=checkbox]{width:20px;height:20px;accent-color:var(--green)}.danger-button{color:#b76451;border-color:#ecd6cf;background:#fffaf8;padding:8px 11px}.privacy-note,.app-version{font-size:11px;line-height:1.7;color:#8c9890}.app-version{margin-bottom:0}.toast{position:fixed;left:50%;bottom:calc(22px + var(--safe-bottom));transform:translate(-50%,15px);opacity:0;pointer-events:none;background:#35473c;color:#fff;border-radius:12px;padding:10px 16px;font-size:12px;transition:.2s;z-index:5}.toast.show{opacity:1;transform:translate(-50%,0)}[hidden]{display:none!important}
@media(min-height:800px) and (orientation:landscape){.quiz-content{grid-template-rows:minmax(240px,1fr) minmax(185px,.88fr)}.keyboard{max-height:210px}.app-shell{padding-top:calc(12px + var(--safe-top))}}
@media(max-width:700px){.app-shell{padding-left:max(13px,env(safe-area-inset-left));padding-right:max(13px,env(safe-area-inset-right))}.home-screen{grid-template-columns:1fr;gap:24px;align-content:center;padding:20px 4px 35px}.welcome-copy h1{font-size:39px}.home-intro{margin:12px 0 0}.mode-card{min-height:175px;padding:16px}.mode-name{font-size:18px}.mode-desc{font-size:11px}.quiz-content{grid-template-rows:minmax(165px,1fr) minmax(160px,1fr);gap:8px;padding-top:9px}.keyboard-card{padding:9px 8px 6px}.keyboard{min-height:108px}.staff-card{padding-inline:8px}.staff-caption{top:10px;left:11px;font-size:10px}.practice-tools{align-items:flex-start;flex-direction:column;gap:4px}.tool-buttons{align-self:flex-end}.quiz-toolbar{grid-template-columns:1fr 1fr 1fr}.gentle-note{max-width:48%;line-height:1.4}.key{font-size:9px}.feedback{font-size:11px}}
@media(max-width:420px){.brand{font-size:14px}.mode-cards{gap:9px}.mode-card{min-height:160px}.mode-icon{margin-bottom:12px}.result-stats{grid-template-columns:repeat(3,1fr)}.stat-value{font-size:20px}.session-label{font-size:11px}.score-chip{font-size:10px;padding:7px 9px}.tool-buttons .secondary-button{padding:9px 12px}.keyboard-footer{font-size:9px}}
@media(max-height:640px){.quiz-toolbar{min-height:42px}.quiz-content{grid-template-rows:minmax(105px,1fr) minmax(140px,.9fr);gap:6px;padding:6px 0 4px}.keyboard-viewport,.keyboard{min-height:96px}.practice-tools{min-height:38px}.quiz-bottom{min-height:38px}.gentle-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}
.feedback{width:calc(100% - 24px);display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px;text-align:center;line-height:1.35}.feedback-note-name{font-size:1.55em;font-weight:900;color:var(--green-dark)}.feedback.incorrect .feedback-note-name{color:#a9553e}.quiz-screen.has-next #practice-tools{display:none}.quiz-screen.has-next .quiz-bottom{height:0;min-height:0;overflow:visible}.quiz-screen.has-next .gentle-note{display:none}.quiz-screen.has-next .quiz-content{margin-bottom:70px}.quiz-screen.has-next #next-button{position:fixed;z-index:8;left:50%;bottom:calc(14px + var(--safe-bottom));transform:translateX(-50%);width:min(340px,calc(100vw - 32px));min-height:54px;box-shadow:0 8px 24px rgba(43,69,56,.24)}
