@import url("shell.css?v=20260714-readiness");

.ly-app-body {
  min-height: calc(100vh - var(--ly-header-height));
}

.ly-app-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  padding: 28px;
}

.ly-app-sidebar,
.ly-app-preview {
  background: #FFFFFF;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  box-shadow: var(--ly-shadow-sm);
}

.ly-app-sidebar {
  padding: 22px;
}

.ly-app-preview {
  padding: 32px;
  min-height: 640px;
}

.ly-segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 6px;
  border-radius: 18px;
  background: #EEF1F5;
}

.ly-segmented button {
  border: 0;
  border-radius: 14px;
  padding: 12px 10px;
  background: transparent;
  color: var(--ly-color-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.ly-segmented button.is-active {
  background: #FFFFFF;
  color: var(--ly-color-text);
  box-shadow: var(--ly-shadow-sm);
}

@media (max-width: 980px) {
  .ly-app-layout {
    grid-template-columns: 1fr;
    padding: 16px;
  }
}

/* Phase 9.10 · WebApp Layout */
.ly-app-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.ly-app-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: start;
  margin-bottom: 34px;
}

.ly-app-sheet {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-xl);
  background: linear-gradient(180deg, #FFFFFF, #FAFAFB);
  box-shadow: var(--ly-shadow-sm);
}

.ly-app-sheet p {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 18px;
  align-items: baseline;
  font-size: 18px;
}

.ly-app-sheet .ly-chord {
  color: var(--ly-color-primary-hover);
  font-weight: 950;
}

@media (max-width: 720px) {
  .ly-app-preview-head {
    flex-direction: column;
  }

  .ly-app-sheet p {
    grid-template-columns: 48px 1fr;
  }
}

/* Final mission overrides: preserve alignment without page-level overflow. */
#lyricsInput,
.ly-section-editor-card textarea {
  white-space: pre-wrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.ly-sheet-chords b,
.ly-sheet-lyric {
  min-width: 0;
  max-width: 100%;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

/* 2026-07-15 · Manuelle Texteingabe, Struktur-Editor und Exportvorschau */
.ly-manual-format-help {
  margin: 0;
  padding: .8rem .9rem;
  border-radius: .85rem;
  background: rgba(15, 23, 42, .045);
  line-height: 1.55;
}

.ly-manual-format-help code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.ly-manual-message {
  margin: 0;
  padding: .8rem .9rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: .85rem;
  font-weight: 750;
  line-height: 1.45;
}

.ly-manual-message.is-error {
  border-color: rgba(190, 55, 55, .38);
  background: rgba(190, 55, 55, .08);
  color: #8f2525;
}

.ly-manual-message.is-success {
  border-color: rgba(34, 139, 94, .35);
  background: rgba(34, 139, 94, .08);
  color: #196a47;
}

.ly-section-editor[hidden] {
  display: none;
}

.ly-section-editor {
  display: grid;
  gap: 1rem;
  margin: 1rem 0 1.25rem;
  padding: clamp(1rem, 2vw, 1.4rem);
  border: 1px solid var(--ly-color-border);
  border-radius: 1.25rem;
  background: #f8fafc;
}

.ly-section-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.ly-section-editor-head > div {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.ly-section-editor-head span {
  color: var(--ly-color-muted);
  line-height: 1.4;
}

.ly-section-editor-list {
  display: grid;
  gap: 1rem;
}

.ly-section-editor-card {
  display: grid;
  grid-template-columns: minmax(150px, .35fr) minmax(0, 1fr);
  gap: .9rem;
  padding: 1rem;
  border: 1px solid var(--ly-color-border);
  border-radius: 1rem;
  background: #fff;
}

.ly-section-editor-card label {
  display: grid;
  align-content: start;
  gap: .45rem;
  min-width: 0;
  font-weight: 800;
}

.ly-section-editor-card textarea {
  min-height: 7rem;
  max-height: 22rem;
  font-family: var(--ly-font-mono);
  white-space: pre-wrap;
  overflow-wrap: normal;
}

.ly-section-editor-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.ly-section-editor-actions button {
  padding: .55rem .7rem;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #fff;
  color: var(--ly-color-text);
  font: inherit;
  font-size: .82rem;
  font-weight: 800;
  cursor: pointer;
}

.ly-section-editor-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.ly-export-modal-card {
  max-height: min(92vh, 900px);
  overflow-y: auto;
}

.ly-export-preview {
  display: grid;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid rgba(201, 163, 74, .35);
  border-radius: 1rem;
  background: rgba(201, 163, 74, .07);
  color: var(--ly-color-text);
}

.ly-export-preview ul {
  display: grid;
  gap: .3rem;
  margin: 0;
  padding-left: 1.2rem;
}

#lyricsInput {
  white-space: pre-wrap;
  overflow-wrap: normal;
}

.ly-sheet-chords b,
.ly-sheet-lyric {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
}

.ly-sheet-notes,
.ly-sheet-repeat,
.ly-sheet-empty-section {
  margin: .35rem 0 0;
  color: var(--ly-color-muted);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ly-sheet-spacer {
  min-height: .75rem;
}

.ly-app-sheet.is-empty .ly-sheet-preview-header + .ly-sheet-section {
  margin-top: 0;
}

@media (max-width: 720px) {
  .ly-section-editor-head,
  .ly-section-editor-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ly-section-editor-head .ly-btn,
  .ly-section-editor-actions button {
    width: 100%;
    justify-content: center;
  }

  .ly-section-editor-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ly-sheet-chords {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: .2rem !important;
  }

  .ly-sheet-chords span {
    display: block;
  }
}

@media print {
  .ly-section-editor,
  .ly-app-tools,
  .ly-app-exportbar,
  .ly-structure-bar {
    display: none !important;
  }

  .ly-sheet-section,
  .ly-sheet-row {
    break-inside: avoid;
  }
}

/* Phase 9.11 · Eingabe-Modi */
.ly-mode-panel {
  display: none;
}

.ly-mode-panel.is-active {
  display: block;
}

.ly-upload-box {
  display: grid;
  gap: 8px;
  padding: 28px;
  border: 1.5px dashed var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FAFAFB;
  color: var(--ly-color-muted);
  text-align: center;
}

.ly-upload-box strong {
  color: var(--ly-color-text);
  font-size: 18px;
}

/* Phase 9.12 · Live Preview */
.ly-app-sheet {
  transition: box-shadow .2s ease, border-color .2s ease;
}

.ly-app-sheet:has(p) {
  border-color: rgba(200,164,93,.28);
}

/* Phase 9.13 · Projektbibliothek */
.ly-app-library-wrap {
  padding: 0 28px 48px;
}

.ly-app-library-head {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: end;
  margin: 12px 0 22px;
}

.ly-app-library-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ly-app-project-card {
  display: grid;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-app-project-card strong {
  color: var(--ly-color-text);
  font-size: 18px;
}

.ly-app-project-card span {
  color: var(--ly-color-muted);
  font-weight: 700;
}

@media (max-width: 920px) {
  .ly-app-library-wrap {
    padding: 0 16px 36px;
  }

  .ly-app-library-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ly-app-library-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 9.14 · Export-Leiste */
.ly-app-exportbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-app-exportbar .ly-btn {
  min-height: 42px;
  padding: 10px 14px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .ly-app-exportbar {
    display: grid;
  }

  .ly-app-exportbar .ly-btn {
    width: 100%;
  }
}

/* Phase 9.15 · Metadaten & Analyse-Status */
.ly-app-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.ly-analysis-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.ly-analysis-status span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--ly-color-muted);
  font-size: 13px;
  font-weight: 850;
}

.ly-analysis-status span:first-child {
  background: rgba(46,157,97,.10);
  color: var(--ly-color-success);
}

@media (max-width: 720px) {
  .ly-app-meta-grid {
    grid-template-columns: 1fr;
  }
}

/* Phase 9.16 · Songstruktur */
.ly-structure-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ly-structure-bar span {
  padding: 8px 12px;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ly-color-muted);
  font-size: 13px;
  font-weight: 850;
  box-shadow: var(--ly-shadow-sm);
}

.ly-structure-bar span.is-active {
  background: rgba(200,164,93,.16);
  border-color: rgba(200,164,93,.45);
  color: #7A5B1E;
}

/* Phase 9.17 · Transponieren & Ansicht */
.ly-app-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.ly-app-tools .ly-btn {
  min-height: 38px;
  padding: 8px 12px;
  font-size: 13px;
}

@media (max-width: 720px) {
  .ly-app-tools {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Phase 9.18 · Export-Status */
.ly-export-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 22px;
}

.ly-export-status span {
  padding: 7px 10px;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--ly-color-muted);
  font-size: 13px;
  font-weight: 850;
}

/* Phase 10.1 · App Framework */
.ly-app-project-card {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.ly-app-project-card:hover,
.ly-app-project-card.is-selected {
  transform: translateY(-2px);
  border-color: rgba(200,164,93,.55);
  box-shadow: var(--ly-shadow-md);
}

.ly-app-project-card.is-selected {
  background: rgba(200,164,93,.08);
}

/* Phase 10.2 · Lokale Projektverwaltung */
[data-library-status] {
  transition: color .2s ease;
}

.ly-app-project-card:active {
  transform: scale(.99);
}

/* Phase 10.3 · Autosave / Update / Delete */
.ly-app-project-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.ly-app-project-card button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--ly-color-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.ly-app-project-card button:hover {
  background: rgba(209,74,74,.10);
  color: var(--ly-color-error);
}

/* Phase 10.4 · Projektbibliothek UX-Fix */
.ly-app-library-head {
  align-items: center;
}

.ly-app-empty-project {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid rgba(200,164,93,.35);
  border-radius: var(--ly-radius-xl);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-empty-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(200,164,93,.16);
  color: #7A5B1E;
  font-size: 24px;
  font-weight: 950;
}

.ly-app-empty-project strong {
  display: block;
  color: var(--ly-color-text);
  font-size: 22px;
  line-height: 1.15;
  margin-bottom: 6px;
}

.ly-app-empty-project span {
  display: block;
  color: var(--ly-color-muted);
  font-size: 16px;
  line-height: 1.5;
  font-weight: 750;
}

.ly-app-project-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-width: 0;
}

.ly-app-project-card div,
.ly-app-project-card strong,
.ly-app-project-card span {
  min-width: 0;
}

.ly-app-project-card strong,
.ly-app-project-card span {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .ly-app-library-wrap {
    padding: 0 18px 40px;
  }

  .ly-app-library-head {
    display: grid;
    gap: 18px;
    align-items: stretch;
  }

  .ly-app-library-head h2 {
    font-size: clamp(36px, 10vw, 54px);
    line-height: .98;
  }

  .ly-app-empty-project {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 24px;
  }

  .ly-empty-icon {
    width: 48px;
    height: 48px;
  }

  .ly-app-empty-project strong {
    font-size: 28px;
  }

  .ly-app-empty-project span {
    font-size: 18px;
  }

  .ly-app-project-card {
    grid-template-columns: minmax(0, 1fr) 36px;
    padding: 20px;
  }
}

/* Phase 10.5 · Bibliothek Suche & Sortierung */
.ly-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  align-items: center;
}

.ly-library-search {
  min-width: 220px;
}

.ly-library-sort {
  min-width: 160px;
}

@media (max-width: 720px) {
  .ly-library-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ly-library-search,
  .ly-library-sort {
    width: 100%;
    min-width: 0;
  }
}

/* Phase 10.6 · TXT Export */
.ly-export-status span:nth-child(2) {
  transition: background .2s ease, color .2s ease;
}

/* Phase 10.7 · PDF Druckexport */
.ly-export-status span:nth-child(2) {
  border: 1px solid rgba(200,164,93,.25);
}

/* Phase 10.8 · ChordPro Export */
.ly-app-exportbar {
  align-items: center;
}

/* Phase 11.1 · Harmonische Akkord-Engine */
.ly-chord-engine-panel {
  display: grid;
  gap: 16px;
  margin-top: 28px;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-chord-engine-panel h3 {
  margin-top: 6px;
}

.ly-chord-scale {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ly-chord-scale span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--ly-color-border);
  border-radius: 14px;
  background: #FAFAFB;
}

.ly-chord-scale small {
  color: var(--ly-color-muted);
  font-weight: 850;
}

.ly-chord-scale strong {
  color: var(--ly-color-text);
  font-weight: 950;
}

@media (max-width: 720px) {
  .ly-chord-scale {
    grid-template-columns: 1fr;
  }
}

/* Phase 11.3 · Mehrfachakkorde über Textzeile */
.ly-app-sheet {
  gap: 18px;
}

.ly-sheet-row {
  display: grid;
  gap: 4px;
}

.ly-sheet-chords {
  white-space: pre-wrap;
  color: var(--ly-color-primary-hover);
  font-weight: 950;
  font-family: var(--ly-font-mono);
  letter-spacing: .01em;
}

.ly-sheet-lyric {
  color: var(--ly-color-body);
  font-size: 18px;
  line-height: 1.55;
}

.ly-app-sheet p {
  display: none;
}

/* Phase 11.4 · Akkordpositionen */
.ly-sheet-chords,
.ly-sheet-lyric {
  font-family: var(--ly-font-mono);
  white-space: pre;
  overflow-x: auto;
}

.ly-sheet-row {
  overflow-x: auto;
  padding-bottom: 2px;
}

#lyricsInput {
  font-family: var(--ly-font-mono);
  white-space: pre;
}

/* Phase 11.5 · Transponieren & Schriftgröße */
:root {
  --ly-sheet-font-size: 18px;
}

.ly-sheet-lyric {
  font-size: var(--ly-sheet-font-size);
}

.ly-sheet-chords {
  font-size: calc(var(--ly-sheet-font-size) * .95);
}

/* Phase 11.7 · Capo */
[data-capo-status] {
  background: rgba(200,164,93,.12) !important;
  color: #7A5B1E !important;
}

/* Phase 11.8 · Capo Spielakkorde */
[data-capo-status] {
  font-weight: 900;
}

/* Phase 11.9 · Original + Capo Anzeige */
.ly-sheet-row {
  gap: 3px;
  padding: 4px 0 10px;
  border-bottom: 1px solid rgba(229,232,238,.7);
}

.ly-sheet-row:last-child {
  border-bottom: 0;
}

.ly-sheet-chords {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
}

.ly-sheet-chords span {
  color: var(--ly-color-muted);
  font-family: var(--ly-font-sans);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.ly-original-chords {
  color: var(--ly-color-primary-hover);
}

.ly-capo-chords {
  color: var(--ly-color-success);
}

.ly-sheet-lyric {
  padding-left: 92px;
}

@media (max-width: 720px) {
  .ly-sheet-chords {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ly-sheet-lyric {
    padding-left: 82px;
  }
}

/* Phase 11.10 · Songstruktur Navigation */
.ly-structure-bar button {
  padding: 8px 12px;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ly-color-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: var(--ly-shadow-sm);
}

.ly-structure-bar button.is-active {
  background: rgba(200,164,93,.16);
  border-color: rgba(200,164,93,.45);
  color: #7A5B1E;
}

/* Phase 11.11 · Gesamtblatt Vorschau */
.ly-sheet-section-title {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ly-color-border);
  color: var(--ly-color-text);
  font-size: 20px;
  font-weight: 950;
}

.ly-structure-bar button[data-section-all] {
  background: #FFFFFF;
  color: var(--ly-color-text);
}

.ly-structure-bar button[data-section-all].is-active {
  background: var(--ly-color-text);
  border-color: var(--ly-color-text);
  color: #FFFFFF;
}

.ly-app-sheet {
  max-width: 820px;
  margin-inline: auto;
}

@media (min-width: 1100px) {
  .ly-app-sheet {
    min-height: 820px;
  }
}

/* Phase 11.12 · Projekt speichern final */
[data-save-status] {
  background: rgba(209,74,74,.08) !important;
  color: var(--ly-color-muted) !important;
}

.ly-app-project-card[data-project-id] {
  cursor: pointer;
}

/* Phase 11.13 · Projektbibliothek Aktionen */
.ly-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ly-project-actions button {
  width: auto;
  height: auto;
  padding: 8px 10px;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ly-color-muted);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.ly-project-actions button:hover {
  border-color: rgba(200,164,93,.45);
  color: var(--ly-color-text);
  background: rgba(200,164,93,.08);
}

@media (max-width: 720px) {
  .ly-app-project-card {
    grid-template-columns: 1fr;
  }

  .ly-project-actions {
    justify-content: flex-start;
  }
}

/* Phase 11.13B · Responsive App Layout Fix */

/* Grundschutz gegen horizontales Überlaufen */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.ly-app-body,
.ly-app-layout,
.ly-app-sidebar,
.ly-app-preview,
.ly-app-library-wrap,
.ly-container,
.ly-app-sheet,
.ly-app-library-grid,
.ly-project-card-clean {
  min-width: 0;
  max-width: 100%;
}

/* Große Desktop-Ansicht */
.ly-app-layout {
  width: 100%;
}

/* Laptop / iPad quer */
@media (max-width: 1280px) {
  .ly-app-layout {
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 22px;
  }

  .ly-app-preview {
    padding: 28px;
  }

  .ly-app-library-wrap .ly-container {
    max-width: 100%;
  }
}

/* iPad hoch / kleine Laptops */
@media (max-width: 1024px) {
  .ly-app-layout {
    grid-template-columns: 1fr;
  }

  .ly-app-sidebar {
    position: static;
  }

  .ly-app-preview {
    min-height: auto;
  }

  .ly-app-library-head {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .ly-library-actions {
    justify-content: stretch;
  }

  .ly-library-actions > * {
    width: 100%;
  }

  .ly-project-card-clean {
    grid-template-columns: 1fr;
  }

  .ly-project-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* Tablet / große Smartphones */
@media (max-width: 768px) {
  .ly-app-body {
    padding: 16px;
  }

  .ly-app-layout {
    gap: 18px;
  }

  .ly-app-sidebar,
  .ly-app-preview {
    border-radius: 22px;
    padding: 22px;
  }

  .ly-app-preview-head {
    gap: 14px;
  }

  .ly-app-preview h1,
  .ly-app-sidebar h2,
  .ly-app-library-head h2 {
    font-size: clamp(34px, 9vw, 54px);
    line-height: 1;
  }

  .ly-app-meta-grid {
    grid-template-columns: 1fr;
  }

  .ly-app-tools,
  .ly-app-exportbar,
  .ly-structure-bar {
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
    -webkit-overflow-scrolling: touch;
  }

  .ly-app-tools .ly-btn,
  .ly-app-exportbar .ly-btn,
  .ly-structure-bar button {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .ly-app-sheet {
    min-height: auto;
    padding: 22px;
  }

  .ly-sheet-chords,
  .ly-sheet-lyric {
    overflow-x: auto;
  }

  .ly-project-main {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .ly-project-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ly-project-actions button {
    width: 100%;
  }
}

/* Smartphone */
@media (max-width: 520px) {
  .ly-app-body {
    padding: 10px;
  }

  .ly-app-sidebar,
  .ly-app-preview {
    padding: 18px;
    border-radius: 18px;
  }

  .ly-app-library-wrap {
    padding-left: 10px;
    padding-right: 10px;
  }

  .ly-app-library-head h2 {
    font-size: clamp(32px, 11vw, 46px);
  }

  .ly-project-card-clean {
    padding: 18px;
  }

  .ly-project-main {
    grid-template-columns: 1fr;
  }

  .ly-project-icon {
    width: 44px;
    height: 44px;
  }

  .ly-project-meta {
    gap: 6px;
  }

  .ly-project-meta span {
    font-size: 12px;
    min-height: 28px;
  }

  .ly-sheet-chords {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .ly-sheet-lyric {
    padding-left: 80px;
  }
}

/* Sehr große Monitore / TV */
@media (min-width: 1600px) {
  .ly-app-layout,
  .ly-app-library-wrap .ly-container {
    max-width: 1500px;
    margin-inline: auto;
  }

  .ly-app-layout {
    grid-template-columns: 420px minmax(0, 1fr);
  }
}

/* Phase 11.13C · Projektbibliothek Redesign */
.ly-app-library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  width: 100%;
  max-width: 980px;
  margin-inline: auto;
}

.ly-project-list-card {
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-xl);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-project-list-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.ly-project-list-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(200,164,93,.16);
  color: #7A5B1E;
  font-size: 24px;
  font-weight: 950;
}

.ly-project-list-head strong {
  display: block;
  color: var(--ly-color-text);
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.ly-project-list-head span {
  display: block;
  margin-top: 4px;
  color: var(--ly-color-muted);
  font-size: 14px;
  font-weight: 800;
}

.ly-project-list-meta {
  display: grid;
  gap: 8px;
  color: var(--ly-color-muted);
  font-size: 15px;
  font-weight: 750;
}

.ly-project-list-meta b {
  color: var(--ly-color-text);
  font-weight: 950;
}

.ly-project-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ly-project-list-actions button {
  min-height: 40px;
  padding: 10px 14px;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--ly-color-text);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.ly-project-list-actions button:hover {
  border-color: rgba(200,164,93,.55);
  background: rgba(200,164,93,.10);
}

.ly-project-list-actions button[data-project-action="delete"]:hover {
  border-color: rgba(209,74,74,.45);
  background: rgba(209,74,74,.08);
  color: var(--ly-color-error);
}

@media (max-width: 640px) {
  .ly-project-list-card {
    padding: 20px;
  }

  .ly-project-list-head {
    grid-template-columns: 1fr;
  }

  .ly-project-list-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ly-project-list-actions button {
    width: 100%;
  }
}

/* Phase 11.14 · Export-Assistent */
.ly-export-modal[hidden] {
  display: none;
}

.ly-export-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32,36,42,.45);
  backdrop-filter: blur(10px);
}

.ly-export-modal-card {
  width: min(720px, 100%);
  display: grid;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--ly-radius-xl);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-lg);
}

.ly-export-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.ly-export-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ly-export-options {
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FAFAFB;
}

.ly-export-options label {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--ly-color-text);
  font-weight: 850;
}

.ly-export-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .ly-export-modal-actions {
    display: grid;
  }

  .ly-export-modal-actions .ly-btn {
    width: 100%;
  }
}

