/* ─── SONGBOOK ──────────────────────────────────────────────── */
.songbook-page {
  width: 100%;
  min-height: 100%;
  padding: calc(24px * var(--ui-scale));
  display: flex;
  flex-direction: column;
  gap: calc(18px * var(--ui-scale));
}

.songbook-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(16px * var(--ui-scale));
}

.songbook-library-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.songbook-library-title {
  min-width: max-content;
}

.songbook-library-header .songbook-header-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.songbook-page-header h1 {
  font-size: calc(30px * var(--ui-scale));
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.03em;
}

.songbook-page-header p {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  margin-top: calc(6px * var(--ui-scale));
}

.songbook-header-actions,
.songbook-import-actions {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ui-scale));
  flex-wrap: wrap;
}

.songbook-btn,
.songbook-file-btn,
.songbook-icon-btn,
.songbook-tab,
.songbook-select {
  min-height: calc(38px * var(--ui-scale));
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.songbook-btn,
.songbook-file-btn {
  padding: 0 calc(15px * var(--ui-scale));
}

.songbook-icon-btn {
  width: calc(40px * var(--ui-scale));
  padding: 0;
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.songbook-btn.primary,
.songbook-tab.active,
.songbook-icon-btn.active {
  color: #fff;
  background: var(--note-blue);
  border-color: var(--note-blue);
  box-shadow: 0 0 0 3px var(--note-blue-soft);
}

.songbook-btn.secondary,
.songbook-file-btn,
.songbook-select,
.songbook-tab {
  color: var(--text-secondary);
  background: var(--bg-surface);
}

.songbook-btn.danger {
  color: var(--error);
  background: transparent;
  border-color: rgba(240, 80, 80, 0.35);
}

.songbook-btn:hover:not(:disabled),
.songbook-file-btn:hover,
.songbook-icon-btn:hover,
.songbook-tab:hover,
.songbook-select:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.songbook-btn.primary:hover:not(:disabled) {
  color: #fff;
  background: var(--note-blue);
  filter: brightness(1.05);
}

.songbook-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.songbook-input,
.songbook-select {
  min-height: calc(40px * var(--ui-scale));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  font: inherit;
  outline: none;
}

.songbook-input {
  width: 100%;
  padding: 0 calc(12px * var(--ui-scale));
}

.songbook-select {
  padding: 0 calc(12px * var(--ui-scale));
}

.songbook-input:focus,
.songbook-select:focus,
.songbook-textarea:focus {
  border-color: var(--note-blue);
  box-shadow: 0 0 0 3px var(--note-blue-soft);
}

.songbook-secondary-menu {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(340px, auto);
  align-items: center;
  gap: calc(12px * var(--ui-scale));
}

.songbook-search-control {
  position: relative;
  min-width: 0;
  max-width: 420px;
}

.songbook-search-control .songbook-input {
  padding-right: calc(40px * var(--ui-scale));
}

.songbook-search-control span {
  position: absolute;
  right: calc(13px * var(--ui-scale));
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
}

.songbook-filter-tabs {
  display: flex;
  justify-content: flex-end;
  gap: calc(8px * var(--ui-scale));
  flex-wrap: wrap;
}

.songbook-library-header-menu {
  grid-template-columns: minmax(220px, 1fr) minmax(96px, 120px) auto;
  width: 100%;
}

.songbook-library-header-menu .songbook-search-control {
  max-width: none;
}

.songbook-library-header-menu .songbook-filter-tabs {
  flex-wrap: nowrap;
}

.songbook-tab {
  gap: calc(7px * var(--ui-scale));
  padding: 0 calc(14px * var(--ui-scale));
}

.songbook-library-layout {
  display: grid;
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
  gap: calc(14px * var(--ui-scale));
  min-height: 0;
}

.songbook-lists-panel,
.songbook-table-panel,
.songbook-song-main,
.songbook-display-drawer,
.songbook-editor-panel,
.songbook-edit-side-panel {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.songbook-lists-panel {
  padding: calc(14px * var(--ui-scale));
  display: flex;
  flex-direction: column;
  gap: calc(12px * var(--ui-scale));
}

.songbook-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.songbook-list-cards {
  display: flex;
  flex-direction: column;
  gap: calc(9px * var(--ui-scale));
}

.songbook-list-card {
  width: 100%;
  min-height: calc(64px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(11px * var(--ui-scale));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  color: var(--text-primary);
  text-align: left;
}

.songbook-list-card:hover {
  background: var(--bg-hover);
}

.songbook-list-card.active {
  color: var(--text-primary);
  border-color: var(--note-blue);
  background: var(--note-blue-soft);
}

.songbook-list-card-icon {
  width: calc(32px * var(--ui-scale));
  height: calc(32px * var(--ui-scale));
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--note-blue);
  font-weight: var(--weight-semibold);
}

.songbook-list-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.songbook-list-card-copy strong,
.songbook-cell-song strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.songbook-list-card-copy small,
.songbook-list-tip,
.songbook-table-footer {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.songbook-list-card-more {
  color: var(--text-tertiary);
}

.songbook-list-tip {
  margin-top: auto;
  padding: calc(12px * var(--ui-scale));
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  text-align: center;
}

.songbook-table-panel {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.songbook-table-head,
.songbook-table-row {
  display: grid;
  grid-template-columns: 34px minmax(180px, 1.35fr) minmax(140px, 1fr) 74px 74px 74px 86px 34px;
  align-items: center;
  gap: calc(8px * var(--ui-scale));
}

.songbook-table-head {
  min-height: calc(52px * var(--ui-scale));
  padding: 0 calc(16px * var(--ui-scale));
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-subtle);
}

.songbook-table-body {
  display: flex;
  flex-direction: column;
  overflow: auto;
}

.songbook-table-row {
  width: 100%;
  min-height: calc(52px * var(--ui-scale));
  padding: 0 calc(16px * var(--ui-scale));
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  text-align: left;
}

.songbook-table-row:hover {
  background: var(--bg-hover);
}

.songbook-cell {
  min-width: 0;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.songbook-cell-song {
  color: var(--text-primary);
}

.songbook-cell-center {
  text-align: center;
}

.songbook-row-star,
.songbook-row-menu {
  color: var(--text-tertiary);
  text-align: center;
  font-size: var(--text-lg);
}

.songbook-row-star:hover {
  color: var(--note-blue);
}

.songbook-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: calc(42px * var(--ui-scale));
  padding: 0 calc(16px * var(--ui-scale));
}

.songbook-empty,
.songbook-error {
  padding: calc(26px * var(--ui-scale));
  color: var(--text-tertiary);
  text-align: center;
}

.songbook-error,
.songbook-inline-error {
  color: var(--error);
}

.songbook-song-topbar .songbook-back-library {
  margin-top: calc(14px * var(--ui-scale));
}

.songbook-song-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: calc(14px * var(--ui-scale));
  align-items: start;
}

.songbook-song-layout.settings-open {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
}

.songbook-song-main {
  overflow: hidden;
  min-width: 0;
}

.songbook-song-info-row {
  min-height: calc(60px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale)) calc(18px * var(--ui-scale));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16px * var(--ui-scale));
  border-bottom: 1px solid var(--border-subtle);
}

.songbook-song-title-block {
  display: flex;
  align-items: baseline;
  gap: calc(12px * var(--ui-scale));
  min-width: 0;
}

.songbook-song-title-block h2 {
  margin: 0;
  font-size: calc(22px * var(--ui-scale));
  line-height: 1.15;
}

.songbook-song-title-block span,
.songbook-song-meta {
  color: var(--text-secondary);
}

.songbook-song-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: calc(12px * var(--ui-scale));
  white-space: nowrap;
  font-size: var(--text-sm);
}

