body.theme-practice .prog-step-chord {
  font-family: var(--font-serif) !important;
}
body.theme-practice .prog-step-chord.role-ii { color: #9090e0; }
body.theme-practice .prog-step-chord.role-v  { color: #e07060; }
body.theme-practice .prog-step-chord.role-i  { color: #50c890; }
body.theme-practice .prog-step-arrow,
body.theme-practice .prog-arrow { color: var(--text3); }
body.theme-practice .progression-flow {
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

/* ── Progression groups & cards ── */
body.theme-practice .prog-group {
  padding: 36px 48px 0;
  background: var(--bg2);
}
body.theme-practice .prog-group:nth-child(even) { background: var(--bg); }
body.theme-practice .prog-group-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
body.theme-practice .prog-group-desc {
  font-size: 14px;
  color: var(--text2);
  max-width: 42em;
}

body.theme-practice .prog-subgroup {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px dashed var(--border);
}
body.theme-practice .prog-subgroup-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
body.theme-practice .prog-subgroup-desc {
  font-size: 13px;
  color: var(--text2);
}

body.theme-practice .prog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--bg2);
  margin-bottom: 24px;
}
body.theme-practice .prog-card-header {
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
}
body.theme-practice .prog-card-name {
  font-family: var(--font-serif);
  font-size: 18px;
  color: var(--text);
}
body.theme-practice .prog-card-tag {
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text2);
  border: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 9px;
}
body.theme-practice .theory-note {
  background: var(--bg3);
  border-left: 3px solid var(--gold2);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text2);
  border-radius: 0;
}