/* Phase 11.14A · Songstruktur Reihenfolge */
.ly-sheet-section {
  display: grid;
  gap: 12px;
}

.ly-sheet-section + .ly-sheet-section {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 2px solid var(--ly-color-border);
}

.ly-sheet-section-title {
  margin: 0 0 4px;
  padding-bottom: 8px;
}

.ly-sheet-row {
  padding: 2px 0 8px;
}

/* Phase 11.14B · Einzelabschnitte kompakt */
.ly-app-sheet {
  min-height: 0 !important;
  align-content: start;
  justify-content: stretch;
}

.ly-sheet-section {
  align-content: start;
  gap: 8px;
}

.ly-sheet-section-title {
  margin: 0 0 8px !important;
  padding-bottom: 8px !important;
  line-height: 1.1;
}

.ly-sheet-row {
  padding: 0 0 10px !important;
  margin: 0;
}

.ly-sheet-chords {
  margin: 0;
  line-height: 1.25;
}

.ly-sheet-lyric {
  margin: 0;
  line-height: 1.35;
}

.ly-sheet-section .ly-sheet-row:first-of-type {
  margin-top: 0;
}

/* Nur Einzelabschnitt: keine künstliche A4-Höhe */
.ly-app-sheet:not(:has(.ly-sheet-section + .ly-sheet-section)) {
  min-height: 0 !important;
}

