@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&display=swap');

:root {
  font-family: 'Nunito', 'Trebuchet MS', sans-serif;
  color: #253b38;
  background: #f7f7f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --teal: #147d78;
  --teal-dark: #0e6864;
  --teal-light: #e8f4ef;
  --ink: #253b38;
  --muted: #7e9089;
  --paper: #fbf8f0;
  --cream: #f4e8cf;
  --line: #e9ede8;
  --shadow: 0 18px 48px rgba(41, 70, 60, .065);
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; background: #f7f7f2; }
button, a { font: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid rgba(20, 125, 120, .32); outline-offset: 3px; }
.page-wash { position: fixed; z-index: -1; top: 0; left: 0; width: 100%; height: 315px; background: linear-gradient(115deg, #edf5ef 0%, #f4f1e6 66%, #f8f7f0 100%); }
.page-wash::after { content: ''; position: absolute; right: -100px; top: -180px; width: 490px; height: 490px; border-radius: 50%; border: 1px solid rgba(20, 125, 120, .07); box-shadow: 0 0 0 44px rgba(20, 125, 120, .025), 0 0 0 90px rgba(20, 125, 120, .018); }
.app-shell { width: min(1240px, calc(100% - 72px)); margin: 0 auto; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(89, 122, 107, .13); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; color: var(--teal); border-radius: 13px; background: #dceee5; transform: rotate(-4deg); }
.brand-mark svg { width: 28px; height: 28px; }
.brand-copy { display: grid; gap: 0; }
.brand-copy strong { font-size: 19px; font-weight: 900; letter-spacing: -.6px; line-height: 1.1; }
.brand-copy small { margin-top: 4px; color: #8b9991; font-size: 8px; font-weight: 900; letter-spacing: 1.45px; }
.topbar-right { display: flex; align-items: center; gap: 24px; }
.top-note { color: #798981; font-size: 12px; font-weight: 700; }
.sparkle { margin-right: 5px; color: #d19a4e; font-size: 14px; }
.device-chip { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 9px 13px; color: #71847d; background: rgba(255,255,255,.7); border: 1px solid rgba(97, 129, 113, .12); font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-dot { width: 7px; height: 7px; display: inline-block; flex: 0 0 auto; border-radius: 50%; background: #c4cdc7; }
.page-content { padding: 37px 0 22px; }
.welcome-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 0 0 26px; }
.eyebrow, .micro-label, .midi-label { margin: 0; color: #7b9690; font-size: 9px; font-weight: 900; letter-spacing: 1.6px; }
.welcome-row h1 { margin: 8px 0 5px; color: #29423d; font-size: clamp(29px, 4vw, 42px); font-weight: 900; letter-spacing: -1.8px; line-height: 1.1; }
.welcome-row h1 span { color: var(--teal); }
.welcome-copy { margin: 0; color: #7b8b84; font-size: 13px; font-weight: 600; }
.date-note { display: flex; align-items: center; gap: 10px; padding: 10px 15px 10px 10px; border: 1px solid rgba(174, 143, 95, .14); border-radius: 14px; background: rgba(255, 252, 243, .8); margin-bottom: 2px; white-space: nowrap; }
.date-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; background: #f2e5c9; color: #b1803e; font-size: 21px; }
.date-note strong, .date-note small { display: block; }
.date-note strong { color: #635746; font-size: 11px; font-weight: 900; }
.date-note small { margin-top: 2px; color: #9b917f; font-size: 10px; font-weight: 600; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 22px; }
.practice-card, .progress-card, .midi-card, .how-card { border: 1px solid rgba(58, 90, 74, .08); border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: var(--shadow); }
.practice-card { min-width: 0; padding: 22px 27px 17px; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.lesson-tag { display: flex; align-items: center; gap: 8px; color: #8a9a93; font-size: 9px; font-weight: 900; letter-spacing: 1.1px; }
.lesson-icon { display: grid; place-items: center; width: 24px; height: 24px; color: var(--teal); border-radius: 8px; background: #e7f3ee; font-size: 15px; }
.tag-divider { color: #d0d9d3; }
.sound-button { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid #e7eeea; border-radius: 10px; background: #fbfdfb; color: #779089; font-size: 10px; font-weight: 800; cursor: pointer; transition: .18s ease; }
.sound-button:hover { border-color: #b9d8cb; color: var(--teal); }
.sound-button svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.sound-button[aria-pressed="false"] { color: #a2aaa5; background: #f6f7f5; }
.exercise-heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-top: 20px; }
.micro-label { font-size: 8px; letter-spacing: 1.35px; }
.exercise-heading h2 { margin: 4px 0 0; color: #2d4640; font-size: 23px; font-weight: 900; letter-spacing: -.7px; }
.round-count { margin-bottom: 3px; padding: 6px 9px; border-radius: 7px; background: #f6f4ed; color: #a18c67; font-size: 8px; font-weight: 900; letter-spacing: 1px; }
.staff-wrap { margin-top: 18px; }
.staff-paper { position: relative; overflow: hidden; border: 1px solid #f0eee6; border-radius: 16px; background: linear-gradient(180deg, #fffefa 0%, #fffdf8 100%); }
.staff-paper::before, .staff-paper::after { content: ''; position: absolute; width: 165px; height: 165px; border-radius: 50%; pointer-events: none; }
.staff-paper::before { top: -120px; right: 4%; border: 1px solid rgba(212, 176, 120, .13); box-shadow: 0 0 0 16px rgba(212, 176, 120, .045); }
.staff-paper::after { bottom: -145px; left: 13%; border: 1px solid rgba(20, 125, 120, .08); }
#staff-svg { display: block; width: 100%; min-height: 176px; max-height: 204px; position: relative; z-index: 1; }
.staff-line { stroke: #83938b; stroke-width: 1.4; opacity: .72; }
.ledger-line { stroke: #82928a; stroke-width: 1.5; opacity: .8; }
.clef { fill: #50867b; font-family: 'Noto Music', 'Bravura', 'Segoe UI Symbol', serif; font-size: 83px; }
.clef-mark { fill: #75938a; font-size: 8px; font-weight: 900; letter-spacing: 1.3px; }
.note-head { fill: #167d75; stroke: #0e6963; stroke-width: 1.2; }
.note-stem { stroke: #176f68; stroke-width: 2.6; stroke-linecap: round; }
.note-glow { fill: #b3ddd1; opacity: .35; }
.staff-caption { position: absolute; bottom: 9px; right: 13px; z-index: 2; color: #b0b4a8; font-size: 8px; font-weight: 800; letter-spacing: .8px; }
.answer-prompt { display: flex; align-items: center; gap: 10px; margin: 17px 0 11px; color: #9aa49c; font-size: 10px; font-weight: 800; text-align: center; }
.prompt-line { height: 1px; flex: 1; background: #eff1ec; }
.answer-grid { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 8px; }
.answer-button { min-width: 0; min-height: 50px; padding: 6px 4px 5px; border: 1px solid #e9eeea; border-radius: 12px; background: #fff; cursor: pointer; transition: transform .15s, border-color .15s, background .15s, box-shadow .15s; }
.answer-button strong, .answer-button small { display: block; }
.answer-button strong { color: #47615a; font-size: 12px; font-weight: 900; }
.answer-button small { margin-top: 1px; color: #a3afa8; font-size: 8px; font-weight: 700; }
.answer-button:hover:not(:disabled) { transform: translateY(-2px); border-color: #9ecbc0; background: #f5fbf8; box-shadow: 0 5px 12px rgba(34, 103, 85, .08); }
.answer-button:disabled { cursor: default; }
.answer-button.correct { border-color: #6db89b; color: #177856; background: #eaf7ef; box-shadow: 0 0 0 2px rgba(92, 177, 141, .11); }
.answer-button.incorrect { border-color: #e9b7a9; color: #ab5947; background: #fff1ec; }
.answer-button.octave-mismatch { border-color: #d9b96f; color: #896d39; background: #fbf3df; box-shadow: 0 0 0 2px rgba(217,185,111,.12); }
.feedback { display: flex; align-items: center; gap: 9px; min-height: 38px; margin-top: 12px; padding: 7px 11px; border-radius: 10px; background: #f7f8f3; color: #81918a; font-size: 10px; font-weight: 700; line-height: 1.4; }
.feedback-icon { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; border-radius: 7px; background: #eeeddf; color: #ac9861; font-size: 13px; }
.feedback.correct { background: #eef8f1; color: #4b8068; }
.feedback.correct .feedback-icon { color: #27835f; background: #dcefe2; }
.feedback.incorrect { background: #fff4f0; color: #986658; }
.feedback.incorrect .feedback-icon { color: #be6c56; background: #f7e4db; }
.practice-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 12px; }
.keyboard-hint { color: #a0aaa3; font-size: 9px; font-weight: 700; }
kbd { display: inline-block; padding: 2px 5px; border: 1px solid #e5e9e4; border-bottom-width: 2px; border-radius: 4px; color: #82928b; background: #fbfcfa; font: inherit; font-size: 8px; }
.next-button { display: inline-flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 10px; background: var(--teal); color: #fff; cursor: pointer; font-size: 10px; font-weight: 900; transition: .18s ease; }
.next-button:hover { background: var(--teal-dark); transform: translateY(-1px); }
.next-button span:last-child { font-size: 14px; line-height: 10px; }
.side-column { display: grid; gap: 13px; }
.progress-card { padding: 18px 18px 15px; }
.side-heading { display: flex; align-items: center; gap: 8px; }
.side-heading h2 { margin: 0; color: #425b54; font-size: 13px; font-weight: 900; }
.side-heading-icon, .how-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; color: #b08e53; background: #f7f0df; font-size: 12px; }
.progress-numbers { display: flex; align-items: center; gap: 12px; margin: 16px 0 13px; }
.progress-numbers > div:first-child, .progress-numbers > div:nth-child(3) { display: grid; gap: 0; }
.progress-numbers strong { color: #31635a; font-size: 24px; font-weight: 900; line-height: 1; letter-spacing: -1px; }
.progress-numbers span { margin-top: 4px; color: #9aa59e; font-size: 9px; font-weight: 700; }
.number-divider { width: 1px; height: 31px; background: #e9eeea; }
.streak-flower { margin-left: auto; color: #deab68; font-size: 32px; opacity: .8; }
.progress-track { height: 6px; overflow: hidden; border-radius: 99px; background: #edf1ec; }
.progress-track span { display: block; width: 0%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#5aab91,#a8cfa9); transition: width .3s ease; }
.progress-caption { display: flex; justify-content: space-between; margin-top: 7px; color: #9aa69e; font-size: 9px; font-weight: 700; }
.midi-card { padding: 17px 18px 15px; background: linear-gradient(140deg,#fff 0%,#f9fcf8 100%); }
.midi-card-top { display: flex; align-items: center; gap: 9px; }
.midi-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; color: #428777; background: #e5f2ea; }
.midi-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.midi-label { font-size: 8px; letter-spacing: 1.1px; }
.midi-card h2 { margin: 12px 0 4px; color: #38544c; font-size: 15px; font-weight: 900; }
.midi-copy { margin: 0; color: #88978f; font-size: 10px; font-weight: 600; line-height: 1.55; }
.midi-status { display: flex; align-items: center; gap: 7px; margin-top: 12px; color: #84928b; font-size: 9px; font-weight: 800; }
.midi-status.connected .status-dot, .device-chip.connected .status-dot { background: #4baa7e; box-shadow: 0 0 0 3px rgba(75,170,126,.12); }
.midi-status.error .status-dot { background: #d37e69; }
.connect-button { display: flex; justify-content: center; align-items: center; gap: 8px; width: 100%; margin-top: 10px; padding: 10px; border: 1px solid #cbded4; border-radius: 10px; color: #257768; background: #edf7f1; cursor: pointer; font-size: 10px; font-weight: 900; transition: .18s ease; }
.connect-button:hover { border-color: #92c4b0; background: #e2f2e9; }
.connect-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.connection-options { margin-top: 12px; padding: 10px; border: 1px solid #e9eeea; border-radius: 12px; background: #fff; }
.connection-options[hidden] { display: none; }
.options-title { margin: 0 0 8px; color: #819189; font-size: 9px; font-weight: 900; }
.connection-option { display: flex; align-items: center; width: 100%; gap: 9px; margin: 5px 0; padding: 9px 8px; border: 1px solid #edf0ec; border-radius: 9px; background: #fff; text-align: left; cursor: pointer; }
.connection-option:hover:not(:disabled) { background: #f5faf7; border-color: #c7e1d6; }
.connection-option:disabled { opacity: .46; cursor: not-allowed; }
.option-icon { display: grid; place-items: center; width: 25px; height: 25px; flex: 0 0 25px; border-radius: 8px; color: #317a6e; background: #e9f4ee; font-size: 16px; }
.connection-option strong, .connection-option small { display: block; }
.connection-option strong { color: #4b625a; font-size: 9px; font-weight: 900; }
.connection-option small { margin-top: 1px; color: #9aa59e; font-size: 8px; font-weight: 700; }
.option-arrow { margin-left: auto; color: #9bb0a7; font-size: 19px; }
.compat-note { margin: 8px 1px 0; color: #929f98; font-size: 8px; line-height: 1.45; }
.midi-footnote { margin: 9px 0 0; color: #a2aaa4; font-size: 8px; line-height: 1.45; }
.how-card { padding: 15px 17px 14px; background: rgba(255,255,255,.76); box-shadow: 0 8px 22px rgba(41,70,60,.035); }
.how-icon { color: #678f79; background: #eaf4eb; font-size: 15px; }
.how-list { display: grid; gap: 10px; list-style: none; padding: 0; margin: 13px 0 0; }
.how-list li { display: flex; align-items: center; gap: 9px; }
.how-list li > span { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 21px; border-radius: 50%; color: #548375; background: #e7f1e9; font-size: 9px; font-weight: 900; }
.how-list p { margin: 0; color: #84928b; font-size: 9px; font-weight: 700; }
.page-footer { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 19px 0 0; color: #a2aaa1; font-size: 10px; font-weight: 700; }
.page-footer span { color: #bb9860; font-size: 15px; }
@media (max-width: 940px) {
  .app-shell { width: min(100% - 42px, 800px); }
  .content-layout { grid-template-columns: minmax(0,1fr) 270px; gap: 15px; }
  .practice-card { padding: 20px 20px 16px; }
  .answer-grid { gap: 5px; }
  .answer-button strong { font-size: 11px; }
  .top-note { display: none; }
}
@media (max-width: 720px) {
  .app-shell { width: calc(100% - 30px); }
  .topbar { min-height: 72px; }
  .brand-mark { width: 37px; height: 37px; }
  .brand-copy strong { font-size: 17px; }
  .brand-copy small { font-size: 7px; }
  .topbar-right { gap: 0; }
  .device-chip { padding: 8px 10px; font-size: 9px; }
  .page-content { padding-top: 27px; }
  .welcome-row { align-items: start; margin-bottom: 19px; }
  .welcome-row h1 { font-size: 31px; }
  .welcome-copy { max-width: 440px; font-size: 11px; line-height: 1.5; }
  .date-note { display: none; }
  .content-layout { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .progress-card { grid-column: 1 / -1; }
  .how-card { min-height: 100%; }
  .how-list { gap: 9px; }
}
@media (max-width: 480px) {
  .app-shell { width: calc(100% - 22px); }
  .topbar { min-height: 66px; }
  .brand { gap: 8px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .brand-mark svg { width: 23px; height: 23px; }
  .brand-copy strong { font-size: 15px; }
  .brand-copy small { letter-spacing: .9px; }
  .device-chip { max-width: 138px; gap: 6px; padding: 7px 8px; font-size: 8px; }
  .device-chip .status-dot { width: 6px; height: 6px; }
  .page-content { padding-top: 22px; }
  .eyebrow { font-size: 8px; }
  .welcome-row h1 { margin-top: 7px; font-size: 28px; letter-spacing: -1.2px; }
  .welcome-copy { font-size: 10px; }
  .practice-card { padding: 16px 13px 13px; border-radius: 17px; }
  .lesson-tag { gap: 5px; font-size: 8px; letter-spacing: .8px; }
  .lesson-icon { width: 21px; height: 21px; }
  .sound-button { gap: 4px; padding: 6px 7px; font-size: 8px; }
  .exercise-heading { margin-top: 16px; }
  .exercise-heading h2 { font-size: 20px; }
  .round-count { padding: 6px 7px; font-size: 7px; }
  .staff-wrap { margin-top: 15px; }
  #staff-svg { min-height: 151px; max-height: 172px; }
  .answer-prompt { gap: 7px; margin-top: 13px; font-size: 9px; }
  .answer-grid { gap: 4px; }
  .answer-button { min-height: 47px; padding: 5px 1px; border-radius: 9px; }
  .answer-button strong { font-size: 10px; }
  .answer-button small { font-size: 7px; }
  .feedback { font-size: 9px; }
  .keyboard-hint { font-size: 8px; }
  .next-button { padding: 8px 9px; font-size: 9px; }
  .side-column { gap: 9px; }
  .progress-card { padding: 14px; }
  .midi-card { padding: 14px 13px; }
  .how-card { padding: 13px 12px; }
  .midi-card h2 { font-size: 13px; }
  .midi-copy { font-size: 9px; }
  .how-list p { font-size: 8px; line-height: 1.35; }
  .how-list { gap: 8px; }
  .page-footer { padding-top: 15px; font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


/* Advanced practice mode */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 16px; padding: 5px; border: 1px solid #e8eee8; border-radius: 13px; background: #f5f8f4; }
.mode-tab { display: grid; grid-template-columns: 31px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 8px 11px; border: 1px solid transparent; border-radius: 10px; color: #86968e; background: transparent; text-align: left; cursor: pointer; transition: .18s ease; }
.mode-tab[aria-selected="true"] { border-color: #e4eee7; background: #fff; color: #31635a; box-shadow: 0 3px 10px rgba(42, 79, 61, .055); }
.mode-number { grid-row: 1 / span 2; display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: #80988b; background: #e8f1e9; font-size: 9px; font-weight: 900; }
.mode-tab[aria-selected="true"] .mode-number { color: #fff; background: var(--teal); }
.mode-title { color: #536b62; font-size: 11px; font-weight: 900; }
.mode-tab[aria-selected="true"] .mode-title { color: #236e65; }
.mode-tab small { margin-top: 1px; color: #9aa69f; font-size: 8px; font-weight: 700; }
.advanced-panel { margin-top: 11px; padding: 13px 15px; border: 1px solid #e8eee7; border-radius: 14px; background: linear-gradient(115deg,#f8fbf7 0%,#fcfaf3 100%); }
.advanced-panel[hidden], .piano-panel[hidden] { display: none; }
.advanced-panel-heading { display: flex; align-items: center; gap: 9px; }
.advanced-star { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; color: #b28d53; background: #f5ecd9; font-size: 13px; }
.advanced-panel-heading strong, .advanced-panel-heading small { display: block; }
.advanced-panel-heading strong { color: #496257; font-size: 11px; font-weight: 900; }
.advanced-panel-heading small { margin-top: 1px; color: #98a59e; font-size: 8px; font-weight: 700; }
.advanced-settings { display: grid; grid-template-columns: 1fr 1.15fr; gap: 12px; margin-top: 12px; }
.setting-group { min-width: 0; }
.setting-label { display: block; margin-bottom: 6px; color: #92a198; font-size: 7px; font-weight: 900; letter-spacing: 1.1px; }
.clef-picker, .dynamic-picker { display: flex; gap: 5px; }
.clef-option, .dynamic-option { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 7px 8px; border: 1px solid #e4ebe5; border-radius: 8px; background: rgba(255,255,255,.75); color: #82948a; cursor: pointer; font-size: 8px; font-weight: 800; transition: .16s ease; }
.clef-option { flex: 1; }
.clef-option[aria-pressed="true"], .dynamic-option.selected { border-color: #9ecaba; color: #246f63; background: #eaf5ee; box-shadow: inset 0 0 0 1px rgba(71,151,124,.06); }
.clef-symbol { color: #53887a; font-family: 'Noto Music','Segoe UI Symbol',serif; font-size: 17px; line-height: 14px; }
.bass-clef-dot { fill: #50867b; }
.dynamic-option { flex: 1; flex-direction: column; gap: 1px; padding: 5px 4px; }
.dynamic-mark { color: #967c4f; font-family: Georgia,serif; font-size: 12px; font-style: italic; font-weight: 700; line-height: 1; }
.dynamic-option.selected .dynamic-mark { color: #267b6d; }
.setting-hint { display: block; margin-top: 5px; color: #9aa69f; font-size: 7px; line-height: 1.35; }
.exercise-tools { display: flex; align-items: center; gap: 7px; }
.hear-note-button { display: inline-flex; align-items: center; gap: 4px; padding: 6px 8px; border: 1px solid #e4eee8; border-radius: 8px; color: #508477; background: #f4faf6; cursor: pointer; font-size: 8px; font-weight: 900; white-space: nowrap; }
.hear-note-button:hover { border-color: #9ecaba; color: #176f65; background: #eaf6ef; }
.hear-note-button span { font-size: 12px; }
.piano-panel { margin-top: 18px; padding-top: 15px; border-top: 1px solid #edf0e9; }
.piano-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 11px; }
.piano-eyebrow { margin: 0 0 2px; color: #99a79f; font-size: 7px; font-weight: 900; letter-spacing: 1.25px; }
.piano-heading-row h3 { margin: 0; color: #3e5a50; font-size: 13px; font-weight: 900; }
.piano-readout { display: inline-flex; align-items: center; gap: 6px; max-width: 55%; padding: 6px 9px; border-radius: 9px; color: #91a098; background: #f6f8f5; font-size: 8px; font-weight: 800; text-align: right; }
.piano-readout.has-note { color: #347563; background: #eaf4ed; }
.readout-dot { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #c5cec8; }
.piano-readout.has-note .readout-dot { background: #4d9f7e; box-shadow: 0 0 0 3px rgba(77,159,126,.11); }
.piano-scroll { overflow-x: auto; overflow-y: hidden; padding: 0 0 7px; border: 1px solid #e8ece6; border-radius: 10px; background: #f5f7f3; scrollbar-color: #c7d7cc #f1f4ef; scrollbar-width: thin; overscroll-behavior-x: contain; }
.piano-keyboard { position: relative; display: flex; align-items: flex-start; width: 1664px; height: 124px; padding: 0 0 5px; background: #fbfcf9; }
.piano-key { position: relative; flex: 0 0 auto; padding: 0; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.piano-key.white { z-index: 1; width: 32px; height: 119px; border-right: 1px solid #c3ccc5; border-bottom: 2px solid #bdc7bf; border-left: 1px solid #e2e7e2; border-radius: 0 0 4px 4px; background: linear-gradient(180deg,#fff 0%,#fdfefb 74%,#f5f7f3 100%); }
.piano-key.black { position: absolute; z-index: 2; top: 0; left: var(--piano-left); width: 24px; height: 78px; border: 1px solid #34453e; border-top: 0; border-radius: 0 0 4px 4px; background: linear-gradient(135deg,#394a43 0%,#1f2e29 74%,#17231f 100%); box-shadow: 0 3px 3px rgba(33,50,42,.22); }
.piano-key.white:hover { background: #f0f8f2; }
.piano-key.black:hover { background: #45665a; }
.piano-key.white.target { border-color: #58a982; background: linear-gradient(180deg,#dff3e6 0%,#b8dec5 100%); }
.piano-key.black.target { border-color: #6bb893; background: linear-gradient(145deg,#579c7b,#26725e); }
.piano-key.white.live { box-shadow: inset 0 -4px 0 #d5a75f; }
.piano-key.black.live { box-shadow: inset 0 -4px 0 #e4bd78,0 3px 3px rgba(33,50,42,.22); }
.piano-key.live.target { outline: 2px solid #d2a252; outline-offset: -2px; }
.key-octave { position: absolute; right: 1px; bottom: 4px; left: 1px; color: #a5afa7; font-size: 6px; font-weight: 800; pointer-events: none; }
.piano-key.target .key-octave, .piano-key.live .key-octave { color: #276f57; }
.piano-key.black.target .key-octave, .piano-key.black.live .key-octave { color: #f1f7f0; }
.piano-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; color: #98a49c; font-size: 7px; font-weight: 700; }
.piano-legend span { display: inline-flex; align-items: center; gap: 5px; }
.piano-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; }
.legend-target { background: #9bccaa; }
.legend-live { background: #ddba78; }
@media (max-width: 720px) {
  .advanced-settings { grid-template-columns: 1fr; gap: 9px; }
  .advanced-panel { padding: 12px; }
  .piano-heading-row { align-items: flex-start; }
  .piano-readout { max-width: 52%; line-height: 1.35; }
}
@media (max-width: 480px) {
  .mode-switch { margin-top: 12px; }
  .mode-tab { column-gap: 6px; padding: 7px 6px; }
  .mode-number { width: 25px; height: 25px; }
  .mode-title { font-size: 10px; }
  .mode-tab small { font-size: 7px; }
  .advanced-panel-heading strong { font-size: 10px; }
  .clef-option { font-size: 8px; }
  .setting-hint { font-size: 7px; }
  .exercise-heading { align-items: center; }
  .exercise-heading h2 { font-size: 18px; }
  .exercise-tools { gap: 4px; }
  .hear-note-button { gap: 2px; padding: 6px 5px; font-size: 7px; }
  .round-count { font-size: 6px; }
  .piano-heading-row h3 { font-size: 11px; }
  .piano-readout { font-size: 7px; padding: 5px 6px; }
  .piano-legend { gap: 8px; font-size: 6px; }
}