/* ── Form bars ── */
body.theme-practice .form-bar {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
body.theme-practice .form-bar.turnaround {
  background: rgba(140, 155, 200, 0.07);
  border-color: rgba(140, 155, 200, 0.22);
  box-shadow: inset 3px 0 0 rgba(180, 195, 230, 0.6);
}
body.theme-practice .form-bar.highlight {
  background: rgba(104, 168, 136, 0.06);
  border-color: rgba(104, 168, 136, 0.2);
  box-shadow: inset 3px 0 0 var(--pr-sage);
}
body.theme-practice .bar-chord {
  font-family: var(--font-serif);
  color: var(--text);
}

body.theme-practice .prog-tool-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
  margin: 4px 0 2px;
  font-size: 10px;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
}
body.theme-practice .tool-cross-link {
  color: var(--gold2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
body.theme-practice .tool-cross-link:hover {
  border-bottom-color: var(--gold2);
}
body.theme-practice .donate-link.tip-me-badge {
  min-height: 0;
}

/* ── Black key note labels (interval explorer) ── */
body.theme-practice .note-name-b {
  font-size: 7px;
  bottom: 4px;
  top: auto;
}

/* ── Welcome modal ── */
body.theme-practice.welcome-open { overflow: hidden; }
body.theme-practice .welcome-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(8, 7, 6, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
body.theme-practice .welcome-overlay[hidden] { display: none; }
body.theme-practice .welcome-card {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  padding: 24px 22px 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
body.theme-practice .welcome-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
body.theme-practice .welcome-lead {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 14px;
}
body.theme-practice .welcome-list {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.6;
}
body.theme-practice .welcome-actions {
  margin: 0 0 18px;
  font-size: 13px;
}
body.theme-practice .welcome-cta {
  color: var(--gold2);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--gold2);
}
body.theme-practice .welcome-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
body.theme-practice .welcome-support.tip-me-badge {
  min-height: 0;
}
body.theme-practice .welcome-dismiss {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 18px;
  cursor: pointer;
  min-height: 44px;
}
body.theme-practice .welcome-dismiss:hover {
  border-color: var(--gold2);
  background: var(--accent-light);
}
body.theme-practice .prog-tool-sep {
  color: var(--text3);
}

/* Function labels — muted academic */
body.theme-practice .fn-i,
body.theme-practice .fn-iv,
body.theme-practice .fn-v,
body.theme-practice .fn-ii,
body.theme-practice .fn-vi,
body.theme-practice .fn-iii,
body.theme-practice .fn-sub {
  border-radius: var(--radius);
  font-weight: 600;
}

/* ── Chord flow items ── */
body.theme-practice .flow-chord-name {
  font-family: var(--font-serif);
  font-size: 15px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text) !important;
}
body.theme-practice .flow-item.fi-ii .flow-chord-name  { border-left: 3px solid #6060b0; }
body.theme-practice .flow-item.fi-v  .flow-chord-name  { border-left: 3px solid #a04030; }
body.theme-practice .flow-item.fi-i  .flow-chord-name  { border-left: 3px solid #208060; }
body.theme-practice .flow-item.fi-vi .flow-chord-name  { border-left: 3px solid #804080; }
body.theme-practice .flow-item.fi-iii .flow-chord-name { border-left: 3px solid #406880; }
body.theme-practice .flow-item.fi-iv  .flow-chord-name  { border-left: 3px solid #806020; }
body.theme-practice .flow-item.fi-sub .flow-chord-name { border-left: 3px solid #705030; }

body.theme-practice .vl-table {
  font-size: 12px;
  border: 1px solid var(--border);
}
body.theme-practice .vl-table th {
  background: var(--bg3);
  color: var(--text3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.06em;
}
body.theme-practice .vl-table td {
  border-color: var(--border);
  color: var(--text2);
}

body.theme-practice .compare-box {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* ── Theory tab ── */
body.theme-practice .theory-page {
  padding: 0 48px 80px;
  background: var(--bg2);
  max-width: 52em;
}
body.theme-practice .theory-chapter-title {
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 700;
  color: var(--ink);
}
body.theme-practice .theory-chapter-sub {
  color: var(--text3);
  letter-spacing: 0.06em;
}
body.theme-practice .theory-chapter-lead {
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text2);
}
body.theme-practice .theory-section-title {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--pr-subtitle);
  border-bottom: 1px solid var(--border);
  padding-bottom: 6px;
}
body.theme-practice .theory-section-num {
  background: var(--bg3);
  color: var(--gold2);
  border: 1px solid var(--border);
}
body.theme-practice .theory-body {
  font-family: var(--font-sans);
  font-size: 15px;
}
body.theme-practice .theory-body em {
  color: var(--gold2);
  font-style: italic;
  font-weight: 500;
}
body.theme-practice .theory-callout {
  background: var(--bg3);
  border-left-color: var(--gold2);
  border-radius: 0;
}
body.theme-practice .theory-callout strong { color: var(--text); }
body.theme-practice .theory-rule {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
body.theme-practice .theory-col-box {
  background: var(--bg2);
  border: 1px solid var(--border);
}
body.theme-practice .theory-table th {
  background: var(--bg3);
}
body.theme-practice .theory-table .gold td:first-child { color: var(--gold2); }
body.theme-practice .th-blues { background: #1e100a; color: #c08070; }
body.theme-practice .th-jazz  { background: #141a24; color: var(--gold2); }
body.theme-practice .th-rnb   { background: #0a1e14; color: #50a080; }

/* ── Practice tab ── */
body.theme-practice .practice-page { padding: 0 48px 100px; }
body.theme-practice .practice-section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--text);
}
body.theme-practice .metro-bpm-display {
  font-family: var(--font-serif);
  font-size: 56px;
  color: var(--text);
}
body.theme-practice .metro-btn.active {
  background: var(--gold2);
  color: var(--bg);
  border-color: var(--gold2);
}
body.theme-practice .metro-btn:hover {
  border-color: var(--gold2);
  color: var(--gold2);
  background: var(--accent-light);
}

/* ── Tooltip ── */
body.theme-practice .tooltip-inner {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  border-radius: var(--radius);
}
body.theme-practice .tt-desc { color: var(--text2); }
body.theme-practice .tt-interval {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
}

/* ── Voicing dock + picker ── */
body.theme-practice .support-page {
  padding-left: 40px;
  padding-right: 40px;
  padding-bottom: 100px;
}
body.theme-practice .support-title {
  font-family: var(--font-sans);
  color: var(--gold2);
}
body.theme-practice .support-letter p {
  color: var(--text2);
}
body.theme-practice .support-contact {
  font-size: 13px;
  color: var(--text3);
  margin-top: 20px;
}
body.theme-practice .support-email {
  color: var(--gold2);
  text-decoration: none;
  font-weight: 600;
}
body.theme-practice .support-email:hover {
  color: var(--gold);
  text-decoration: underline;
}
body.theme-practice .support-kofi {
  border-color: var(--border2);
}
body.theme-practice .studios-page {
  padding: 0 40px 100px;
  max-width: 720px;
}
body.theme-practice .studios-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text3);
  margin: 0 0 8px;
}
body.theme-practice .studios-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold2);
  margin: 0 0 16px;
}
body.theme-practice .studios-lead {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.65;
  margin: 0 0 24px;
}
body.theme-practice .studios-points {
  margin: 0 0 24px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
body.theme-practice .studios-points p {
  color: var(--text2);
  font-size: 14px;
  line-height: 1.65;
  margin: 0 0 14px;
}
body.theme-practice .studios-points p:last-child {
  margin-bottom: 0;
}
body.theme-practice .studios-points strong {
  color: var(--text);
}
body.theme-practice .studios-journal-block {
  margin: 8px 0 24px;
  padding-top: 28px;
  border-top: 1px solid var(--border2);
}
body.theme-practice .studios-hook {
  margin: 0 0 20px;
}
body.theme-practice .studios-hook-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tab-support);
  margin: 0 0 10px;
}
body.theme-practice .studios-hook-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold2);
  line-height: 1.25;
  margin: 0 0 12px;
}
body.theme-practice .studios-hook-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text2);
  margin: 0;
  max-width: 38em;
}
body.theme-practice .studios-note {
  font-size: 13px;
  color: var(--text3);
  line-height: 1.6;
  margin: 0 0 20px;
}
body.theme-practice .studios-contact {
  font-size: 14px;
  color: var(--text2);
  margin: 0;
}
body.theme-practice .studios-cta {
  color: var(--gold2);
  text-decoration: none;
  font-weight: 600;
}
body.theme-practice .studios-cta:hover {
  color: var(--gold);
  text-decoration: underline;
}
body.theme-practice .footer-hosting {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--tab-studios);
  text-decoration: none;
  letter-spacing: 0.02em;
}
body.theme-practice .footer-hosting:hover {
  color: var(--tab-studios-hover);
}
body.theme-practice #voicing-picker {
  background: linear-gradient(180deg, var(--bg3) 0%, var(--bg2) 100%);
  border: 1px solid var(--border2);
  border-radius: 8px;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
body.theme-practice .vp-title {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--gold2);
}
body.theme-practice .vp-hint {
  font-size: 11px;
  color: var(--text3);
  line-height: 1.4;
}
body.theme-practice .vp-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid var(--border2);
  background: var(--bg);
  color: var(--text);
}
body.theme-practice .vp-btn.active {
  background: var(--gold2);
  color: var(--bg);
  border-color: var(--gold2);
  box-shadow: 0 2px 12px rgba(138, 154, 170, 0.35);
}
body.theme-practice .vp-btn:hover {
  border-color: var(--gold2);
  color: var(--gold2);
  background: var(--accent-light);
}
body.theme-practice .vp-btn.active:hover {
  color: var(--bg);
  background: var(--gold2);
}