/* Gesamtblatt bleibt etwas luftiger */
.ly-app-sheet:has(.ly-sheet-section + .ly-sheet-section) {
  min-height: 820px;
}

/* Phase 11.18 · Exportstatus */
.ly-export-status span.is-export-ready {
  background: rgba(46,157,97,.12) !important;
  color: var(--ly-color-success) !important;
}

.ly-export-status span.is-export-warning {
  background: rgba(216,138,0,.12) !important;
  color: var(--ly-color-warning) !important;
}

/* Phase 11.19 · Exportoptionen speichern */
.ly-export-options input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--ly-color-primary);
}


.ly-song-meta{
margin:22px 0;
padding:18px;
background:#fff;
border-radius:18px;
border:1px solid #E6E8ED;
}

.ly-song-meta h3{
margin:0 0 14px;
font-size:18px;
}

.ly-song-meta label{
display:block;
margin-top:10px;
margin-bottom:4px;
font-weight:600;
}

.ly-song-meta input,
.ly-song-meta select{
width:100%;
}

/* Phase 11.21A · Songinformationen */
.ly-song-meta {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-song-meta h3 {
  margin: 0 0 4px;
  color: var(--ly-color-text);
  font-size: 20px;
  line-height: 1.1;
}

/* Phase 11.22 · Lead Sheet vorbereiten */
.ly-badge.is-ready {
  background: rgba(46,157,97,.12) !important;
  color: var(--ly-color-success) !important;
}

/* Phase 11.23 · Editor Akkorddarstellung */
[data-chord-display-toggle] {
  font-weight: 950;
}

/* Phase 12.1 · Import Core */
.ly-import-panel {
  display: grid;
  gap: 16px;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-import-panel h3 {
  margin: 6px 0 6px;
  font-size: 20px;
}

.ly-import-drop {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(200,164,93,.55);
  border-radius: 18px;
  background: rgba(200,164,93,.08);
  cursor: pointer;
}

.ly-import-drop input {
  display: none;
}

.ly-import-drop span {
  color: var(--ly-color-text);
  font-weight: 950;
}

.ly-import-drop small {
  color: var(--ly-color-muted);
  font-weight: 850;
}

.ly-import-drop small.is-ready {
  color: var(--ly-color-success);
}

.ly-import-drop small.is-error {
  color: var(--ly-color-danger, #B42318);
}

.ly-import-drop.is-busy {
  cursor: progress;
  opacity: .72;
}

.ly-import-rights {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--ly-color-body);
  line-height: 1.45;
  cursor: pointer;
}

.ly-import-rights input {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--ly-color-primary);
}

/* Phase 12.7 · Import-Vorschau */
.ly-import-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(32,36,42,.48);
  backdrop-filter: blur(10px);
}

