@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--bg:#f5f4ef;--paper:#fffefa;--ink:#243537;--muted:#687677;--teal:#227b79;--line:#e2e5de;--tint:#e8f1ec;--amber:#9b6418}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:'DM Sans',system-ui,sans-serif;font-size:14px}button,select,input{font:inherit}button,select{cursor:pointer}button{transition:background .15s,transform .15s}button:hover{filter:brightness(.96)}button:active{transform:translateY(1px)}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #c29748;outline-offset:3px}[hidden]{display:none!important}header{height:86px;background:#213638;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 max(24px,calc((100vw - 1380px)/2));gap:20px}.brand{color:#fff;text-decoration:none;display:flex;align-items:center;gap:12px;font:700 23px 'Manrope',sans-serif;letter-spacing:-.8px}.brandmark{color:#c5dece;border:1px solid #526b66;border-radius:12px;width:43px;height:43px;display:grid;place-items:center;font-size:30px}.brand-sub{display:block;font:500 9px 'DM Sans',sans-serif;letter-spacing:4.3px;color:#b8cac6;margin-top:3px}nav{display:flex;height:100%;gap:14px}nav button{background:none;border:0;color:#bac9c5;padding:0 20px;font-weight:600;border-bottom:3px solid transparent}nav button.active{border-color:#99c6b1;color:white}.connection{border:1px solid #657b78;border-radius:8px;color:#e7efeb;background:#31494a;padding:11px 15px;font-size:12px}main{max-width:1380px;margin:auto;padding:36px 28px 0}.page-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#6f817b;margin:0 0 12px}h1,h2,h3,p{margin-top:0}h1{font:700 29px 'Manrope',sans-serif;letter-spacing:-1.1px;margin-bottom:10px}h2{font:700 21px 'Manrope',sans-serif;margin-bottom:8px}h3{font-size:14px;font-weight:700;margin:0}.muted{color:var(--muted);line-height:1.65}.page-title p:last-child{margin-bottom:0}.level-badge{display:flex;align-items:center;gap:10px;color:#668373;font-size:26px}.level-badge span{font-size:12px}.layout{display:grid;grid-template-columns:255px minmax(0,1fr);gap:26px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:14px;box-shadow:0 3px 12px #263a3211}.controls{padding:24px 20px}label{display:block;font-size:12px;font-weight:600;color:#4d6160}select{width:100%;padding:10px 30px 10px 11px;margin-top:7px;background:#fffefa;color:var(--ink);border:1px solid #d8ded6;border-radius:7px;min-height:39px}label+label{margin-top:19px}.divider{height:1px;background:var(--line);margin:23px 0}.check{display:flex;align-items:center;gap:7px;font-weight:400;font-size:12px;line-height:1.5}.check input{accent-color:var(--teal);height:15px;width:15px;flex-shrink:0;margin:0}.controls .check{margin-top:18px}.controls small{display:block;margin-top:7px;font-size:10px}.tip{padding:17px 14px 4px;background:#eef1e7;border-radius:9px;margin-top:24px}.tip span{font-size:9px;letter-spacing:1.6px;color:#667851;font-weight:700}.tip p{font-size:12px;line-height:1.7;color:#607059;margin-top:9px}.midi-panel{padding:20px;margin-top:19px}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.midi-panel p{font-size:12px;margin:12px 0}.fine{font-size:10px;color:#78827d;line-height:1.6}.dot{width:8px;height:8px;border-radius:100%;background:#b8c1b8}.dot.connected{background:#229760}.chord-panel{padding:27px 30px 17px}.chord-heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:28px}.chord-symbol{font:800 clamp(43px,5.5vw,70px) 'Manrope',sans-serif;letter-spacing:-3px;line-height:1.1;margin-bottom:8px}.chord-name{font-size:16px;color:#5b6d68;margin-bottom:14px}.note-chips{display:flex;gap:8px}.note-chips>span{border-radius:6px;padding:6px 11px;background:#e9f1eb;color:#3b6e62;font-weight:700;font-size:13px}.chord-actions{display:grid;gap:10px}.primary,.secondary{border-radius:8px;padding:11px 19px;font-weight:600;font-size:12px;min-height:41px}.primary{background:var(--teal);border:1px solid var(--teal);color:#fff}.secondary{background:transparent;border:1px solid #cdd8cf;color:#45655c}.text-button{color:var(--teal);background:none;border:0;padding:5px;font-size:12px;font-weight:600}.piano-heading{display:flex;gap:12px;align-items:center;margin-bottom:13px;min-height:25px}.piano-heading .muted{font-size:12px}.piano-heading button{margin-left:auto}.piano-wrap{position:relative;height:139px;overflow-x:auto;overflow-y:hidden;padding-bottom:19px}.piano{position:relative;height:117px;min-width:540px;isolation:isolate;border-radius:5px;border:1px solid #35413c;overflow:hidden;background:#282f2c;touch-action:manipulation}.key{position:absolute;top:0;padding:0;border-radius:0 0 4px 4px;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;font-weight:600}.key.white{height:100%;z-index:1;background:linear-gradient(#fff,#faf9f3);border:1px solid #9ca59b;border-top:0;color:#68756a;padding-bottom:9px}.key.black{height:63%;z-index:3;background:linear-gradient(90deg,#222b28,#3d4740 55%,#17211c);border:1px solid #111a15;box-shadow:0 4px 1px #0008;color:white;padding-bottom:8px}.key.white.lit{background:linear-gradient(#cbe2d4,#82baa7);color:#214f40}.key.black.lit{background:linear-gradient(#5eaf96,#2c7e66)}.key.white.played{background:linear-gradient(#c6e4df,#77bfb8);color:#164f4c}.key.black.played{background:#267f79}.key.wrong{background:linear-gradient(#f8b8b5,#de625f)!important;color:#681e1b!important;box-shadow:inset 0 -4px 0 #b62f2a}.key.black.wrong{background:linear-gradient(#b73937,#7d1d20)!important;color:#fff!important}.key .note{font-size:10px}.finger{position:absolute;top:12px;background:#385d50;color:white;border:2px solid #f8f9f3;border-radius:50%;width:21px;height:21px;display:grid;place-items:center;font-size:10px}.black .finger{width:17px;height:17px;font-size:9px;top:8px}.between{display:flex;align-items:center;justify-content:space-between;margin:2px 0 20px;font-size:12px;color:#7a867d}.arrow{font-size:18px;color:#81a18c}.feedback{background:#edf2e9;color:#4d6954;border:1px solid #dce6d8;padding:12px 14px;border-radius:7px;margin-top:8px;font-size:12px}.feedback.success{background:#e2f2e7;color:#256646;border-color:#b7dbbf}.feedback.warning{background:#fff3df;color:#8a5b17;border-color:#eed9b3}.lesson-footer{display:flex;justify-content:space-between;align-items:center;gap:10px;padding-top:14px}.lesson-footer .muted{font-size:11px}.transport{margin-top:19px;padding:20px 23px;display:flex;justify-content:space-between;align-items:center;gap:22px}.tempo-block{min-width:140px;flex:1}.tempo-block label{display:flex;justify-content:space-between;align-items:center;font-size:9px;letter-spacing:1px}.tempo-block strong{font-size:21px;letter-spacing:-.6px;color:var(--ink)}.tempo-block strong small{font-size:9px;letter-spacing:0;color:#798679}input[type=range]{width:100%;accent-color:var(--teal);margin-top:12px}.transport-options{display:flex;gap:12px;flex:1.5}.transport-options label{flex:1;font-size:10px;min-width:100px}.transport-options label+label{margin-top:0}.transport-options select{font-size:11px}.play-controls{display:grid;grid-template-columns:1fr auto;align-items:center;gap:8px 14px}.play-controls button{grid-column:1/3}.beat-dots{display:flex;gap:5px}.beat-dots i{height:6px;width:6px;border-radius:50%;background:#dbe0d6}.beat-dots i.on{background:var(--teal);box-shadow:0 0 0 3px #227b7920}.transport-status{text-align:center;font-size:11px;color:#758374;padding:11px 0;margin-bottom:16px}.learning-strip{display:flex;gap:22px;justify-content:space-between;margin-bottom:30px}.learning-strip>div{display:flex;gap:10px;align-items:flex-start;flex:1}.step-number{color:#8d9e8b;font-size:11px;padding-top:3px}.learning-strip p{margin:0}.learning-strip strong{display:block;font-size:11px;color:#51624f}.learning-strip small{display:block;font-size:10px;color:#818b7c;margin-top:5px;line-height:1.5}footer{border-top:1px solid var(--line);padding:19px 0 23px;font-size:11px;color:#829080;display:flex;justify-content:space-between}.builder{padding:23px;margin-bottom:20px}.builder .section-heading select{max-width:180px;margin:0}.builder .muted{font-size:12px;margin-bottom:15px}.chord-cards{display:flex;gap:9px;overflow-x:auto;padding-bottom:10px}.chord-card{min-width:115px;border:1px solid #dce3d7;background:#f3f6ee;border-radius:9px;position:relative;padding:13px 23px 12px 12px;cursor:pointer;flex-shrink:0}.chord-card.active{background:#e0eee6;border-color:#78a88d;box-shadow:inset 0 0 0 1px #78a88d}.chord-card strong{display:block;font:700 22px 'Manrope',sans-serif;letter-spacing:-1px}.chord-card small{font-size:9px;display:block;color:#687a68;margin-top:7px}.remove-chord{position:absolute;right:2px;top:1px;border:0;background:none;color:#849380;font-size:16px}.builder-add{display:flex;gap:7px;align-items:center;flex-wrap:wrap}.builder-add select{width:auto;flex:1;min-width:72px;margin:0;font-size:11px}.builder-add button{font-size:11px;padding:9px 12px}.save-row{display:flex;gap:12px;align-items:center;flex-wrap:wrap;margin-top:12px}.save-row button{font-size:11px}.key:hover{filter:brightness(.94)}
.transport{flex-wrap:wrap}.transport-options{flex:2;flex-wrap:wrap}.transport-options label:first-child{min-width:170px}.play-controls{display:flex;flex-wrap:wrap;gap:12px;flex-basis:100%;border-top:1px solid var(--line);padding-top:14px}.play-controls button{margin-left:auto;min-width:160px}.auto-playing .key.lit{box-shadow:inset 0 -5px 0 #227b79}.transport-status{line-height:1.7}
@media(min-width:1450px){main{padding-top:44px}.chord-panel{padding:32px 36px 20px}.piano-wrap{height:155px}.piano{height:134px}.chord-heading{margin-bottom:32px}}
@media(max-width:1050px){.layout{grid-template-columns:210px minmax(0,1fr);gap:18px}.transport{flex-wrap:wrap}.play-controls{display:flex;width:100%;justify-content:space-between}.play-controls button{margin-left:auto}.chord-panel{padding:23px 20px}.controls{padding:20px 16px}.level-badge{display:none}header{padding:0 22px}nav{gap:0}nav button{padding:0 15px}.learning-strip{gap:12px}}
@media(max-width:720px){header{height:auto;min-height:82px;padding:15px 18px 0;flex-wrap:wrap;gap:12px}.brand{font-size:20px}.brandmark{width:35px;height:35px}.connection{font-size:10px;padding:9px}nav{order:3;width:100%;justify-content:center;height:45px}nav button{flex:1}main{padding:24px 14px 0}h1{font-size:25px}.page-title{margin-bottom:20px}.page-title .muted{font-size:12px}.layout{display:flex;flex-direction:column}.controls{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px}.controls>.eyebrow{grid-column:1/3;margin-bottom:0}.controls label+label,.controls .check{margin:0}.controls .divider,.controls>.muted{display:none}.controls .tip{grid-column:1/3;margin-top:0;padding-top:12px}.controls .tip p{margin:5px 0 8px}.midi-panel{padding:13px 17px;margin-top:12px}.midi-panel p{margin:5px 0}.midi-panel .fine{display:none}.workspace{min-width:0}.chord-symbol{font-size:48px}.chord-actions{gap:8px}.chord-actions button{font-size:10px;padding:10px}.chord-panel{padding:21px 15px 14px}.chord-name{font-size:13px}.piano-heading{gap:7px;flex-wrap:wrap}.piano-heading h3{font-size:12px}.piano-heading .muted{font-size:10px}.piano{min-width:470px}.piano-wrap{height:136px}.transport{padding:18px 15px;gap:14px}.tempo-block{width:100%;flex:auto}.transport-options{width:100%;flex:auto}.learning-strip{flex-direction:column;gap:13px;margin-top:22px}.learning-strip>div{gap:13px}.learning-strip small{margin-top:2px}.builder{padding:18px 14px}.builder h2{font-size:18px}.builder .section-heading select{max-width:140px;font-size:11px}.builder-add button{flex:1}footer span{display:none}.lesson-footer{align-items:flex-start}.note-chips{gap:5px}.note-chips>span{padding:5px 8px;font-size:12px}}

.key-legend{display:flex;align-items:center;gap:6px;font-size:10px;color:#687677;margin:1px 0 12px}.legend-correct{color:#227b79}.legend-wrong{color:#be3834;margin-left:12px}

/* Keep transport checkboxes evenly spaced without inherited label margins. */
.play-controls{justify-content:flex-start}
.transport-checks{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;gap:12px 18px;flex:1 1 470px}
.transport-checks .check{margin:0;min-height:32px;align-items:center}
@media(max-width:720px){.transport-checks{grid-template-columns:1fr;flex-basis:100%;gap:6px}.play-controls .beat-dots{margin-right:auto}.play-controls button{margin-left:0}}

/* Learn: keep each chord-tone interval directly beneath its note. */
.note-chips{flex-wrap:wrap}
.tone-chip{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:29px;text-align:center;line-height:1.3}
.tone-name{font-weight:700}
.tone-interval{font-size:11px;font-weight:600;color:#456b60;white-space:nowrap}
.learn-formula{max-width:390px;margin-top:12px}
.learn-formula p{font-size:11px;line-height:1.6;margin:0 0 5px}
.learn-formula #chordFormula{font-weight:600;color:#45655c}
.chord-tone-row{display:inline-flex;align-items:center;flex-wrap:wrap;gap:8px}
.key .note{display:flex;flex-direction:column;align-items:center;gap:2px;line-height:1.2}
.key-interval{font-size:9px;font-weight:600;color:inherit}
@media(max-width:720px){.chord-heading{gap:12px;align-items:flex-start}.learn-formula{max-width:100%}.chord-tone-row{gap:5px}.chord-tone-row .tone-chip{min-width:22px}.learn-tones>span{padding:5px 8px}.learn-formula p{font-size:10px}}

footer a{color:var(--teal);text-underline-offset:3px}footer a:hover{text-decoration-thickness:2px}