/* ── Play buttons ── */
body.theme-practice .play-btn,
body.theme-practice .play-prog-btn {
  font-family: var(--font-mono);
  font-size: 11px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--text2);
}
body.theme-practice .play-btn:hover,
body.theme-practice .play-prog-btn:hover {
  border-color: var(--gold2);
  color: var(--gold2);
}
body.theme-practice .play-prog-btn.is-playing,
body.theme-practice .play-btn.is-playing {
  background: var(--gold2);
  color: var(--bg);
  border-color: var(--gold2);
}

/* ── Piano keys — only unlit keys; lit-* colors come from styles.css ── */
body.theme-practice .key-w:not([class*="lit-"]) {
  background: #f0ece4;
  border-color: #888;
}
body.theme-practice .key-b:not([class*="lit-"]) {
  background: #1a1814;
  border-color: #000;
}

/* Progression inline hand boxes */
body.theme-practice .prog-hand-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 7px;
}
body.theme-practice .legend-caption {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
}
body.theme-practice .prog-key-picker {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
body.theme-practice .prog-key-label {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--font-mono);
}

/* ── Responsive padding alignment ── */
@media (max-width: 768px) {
  body.theme-practice .site-header { padding: 20px 20px 16px; }
  body.theme-practice .tab-bar,
  body.theme-practice .key-nav,
  body.theme-practice .legend,
  body.theme-practice .prog-top-nav { padding-left: 16px; padding-right: 16px; }
  body.theme-practice .key-section,
  body.theme-practice .prog-group { padding-left: 20px; padding-right: 20px; }
  body.theme-practice .theory-page { padding-left: 20px; padding-right: 20px; }
  body.theme-practice .support-page,
  body.theme-practice .studios-page { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 600px) {
  body.theme-practice .site-header {
    padding: 16px 16px 14px;
  }
  body.theme-practice .site-header-row {
    gap: 10px;
  }
  body.theme-practice .site-header h1 { font-size: 22px; }
  body.theme-practice .site-header .subtitle {
    font-size: 11px;
    line-height: 1.45;
  }
  body.theme-practice {
    --tab-bar-sticky-offset: 72px;
  }
  body.theme-practice .tab-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow-x: visible;
    padding: 0;
  }
  body.theme-practice .tab-btn {
    font-size: 10px;
    padding: 10px 4px 8px;
    min-height: 40px;
    white-space: normal;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
  }
  body.theme-practice .tab-label-full { display: none; }
  body.theme-practice .tab-label-short { display: inline; }
  body.theme-practice .tab-btn[data-tab="support"] {
    font-size: 11px;
  }
  body.theme-practice .tab-bar-trailing {
    grid-column: 3;
    justify-self: end;
    margin-left: 0;
    padding: 4px 8px 6px 0;
  }
  body.theme-practice .theme-toggle--bar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
  body.theme-practice .tab-bar,
  body.theme-practice .key-nav,
  body.theme-practice .legend,
  body.theme-practice .prog-top-nav { padding-left: 0; padding-right: 0; }
  body.theme-practice .key-nav,
  body.theme-practice .prog-top-nav,
  body.theme-practice .tools-nav {
    top: var(--tab-bar-sticky-offset);
  }
  body.theme-practice .tip-me-badge {
    padding: 4px 9px 4px 7px;
    font-size: 10px;
  }
  body.theme-practice .tip-me-badge::before {
    width: 12px;
    height: 12px;
  }
  body.theme-practice .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  body.theme-practice .site-footer-actions {
    width: 100%;
  }
}