.songbook-song-meta i {
  display: block;
  width: 1px;
  height: 18px;
  background: var(--border-default);
}

.songbook-song-meta strong {
  color: var(--text-primary);
  margin-left: 5px;
}

.songbook-song-sheet {
  padding: calc(24px * var(--ui-scale)) calc(22px * var(--ui-scale));
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(16px * var(--ui-scale));
  line-height: 1;
  font-weight: var(--weight-regular);
  overflow: auto;
  tab-size: 4;
}

.songbook-song-sheet.columns-2 {
  column-count: 2;
  column-gap: calc(44px * var(--ui-scale));
  column-rule: 1px solid var(--border-subtle);
}

.songbook-song-sheet.weight-thin {
  font-weight: var(--weight-light);
}

.songbook-song-sheet.weight-bold {
  font-weight: var(--weight-semibold);
}

.songbook-song-sheet.font-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.songbook-song-sheet.font-sans {
  font-family: var(--font-sans);
}

.songbook-song-sheet.font-serif {
  font-family: var(--font-serif);
}

.songbook-preview-line {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  min-height: 0;
  margin-bottom: calc((var(--song-line-spacing, 1) - 0.9) * 28px * var(--ui-scale));
  break-inside: avoid;
}

.songbook-standalone-chord-line {
  min-height: calc(var(--song-chord-lane, 15px) * var(--ui-scale));
  margin-bottom: calc((var(--song-line-spacing, 1) - 0.9) * 28px * var(--ui-scale));
  color: var(--note-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: calc(var(--song-chord-size, 14px) * var(--ui-scale));
  line-height: calc(var(--song-chord-lane, 15px) * var(--ui-scale));
  font-weight: 700;
  white-space: pre;
  overflow-x: visible;
  break-inside: avoid;
}

.songbook-lyric-token {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  white-space: pre-wrap;
}

.songbook-chord {
  height: calc(var(--song-chord-lane, 15px) * var(--ui-scale));
  color: var(--note-blue);
  display: block;
  font-size: calc(var(--song-chord-size, 14px) * var(--ui-scale));
  line-height: calc(var(--song-chord-lane, 15px) * var(--ui-scale));
  font-weight: 700;
  overflow: visible;
  white-space: nowrap;
}

.songbook-lyric {
  color: var(--text-primary);
  font-size: calc(var(--song-lyric-size, 16px) * var(--ui-scale));
  line-height: 1.05;
  white-space: pre-wrap;
}

.songbook-preview-blank {
  height: calc(var(--song-lyric-size, 16px) * var(--song-line-spacing, 1) * 0.65 * var(--ui-scale));
  break-inside: avoid;
}

.songbook-section-label {
  margin: calc(20px * var(--ui-scale)) 0 calc(8px * var(--ui-scale));
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  break-after: avoid;
}

.songbook-preview-empty {
  color: var(--text-tertiary);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
}

.songbook-song-sheet.hide-chords .songbook-chord,
.songbook-song-sheet.hide-chords .songbook-standalone-chord-line,
.songbook-song-sheet.hide-sections .songbook-section-label {
  display: none;
}

.songbook-display-drawer {
  padding: calc(16px * var(--ui-scale));
  display: flex;
  flex-direction: column;
  gap: calc(16px * var(--ui-scale));
}

.songbook-display-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: calc(10px * var(--ui-scale));
  border-bottom: 1px solid var(--border-subtle);
}

