:root{--ink:#24233b;--muted:#8b8ba1;--purple:#7456da;--purple-dark:#6245c6;--line:#eceaf4;--page:#f7f7fb;--white:#fff;--shadow:0 18px 48px rgba(44,39,96,.055)}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--page);color:var(--ink);font-family:'DM Sans',Arial,sans-serif;font-size:14px}button,select,input{font:inherit}button{cursor:pointer}button:focus-visible,select:focus-visible,input:focus-visible,summary:focus-visible,a:focus-visible{outline:3px solid #bcaafd;outline-offset:3px}.hidden{display:none!important}
.app-shell{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:100vh}.sidebar{background:#fff;border-right:1px solid var(--line);padding:28px 18px 22px;display:flex;flex-direction:column;min-height:100vh;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:11px;padding:3px 10px;text-decoration:none;color:var(--ink)}.brand-mark{display:grid;place-items:center;width:39px;height:39px;border-radius:13px;background:transparent;color:#fff;font-size:26px;font-weight:800;box-shadow:0 7px 15px #7858d73b}.brand strong{display:block;font-family:Nunito,sans-serif;font-size:18px;letter-spacing:-.6px;line-height:1.1}.brand small{display:block;color:#a4a0b6;font-size:10px;margin-top:4px}.sidebar-group-label{font-size:10px;font-weight:800;color:#aaa9bb;letter-spacing:1.55px;margin:45px 12px 15px}.side-nav{display:grid;gap:5px}.nav-item{display:flex;align-items:center;gap:11px;width:100%;text-align:left;background:transparent;border:0;border-radius:11px;color:#77758e;font-weight:700;padding:11px 13px;transition:.2s}.nav-item:hover,.nav-item.active{background:#f0ecff;color:#6f51d2}.nav-item.active{box-shadow:inset 3px 0 #8062e9}.nav-icon{width:22px;text-align:center;font-size:20px;line-height:1}.lesson-label{margin-top:35px}.lesson-list{display:grid;gap:5px}.lesson-item{display:flex;align-items:center;gap:10px;width:100%;border:0;background:transparent;text-align:left;color:#9290a5;border-radius:11px;padding:9px 8px}.lesson-item:hover,.lesson-item.current{background:#f9f7ff;color:var(--ink)}.lesson-number{display:grid;place-items:center;width:29px;height:29px;flex:none;background:#f1eff7;border-radius:50%;font-weight:800;font-size:11px;color:#8f8aa6}.lesson-item.current .lesson-number{background:#7d5de3;color:#fff}.lesson-item.done .lesson-number{background:#e8f9ed;color:#2fac76}.lesson-item strong{font-size:11px;display:block}.lesson-item small{display:block;color:#aaa8b8;font-size:10px;margin-top:2px}.sidebar-bottom{margin-top:auto}.quiet-card{background:#f5f1ff;border:1px solid #eee6ff;border-radius:14px;padding:14px;display:flex;gap:9px;color:#7c5ddd}.quiet-card>span{font-size:19px}.quiet-card strong{font-size:11px}.quiet-card p{margin:4px 0 0;line-height:1.45;font-size:10px;color:#9c91c6}.sidebar-help{margin-top:15px;padding:11px 12px;background:transparent;border:0;color:#8e8ca2;font-weight:700;width:100%;text-align:left}.sidebar-help:hover{color:var(--purple)}
.workspace{min-width:0}.topbar{height:72px;padding:0 38px;display:flex;align-items:center;justify-content:space-between;background:#fff;border-bottom:1px solid var(--line)}.breadcrumb{display:flex;gap:13px;align-items:center;font-size:11px;letter-spacing:.4px;color:#aaa8ba;font-weight:800}.breadcrumb strong{color:#6c6682;font-size:12px;letter-spacing:0}.crumb-divider{color:#d4d0de}.top-actions{display:flex;align-items:center;gap:20px}.daily-tag{color:#9690ae;font-size:11px;font-weight:700}.avatar{display:grid;place-items:center;border-radius:12px;background:#eee9fc;color:#7d5de3;width:34px;height:34px;font-size:20px}.main-content{max-width:1500px;margin:auto;padding:30px 38px 42px}.welcome{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px}.eyebrow{font-size:10px;color:#8e74d7;font-weight:900;letter-spacing:1.55px}.welcome h1{font-family:Nunito,sans-serif;font-size:27px;line-height:1.2;letter-spacing:-1px;margin:7px 0 5px;font-weight:900}.welcome h1 span{font-size:25px}.welcome p{margin:0;color:#9896a7;font-size:13px}.progress-summary{display:flex;align-items:center;gap:13px;padding:0 9px}.progress-summary strong{display:block;font-size:12px}.progress-summary small{display:block;color:#aaa5bc;font-size:10px;margin-top:4px}.progress-ring{--progress:0;display:grid;place-items:center;width:55px;height:55px;border-radius:50%;background:conic-gradient(#8165e7 calc(var(--progress)*1%),#efebf9 0);position:relative}.progress-ring:before{content:"";position:absolute;inset:5px;background:var(--page);border-radius:50%}.progress-ring span{z-index:1;font-family:Nunito,sans-serif;font-weight:900;font-size:15px;color:#7455d5}.progress-ring small{display:inline;font-size:10px;color:#aaa5bc}
.content-grid{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:20px;align-items:start}.learning-column,.context-column{min-width:0}.learning-column{display:grid;gap:20px}.context-column{display:grid;gap:16px}.lesson-hero{display:flex;position:relative;min-height:200px;overflow:hidden;background:linear-gradient(112deg,#e9e1ff 0%,#eee9ff 55%,#e6ddff 100%);border:1px solid #ded3ff;border-radius:18px;box-shadow:var(--shadow)}.hero-copy{padding:26px 28px;position:relative;z-index:2;max-width:62%}.hero-kicker{color:#7f65d0;font-size:10px;font-weight:900;letter-spacing:1.2px}.hero-copy h2{font-family:Nunito,sans-serif;font-size:24px;letter-spacing:-.7px;line-height:1.1;margin:9px 0 8px}.hero-copy p{font-size:12px;line-height:1.55;color:#777087;margin:0 0 17px;max-width:450px}.primary-button{display:inline-flex;align-items:center;justify-content:center;gap:19px;border:0;border-radius:10px;background:#7758d9;color:white;font-weight:800;font-size:11px;padding:12px 17px;box-shadow:0 8px 15px #7353d63b;transition:.18s}.primary-button:hover{background:#6241c7;transform:translateY(-1px)}.primary-button:active{transform:translateY(1px)}.hero-art{position:absolute;right:0;top:0;width:43%;height:100%;overflow:hidden}.hero-art:before{content:"";position:absolute;width:235px;height:235px;border-radius:50%;background:#d9cbff;right:42px;top:35px}.art-piano{position:absolute;right:38px;bottom:-28px;width:225px;height:140px;display:flex;background:#736c92;border-radius:12px;transform:rotate(-17deg);padding:10px 9px 12px;box-shadow:0 15px 20px #7660b968}.art-piano i{flex:1;background:#fff;border-right:2px solid #d6d3e1;border-radius:0 0 5px 5px}.art-piano b{position:absolute;background:#302f43;width:17px;height:65px;border-radius:0 0 3px 3px;top:10px;z-index:2}.art-piano b:nth-of-type(1){left:32px}.art-piano b:nth-of-type(2){left:60px}.art-piano b:nth-of-type(3){left:119px}.art-piano b:nth-of-type(4){left:148px}.art-piano b:nth-of-type(5){left:176px}.music-orbit{position:absolute;z-index:2;color:#8d6ded;font-size:27px}.orbit-one{top:27px;right:78px;transform:rotate(18deg)}.orbit-two{top:45px;left:30px;transform:rotate(-20deg)}.art-sparkle{position:absolute;color:#fff;font-size:28px}.sparkle-one{top:28px;right:20px}.sparkle-two{bottom:24px;left:22px}
.practice-card,.today-card,.tip-card,.settings-card,.keyboard-card{background:#fff;border:1px solid #eeedf4;border-radius:17px;box-shadow:var(--shadow)}.practice-card{padding:23px 25px 18px}.practice-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.practice-header h2,.keyboard-heading h2{font-family:Nunito,sans-serif;letter-spacing:-.55px;font-size:19px;margin:6px 0 0;font-weight:900}.round-pill{background:#f2eeff;color:#7859d8;padding:7px 11px;border-radius:50px;font-size:10px;font-weight:800;white-space:nowrap}.practice-instruction{margin:10px 0 8px;color:#9391a3;font-size:12px}.staff-paper{height:204px;display:grid;place-items:center;border-radius:11px;background:repeating-linear-gradient(0deg,#fff,#fff 20px,#fdfcff 21px);overflow:hidden}.staff-paper svg{width:100%;max-width:720px;height:198px}.feedback{min-height:39px;display:flex;align-items:center;gap:9px;padding:8px 13px;border-radius:9px;font-size:11px;font-weight:700;line-height:1.4}.feedback-symbol{display:grid;place-items:center;border-radius:50%;width:19px;height:19px;flex:none;font-size:12px}.feedback.neutral{background:#f7f6fc;color:#8a88a1}.feedback.neutral .feedback-symbol{background:#ebe6ff;color:#8063db}.feedback.success{background:#eaf9ef;color:#27925a}.feedback.success .feedback-symbol{background:#d2f3df}.feedback.error{background:#fff3ec;color:#d17a3b}.feedback.error .feedback-symbol{background:#ffe5cf}.practice-actions{display:flex;align-items:center;gap:8px;margin-top:14px}.soft-button{border:1px solid #e9e7f2;border-radius:9px;background:#fff;color:#656077;font-size:11px;font-weight:800;padding:9px 12px}.soft-button:hover{background:#f7f4ff;border-color:#d7cdf7;color:#7454d5}.text-button{margin-left:auto;border:0;background:transparent;color:#8666db;font-size:11px;font-weight:800;padding:8px}.text-button:hover{text-decoration:underline}
.today-card,.tip-card,.settings-card{padding:19px}.card-heading{display:flex;gap:10px;align-items:center;margin-bottom:18px}.heading-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:10px;font-size:18px;font-weight:800}.heading-icon.lavender{background:#ede7ff;color:#8461e9}.heading-icon.peach{background:#fff1e5;color:#eda058}.heading-icon.mint{background:#e4f8ee;color:#48b880}.card-heading .eyebrow{font-size:8px;letter-spacing:1.25px;color:#aaa7bb}.card-heading h2{font-family:Nunito,sans-serif;font-size:13px;margin:3px 0 0;font-weight:900}.stat-line{display:flex;align-items:center;justify-content:space-between;margin:12px 0;color:#9896a8;font-size:11px}.stat-line strong{color:#48415c;font-family:Nunito,sans-serif;font-size:13px}.mini-progress{height:6px;background:#f0ecf9;border-radius:6px;overflow:hidden;margin:17px 0 10px}.mini-progress span{display:block;height:100%;width:0;background:linear-gradient(90deg,#7656d9,#ad92ff);border-radius:6px;transition:width .3s}.today-card p{margin:0;color:#aaa6bb;font-size:10px}.tip-card{position:relative;overflow:hidden;background:#fffefa}.tip-card p{position:relative;z-index:1;font-size:11px;line-height:1.6;color:#898493;margin:0;max-width:220px}.tip-decoration{position:absolute;right:12px;bottom:-24px;font-size:87px;color:#fff0d9;line-height:1}.settings-card .card-heading{margin-bottom:13px}.field-label{display:block;color:#898698;font-size:10px;font-weight:800;margin:11px 0 6px}.settings-card select{width:100%;height:35px;border:1px solid #eae8f1;background:#faf9fd;color:#514d65;border-radius:8px;padding:0 9px;font-size:11px;font-weight:700}.toggle-row{display:flex;align-items:center;justify-content:space-between;color:#797588;font-size:10px;font-weight:700;margin:17px 0;cursor:pointer}.toggle-row input{position:absolute;opacity:0}.toggle-row i{width:31px;height:17px;background:#ccc8d8;border-radius:20px;position:relative;transition:.2s}.toggle-row i:before{content:"";position:absolute;width:11px;height:11px;left:3px;top:3px;background:white;border-radius:50%;transition:.2s}.toggle-row input:checked+i{background:#8668e5}.toggle-row input:checked+i:before{transform:translateX(14px)}.midi-button{width:100%;text-align:left;border:1px solid #e9e7f2;color:#676077;background:#fff;padding:9px 10px;border-radius:9px;font-size:10px;font-weight:800}.midi-button:hover{border-color:#a991f1;color:var(--purple)}.midi-status{font-size:9px;line-height:1.4;color:#aaa7b8;margin:7px 0 0}.metronome{border-top:1px solid #f0eef4;margin-top:14px;padding-top:12px}.metronome summary{list-style:none;display:flex;justify-content:space-between;cursor:pointer;color:#777084;font-size:10px;font-weight:800}.metronome summary::-webkit-details-marker{display:none}.metronome summary span{color:#8164dd}.metronome-controls{display:flex;gap:9px;align-items:center;margin-top:12px}.metronome-controls input{flex:1;min-width:0;accent-color:#8063e2}.metronome-controls button{border:0;background:#eae4fc;color:#7454d0;padding:6px 11px;border-radius:7px;font-weight:800;font-size:10px}
.keyboard-card{margin-top:20px;padding:20px 24px 14px}.keyboard-heading{display:flex;align-items:end;justify-content:space-between;gap:10px}.keyboard-guide{font-size:10px;color:#9b98ab;font-weight:700;white-space:nowrap}.guide-dot{display:inline-block;width:7px;height:7px;background:#70c99d;border-radius:50%;margin-right:5px}.guide-divider{margin:0 8px}.keyboard-scroller{overflow-x:auto;padding:18px 2px 8px;scrollbar-color:#e1d9fa transparent}.piano-keyboard{position:relative;height:146px;margin:auto}.key{position:absolute;top:0;border:0;touch-action:none;user-select:none}.white-key{height:146px;background:linear-gradient(#fff,#f9f8fd);border:1px solid #dcdbe6;border-bottom:5px solid #dedde8;border-radius:0 0 7px 7px;box-shadow:1px 4px 6px #5952771c;z-index:1;color:#827b91}.white-key:hover{background:#f4f0ff}.white-key.active,.white-key.target-key{background:linear-gradient(#eee7ff,#dcd0ff);border-bottom-color:#9b7be8}.black-key{height:90px;background:linear-gradient(#444058,#232036);border-radius:0 0 5px 5px;box-shadow:2px 4px 6px #2d293e52;z-index:2;color:#e6dcff}.black-key:hover{background:#514677}.black-key.active,.black-key.target-key{background:linear-gradient(#a88aef,#7350cf)}.key-label{position:absolute;bottom:12px;left:0;right:0;text-align:center;font-size:10px;font-weight:900}.black-key .key-label{bottom:8px;font-size:8px}.key-shortcut{position:absolute;top:7px;left:0;right:0;text-align:center;font-size:9px;color:#b3adbd}.black-key .key-shortcut{color:#a29baa}.keyboard-footnote{font-size:10px;color:#a8a4b5;text-align:center;margin:8px 0 0}.help-dialog{border:0;border-radius:19px;max-width:440px;width:calc(100% - 30px);padding:26px;box-shadow:0 24px 70px #27204740;color:var(--ink)}.help-dialog::backdrop{background:#2420378a}.help-dialog h2{font-family:Nunito,sans-serif;font-size:24px;margin:8px 0}.help-dialog p,.help-dialog li{font-size:13px;line-height:1.6;color:#777287}.help-dialog ul{padding-left:21px;margin-bottom:23px}.dialog-close{float:right;border:0;background:#f2eff9;border-radius:50%;width:28px;height:28px;color:#6f6590;font-size:20px}
@media(max-width:1180px){.app-shell{grid-template-columns:210px minmax(0,1fr)}.sidebar{padding-left:12px;padding-right:12px}.topbar{padding:0 24px}.main-content{padding:26px 24px}.content-grid{grid-template-columns:minmax(0,1fr) 245px;gap:14px}.hero-copy{max-width:69%}.hero-art{opacity:.7}.context-column{gap:12px}}
@media(max-width:900px){.app-shell{display:block}.sidebar{position:static;height:auto;min-height:0;padding:14px 18px}.brand{margin-bottom:10px}.sidebar-group-label,.lesson-list,.sidebar-bottom{display:none}.side-nav{display:flex;overflow-x:auto}.nav-item{white-space:nowrap;width:auto}.topbar{height:52px}.daily-tag{display:none}.content-grid{grid-template-columns:1fr}.context-column{grid-template-columns:repeat(2,1fr)}.settings-card{grid-column:1/-1}.hero-copy{max-width:65%}}
@media(max-width:620px){.main-content{padding:20px 14px}.welcome{align-items:start}.welcome h1{font-size:22px}.progress-summary{display:none}.hero-copy{max-width:100%;padding:22px}.hero-art{opacity:.16;width:70%}.lesson-hero{min-height:190px}.practice-card{padding:17px}.context-column{grid-template-columns:1fr}.keyboard-card{padding:17px}.keyboard-guide{display:none}.practice-actions{flex-wrap:wrap}.practice-instruction{line-height:1.5}}

.advanced-settings{border-top:1px solid #f0eef4;margin-top:14px;padding-top:11px}
.advanced-settings>summary{display:flex;align-items:center;justify-content:space-between;list-style:none;cursor:pointer;color:#8063d7;font-size:11px;font-weight:800}
.advanced-settings>summary::-webkit-details-marker{display:none}
.advanced-settings>summary span{font-size:17px;line-height:1;transition:transform .2s}
.advanced-settings[open]>summary span{transform:rotate(180deg)}
.advanced-settings .metronome{margin-top:12px}
.lesson-complete-actions{display:flex;align-items:center;gap:9px;margin-top:9px;flex-wrap:wrap}
.lesson-complete-actions .primary-button{padding:9px 12px}
.practice-header-controls{display:flex;align-items:center;gap:10px}
.note-name-toggle{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;color:#756c8c;font-size:10px;font-weight:800;cursor:pointer}
.note-name-toggle input{width:15px;height:15px;margin:0;accent-color:#7959dc;cursor:pointer}
@media(max-width:620px){.practice-header{align-items:flex-start;flex-wrap:wrap}.practice-header-controls{width:100%;justify-content:space-between}}

/* Keep the reading exercise and piano together, independent of sidebar height. */
@media(min-width:901px){
  .main-content{padding:20px 28px 28px}
  .welcome{margin-bottom:12px}
  .welcome h1{font-size:23px;margin:4px 0 3px}
  .content-grid{gap:14px}
  .learning-column{gap:12px}
  .lesson-hero{min-height:120px}
  .hero-copy{padding:16px 22px;max-width:70%}
  .hero-copy h2{font-size:19px;margin:5px 0 3px}
  .hero-copy p{font-size:11px;line-height:1.35;margin-bottom:8px}
  .hero-copy .primary-button{padding:8px 12px}
  .hero-art:before{top:-56px}
  .art-piano{bottom:-66px}
  .practice-card{padding:15px 20px 12px}
  .staff-paper{height:164px}
  .staff-paper svg{height:160px}
  .practice-actions{margin-top:9px}
  .soft-button{padding:7px 10px}
  .keyboard-card{margin-top:0;padding:12px 18px 8px}
  .keyboard-heading h2{font-size:16px;margin-top:3px}
  .keyboard-scroller{padding-top:12px;padding-bottom:4px}
  .piano-keyboard{height:120px}
  .white-key{height:120px}
  .black-key{height:76px}
  .keyboard-footnote{margin-top:5px}
}

@media(min-width:901px) and (max-height:850px){
  .topbar{height:56px}
  .main-content{padding-top:12px;padding-bottom:14px}
  .welcome{margin-bottom:8px}
  .welcome h1{font-size:20px}
  .welcome p{display:none}
  .progress-ring{width:42px;height:42px}
  .lesson-hero{min-height:83px}
  .hero-copy{padding:11px 18px}
  .hero-copy h2{font-size:17px;margin:3px 0}
  .hero-copy p{display:none}
  .hero-copy .primary-button{padding:6px 10px}
  .learning-column{gap:9px}
  .practice-card{padding:11px 16px 10px}
  .practice-instruction{margin:6px 0 3px}
  .staff-paper{height:140px}
  .staff-paper svg{height:138px}
  .feedback{min-height:32px;padding:6px 10px}
  .practice-actions{margin-top:6px}
  .keyboard-card{padding:9px 15px 6px}
  .keyboard-scroller{padding-top:8px}
  .piano-keyboard{height:105px}
  .white-key{height:105px}
  .black-key{height:66px}
  .keyboard-footnote{display:none}
}

.sidebar{overflow-y:auto}
.brand-mark img{display:block;width:100%;height:100%;object-fit:cover;border-radius:inherit}
.quiet-card div{min-width:0}
.quiet-card p{font-size:11px;line-height:1.5}
.inspiration-action{position:relative;z-index:2;display:inline-block;border:0;background:transparent;padding:10px 0 0;color:#8160dd;font-size:10px;font-weight:800;text-align:left}
.inspiration-action:hover:not(:disabled){text-decoration:underline}
.inspiration-action:disabled{opacity:.45;cursor:default}
.tip-card .inspiration-action{margin-top:4px}
.quiet-card .inspiration-action{color:#7958d0}
@media(max-width:900px){.sidebar{overflow:visible}}

/* Tablet and phone navigation keeps every lesson reachable. */
.mobile-help-button,.mobile-lesson-strip,.mobile-quote-card,.keyboard-scroll-button{display:none}
.keyboard-heading-actions{display:flex;align-items:center;gap:8px}
.keyboard-scroller{-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
.key{touch-action:auto}
@media(max-width:1100px){
  .app-shell{display:block}
  .sidebar{position:relative;top:auto;height:auto;min-height:0;overflow:visible;padding:13px 22px 10px;border-right:0;border-bottom:1px solid var(--line);box-shadow:0 3px 14px #4c3e7b0b}
  .brand{margin:0 0 9px;padding:0}
  .sidebar-group-label,.lesson-list,.sidebar-bottom{display:none}
  .mobile-help-button{display:grid;place-items:center;position:absolute;right:20px;top:12px;width:36px;height:36px;border:1px solid #e9e4f4;border-radius:10px;background:#faf8ff;color:#795ad7;font-size:20px}
  .side-nav{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none}
  .side-nav::-webkit-scrollbar,.mobile-lesson-strip::-webkit-scrollbar{display:none}
  .nav-item{width:auto;flex:none;white-space:nowrap;padding:8px 12px;font-size:12px}
  .nav-icon{font-size:18px;width:18px}
  .mobile-lesson-strip{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;padding:1px 0 10px;margin-bottom:10px}
  .mobile-lesson-chip{flex:none;display:flex;align-items:center;gap:7px;border:1px solid #e7e2f2;background:#fff;color:#726d86;border-radius:999px;padding:8px 12px;font-size:11px;font-weight:800;white-space:nowrap}
  .mobile-lesson-chip span{display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#f1edfa;color:#8a73c6;font-size:10px}
  .mobile-lesson-chip.active{background:#795add;color:#fff;border-color:#795add;box-shadow:0 5px 12px #7658d740}
  .mobile-lesson-chip.active span{background:#ffffff2e;color:#fff}
  .mobile-quote-card{display:flex;margin:0}
  .keyboard-scroll-button.visible{display:grid;place-items:center;width:30px;height:30px;border:1px solid #e8e2f4;border-radius:9px;background:#faf8ff;color:#7554d7;font-size:23px;line-height:1}
  .keyboard-scroll-button:disabled{opacity:.35;cursor:default}
}
@media(min-width:901px) and (max-width:1100px){
  .main-content{padding:20px 24px 28px}
  .content-grid{grid-template-columns:minmax(0,1fr) 245px}
  .context-column{grid-template-columns:1fr}
}
@media(min-width:621px) and (max-width:900px){
  .topbar{display:none}
  .main-content{padding:19px 23px 32px}
  .welcome{margin-bottom:14px}
  .welcome h1{font-size:23px}
  .learning-column{gap:13px}
  .lesson-hero{min-height:148px}
  .hero-copy{padding:20px 24px}
  .hero-copy h2{font-size:21px}
  .hero-copy p{margin-bottom:10px}
  .practice-card{padding:19px 22px 15px}
  .staff-paper{height:174px}
  .staff-paper svg{height:170px}
  .keyboard-card{margin-top:0;padding:15px 20px 10px}
  .piano-keyboard,.white-key{height:125px}
  .black-key{height:78px}
  .context-column{margin-top:18px;gap:13px}
  .mobile-quote-card{align-self:stretch;grid-column:1/-1}
}
@media(min-width:621px) and (max-width:1100px) and (max-height:850px){
  .topbar,.welcome{display:none}
  .main-content{padding-top:12px}
  .lesson-hero{min-height:86px}
  .hero-copy{padding:12px 18px}
  .hero-copy p{display:none}
  .hero-copy h2{font-size:18px;margin:3px 0 6px}
  .hero-copy .primary-button{padding:7px 11px}
  .staff-paper{height:145px}
  .staff-paper svg{height:142px}
  .piano-keyboard,.white-key{height:108px}
  .black-key{height:68px}
}
@media(max-width:620px){
  .sidebar{position:sticky;top:0;z-index:40;padding:8px 12px 7px;background:#fff}
  .brand{margin:0 0 6px;gap:8px}
  .brand-mark{width:31px;height:31px;border-radius:10px;font-size:20px}
  .brand strong{font-size:15px}
  .brand small{display:none}
  .mobile-help-button{right:12px;top:8px;width:31px;height:31px;font-size:17px}
  .side-nav{gap:3px}
  .nav-item{padding:7px 10px;font-size:11px;border-radius:9px}
  .nav-icon{font-size:16px;width:15px}
  .topbar,.welcome{display:none}
  .main-content{padding:10px 12px calc(205px + env(safe-area-inset-bottom))}
  .mobile-lesson-strip{gap:6px;margin-bottom:5px;padding-bottom:6px}
  .mobile-lesson-chip{padding:7px 9px;font-size:10px}
  .content-grid{display:block}
  .learning-column{display:flex;flex-direction:column;gap:10px}
  .practice-card{order:1;padding:12px 13px 11px;border-radius:15px}
  .practice-card{scroll-margin-top:94px}
  .practice-header h2{font-size:17px;margin-top:3px}
  .practice-header-controls{gap:5px}
  .round-pill{padding:5px 8px}
  .practice-instruction{font-size:11px;margin:6px 0 3px}
  .staff-paper{height:154px}
  .staff-paper svg{height:150px}
  .feedback{font-size:10px;padding:7px 9px;min-height:34px}
  .practice-actions{margin-top:7px;gap:5px}
  .soft-button{padding:8px 9px}
  .text-button{padding:7px 2px}
  .keyboard-card{order:2;position:fixed;left:0;right:0;bottom:0;z-index:35;margin:0;padding:9px 12px calc(8px + env(safe-area-inset-bottom));border-radius:16px 16px 0 0;box-shadow:0 -10px 30px #3426622d;border-color:#ded4f5}
  .keyboard-heading{align-items:center}
  .keyboard-heading h2{font-size:14px;margin-top:2px}
  .keyboard-heading .eyebrow{font-size:8px}
  .keyboard-heading-actions{gap:4px}
  .keyboard-heading .note-name-toggle{font-size:9px;gap:4px}
  .keyboard-heading .note-name-toggle input{width:13px;height:13px}
  .keyboard-scroll-button.visible{width:25px;height:25px;font-size:19px}
  .keyboard-scroller{padding:8px 1px 3px}
  .piano-keyboard,.white-key{height:101px}
  .black-key{height:64px}
  .key-label{font-size:9px;bottom:7px}
  .black-key .key-label{font-size:7px;bottom:5px}
  .key-shortcut{display:none}
  .keyboard-footnote{font-size:9px;margin:4px 0 0}
  .lesson-hero{order:3;min-height:0}
  .hero-copy{max-width:100%;padding:15px 17px}
  .hero-copy h2{font-size:18px;margin:5px 0 4px}
  .hero-copy p{font-size:11px;margin-bottom:10px}
  .hero-art{opacity:.12;width:65%}
  .context-column{display:grid;grid-template-columns:1fr;gap:10px;margin-top:10px}
  .settings-card{grid-column:auto}
  .today-card,.tip-card,.settings-card{padding:15px}
  .mobile-quote-card{margin:0}
  .help-dialog{max-height:85dvh;overflow-y:auto}
}
@media(max-width:620px) and (max-height:650px){
  .staff-paper{height:128px}
  .staff-paper svg{height:125px}
  .piano-keyboard,.white-key{height:86px}
  .black-key{height:55px}
  .main-content{padding-bottom:180px}
}

/* A restrained piano case and tactile keys keep the exercise easy to read. */
.keyboard-scroller{
  position:relative;
  background:linear-gradient(180deg,#414256 0,#242636 7px,#171924 15px,#292a3a 100%);
  border:1px solid #323448;
  border-radius:11px;
  box-shadow:inset 0 1px 1px #ffffff40,inset 0 -3px 6px #090a1559,0 6px 14px #2a25402b;
}
.white-key,.black-key{transition:transform .11s ease,background .14s ease,box-shadow .14s ease,border-bottom-width .11s ease}
.white-key{
  background:linear-gradient(90deg,#e6e4e8 0%,#fff 7%,#fdfdfd 55%,#f1f0f3 94%,#d9d7df 100%);
  border-color:#c7c4cd;
  border-bottom:6px solid #d4d1d8;
  box-shadow:inset 0 2px 2px #fff,inset -2px 0 3px #a9a5b63b,1px 4px 5px #0c0d1859;
  color:#635e70;
}
.white-key::after{
  content:"";position:absolute;top:2px;left:4px;right:4px;height:29%;
  border-radius:0 0 12px 12px;background:linear-gradient(180deg,#ffffffa8,#ffffff00);
  pointer-events:none;
}
.white-key:hover{background:linear-gradient(90deg,#e9e2fc,#fff 12%,#faf7ff 72%,#e8e0fa)}
.white-key.target-key{background:linear-gradient(90deg,#ded2fa,#fbf9ff 11%,#f0eaff 80%,#d9c9f5);border-bottom-color:#b6a1e7}
.white-key.active,.white-key.active:hover{
  transform:translateY(3px);
  background:linear-gradient(90deg,#d9c9f6,#eee6ff 16%,#e5d9ff 82%,#c9b5ed);
  border-bottom-width:3px;border-bottom-color:#a78cdb;
  box-shadow:inset 0 4px 8px #6a4ea841,0 2px 3px #0808176b;
}
.black-key{
  background:linear-gradient(90deg,#0c0d15 0%,#37394a 13%,#242635 45%,#0d0f1a 92%,#080911);
  border:1px solid #0b0c14;border-bottom:5px solid #090a12;
  box-shadow:inset 1px 2px 2px #ffffff36,inset -3px 0 3px #0008,2px 5px 7px #05050bb3;
  color:#f4ecff;
}
.black-key::after{
  content:"";position:absolute;top:5px;left:5px;right:5px;height:34%;
  border-radius:2px 2px 7px 7px;background:linear-gradient(180deg,#ffffff3d,#ffffff00);
  pointer-events:none;
}
.black-key:hover{background:linear-gradient(90deg,#171322,#574772 16%,#332b46 75%,#171320)}
.black-key.target-key{background:linear-gradient(90deg,#49346d,#9d7fd8 17%,#6b4da6 76%,#372752);border-bottom-color:#3d2b62}
.black-key.active,.black-key.active:hover{
  transform:translateY(3px);
  background:linear-gradient(90deg,#44316a,#9470d4 19%,#66469d 78%,#30234b);
  border-bottom-width:2px;border-bottom-color:#2a1e46;
  box-shadow:inset 0 3px 6px #2113358c,1px 2px 3px #05050bbb;
}
@media(prefers-reduced-motion:reduce){.white-key,.black-key{transition:none}}
