.chords-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:30px; }
.hero-note { padding:14px 18px; color:#125f9e; background:#e3f3ff; border:1px solid #bddff5; border-radius:18px; font-size:13px; font-weight:850; }
.inline-midi-button { display:inline; margin:0 2px; padding:2px 8px; cursor:pointer; color:#075f9f; background:#e7f5ff; border:1px solid #7bc3f1; border-radius:8px; font:inherit; font-weight:850; line-height:1.35; vertical-align:baseline; box-shadow:0 2px 8px rgba(36,147,239,.12); }
.inline-midi-button:hover { color:#fff; background:var(--blue); border-color:var(--blue); }
.inline-midi-button:focus-visible { outline:3px solid rgba(36,147,239,.28); outline-offset:2px; }
.inline-midi-button:disabled { cursor:not-allowed; color:#7b8797; background:#edf1f5; border-color:#cfd7e0; box-shadow:none; }
.chords-trainer { position:relative; }
.trainer-heading-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px; }
.reference-link { min-height:40px; padding-inline:15px; font-size:12px; }
.resume-card { display:flex; align-items:center; justify-content:space-between; gap:18px; margin-bottom:18px; padding:17px 19px; border:1px solid #b8ddf5; border-radius:16px; background:#eff9ff; }
.resume-card p { margin:4px 0 0; color:var(--muted); font-size:13px; }
.resume-card > div:last-child { display:flex; flex-wrap:wrap; gap:8px; }
.chords-settings .settings-content { border-top:1px solid var(--line); background:#fbfcfe; }
.settings-columns { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.setting-field { min-width:0; padding:18px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); }
.setting-field:nth-child(4n) { border-right:0; }
.setting-field h3 { margin-bottom:11px; font-size:13px; }
.setting-row { display:grid; gap:6px; margin-top:10px; color:var(--muted); font-size:12px; }
.setting-row select, .setting-row input[type="number"] { width:100%; min-height:42px; padding:0 10px; color:var(--ink); background:#fff; border:1px solid #ccd6e2; border-radius:10px; }
.setting-hint { clear:both; margin:10px 0 0; color:var(--muted); font-size:11px; }
.custom-count { width:100%; min-height:42px; margin-top:8px; padding:0 10px; border:1px solid #ccd6e2; border-radius:10px; }
.count-control { display:flex; flex-wrap:wrap; gap:7px; }
.text-action { padding:0; cursor:pointer; color:var(--blue-dark); background:none; border:0; text-decoration:underline; text-underline-offset:3px; font-weight:800; }
.midi-device { display:grid; gap:6px; margin-top:10px; color:var(--muted); font-size:12px; }
.midi-device select { min-height:40px; padding:0 9px; border:1px solid #ccd6e2; border-radius:10px; background:#fff; }
.midi-status { margin:9px 0 0; color:var(--success); font-size:11px; }
.midi-status.error { color:var(--error); }
.learning-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.level-switcher { position:relative; display:grid; grid-template-columns:auto 42px minmax(190px,1fr) 42px; align-items:center; gap:7px; flex:1 1 420px; }
.level-caption { color:var(--muted); font-size:11px; font-weight:800; }
.level-arrow, .level-current { min-height:46px; cursor:pointer; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:12px; }
.level-current { display:flex; align-items:center; justify-content:center; gap:9px; padding:7px 13px; text-align:left; }
.level-current strong { color:var(--blue-dark); }
.level-current span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.level-current svg { width:17px; flex:none; }
.volume-control { display:flex; align-items:center; gap:8px; color:var(--muted); font-size:11px; }
.volume-control svg { width:22px; }
.volume-control input { width:105px; accent-color:var(--blue); }
.session-controls { display:flex; gap:8px; }
.level-popover { position:absolute; z-index:25; left:30px; right:30px; max-height:min(70vh,680px); overflow:auto; margin-top:-8px; padding:20px; border:1px solid var(--line); border-radius:20px; background:#fff; box-shadow:0 24px 70px rgba(11,19,36,.22); }
.level-popover[hidden] { display:none; }
.popover-heading { position:sticky; z-index:2; top:-20px; display:flex; justify-content:space-between; align-items:center; margin:-20px -20px 16px; padding:17px 20px; background:#fff; border-bottom:1px solid var(--line); }
.popover-close { width:38px; height:38px; cursor:pointer; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:23px; }
.curriculum-list { display:grid; gap:14px; }
.curriculum-group { padding:16px; border:1px solid var(--line); border-radius:16px; background:#fbfcfe; }
.curriculum-group h3 { margin-bottom:4px; font-size:16px; }
.curriculum-group > p { margin-bottom:12px; color:var(--muted); font-size:12px; }
.curriculum-steps { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.curriculum-step { min-height:60px; padding:9px 11px; cursor:pointer; text-align:left; color:var(--ink); background:#fff; border:1px solid var(--line); border-radius:12px; }
.curriculum-step strong, .curriculum-step small { display:block; }
.curriculum-step strong { color:var(--blue-dark); font-size:12px; }
.curriculum-step small { margin-top:3px; color:var(--muted); }
.curriculum-step.selected { background:#eaf7ff; border-color:#79c2ef; box-shadow:inset 0 0 0 1px rgba(36,147,239,.13); }
.curriculum-step.exam { border-style:dashed; }
.curriculum-step.completed::after { content:"✓"; float:right; margin-top:-27px; color:var(--success); font-weight:900; }
.lesson-description { margin:0 0 18px; border:1px solid var(--line); border-radius:15px; background:#fbfcfe; }
.lesson-description summary { position:relative; padding:15px 45px 15px 16px; cursor:pointer; list-style:none; font-weight:850; }
.lesson-description summary::-webkit-details-marker { display:none; }
.description-chevron { position:absolute; right:17px; color:var(--blue); }
.lesson-description > div { padding:0 16px 16px; color:#4f5d73; font-size:14px; }
.lesson-description p:last-child { margin-bottom:0; }
.chord-formula { white-space:nowrap; color:#075f9f; font-weight:850; }
.chord-task { position:relative; display:grid; place-items:center; min-height:104px; margin-bottom:10px; padding:15px 20px; overflow:hidden; border:1px solid #d3e6f4; border-radius:20px; background:linear-gradient(145deg,#f6fbff,#edf6fd); text-align:center; }
.chord-task::after { content:""; position:absolute; right:-45px; bottom:-105px; width:190px; height:190px; border-radius:50%; background:rgba(36,147,239,.1); }
.chord-task small { color:var(--muted); font-weight:750; }
.chord-symbol { position:relative; z-index:1; margin-top:2px; font-family:Georgia,"Times New Roman",serif; font-size:clamp(48px,7vw,72px); line-height:1; letter-spacing:-.04em; }
.chord-symbol sub { font-size:.42em; vertical-align:-.12em; }
.stave-wrap { max-width:850px; margin-inline:auto; }
.chord-stave { display:block; width:100%; min-height:0; aspect-ratio:30 / 7; }
.staff-line, .staff-ledger { stroke:#465469; stroke-width:1.6; }
.staff-note { fill:#2493ef; stroke:#164f80; stroke-width:1.5; }
.staff-note.hint { fill:#4c9a67; stroke:#2e7148; }
.staff-accidental { fill:#24344a; font-family:Georgia,serif; }
.enharmonic-note { fill:#7a4d00; font-size:13px; font-weight:750; }
.audio-notice { margin:8px 0 0; color:#9a6500; text-align:center; font-size:12px; }
.audio-notice.error { color:var(--error); }
.chords-keyboard-scroll { margin-top:0; }
.chords-keyboard { min-width:760px; margin-inline:auto; }
.piano-key.selected-note, .piano-key.correct { background:#86d3a0 !important; }
.piano-key.position-warning { background:#f4c95d !important; color:#2e2500 !important; }
.piano-key.wrong { background:#e87373 !important; }
.keyboard-bottom { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-top:-8px; }
.keyboard-note { margin:0; color:var(--muted); font-size:11px; }
.chord-action-slot { display:grid; place-items:center; min-height:52px; margin:7px 0 6px; }
.answer-controls, .hint-actions { grid-area:1 / 1; display:flex; justify-content:center; flex-wrap:wrap; gap:9px; margin:0; }
.hint-button.attention { animation:hint-blue-pulse .8s ease-out; }
@keyframes hint-blue-pulse { 0%{color:#fff;background:#177fd2;border-color:#177fd2;box-shadow:0 0 0 0 rgba(36,147,239,.48)} 45%{color:#fff;background:#2493ef;border-color:#2493ef;box-shadow:0 0 0 7px rgba(36,147,239,.2),0 9px 24px rgba(36,147,239,.28)} 100%{box-shadow:0 0 0 12px rgba(36,147,239,0)} }
.feedback-toast { position:absolute; z-index:5; left:50%; top:50%; min-width:190px; max-width:calc(100% - 28px); padding:11px 16px; transform:translate(-50%,-50%); color:#fff; background:#23344e; border-radius:12px; box-shadow:0 14px 36px rgba(11,19,36,.22); font-weight:850; text-align:center; }
.feedback-toast.correct { background:var(--success); }
.feedback-toast.wrong { background:var(--error); }
.feedback-toast.warning { color:#342900; background:#f4c95d; }
.feedback-toast.hint { background:#9a6b00; }
.chords-result-grid { grid-template-columns:repeat(5,1fr); }
.result-recommendation { padding:14px 16px; border-radius:13px; background:#edf7ff; color:#31506c; }
.result-booking { display:block; margin-top:19px; color:var(--blue-dark); text-align:center; font-weight:850; }
.chords-howto { margin-bottom:30px; }
.chords-howto h2, .chords-reference-teaser h2 { margin-bottom:18px; font-size:clamp(29px,4vw,46px); letter-spacing:-.04em; }
.chords-howto-copy { max-width:920px; color:#435169; font-size:16px; line-height:1.72; }
.chords-howto-copy p { margin:0 0 16px; }
.chords-howto-copy p:last-child { margin-bottom:0; }
.chords-reference-teaser { display:flex; align-items:center; justify-content:space-between; gap:28px; margin-bottom:54px; padding:28px 32px; background:linear-gradient(135deg,#edf8ff,#f8fcff); border:1px solid #c7e3f5; border-radius:20px; }
.chords-reference-teaser h2 { margin-bottom:10px; }
.chords-reference-teaser p:not(.eyebrow) { max-width:760px; margin:0; color:#435169; line-height:1.65; }
.chords-reference-teaser .button { flex:none; }
.cta-section { display:grid; grid-template-columns:1fr 1fr; overflow:hidden; margin-bottom:72px; background:#fff; border:1px solid var(--line); border-radius:24px; box-shadow:var(--shadow); }
.cta-photo { min-height:345px; }
.cta-photo img { display:block; width:100%; height:100%; object-fit:cover; }
.cta-copy { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; padding:39px; }
.cta-copy h2 { font-size:clamp(29px,4vw,45px); line-height:1.12; }
.cta-copy > p:not(.eyebrow) { color:var(--muted); }
.reference-hero { padding-bottom:52px; }
.reference-nav { display:flex; flex-wrap:wrap; gap:9px; margin-top:24px; }
.reference-section { margin:0 auto 64px; }
.reference-section > h2 { font-size:clamp(29px,4vw,48px); letter-spacing:-.04em; }
.reference-table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:18px; background:#fff; }
.reference-table { width:100%; border-collapse:collapse; min-width:760px; }
.reference-table:not(.inversion-table) { min-width:900px; }
.reference-table th, .reference-table td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; }
.reference-table th { color:#44536a; background:#f6f9fc; font-size:12px; }
.reference-table tr:last-child td { border-bottom:0; }
.reference-table code { padding:3px 7px; color:#0d5b98; background:#eaf6ff; border-radius:7px; font-family:Georgia,serif; font-size:15px; }
.reference-note { margin-top:16px; padding:16px 18px; border-left:4px solid var(--gold); background:#fff9e8; border-radius:0 13px 13px 0; }
.chord-example { display:grid; gap:6px; width:max-content; max-width:100%; }
.chord-example small { color:var(--muted); font-size:10px; }
.mini-keyboard { position:relative; display:flex; width:98px; height:58px; overflow:hidden; background:#d6dee8; border:1px solid #aeb9c7; border-radius:7px; box-shadow:0 4px 10px rgba(11,19,36,.08); }
.mini-keyboard[data-octaves="2"] { width:196px; }
.mini-key { display:block; pointer-events:none; }
.mini-key.white { width:14px; height:57px; flex:0 0 14px; background:#fff; border-right:1px solid #bbc5d1; }
.mini-key.black { position:absolute; z-index:2; top:0; width:9px; height:35px; transform:translateX(-50%); background:#202b3a; border-radius:0 0 3px 3px; box-shadow:0 2px 3px rgba(0,0,0,.28); }
.mini-key.white.is-chord { background:#84d19f; }
.mini-key.black.is-chord { background:#439764; }
.mini-key.white.is-bass { background:#2f7b4b; box-shadow:inset 0 0 0 2px #205c37; }
.mini-key.black.is-bass { background:#1d5d37; box-shadow:inset 0 0 0 1px #0c3e21,0 2px 3px rgba(0,0,0,.25); }
.inversion-table td:last-child { min-width:225px; }
@media (max-width:920px) {
  .settings-columns { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .setting-field:nth-child(4n) { border-right:1px solid var(--line); }
  .setting-field:nth-child(2n) { border-right:0; }
  .curriculum-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .chords-result-grid { grid-template-columns:repeat(3,1fr); }
  .cta-section { grid-template-columns:1fr; }
  .cta-photo { min-height:300px; max-height:380px; }
  .cta-copy { padding:29px; }
}
@media (max-width:680px) {
  .chords-hero { grid-template-columns:1fr; }
  .hero-note { justify-self:start; }
  .trainer-heading-actions { justify-content:flex-start; }
  .resume-card { align-items:stretch; flex-direction:column; }
  .settings-columns { grid-template-columns:1fr; }
  .setting-field, .setting-field:nth-child(2n), .setting-field:nth-child(4n) { border-right:0; }
  .learning-controls { align-items:stretch; }
  .level-switcher { grid-template-columns:37px minmax(0,1fr) 37px; flex-basis:100%; }
  .level-caption { grid-column:1/-1; }
  .volume-control { justify-content:center; width:100%; }
  .start-button, .session-controls { width:100%; }
  .session-controls .button { flex:1; }
  .level-popover { left:8px; right:8px; }
  .curriculum-steps { grid-template-columns:1fr; }
  .chord-task { min-height:96px; padding-block:13px; }
  .chords-keyboard { min-width:0; }
  .keyboard-bottom { align-items:stretch; flex-direction:column; }
  .keyboard-bottom .button { width:100%; }
  .chords-result-grid { grid-template-columns:1fr 1fr; }
  .chords-result-grid > div:last-child { grid-column:1/-1; }
  .chords-howto { margin-bottom:24px; }
  .chords-howto-copy { font-size:15px; }
  .chords-reference-teaser { align-items:stretch; flex-direction:column; margin-bottom:36px; padding:23px 20px; }
  .chords-reference-teaser .button { width:100%; }
  .cta-section { width:100%; border-radius:0; }
  .cta-copy .button { width:100%; }
}
@media (prefers-reduced-motion:reduce) { .hint-button.attention { animation-duration:.01ms; } }