body.theme-practice .vn {
  border-radius: var(--radius);
  border: 1px solid transparent;
}
body.theme-practice .vn-5th {
  background: var(--bg3);
  color: var(--text3);
  border-color: var(--border);
}

body.theme-practice .prog-step-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

body.theme-practice .prog-page {
  background: var(--bg);
  padding-bottom: 80px;
}

body.theme-practice .tab-bar {
  position: sticky;
  top: 0;
  z-index: 200;
}

body.theme-practice {
  --tab-bar-sticky-offset: 41px;
}

body.theme-practice .key-nav,
body.theme-practice .prog-top-nav {
  position: sticky;
  top: var(--tab-bar-sticky-offset);
  z-index: 150;
}

body.theme-practice .detect-card,
body.theme-practice .detect-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
body.theme-practice .detect-chord-name {
  font-family: var(--font-serif);
  color: var(--text);
}
body.theme-practice .detect-source-badge {
  font-family: var(--font-mono);
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
}

body.theme-practice .chord-flow-container .flow-arrow {
  color: var(--text3) !important;
  font-size: 18px !important;
}

/* ── Site footer / donations ── */
body.theme-practice[data-tab="theory"] .site-footer {
  margin-bottom: 72px;
}
body.theme-practice[data-tab="theory"] .theory-page {
  padding-bottom: 88px;
}
body.theme-practice .site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 48px 28px;
  margin-bottom: 132px;
  border-top: 1px solid var(--border);
  background: var(--bg2);
  font-size: 12px;
  color: var(--text3);
}
body.theme-practice .site-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
body.theme-practice .footer-suggestions {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  text-decoration: none;
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: var(--radius);
}
body.theme-practice .footer-suggestions:hover {
  color: var(--gold2);
  border-color: var(--gold2);
}
/* ── Progressions harmony tools modal ── */
body.theme-practice.prog-tools-open { overflow: hidden; }
body.theme-practice .prog-tools-overlay {
  position: fixed;
  inset: 0;
  z-index: 520;
  background: rgba(8, 7, 6, 0.78);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
body.theme-practice .prog-tools-overlay[hidden] { display: none; }
body.theme-practice .prog-tools-sheet {
  display: flex;
  flex-direction: column;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  width: min(720px, 100%);
  max-height: min(85vh, 900px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
body.theme-practice .prog-tools-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
body.theme-practice .prog-tools-modal-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
body.theme-practice .prog-tools-modal-close {
  background: none;
  border: none;
  color: var(--text3);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
body.theme-practice .prog-tools-modal-close:hover { color: var(--text); }
body.theme-practice .prog-tools-modal-scroll {
  overflow-y: auto;
  padding: 16px 18px 20px;
  -webkit-overflow-scrolling: touch;
}
body.theme-practice .prog-tools-modal-lead {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 14px;
}
body.theme-practice .prog-tools-modal-footer {
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
body.theme-practice .prog-tool-links--blues {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}
body.theme-practice .prog-tool-links-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}
body.theme-practice .tool-cross-link--primary {
  color: var(--gold2);
}
body.theme-practice .tool-cross-link--muted {
  color: var(--text3);
  font-size: 11px;
}
body.theme-practice .blues-bar-section {
  margin: 0 0 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
body.theme-practice .blues-bar-section:last-of-type {
  border-bottom: none;
}
body.theme-practice .blues-bar-section-title {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 6px;
}
body.theme-practice .blues-bar-section-headline {
  font-size: 13px;
  color: var(--text);
  margin: 0 0 6px;
}
body.theme-practice .blues-bar-section-lead {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 10px;
}
body.theme-practice .blues-bar-tip {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--bg2);
  border-radius: var(--radius);
  border-left: 3px solid var(--gold2);
}
body.theme-practice .blues-bar-role-hint {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 10px;
  padding: 8px 10px;
  background: var(--bg2);
  border-radius: var(--radius);
  border-left: 3px solid var(--border2);
}
body.theme-practice .blues-bar-tensions {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--text);
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  vertical-align: middle;
  letter-spacing: 0.04em;
}
body.theme-practice .blues-bar-comping-ext,
body.theme-practice .blues-bar-comping-when {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 10px;
}
body.theme-practice .blues-bar-section--comping {
  background: var(--bg2);
  margin: 0 -4px;
  padding: 14px 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
body.theme-practice .blues-bar-tips {
  margin: 0;
  padding-left: 1.2em;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.55;
}
body.theme-practice .blues-bar-tips li {
  margin-bottom: 4px;
}
body.theme-practice .blues-bar-jazz-links {
  margin: 14px 0 0;
  font-size: 12px;
}
body.theme-practice .blues-bar-jazz-label {
  color: var(--text3);
  margin-right: 6px;
}
body.theme-practice #prog-tools-modal-body .beginner-demo {
  max-width: none;
  margin-bottom: 0;
}
@media (max-width: 600px) {
  body.theme-practice .prog-tools-overlay {
    align-items: flex-end;
    padding: 0;
  }
  body.theme-practice .prog-tools-sheet {
    width: 100%;
    max-height: 92vh;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
  }
  body.theme-practice .prog-tools-modal-scroll {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }
}

/* ── Harmony Tools tab ── */
body.theme-practice .tools-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 48px;
  background: var(--bg3);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--tab-bar-sticky-offset);
  z-index: 140;
}
body.theme-practice .tools-nav a {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg2);
  padding: 4px 10px;
  text-decoration: none;
}
body.theme-practice .tools-nav a:hover {
  color: var(--gold2);
  border-color: var(--gold2);
}
body.theme-practice .tools-page {
  padding: 0 48px 80px;
}
body.theme-practice .tools-section {
  padding: 36px 0 28px;
  border-bottom: 1px solid var(--border);
}
body.theme-practice .tools-section:last-child {
  border-bottom: none;
}
body.theme-practice .tools-section-title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: normal;
}
body.theme-practice .tools-section-desc,
body.theme-practice .tools-section-teach {
  font-family: var(--font-sans);
}
body.theme-practice .tools-section-desc {
  font-size: 14px;
  color: var(--text2);
  max-width: 42em;
  margin-bottom: 8px;
}
body.theme-practice .tools-section-teach {
  font-size: 13px;
  color: var(--text3);
  max-width: 42em;
  margin-bottom: 16px;
  line-height: 1.55;
}
body.theme-practice .tool-card-more {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 8px;
}
body.theme-practice .tool-card-more summary {
  cursor: pointer;
  color: var(--gold2);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
body.theme-practice .tool-card-when {
  margin-top: 6px;
  color: var(--text3);
}
body.theme-practice .school-lesson {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--bg2);
}
body.theme-practice .school-lesson-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
body.theme-practice .school-lesson-title::-webkit-details-marker { display: none; }
body.theme-practice .school-lesson-num {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--gold2);
  margin-right: 8px;
}
body.theme-practice .school-lesson-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}
body.theme-practice .school-try {
  margin-top: 12px;
  font-size: 12px;
}
body.theme-practice .th-tag.th-school {
  color: var(--gold2);
  border-color: var(--border2);
}
body.theme-practice .th-tag.th-beginner {
  color: #7eb8e8;
  border-color: var(--border2);
}
body.theme-practice .beginner-demo {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: 14px 0;
  max-width: 400px;
}
body.theme-practice .beginner-demo-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
body.theme-practice .beginner-demo-label {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
body.theme-practice .beginner-demo-caption {
  font-size: 12px;
  color: var(--text2);
  line-height: 1.5;
  margin: 0 0 10px;
}
body.theme-practice .beginner-demo-hands {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text2);
}
body.theme-practice .beginner-hand .tool-hand-label {
  color: var(--text3);
  margin-right: 4px;
}
body.theme-practice .blues-scale-block {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
body.theme-practice .blues-scale-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0 12px;
}
body.theme-practice .blues-scale-select-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.theme-practice .blues-scale-select {
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
body.theme-practice .blues-scale-panel {
  margin-top: 4px;
}
body.theme-practice .blues-scale-legend {
  margin-bottom: 16px;
}
body.theme-practice .prog-blues-scale {
  margin: 20px 0 28px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
body.theme-practice .prog-blues-scale-lead {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 14px;
  max-width: 52em;
}
body.theme-practice .prog-blues-scale-tip {
  margin: 12px 0 0;
  font-size: 12px;
}
body.theme-practice .prog-stride-guide {
  margin: 20px 0 28px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
body.theme-practice .prog-stride-guide-lead {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 12px;
  max-width: 52em;
}
body.theme-practice .prog-stride-guide-steps {
  margin: 0 0 12px;
  padding-left: 1.2em;
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  max-width: 52em;
}
body.theme-practice .prog-stride-guide-tip {
  margin: 0;
  font-size: 12px;
}
body.theme-practice .blues-scale-ivv-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
body.theme-practice .blues-scale-ivv-row .beginner-demo {
  margin: 0;
  max-width: none;
  min-width: 0;
}
@media (max-width: 960px) {
  body.theme-practice .blues-scale-ivv-row {
    grid-template-columns: 1fr;
  }
}
body.theme-practice .blues-scale-key-lead {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.55;
  margin: 0 0 12px;
  max-width: 52em;
}
body.theme-practice .blues-scale-degrees {
  margin: 12px 0 0;
  padding-left: 1.2em;
  font-size: 12px;
  color: var(--text2);
  line-height: 1.6;
  max-width: 52em;
}
body.theme-practice .blues-scale-degrees li {
  margin-bottom: 4px;
}
body.theme-practice .blues-scale-try {
  margin-top: 10px;
}
body.theme-practice .th-tag.th-gospel {
  color: #c8a060;
  border-color: #605030;
}
body.theme-practice .theory-chapter-school {
  border-bottom: 2px solid var(--border2);
  padding-bottom: 24px;
  margin-bottom: 8px;
}
body.theme-practice .tools-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}
body.theme-practice .tools-control {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text3);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.theme-practice .tools-control select {
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--bg2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  min-width: 140px;
}
body.theme-practice .tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}
body.theme-practice .tool-card,
body.theme-practice .tool-source-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
body.theme-practice .tool-source-card {
  margin-bottom: 20px;
  border-left: 3px solid var(--gold2);
}
body.theme-practice .tool-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
body.theme-practice .tool-card-chord {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
body.theme-practice .tool-card-tag {
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text3);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--radius);
}
body.theme-practice .tool-card-desc {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 10px;
  line-height: 1.5;
}
body.theme-practice .tool-panel-name {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text3);
  margin-bottom: 8px;
}
body.theme-practice .tool-hand-label,
body.theme-practice .tool-hand-label {
  font-size: 9px;
  color: var(--text3);
  font-family: var(--font-mono);
  margin-bottom: 3px;
}
body.theme-practice .tool-hands {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
body.theme-practice .tool-empty {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--font-mono);
}
body.theme-practice .tool-interval-result {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  max-width: 360px;
}
body.theme-practice .tool-interval-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 12px;
}
body.theme-practice .tool-card-header .play-btn {
  flex-shrink: 0;
}

@media (max-width: 768px) {
  body.theme-practice .site-footer { padding: 16px 20px 24px; }
  body.theme-practice .tools-nav,
  body.theme-practice .tools-page { padding-left: 20px; padding-right: 20px; }
}

/* ── Practice theme layout fixes (ported from academic.css) ── */
body.theme-practice .tab-panel.active {
  position: relative;
  z-index: 0;
}

body.theme-practice .theory-nav {
  position: sticky;
  top: var(--tab-bar-sticky-offset);
  z-index: 140;
}

body.theme-practice .theory-page {
  background: transparent;
  max-width: 52em;
}

body.theme-practice .prog-page {
  background: transparent;
}

/* Desktop: form bars always show voicing panels */
@media (min-width: 601px) {
  body.theme-practice .form-bar .form-bar-panel {
    display: block !important;
  }
  body.theme-practice .form-bar-hint {
    display: none !important;
  }
  body.theme-practice .form-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Chord-flow cards: single column on narrow, scroll on small screens */
body.theme-practice .chord-flow-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
}
body.theme-practice .chord-flow-container .flow-item {
  min-width: 280px;
  max-width: 100%;
}
body.theme-practice .chord-flow-container .piano {
  max-width: 100%;
  overflow-x: auto;
}