.songbook-display-drawer-header h3,
.songbook-edit-side-panel h3 {
  margin: 0;
  font-size: var(--text-lg);
}

.songbook-display-group {
  display: flex;
  flex-direction: column;
  gap: calc(9px * var(--ui-scale));
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.songbook-segmented,
.songbook-stepper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-base);
}

.songbook-segmented.three {
  grid-template-columns: repeat(3, 1fr);
}

.songbook-segmented button,
.songbook-stepper button,
.songbook-stepper strong {
  min-height: calc(38px * var(--ui-scale));
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.songbook-segmented button.active {
  color: #fff;
  background: var(--note-blue);
}

.songbook-weight-options button,
.songbook-font-options button {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.songbook-stepper {
  grid-template-columns: 46px 1fr 46px;
}

.songbook-stepper button {
  background: var(--bg-elevated);
  font-size: var(--text-lg);
}

.songbook-stepper strong {
  color: var(--text-primary);
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  font-weight: var(--weight-medium);
}

.songbook-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(10px * var(--ui-scale));
  color: var(--text-primary);
}

.songbook-switch-row input {
  width: calc(38px * var(--ui-scale));
  height: calc(20px * var(--ui-scale));
  accent-color: var(--note-blue);
}

.songbook-reset-btn {
  width: 100%;
  margin-top: auto;
}

.songbook-edit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 280px);
  gap: calc(14px * var(--ui-scale));
  align-items: start;
}