.ly-import-preview-card {
  width: min(1100px, 100%);
  max-height: min(92vh, 960px);
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 34px);
  border-radius: var(--ly-radius-xl);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-lg);
  overflow: auto;
}

.ly-import-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.ly-import-preview-head button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ly-color-border);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.ly-import-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ly-import-preview-meta span {
  padding: 8px 12px;
  border-radius: 999px;
  background: #F3F4F6;
  color: var(--ly-color-muted);
  font-weight: 800;
}

.ly-import-preview-meta b {
  color: var(--ly-color-text);
}

.ly-import-preview-text {
  max-height: 420px;
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FAFAFB;
  color: var(--ly-color-text);
  font-family: var(--ly-font-mono);
  white-space: pre-wrap;
}

.ly-import-preview-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 560px) {
  .ly-import-preview-actions {
    display: grid;
  }

  .ly-import-preview-actions .ly-btn {
    width: 100%;
  }
}

/* Phase 12.8 · Import-Qualitätsbericht */
.ly-import-report {
  display: grid;
  gap: 10px;
  padding: 16px 18px;
  border-radius: var(--ly-radius-lg);
  border: 1px solid var(--ly-color-border);
}

.ly-import-report strong {
  color: var(--ly-color-text);
  font-size: 16px;
}

.ly-import-report ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--ly-color-body);
}

.ly-import-report p {
  margin: 0;
  color: var(--ly-color-body);
}

