.chord-workspace, .song-learning-panel { color: var(--ak-ink); letter-spacing: 0; }
.chord-workspace [hidden], .song-learning-panel[hidden], .chords-content[hidden] { display: none !important; }
.diagram-item { min-width: 0; margin: 0; }
.diagram-heading { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 40px; }
.diagram-item .diagram-name { margin: 0; color: var(--ak-blue); font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }
.diagram-icon-button { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 1px solid var(--ak-line-strong); border-radius: 8px; background: var(--ak-surface-muted); color: var(--ak-blue); cursor: pointer; }
.diagram-icon-button:hover:not(:disabled) { background: var(--ak-focus); border-color: var(--ak-blue); }
.diagram-icon-button:disabled { opacity: .35; cursor: default; }
.diagram-body { display: grid; place-items: center; }
.chord-diagram { display: block; width: 224px; max-width: 100%; height: 252px; }
.diagram-grid { stroke: var(--ak-line-strong); stroke-width: 1.7; }
.diagram-nut { stroke: var(--ak-ink); stroke-width: 5; }
.diagram-label, .diagram-muted { fill: var(--ak-muted); text-anchor: middle; font-size: 12px; font-family: inherit; }
.diagram-muted { font-size: 20px; }
.diagram-open { fill: none; stroke: var(--ak-blue); stroke-width: 2; }
.diagram-dot { fill: var(--ak-blue); }
.diagram-barre { stroke: var(--ak-blue); stroke-width: 24; stroke-linecap: round; }
.diagram-finger-number { fill: var(--ak-surface); font-weight: 700; font-size: 13px; text-anchor: middle; font-family: inherit; }
.finger-colors .diagram-finger-number { fill: #fff; }
.finger-colors .diagram-dot.diagram-finger-1 { fill: #2875d8; }
.finger-colors .diagram-dot.diagram-finger-2 { fill: #a96a08; }
.finger-colors .diagram-dot.diagram-finger-3 { fill: #087f6b; }
.finger-colors .diagram-dot.diagram-finger-4 { fill: #b84277; }
.finger-colors .diagram-barre.diagram-finger-1 { stroke: #2875d8; }
.finger-colors .diagram-barre.diagram-finger-2 { stroke: #a96a08; }
.finger-colors .diagram-barre.diagram-finger-3 { stroke: #087f6b; }
.finger-colors .diagram-barre.diagram-finger-4 { stroke: #b84277; }
.diagram-positions { display: flex; align-items: center; justify-content: center; gap: 1rem; }
.diagram-position-count { min-width: 48px; color: var(--ak-muted); text-align: center; font-size: .8rem; font-variant-numeric: tabular-nums; }
.diagram-status { display: block; color: var(--ak-muted); font-size: .78rem; }
.diagram-status:empty { display: none; }
.diagram-unavailable { min-height: 150px; padding-top: 2rem; color: var(--ak-muted); font-size: .9rem; }
.finger-color-toggle { display: inline-flex; align-items: center; gap: .4rem; min-height: 36px; color: var(--ak-muted); font-size: .8rem; cursor: pointer; }
.finger-color-toggle input { width: 16px; height: 16px; margin: 0; accent-color: var(--ak-blue); }

.chord-workspace.container { width: min(100% - 48px, 1000px); padding: 1rem 0 2rem; }
.chord-type-tabs { display: flex; gap: .2rem; overflow-x: auto; scrollbar-width: thin; border-bottom: 1px solid var(--ak-line); }
.chord-type-tab { flex: 0 0 auto; min-height: 44px; padding: .5rem .8rem; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ak-muted); font: inherit; font-size: .88rem; cursor: pointer; }
.chord-type-tab[aria-selected="true"] { color: var(--ak-blue); border-bottom-color: var(--ak-blue); font-weight: 700; }
.chord-root-selector { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: .35rem; padding: .85rem 0; }
.chord-root { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; height: 44px; padding: .2rem .1rem; border: 1px solid var(--ak-line); border-radius: 6px; background: var(--ak-surface); color: var(--ak-ink); font: inherit; font-size: .9rem; line-height: 1.2; cursor: pointer; }
.chord-root-suffix { font-size: .65rem; line-height: 1.2; }
.chord-root-suffix:empty { display: none; }
.chord-root[aria-pressed="true"] { background: var(--ak-blue); border-color: var(--ak-blue); color: var(--ak-surface); font-weight: 700; }
.learner-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; padding: .5rem 0 1.5rem; }
.learner-diagram { width: min(100%, 400px); justify-self: center; min-height: 440px; }
.learner-diagram .chord-diagram { width: 320px; height: 360px; }
.learner-diagram .diagram-heading { display: grid; grid-template-columns: 1fr auto 1fr; min-height: 44px; }
.learner-diagram .diagram-name { grid-column: 2; font-size: 1.65rem; text-align: center; }
.learner-diagram .diagram-heading .diagram-icon-button { grid-column: 3; justify-self: end; }
.learner-details { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, 2fr) auto; gap: 1.5rem; width: min(100%, 720px); justify-self: center; padding-top: 1rem; border-top: 1px solid var(--ak-line); min-width: 0; }
.learner-details h2 { font-size: 1rem; margin: 1.2rem 0 .5rem; color: var(--ak-ink); }
.learner-details h2:first-child { margin-top: 0; }
.learner-notes { display: flex; flex-wrap: wrap; gap: .6rem; color: var(--ak-blue); font-weight: 650; }
.learner-fingers { margin: 0; padding-left: 1.2rem; color: var(--ak-muted); font-size: .85rem; line-height: 1.8; }
.guitar-sample-credit { color: var(--ak-muted); font-size: .75rem; line-height: 1.6; }
.chord-learning-guide { padding: 1rem 0; border-top: 1px solid var(--ak-line); color: var(--ak-muted); font-size: .88rem; line-height: 1.75; }
.chord-learning-guide summary { color: var(--ak-ink); font-weight: 650; cursor: pointer; }
.chord-learning-guide p { max-width: 680px; margin: .8rem 0; }
.chord-type-tab, .chord-root { text-decoration: none; }
.chord-theory h2 { font-size: 19px; margin: 18px 0 10px; color: var(--ak-ink); }
.chord-theory h3 { font-size: 14px; margin: 16px 0 8px; color: var(--ak-ink); }
.chord-theory-facts { display: flex; flex-wrap: wrap; gap: 18px 40px; margin: 16px 0; }
.chord-theory-facts dt { font-size: 12px; }.chord-theory-facts dd { margin: 4px 0 0; color: var(--ak-ink); font-weight: 650; }
#chordTheoryFingering { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 20px; margin: 0; padding-left: 20px; }
.learner-song-section { padding-top: 20px; border-top: 1px solid var(--ak-line); }
.learner-song-section > h2 { font-size: 18px; margin: 0 0 6px; overflow-wrap: anywhere; }
.learner-song-section > p { color: var(--ak-muted); font-size: 13px; margin: 0 0 16px; }
.learner-song-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.learner-song { min-width: 0; overflow: hidden; border: 1px solid var(--ak-line); border-radius: 8px; background: var(--ak-surface); text-decoration: none; color: var(--ak-ink); }
.learner-song:hover { border-color: var(--ak-blue); }
.learner-song-cover { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: 128px; padding: 12px; overflow: hidden; background: #234c55; color: #fff; }
.learner-song:nth-child(3n+2) .learner-song-cover { background: #4c3859; }.learner-song:nth-child(3n) .learner-song-cover { background: #384f78; }
.learner-song-cover::before { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent, #000c); z-index: 1; }
.learner-song-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.learner-song-cover > i { position: absolute; top: 16px; left: 12px; opacity: .35; font-size: 22px; }
.learner-song-cover h3, .learner-song-cover p { z-index: 2; position: relative; margin: 0; overflow-wrap: anywhere; }
.learner-song-cover h3 { font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.learner-song-cover p { font-size: 11px; margin-top: 4px; color: #e3e9f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.learner-song-key { display: flex; gap: 6px; align-items: center; min-height: 38px; padding: 8px 12px; font-size: 11px; color: var(--ak-muted); }.learner-song-key strong { color: var(--ak-blue); }
.learner-song-actions { display: flex; justify-content: center; padding: 16px 0 0; }
.learner-song-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px solid var(--ak-line); border-radius: 8px; padding: 9px 16px; background: var(--ak-surface); color: var(--ak-ink); font: inherit; font-size: 13px; cursor: pointer; }.learner-song-refresh:disabled { opacity: .5; cursor: default; }
#learnerSongError:empty { display: none; }#learnerSongError { margin: 12px 0 0; color: var(--ak-muted); }
@media (max-width: 780px) { .learner-song-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 175px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; padding-bottom: 8px; }.learner-song { scroll-snap-align: start; }.learner-song-section > h2 { font-size: 16px; } }
@media (max-width: 370px) { #chordTheoryFingering { grid-template-columns: 1fr; } }
.chord-loading { display: grid; place-items: center; min-height: 250px; color: var(--ak-muted); }
.chord-error { display: grid; gap: .75rem; place-content: center; min-height: 250px; color: var(--ak-muted); }
.chord-retry { justify-self: center; border: 1px solid var(--ak-line); border-radius: 6px; background: var(--ak-surface-muted); color: var(--ak-blue); min-height: 40px; padding: .4rem .9rem; cursor: pointer; }

.song-learning-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--ak-line); }
.song-learning-heading h2 { color: var(--ak-ink); font-size: 1.15rem; line-height: 1.4; margin: 0 0 .25rem; }
.song-learning-heading p { margin: 0; color: var(--ak-muted); font-size: .8rem; }
.song-chord-diagrams { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.25rem; padding-top: 1rem; }
.song-chord-diagrams .diagram-item { padding-bottom: 1rem; border-bottom: 1px solid var(--ak-line); }
.song-chord-diagrams .chord-loading, .song-chord-diagrams .chord-error { grid-column: 1 / -1; }
.control-btn:disabled { opacity: .4; cursor: default; }
.song-learning-panel { scroll-margin-top: calc(90px + var(--mobile-app-banner-height, 0px)); }
.song-reading-tabs { display: none; }
@media (max-width: 780px) {
  .chord-workspace.container { width: calc(100% - 28px); padding-top: .5rem; }
  .chord-type-tab { padding-inline: .7rem; }
  .chord-root-selector { grid-template-columns: repeat(6, minmax(0, 1fr)); padding: .6rem 0; }
  .chord-root { height: 40px; }
  .learner-stage { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-top: 0; }
  .learner-diagram { width: min(100%, 360px); min-height: 0; }
  .learner-diagram .chord-diagram { height: 280px; height: min(280px, max(220px, calc(100svh - 390px))); width: 249px; }
  .learner-diagram .diagram-name { font-size: 1.4rem; }
  .learner-details { grid-template-columns: 1fr 1fr; gap: .5rem 1.25rem; padding-top: 1rem; }
  .learner-details > .finger-color-toggle { grid-column: 1 / -1; }
  .learner-details h2 { margin-top: 0; }
  .song-chord-diagrams { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem; }
  .song-chord-diagrams .chord-diagram { height: 200px; width: 178px; }
  .song-learning-heading h2 { font-size: 1rem; }
}
@media (max-width: 768px) {
  .song-reading-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem; margin-bottom: .85rem; padding-bottom: .85rem; border-bottom: 1px solid var(--ak-line); }
  .song-reading-tabs button { display: flex; align-items: center; justify-content: center; gap: .5rem; min-height: 42px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--ak-muted); font: inherit; font-size: .9rem; cursor: pointer; }
  .song-reading-tabs button[aria-pressed="true"] { border-color: var(--ak-line-strong); background: var(--ak-surface-muted); color: var(--ak-blue); font-weight: 650; }
}
@media (max-width: 365px) {
  .song-chord-diagrams .chord-diagram { height: 172px; }
  .song-chord-diagrams .diagram-positions { gap: .35rem; }
  .song-chord-diagrams .diagram-icon-button { flex-basis: 32px; width: 32px; height: 32px; }
  .song-chord-diagrams .diagram-position-count { min-width: 40px; }
}