.songbook-editor-panel {
  display: flex;
  flex-direction: column;
  gap: calc(14px * var(--ui-scale));
  padding: calc(16px * var(--ui-scale));
}

.songbook-fields-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 100px;
  gap: calc(10px * var(--ui-scale));
}

.songbook-fields-grid.wide {
  grid-template-columns: minmax(180px, 1.3fr) minmax(160px, 1fr) 90px 90px 80px;
}

.songbook-fields-grid label,
.songbook-content-label {
  display: flex;
  flex-direction: column;
  gap: calc(6px * var(--ui-scale));
  color: var(--text-secondary);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
}

.songbook-favorite-check {
  display: inline-flex;
  align-items: center;
  gap: calc(8px * var(--ui-scale));
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.songbook-chord-toolbar {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: calc(10px * var(--ui-scale));
}

.songbook-chord-root-palette {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: calc(8px * var(--ui-scale));
  min-width: 0;
}

.songbook-chord-root {
  position: relative;
}

.songbook-chord-root summary {
  min-width: calc(42px * var(--ui-scale));
  min-height: calc(34px * var(--ui-scale));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(4px * var(--ui-scale));
  padding: 0 calc(10px * var(--ui-scale));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.songbook-chord-root summary::-webkit-details-marker {
  display: none;
}

.songbook-chord-root summary::after {
  content: '⌄';
  color: var(--text-tertiary);
  font-size: 0.8em;
}

.songbook-chord-root[open] summary {
  border-color: var(--note-blue);
  color: var(--note-blue);
  background: var(--note-blue-soft);
}

.songbook-chord-root[open] summary::after {
  content: '⌃';
  color: var(--note-blue);
}

.songbook-chord-variations {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  left: 0;
  width: max-content;
  max-width: min(360px, calc(100vw - 48px));
  display: grid;
  grid-template-columns: repeat(3, minmax(calc(70px * var(--ui-scale)), 1fr));
  gap: calc(6px * var(--ui-scale));
  padding: calc(10px * var(--ui-scale));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-lg);
}

.songbook-chord-variations button {
  min-height: calc(30px * var(--ui-scale));
  padding: 0 calc(10px * var(--ui-scale));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-weight: var(--weight-semibold);
  white-space: nowrap;
}

.songbook-chord-variations button:hover,
.songbook-chord-variations button.dragging {
  border-color: var(--note-blue);
  color: var(--note-blue);
}

.songbook-chord-variations button[draggable="true"] {
  cursor: grab;
}

.songbook-chord-variations button[draggable="true"]:active {
  cursor: grabbing;
}

.songbook-textarea.content.drag-over {
  border-color: var(--note-blue);
  box-shadow: 0 0 0 3px var(--note-blue-soft);
  background: var(--bg-elevated);
}

.songbook-inline-error {
  padding: calc(9px * var(--ui-scale)) calc(11px * var(--ui-scale));
  border: 1px solid rgba(240, 80, 80, 0.25);
  border-radius: var(--radius-md);
  background: rgba(240, 80, 80, 0.08);
  font-size: var(--text-xs);
}

.songbook-import-panel {
  display: flex;
  flex-direction: column;
  gap: calc(10px * var(--ui-scale));
  padding: calc(12px * var(--ui-scale));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.songbook-import-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12px * var(--ui-scale));
}

.songbook-import-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.songbook-import-heading small,
.songbook-edit-help p,
.songbook-list-checkbox-empty {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
}

.songbook-file-btn {
  position: relative;
  overflow: hidden;
}