.ly-import-report.is-clean {
  background: rgba(46,157,97,.10);
  border-color: rgba(46,157,97,.25);
}

.ly-import-report.has-issues {
  background: rgba(216,138,0,.10);
  border-color: rgba(216,138,0,.30);
}

body.ly-modal-open {
  overflow: hidden;
}

.ly-import-edit {
  display: grid;
  gap: 16px;
}

.ly-import-edit h3 {
  margin: 0;
  font-size: 18px;
}

.ly-import-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.ly-import-meta-grid label,
.ly-import-section-head label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.ly-import-meta-grid label > span,
.ly-import-section-head label > span {
  color: var(--ly-color-muted);
  font-size: 13px;
  font-weight: 850;
}

.ly-import-meta-grid .ly-import-notes {
  grid-column: 1 / -1;
}

.ly-import-sections-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-top: 4px;
}

.ly-import-sections {
  display: grid;
  gap: 14px;
}

.ly-import-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-md);
  background: #FAFAFB;
}

.ly-import-section-head {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(220px, 1fr);
  gap: 12px;
}

.ly-import-lines {
  display: grid;
  gap: 8px;
}

.ly-import-line {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 42px;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ly-import-line-delete {
  width: 42px;
  height: 42px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-sm);
  background: #FFFFFF;
  color: var(--ly-color-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.ly-import-add-line {
  justify-self: start;
}

@media (max-width: 780px) {
  .ly-import-preview-modal {
    padding: 12px;
  }

  .ly-import-preview-card {
    gap: 16px;
    padding: 18px;
  }

  .ly-import-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ly-import-section-head,
  .ly-import-line {
    grid-template-columns: 1fr;
  }

  .ly-import-line-delete {
    justify-self: end;
  }
}

@media (max-width: 480px) {
  .ly-import-meta-grid {
    grid-template-columns: 1fr;
  }

  .ly-import-preview-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ly-import-preview-meta span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
}

/* Phase 12.10 · Mobile Export sichtbar */
@media (max-width: 768px) {
  .ly-app-exportbar {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible !important;
  }

  .ly-app-exportbar .ly-btn,
  .ly-app-exportbar button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .ly-app-tools {
    display: grid !important;
    grid-template-columns: 1fr;
    overflow: visible !important;
  }

  .ly-app-tools .ly-btn,
  .ly-app-tools button {
    width: 100%;
  }
}

/* Phase 12.10 · Mobile Export sichtbar */
@media (max-width: 768px) {
  .ly-app-exportbar {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible !important;
  }

  .ly-app-exportbar .ly-btn,
  .ly-app-exportbar button {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  .ly-app-tools {
    display: grid !important;
    grid-template-columns: 1fr;
    overflow: visible !important;
  }

  .ly-app-tools .ly-btn,
  .ly-app-tools button {
    width: 100%;
  }
}

/* Phase 12.10D · PDF Export mobil */
@media (max-width: 768px) {
  .ly-app-exportbar {
    position: sticky;
    top: 8px;
    z-index: 30;
    background: #FFFFFF;
    border-radius: var(--ly-radius-lg);
    box-shadow: var(--ly-shadow-sm);
  }
}

/* Phase 14.1 · Audio Engine */
.ly-audio-panel {
  display: grid;
  gap: 16px;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-audio-panel h3 {
  margin: 6px 0 6px;
  font-size: 20px;
}

.ly-audio-drop {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px dashed rgba(46,157,97,.45);
  border-radius: 18px;
  background: rgba(46,157,97,.08);
  cursor: pointer;
}

.ly-audio-drop input {
  display: none;
}

.ly-audio-drop span {
  color: var(--ly-color-text);
  font-weight: 950;
}

.ly-audio-drop small {
  color: var(--ly-color-muted);
  font-weight: 850;
}

.ly-audio-panel audio {
  width: 100%;
}

.ly-audio-link-source,
.ly-audio-link-status {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(200,164,93,.10);
  color: var(--ly-color-body);
  font-size: 14px;
  font-weight: 750;
}

.ly-audio-link-source[data-source-state="error"],
.ly-audio-link-status[data-state="error"] {
  background: rgba(180,35,24,.08);
  color: #B42318;
}

.ly-audio-link-status[data-state="success"] {
  background: rgba(46,157,97,.10);
  color: #18794e;
}

.ly-audio-link-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(200,164,93,.16);
}

.ly-audio-link-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--ly-color-accent, #c8a45d);
  animation: ly-audio-link-progress 1.2s ease-in-out infinite alternate;
}

.ly-audio-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ly-audio-link-progress[hidden],
.ly-audio-link-actions [hidden] {
  display: none;
}

@keyframes ly-audio-link-progress {
  from { transform: translateX(-10%); }
  to { transform: translateX(150%); }
}

@media (prefers-reduced-motion: reduce) {
  .ly-audio-link-progress span { animation: none; width: 100%; }
}

/* Phase 14.2 · Audio Upload UI */
.ly-audio-report {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-radius: var(--ly-radius-lg);
  border: 1px solid rgba(46,157,97,.25);
  background: rgba(46,157,97,.08);
  color: var(--ly-color-body);
  font-size: 14px;
  font-weight: 800;
}

.ly-audio-report strong {
  color: var(--ly-color-text);
  font-size: 15px;
}

.ly-audio-report span {
  color: var(--ly-color-muted);
}

.ly-audio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ly-audio-actions[hidden],
.ly-audio-progress[hidden] {
  display: none;
}

.ly-audio-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid rgba(89, 101, 121, .2);
  border-radius: 8px;
  background: #f7f9fb;
  color: var(--ly-color-muted);
  font-size: 13px;
  font-weight: 750;
}

.ly-audio-progress progress {
  width: 100%;
  min-height: 10px;
  accent-color: #2e9d61;
}

/* Phase 14.3A · Reiter sauber getrennt */
.ly-mode-panel:not(.is-active) {
  display: none !important;
}

.ly-mode-panel.is-active {
  display: grid;
  gap: 22px;
}

.ly-live-panel {
  display: grid;
  gap: 16px;
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-live-panel [hidden] {
  display: none !important;
}

.ly-live-panel h3 {
  margin: 6px 0 6px;
  font-size: 20px;
}

@media (max-width: 768px) {
  .ly-audio-panel,
  .ly-import-panel,
  .ly-live-panel,
  .ly-song-meta {
    margin: 16px 0;
    padding: 16px;
  }
}

/* Phase 14.3B · stabile Sidebar-Reiter */
.ly-app-sidebar {
  overflow: visible;
}

.ly-mode-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}

.ly-mode-tabs button {
  min-width: 0;
}

.ly-mode-panel:not(.is-active) {
  display: none !important;
}

.ly-mode-panel.is-active {
  display: grid;
  gap: 20px;
}

@media (max-width: 768px) {
  .ly-mode-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ly-song-meta,
.ly-chord-panel,
.ly-audio-panel,
.ly-import-panel,
.ly-live-panel {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--ly-color-border);
  border-radius: var(--ly-radius-lg);
  background: #FFFFFF;
  box-shadow: var(--ly-shadow-sm);
}

.ly-song-meta h3,
.ly-chord-panel h3,
.ly-audio-panel h3,
.ly-import-panel h3,
.ly-live-panel h3 {
  margin: 0;
}

@media (max-width: 768px) {
  .ly-mode-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .ly-song-meta,
  .ly-chord-panel,
  .ly-audio-panel,
  .ly-import-panel,
  .ly-live-panel {
    padding: 16px;
  }
}

/* Phase 14.3C · Mode Tabs Design wiederherstellen */
.ly-mode-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 0 !important;
  padding: 6px;
  border-radius: 22px;
  background: #EEF1F5;
  border: 0 !important;
  box-shadow: none !important;
}

