#french-bass { max-width: 1440px; margin: 0 auto; }
.fb-intro { max-width: 870px; }
.fb-conventions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 22px 0; }
.fb-conventions > div { background: #fff; padding: 18px 20px; }
.fb-conventions strong { display: block; margin-bottom: 7px; }
.fb-conventions p { font-size: 14px; line-height: 1.55; margin: 0; }
.fb-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; margin: 20px 0; }
.fb-toolbar label { display: grid; gap: 5px; font-size: 13px; font-weight: 650; }
.fb-toolbar input, .fb-toolbar select { background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 11px; min-height: 44px; }
.fb-toolbar input { width: min(350px, 80vw); }
.fb-toolbar output { color: var(--muted); font-size: 13px; padding: 12px 0; }
.fb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 28px; align-items: start; }
.fb-jumps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.fb-jumps button { font-size: 12px; min-height: 34px; padding: 5px 9px; border-color: var(--line); }
.fb-family { margin-bottom: 30px; }
.fb-family h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; font-size: 27px; margin: 0 0 8px; }
.fb-family > p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0 0 15px; }
.fb-family a, .fb-sources a, .fb-intro a, .fb-conventions a { color: var(--accent); text-underline-offset: 3px; }
.fb-card { display: grid; grid-template-columns: 93px minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-bottom-width: 0; padding: 18px; gap: 16px; position: relative; }
.fb-card:first-of-type { border-radius: 8px 8px 0 0; }
.fb-card:last-child { border-radius: 0 0 8px 8px; border-bottom-width: 1px; }
.fb-card.fb-selected { border-left: 4px solid var(--accent); padding-left: 15px; background: #f5fbfa; }
.fb-card h4 { margin: 0 0 3px; font-size: 16px; }
.fb-french { color: var(--muted); font-size: 12px; margin: 0 0 9px; }
.fb-intervals { font-size: 13px; color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.fb-explanation { margin: 0; line-height: 1.55; font-size: 14px; }
.fb-pitches { font-size: 13px; line-height: 1.6; margin: 9px 0; color: var(--muted); }
.fb-pitches b { color: var(--ink); font-weight: 650; }
.fb-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fb-actions button { font-size: 12px; min-height: 34px; padding: 4px 10px; }
.fb-glyph { display: inline-flex; align-items: center; justify-content: center; gap: 7px; vertical-align: middle; font-family: Georgia, "Times New Roman", serif; font-size: 30px; color: var(--ink); font-weight: 400; line-height: 1.08; }
.fb-stack { display: inline-flex; flex-direction: column; align-items: center; min-width: 26px; }
.fb-number { display: block; position: relative; white-space: nowrap; }
.fb-barred::after { content: ""; position: absolute; width: 1em; border-top: 1.6px solid currentColor; left: -0.14em; top: 53%; transform: rotate(-34deg); }
.fb-arrow { font-size: 17px; color: var(--muted); }
.fb-card > .fb-glyph { align-self: start; min-height: 82px; }
.fb-player { position: sticky; top: 108px; max-height: calc(100dvh - 270px); overflow-y: auto; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 8px; padding: 20px; background: #fff; }
.fb-player h3 { font-family: Georgia, serif; font-size: 23px; font-weight: 500; line-height: 1.2; margin: 8px 0; }
.fb-player p { font-size: 13px; line-height: 1.55; }
.fb-player .fb-player-key { margin: 0; color: var(--muted); }
.fb-player-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fb-score { min-height: 212px; }
.fb-score svg { display: block; max-width: 100%; height: auto; }
.fb-step-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.fb-step-tabs button { font-size: 11px; padding: 5px 8px; min-height: 32px; }
.fb-step-tabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.fb-note-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.fb-note-buttons button { min-height: 34px; font-size: 12px; padding: 4px 9px; }
.fb-note-buttons button:first-child { border-color: var(--accent-2); color: var(--accent-2); }
.fb-player-controls { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.fb-player-controls button { font-size: 13px; }
.fb-player-status { min-height: 38px; color: var(--accent); margin-bottom: 0; }
.fb-player-foot { border-top: 1px solid var(--line); padding-top: 12px; color: var(--muted); }
.fb-sources { border-top: 1px solid var(--line); margin: 28px 0; padding: 20px 0; font-size: 14px; line-height: 1.6; }
.fb-sources summary { font-weight: 650; cursor: pointer; }
.fb-sources li { margin-bottom: 9px; }
.fb-empty { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
#referenceNavGroup .nav-group-menu { min-width: 250px; }
@media (max-width: 1050px) { .fb-layout { grid-template-columns: minmax(0, 1fr) 295px; gap: 16px; } .fb-player { padding: 14px; top: 140px; } .fb-conventions > div { padding: 15px; } }
@media (max-width: 760px) {
  .fb-layout { display: flex; flex-direction: column; }
  .fb-catalog { width: 100%; }
  .fb-player { position: static; order: -1; width: 100%; max-height: none; overflow: visible; }
  .fb-score { max-width: 310px; margin: 0 auto; }
  .fb-conventions { grid-template-columns: 1fr; }
  .fb-card { grid-template-columns: 67px minmax(0, 1fr); padding: 14px 12px; gap: 10px; }
  .fb-card.fb-selected { padding-left: 9px; }
  .fb-glyph { font-size: 27px; gap: 3px; }
  .fb-stack { min-width: 22px; }
  .fb-toolbar label { flex: 1 1 150px; }
  .fb-toolbar input, .fb-toolbar select { width: 100%; }
  .fb-family h3 { font-size: 25px; }
  body:has(#french-bass.active) footer { gap: 6px; padding: 8px 16px; }
  body:has(#french-bass.active) footer .footer-row { gap: 6px; }
  body:has(#french-bass.active) footer .tonic-picker,
  body:has(#french-bass.active) footer label:has(#tempoInput),
  body:has(#french-bass.active) footer label:has(#globalTuning),
  body:has(#french-bass.active) footer .footer-row:last-child > :not(#musicSettingsPop):not(#recordOutput):not(.footer-help) { display: none; }
  body:has(#french-bass.active) footer label:has(#soundSelect) { flex: 1 1 110px; min-width: 0; gap: 4px; font-size: 12px; }
  body:has(#french-bass.active) #soundSelect { width: 100%; min-width: 0; }
  body:has(#french-bass.active) footer button,
  body:has(#french-bass.active) footer summary,
  body:has(#french-bass.active) footer .footer-help { font-size: 12px; padding: 0 10px; min-height: 38px; }
}
@media print {
  .fb-player, .fb-toolbar, .fb-jumps, .fb-actions { display: none; }
  .fb-layout { display: block; }
  .fb-card { break-inside: avoid; }
}