.songbook-file-btn input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.songbook-textarea {
  width: 100%;
  resize: vertical;
  padding: calc(12px * var(--ui-scale));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: var(--text-sm);
  line-height: 1.55;
  outline: none;
  tab-size: 4;
}

.songbook-textarea.import {
  min-height: 150px;
}

.songbook-textarea.content {
  min-height: 460px;
}

.songbook-edit-side-panel {
  padding: calc(16px * var(--ui-scale));
  display: flex;
  flex-direction: column;
  gap: calc(14px * var(--ui-scale));
}

.songbook-list-checkboxes {
  display: flex;
  flex-direction: column;
  gap: calc(8px * var(--ui-scale));
}

.songbook-list-checkbox {
  display: flex;
  align-items: center;
  gap: calc(8px * var(--ui-scale));
  padding: calc(9px * var(--ui-scale));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: var(--bg-base);
}

.songbook-edit-help {
  margin-top: auto;
  padding: calc(12px * var(--ui-scale));
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.songbook-edit-help strong {
  display: block;
  margin-bottom: calc(5px * var(--ui-scale));
}

.hidden {
  display: none !important;
}

@media (max-width: 1180px) {
  .songbook-secondary-menu,
  .songbook-library-layout,
  .songbook-song-layout.settings-open,
  .songbook-edit-layout {
    grid-template-columns: 1fr;
  }

  .songbook-library-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .songbook-library-header-menu {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .songbook-library-header-menu .songbook-filter-tabs {
    grid-column: 1 / -1;
    flex-wrap: wrap;
  }

  .songbook-library-header .songbook-header-actions,
  .songbook-filter-tabs {
    justify-content: flex-start;
  }

  .songbook-display-drawer {
    order: -1;
  }
}

@media (max-width: 900px) {
  .songbook-table-head,
  .songbook-table-row {
    grid-template-columns: 30px minmax(160px, 1fr) minmax(110px, 0.8fr) 60px 60px 34px;
  }

  .songbook-table-head span:nth-child(6),
  .songbook-table-head span:nth-child(7),
  .songbook-table-row .songbook-cell:nth-of-type(5),
  .songbook-table-row .songbook-cell:nth-of-type(6) {
    display: none;
  }

  .songbook-song-sheet.columns-2 {
    column-count: 1;
  }

  .songbook-fields-grid.wide,
  .songbook-fields-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .songbook-page {
    padding: 16px;
  }

  .songbook-page-header,
  .songbook-import-heading,
  .songbook-song-info-row,
  .songbook-song-title-block {
    flex-direction: column;
    align-items: stretch;
  }

  .songbook-header-actions,
  .songbook-filter-tabs {
    width: 100%;
  }

  .songbook-header-actions .songbook-btn,
  .songbook-tab {
    flex: 1;
  }

  .songbook-chord-variations {
    position: static;
    width: 100%;
    max-width: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: calc(6px * var(--ui-scale));
  }

  .songbook-chord-root {
    flex: 1 1 calc(50% - 8px);
  }

  .songbook-chord-root summary {
    width: 100%;
  }

  .songbook-song-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Songbook display controls live inside the app right panel, not inside the song sheet. */
.app-infopanel .songbook-display-drawer {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  min-height: 100%;
}

.app-infopanel .songbook-display-drawer-header {
  padding-bottom: calc(12px * var(--ui-scale));
}

.app-infopanel .songbook-reset-btn {
  margin-top: calc(8px * var(--ui-scale));
}

.songbook-panel-select {
  width: 100%;
}

.songbook-settings-note {
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  line-height: var(--leading-relaxed);
  padding: calc(10px * var(--ui-scale)) calc(12px * var(--ui-scale));
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

/* A standalone chord row already provides the chord lane for the lyric row below it. */
.songbook-standalone-chord-line {
  margin-bottom: 0;
}

.songbook-standalone-chord-line + .songbook-preview-line .songbook-chord {
  height: 0;
  min-height: 0;
  font-size: 0;
  line-height: 0;
}