.ly-mode-tabs button {
  appearance: none;
  border: 0 !important;
  background: transparent;
  color: var(--ly-color-muted);
  min-height: 48px;
  border-radius: 18px;
  font-weight: 950;
  cursor: pointer;
  box-shadow: none !important;
}

.ly-mode-tabs button.is-active {
  background: #FFFFFF;
  color: var(--ly-color-text);
  box-shadow: var(--ly-shadow-sm) !important;
}

@media (max-width: 768px) {
  .ly-mode-tabs {
    grid-template-columns: repeat(4, 1fr);
    padding: 5px;
    border-radius: 20px;
  }

  .ly-mode-tabs button {
    min-height: 44px;
    font-size: 14px;
    border-radius: 16px;
  }
}

/* Phase 14.6 · BPM Analysebox */
.ly-audio-analysis {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-radius: var(--ly-radius-lg);
  border: 1px solid rgba(200,164,93,.30);
  background: rgba(200,164,93,.10);
  color: var(--ly-color-body);
  font-size: 14px;
  font-weight: 800;
}

.ly-audio-analysis strong {
  color: var(--ly-color-text);
  font-size: 15px;
}

.ly-audio-analysis span {
  color: var(--ly-color-muted);
}

/* Live-Aufnahme */
.ly-live-panel {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.ly-live-head,
.ly-live-progress-head,
.ly-live-preview-head,
.ly-live-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ly-live-head h3,
.ly-live-preview-head h4,
.ly-live-progress h4,
.ly-live-quality h4 {
  margin: 0;
}

.ly-live-state {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(89, 101, 121, .28);
  border-radius: 999px;
  background: #fff;
  color: var(--ly-color-muted);
  font-size: 12px;
  font-weight: 850;
}

.ly-live-state[data-state="recording"] {
  border-color: rgba(190, 55, 55, .38);
  color: #a82727;
}

.ly-live-state[data-state="result"],
.ly-live-state[data-state="ready"] {
  border-color: rgba(34, 139, 94, .38);
  color: #176b45;
}

.ly-live-monitor {
  display: grid;
  grid-template-columns: minmax(92px, .45fr) minmax(160px, 1fr);
  align-items: end;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(89, 101, 121, .18);
  border-radius: 8px;
  background: #f7f9fb;
}

.ly-live-time,
.ly-live-level {
  display: grid;
  gap: 5px;
}

.ly-live-time strong {
  color: var(--ly-color-text);
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.ly-live-time span,
.ly-live-level span {
  color: var(--ly-color-muted);
  font-size: 12px;
  font-weight: 750;
}

.ly-live-level progress,
.ly-live-progress progress {
  width: 100%;
  min-height: 10px;
  accent-color: #2e9d61;
}

.ly-live-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ly-live-actions-secondary {
  padding-top: 2px;
}

.ly-live-actions .ly-btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
  white-space: normal;
}

.ly-live-status {
  min-height: 44px;
  margin: 0;
  padding: 11px 13px;
  border-left: 3px solid #c8a45d;
  border-radius: 4px;
  background: rgba(200, 164, 93, .1);
  color: var(--ly-color-body);
  font-size: 14px;
  font-weight: 750;
}

.ly-live-panel audio {
  width: 100%;
}

.ly-live-quality,
.ly-live-progress,
.ly-live-preview {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(89, 101, 121, .2);
  border-radius: 8px;
  background: #fff;
}

.ly-app-preview > .ly-live-preview {
  margin-bottom: 18px;
}

.ly-live-quality[hidden],
.ly-live-progress[hidden],
.ly-live-preview[hidden] {
  display: none;
}

.ly-live-quality p,
.ly-live-quality ul,
.ly-live-warnings ul,
.ly-live-uncertain ul,
.ly-live-chord-evidence ul,
.ly-live-analysis-details p {
  margin: 0;
}

.ly-live-quality li,
.ly-live-warnings li {
  margin-block: 4px;
  color: var(--ly-color-body);
  font-size: 13px;
  line-height: 1.45;
}

.ly-live-quality li.is-error {
  color: #a82727;
}

.ly-live-confirm {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 9px;
  align-items: start;
  font-size: 13px;
  font-weight: 750;
}

.ly-live-confirm input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
}

.ly-live-progress ol {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 22px;
  color: var(--ly-color-muted);
  font-size: 13px;
}

.ly-live-progress li.is-current,
.ly-live-progress li.is-processing {
  color: var(--ly-color-text);
  font-weight: 800;
}

.ly-live-progress li.is-done {
  color: #176b45;
}

.ly-live-preview-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ly-live-preview-meta label,
.ly-live-preview-sections label,
.ly-live-section-head label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ly-live-preview-meta label > span,
.ly-live-preview-sections label > span,
.ly-live-section-head label > span {
  color: var(--ly-color-muted);
  font-size: 12px;
  font-weight: 800;
}

.ly-live-warnings {
  padding: 12px;
  border-left: 3px solid #cf8e1e;
  background: rgba(207, 142, 30, .08);
}

.ly-live-analysis-details,
.ly-live-uncertain,
.ly-live-chord-evidence {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid rgba(89, 101, 121, .18);
  border-radius: 6px;
  background: #f8fafb;
  color: var(--ly-color-body);
  font-size: 13px;
  line-height: 1.45;
}

.ly-live-uncertain {
  border-left: 3px solid #cf8e1e;
}

.ly-live-uncertain code {
  color: var(--ly-color-text);
  font: inherit;
  font-weight: 850;
}

.ly-live-chord-evidence summary {
  cursor: pointer;
  color: var(--ly-color-text);
  font-weight: 850;
}

.ly-live-preview-sections {
  display: grid;
  gap: 12px;
}

.ly-live-preview-sections article {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(89, 101, 121, .18);
  border-radius: 6px;
  background: #f8fafb;
}

.ly-live-section-head {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(120px, .65fr) minmax(84px, .35fr) minmax(84px, .35fr) auto;
  align-items: end;
}

.ly-live-section-head > span {
  padding-bottom: 10px;
  color: var(--ly-color-muted);
  font-size: 12px;
}

.ly-live-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 640px) {
  .ly-live-head,
  .ly-live-preview-head {
    align-items: flex-start;
  }

  .ly-live-monitor,
  .ly-live-preview-meta,
  .ly-live-section-head {
    grid-template-columns: 1fr;
  }

  .ly-live-actions {
    grid-template-columns: 1fr;
  }

  .ly-live-section-head > span {
    padding-bottom: 0;
  }

  .ly-live-preview-actions .ly-btn {
    width: 100%;
  }
}

@media (min-width: 641px) and (max-width: 1100px) {
  .ly-live-section-head {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ly-live-section-head > span {
    grid-column: 1 / -1;
    padding-bottom: 0;
  }
}

/* Phase 15.7B · Audio Analyse Ergebnis */
.ly-audio-analysis {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border-radius: var(--ly-radius-lg);
  border: 1px solid rgba(46,157,97,.30);
  background: rgba(46,157,97,.10);
  color: var(--ly-color-body);
  font-size: 14px;
  font-weight: 800;
}

.ly-audio-analysis strong {
  color: var(--ly-color-text);
  font-size: 15px;
}

.ly-audio-analysis span {
  color: var(--ly-color-muted);
}

/* Phase 15.8B · Erkannte Akkorde */
.ly-audio-chords {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(46,157,97,.25);
}

.ly-audio-chord {
  display: block;
  color: var(--ly-color-muted);
  font-weight: 800;
  line-height: 1.35;
}

.ly-audio-chord strong {
  color: var(--ly-color-text);
}

.ly-audio-chord-more {
  color: var(--ly-color-gold);
  font-weight: 950;
}

/* Phase 15.10 · LeadSheet-Entwurf übernehmen */
.ly-audio-draft-actions {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.ly-audio-draft-actions .ly-btn {
  width: 100%;
  justify-content: center;
}

/* Lyruma Phase 17.4 · Mobile LeadSheet Layout */
.ly-sheet,
.ly-preview,
.ly-leadsheet,
[data-preview],
[data-leadsheet-preview] {
  max-width: 100%;
  overflow-x: hidden;
}

.ly-sheet *,
.ly-preview *,
.ly-leadsheet *,
[data-preview] *,
[data-leadsheet-preview] * {
  max-width: 100%;
  box-sizing: border-box;
}

.ly-sheet pre,
.ly-preview pre,
.ly-leadsheet pre,
[data-preview] pre,
[data-leadsheet-preview] pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ly-sheet p,
.ly-sheet div,
.ly-preview p,
.ly-preview div,
.ly-leadsheet p,
.ly-leadsheet div,
[data-preview] p,
[data-preview] div,
[data-leadsheet-preview] p,
[data-leadsheet-preview] div {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 720px) {
  .ly-preview-card,
  .ly-sheet-card,
  .ly-leadsheet-card,
  [data-preview],
  [data-leadsheet-preview] {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .ly-lead-row,
  .ly-sheet-row,
  .ly-preview-row {
    display: block;
    width: 100%;
  }

  .ly-chord-line,
  .ly-sheet-chords,
  .ly-preview-chords {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
  }

  .ly-lyric-line,
  .ly-sheet-lyrics,
  .ly-preview-lyrics {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.55;
  }

  .ly-preview {
    font-size: clamp(15px, 4vw, 18px);
  }
}

/* Lyruma Phase 17.4 · Responsive LeadSheet Renderer */
.ly-leadsheet-row,
.ly-preview-row,
.ly-sheet-row,
.leadsheet-row {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: normal;
}

.ly-leadsheet-line,
.ly-preview-line,
.ly-sheet-line,
.leadsheet-line {
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: normal;
}

.ly-leadsheet-chords,
.ly-preview-chords,
.ly-sheet-chords,
.leadsheet-chords {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ly-leadsheet-lyrics,
.ly-preview-lyrics,
.ly-sheet-lyrics,
.leadsheet-lyrics {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Tablet */
@media (max-width: 1024px) {
  .ly-preview-card,
  .ly-sheet-card,
  .ly-leadsheet-card,
  [data-preview] {
    max-width: 100%;
  }

  .ly-leadsheet-row,
  .ly-preview-row,
  .ly-sheet-row,
  .leadsheet-row {
    grid-template-columns: 120px minmax(0, 1fr) !important;
    column-gap: 14px !important;
  }
}

/* Smartphone */
@media (max-width: 720px) {
  .ly-preview-card,
  .ly-sheet-card,
  .ly-leadsheet-card,
  [data-preview] {
    padding-left: 18px !important;
    padding-right: 18px !important;
    overflow-x: hidden !important;
  }

  .ly-leadsheet-row,
  .ly-preview-row,
  .ly-sheet-row,
  .leadsheet-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 0 !important;
    overflow-x: hidden !important;
  }

  .ly-leadsheet-label,
  .ly-preview-label,
  .ly-sheet-label,
  .leadsheet-label {
    display: block !important;
    width: 100% !important;
    margin-bottom: 4px !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.08em !important;
  }

  .ly-leadsheet-chords,
  .ly-preview-chords,
  .ly-sheet-chords,
  .leadsheet-chords {
    display: block !important;
    width: 100% !important;
    margin-bottom: 6px !important;
    font-size: clamp(1rem, 4.5vw, 1.35rem) !important;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
  }

  .ly-leadsheet-lyrics,
  .ly-preview-lyrics,
  .ly-sheet-lyrics,
  .leadsheet-lyrics {
    display: block !important;
    width: 100% !important;
    padding-left: 0 !important;
    font-size: clamp(1rem, 4.6vw, 1.35rem) !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    text-align: left !important;
  }

  .ly-preview pre,
  .ly-sheet pre,
  .ly-leadsheet pre,
  [data-preview] pre {
    white-space: pre-wrap !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
    overflow-x: hidden !important;
  }
}

/* Sehr kleine Smartphones */
@media (max-width: 420px) {
  .ly-preview-card,
  .ly-sheet-card,
  .ly-leadsheet-card,
  [data-preview] {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .ly-leadsheet-lyrics,
  .ly-preview-lyrics,
  .ly-sheet-lyrics,
  .leadsheet-lyrics {
    font-size: 1rem !important;
    line-height: 1.5 !important;
  }

  .ly-leadsheet-chords,
  .ly-preview-chords,
  .ly-sheet-chords,
  .leadsheet-chords {
    font-size: 1rem !important;
  }
}

/* Lyruma Phase 17.5 · Mobile LeadSheet clean */
@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .ly-app,
  .ly-main,
  .ly-preview,
  .ly-preview-card,
  .ly-sheet-card,
  .ly-leadsheet-card,
  [data-preview] {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  .ly-preview-card,
  .ly-sheet-card,
  .ly-leadsheet-card,
  [data-preview] {
    padding: 22px 16px !important;
  }

  .ly-preview-row,
  .ly-sheet-row,
  .ly-leadsheet-row,
  .leadsheet-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  .ly-preview-label,
  .ly-sheet-label,
  .ly-leadsheet-label,
  .leadsheet-label {
    display: none !important;
  }

  .ly-preview-chords,
  .ly-sheet-chords,
  .ly-leadsheet-chords,
  .leadsheet-chords {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 4px 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    font-size: 1.05rem !important;
    line-height: 1.35 !important;
    text-align: left !important;
  }

  .ly-preview-lyrics,
  .ly-sheet-lyrics,
  .ly-leadsheet-lyrics,
  .leadsheet-lyrics {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    font-size: 1.05rem !important;
    line-height: 1.45 !important;
    text-align: left !important;
  }

  .ly-preview pre,
  .ly-sheet pre,
  .ly-leadsheet pre,
  [data-preview] pre {
    max-width: 100% !important;
    white-space: pre-wrap !important;
    overflow-x: hidden !important;
    overflow-wrap: anywhere !important;
  }
}

/* Lyruma Phase 17.8 · Responsive LeadSheet Preview */
.lyruma-responsive-sheet,
.lyruma-responsive-sheet * {
  box-sizing: border-box;
}

.lyruma-responsive-sheet {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.lyruma-sheet-section {
  width: 100%;
  max-width: 100%;
  margin: 28px 0;
  padding: clamp(18px, 4vw, 34px);
  border: 1px solid rgba(25,31,43,.10);
  border-radius: 28px;
  background: #fff;
  overflow: hidden;
}

.lyruma-sheet-section h3 {
  margin: 0 0 18px;
  font-size: clamp(28px, 7vw, 44px);
  line-height: 1.1;
}

.lyruma-sheet-row {
  width: 100%;
  max-width: 100%;
  padding: 14px 0;
  border-top: 1px solid rgba(25,31,43,.10);
  overflow-wrap: anywhere;
  word-break: normal;
}

.lyruma-sheet-chords {
  color: #b38a36;
  font-weight: 800;
  font-size: clamp(20px, 5.2vw, 30px);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  gap: .25em .75em;
  white-space: normal;
}

.lyruma-sheet-lyric {
  margin-top: 8px;
  color: #2e3948;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(18px, 4.8vw, 30px);
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  max-width: 100%;
}

@media (max-width: 640px) {
  .lyruma-sheet-section {
    padding: 18px;
    border-radius: 22px;
  }

  .lyruma-sheet-row {
    padding: 12px 0;
  }

  .lyruma-sheet-lyric {
    text-align: left;
  }
}

/* B.4.2 Right-side Lead Sheet Editor */
.ly-right-editor {
  margin: 1.5rem 0;
  padding: 1rem;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 1.25rem;
  background: #fff;
}

.ly-right-editor .ly-textarea {
  min-height: 360px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 1rem;
  line-height: 1.65;
}

/* B.4.2 Editor/Preview Feinschliff */
.ly-right-editor {
  display: grid;
  gap: 0.85rem;
}

.ly-right-editor .ly-form-row {
  margin: 0;
}

.ly-right-editor [data-prepare-leadsheet] {
  width: fit-content;
  min-width: 220px;
  margin-top: 0.25rem;
}

#lyricsInput {
  max-height: 420px;
  overflow: auto;
  resize: vertical;
}

#previewSheet {
  max-height: 620px;
  overflow: auto;
  scroll-behavior: smooth;
}

/* B.4.2 Right editor spacing + scroll refinement */
.ly-right-editor {
  padding: 1.25rem 1.35rem 1.45rem;
}

.ly-right-editor label.ly-form-row {
  display: grid;
  gap: 0.65rem;
}

.ly-right-editor [data-prepare-leadsheet] {
  display: inline-flex;
  align-self: flex-start;
  margin-top: 1rem;
  margin-bottom: 0.25rem;
}

.ly-right-editor #lyricsInput {
  min-height: 300px;
  max-height: 420px;
  overflow-y: auto;
}

#previewSheet.ly-app-sheet,
.ly-app-sheet#previewSheet {
  max-height: 560px;
  overflow-y: auto;
  padding-right: 0.75rem;
}

/* B.4.3 Lead Sheet metadata + logo */
.ly-logo-upload {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.ly-logo-preview {
  display: flex;
  align-items: center;
  min-height: 64px;
}

.ly-logo-preview img,
.ly-sheet-logo {
  max-width: 140px;
  max-height: 72px;
  object-fit: contain;
}

.ly-sheet-document-head {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.ly-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  font-size: 0.92rem;
  color: #475569;
}

/* Logo Upload */
.ly-logo-upload {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.9rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.035);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.ly-logo-preview img {
  max-width: 140px;
  max-height: 72px;
  object-fit: contain;
}

/* Preview header metadata */
.ly-sheet-preview-header {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.ly-sheet-preview-logo {
  max-width: 150px;
  max-height: 76px;
  object-fit: contain;
}

.ly-sheet-preview-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  color: #475569;
  font-size: 0.92rem;
}

/* PDF Cover Option */
.ly-pdf-cover-option {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  margin: 0.8rem 0 0.9rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  font-weight: 800;
  color: #273244;
}

.ly-pdf-cover-option input {
  width: 1rem;
  height: 1rem;
}

/* Parser Diagnostics */
.ly-parser-diagnostics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.75rem 0 0.9rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(201, 163, 74, 0.35);
  border-radius: 12px;
  background: rgba(201, 163, 74, 0.08);
  color: #273244;
  font-size: 0.9rem;
  line-height: 1.4;
}

.ly-parser-diagnostics strong {
  color: #9a6f14;
}

.ly-parser-diagnostics[hidden] {
  display: none;
}

/* Phase 2.3B – Transkriptionsdiagnose */
.ly-transcription-diagnostics {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid rgba(201, 163, 74, 0.38);
  border-radius: 12px;
  background: rgba(201, 163, 74, 0.08);
}

.ly-transcription-diagnostics > strong {
  color: #182033;
  font-size: 0.96rem;
}

.ly-transcription-diagnostics span {
  display: block;
  color: #596579;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ly-transcription-diagnostics b {
  color: #182033;
}

.ly-transcription-diagnostics.is-good {
  border-color: rgba(34, 139, 94, 0.4);
  background: rgba(34, 139, 94, 0.08);
}

.ly-transcription-diagnostics.is-warning {
  border-color: rgba(207, 142, 30, 0.45);
  background: rgba(207, 142, 30, 0.09);
}

.ly-transcription-diagnostics.is-critical {
  border-color: rgba(190, 55, 55, 0.45);
  background: rgba(190, 55, 55, 0.08);
}

/* Keep the interactive preview inside its own scroll surface. */
#previewSheet > *,
.ly-sheet-preview-header,
.ly-sheet-preview-meta,
.ly-sheet-section,
.ly-sheet-row {
  min-width: 0;
  max-width: 100%;
}

.ly-sheet-preview-meta > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .ly-sheet-row,
  .ly-sheet-chords,
  .ly-sheet-lyric {
    overflow-x: visible !important;
  }

  .ly-sheet-chords,
  .ly-sheet-lyric {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    white-space: pre-wrap !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
  }
}

/* Final manual-text overrides must remain last in the cascade. */
#lyricsInput,
.ly-section-editor-card textarea {
  white-space: pre-wrap !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
}

.ly-sheet-chords b,
.ly-sheet-lyric {
  min-width: 0;
  max-width: 100%;
  white-space: pre-wrap !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}
