:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel-strong: #eef2f7;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --danger: #b42318;
  --chord: #2563eb;
  --stage-bg: #000000;
  --stage-lyric: #ffffff;
  --stage-chord: #7dd3fc;
  --stage-font: 22px;
  --stage-gap: 1.35;
  --shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root.dark {
  color-scheme: dark;
  --bg: #0f1419;
  --panel: #151b22;
  --panel-strong: #1c2430;
  --text: #f3f6fb;
  --muted: #9aa6b2;
  --line: #2a3442;
  --accent: #60a5fa;
  --danger: #f08c84;
  --chord: #93c5fd;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

button, input, textarea, select { font: inherit; }

button, .file-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  padding: 10px 12px;
}

button:hover, .file-button:hover { border-color: var(--accent); }

.primary-action {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.danger-action { color: var(--danger); }

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
}

.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img,
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.brand-mark {
  align-items: center;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 800;
  justify-content: center;
}

.brand strong, .brand span { display: block; }
.brand span, .panel-header p, #stageMeta { color: var(--muted); margin: 4px 0 0; }
.nav-tabs, .sidebar-actions { display: grid; gap: 8px; }
.nav-tab { text-align: left; }
.nav-tab.active { background: var(--panel-strong); border-color: var(--accent); }
.file-button { display: inline-flex; justify-content: center; text-align: center; }
.file-button input { display: none; }

.workspace {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-shell.song-active .toolbar,
.app-shell.stage-active .toolbar,
.app-shell.editing-song .toolbar,
.app-shell.editing-setlist .toolbar {
  display: none;
}

.bottom-nav,
.library-fab {
  display: none;
}

.library-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 16px 12px;
}

.library-filter {
  align-items: center;
  background: var(--panel-strong);
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px 6px 14px;
}

.library-filter.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-count {
  background: var(--panel);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  min-width: 18px;
  padding: 1px 6px;
  text-align: center;
}

.library-filter.active .filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.key-filters {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 0 16px 12px;
  scrollbar-width: none;
}

.key-filters::-webkit-scrollbar {
  display: none;
}

.key-chip {
  background: var(--panel-strong);
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  min-width: 40px;
  padding: 4px 12px;
}

.key-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.song-open-main {
  background: transparent;
  border: 0;
  border-radius: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 16px minmax(0, 1fr);
  min-height: 0;
  min-width: 0;
  padding: 0;
  text-align: left;
  width: 100%;
}

.song-row.library-song-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.library-song-row .song-open-main {
  grid-template-columns: minmax(0, 1fr);
}

.song-more {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.song-meta-key {
  color: var(--accent);
  font-weight: 800;
}

.song-item.active .library-song-row {
  background: #eef4ff;
}

.song-chevron {
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.song-key {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  min-width: 36px;
  padding: 4px 8px;
  text-align: center;
}

.song-key.muted {
  background: transparent;
  color: var(--muted);
}

:root.dark .song-key {
  background: #1c2a44;
  color: #93c5fd;
}

:root.dark .song-key.muted {
  background: transparent;
}

.song-fav {
  background: transparent;
  border: 0;
  color: var(--line);
  font-size: 22px;
  line-height: 1;
  min-height: 44px;
  min-width: 40px;
  padding: 4px;
}

.song-play {
  background: #eaf6f3;
  border: 1px solid #d8e4df;
  border-radius: 999px;
  color: #0d736c;
  font-size: 12px;
  font-weight: 800;
  min-height: 36px;
  min-width: 40px;
  padding: 4px 8px;
}

.song-fav.on {
  color: #e0a106;
}

.more-lead {
  color: var(--muted);
  margin: 0;
}

.more-version,
.more-legal {
  color: var(--muted);
  margin: 8px 0 0;
  font-size: 14px;
}

.more-privacy {
  margin: 10px 0 0;
}

.more-privacy a {
  color: var(--accent);
}

.more-heading {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 8px 0 0;
  text-transform: uppercase;
}

.more-list {
  display: grid;
  gap: 10px;
}

.more-list button,
.more-list .file-button {
  min-height: 46px;
  text-align: left;
}

.more-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 46px;
  padding: 8px 12px;
}

.more-row span {
  font-weight: 700;
}

.more-inline {
  align-items: center;
  display: flex;
  gap: 8px;
}

.more-inline button {
  min-height: 36px;
  min-width: 42px;
  text-align: center;
}

.more-inline output {
  min-width: 28px;
  text-align: center;
}

.look-studio {
  display: grid;
  gap: 14px;
}

.look-preview-frame {
  background: #111513;
  border: 1px solid #2c3532;
  border-radius: 14px;
  overflow: hidden;
}

.look-preview-bar {
  align-items: baseline;
  background: #111513;
  color: #f5f8f6;
  display: flex;
  gap: 10px;
  padding: 10px 14px 8px;
}

.look-preview-bar span {
  color: #8aa39a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.look-preview-bar strong {
  font-size: 15px;
}

.look-preview.stage-content {
  font-size: var(--stage-font, 22px);
  grid-area: auto;
  height: 220px;
  line-height: var(--stage-gap, 1.35);
  max-height: 220px;
  min-height: 220px;
  padding: 8px 16px 18px;
  pointer-events: none;
}

.look-hint,
.look-dirty {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}

.look-dirty {
  color: var(--accent);
  font-weight: 700;
}

.look-block {
  display: grid;
  gap: 8px;
}

.look-block > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.look-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.look-pills button {
  min-height: 36px;
  padding: 6px 12px;
  text-align: center;
}

.look-pills button.active,
.look-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.look-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.look-swatch {
  background: var(--swatch, #333);
  border: 2px solid var(--line);
  border-radius: 50%;
  height: 36px;
  min-height: 36px;
  min-width: 36px;
  padding: 0;
  width: 36px;
}

.look-actions {
  background: var(--panel);
  bottom: 0;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  padding: 10px 0 4px;
  position: sticky;
  z-index: 2;
}

.look-actions button:disabled {
  opacity: 0.45;
}

.toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px 18px;
}

.search-panel {
  display: grid;
  flex: 1;
  gap: 8px;
  max-width: 720px;
  min-width: 0;
  width: 100%;
}

.search-box {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 0 12px;
  width: 100%;
}

.search-scope {
  display: none;
  gap: 8px;
}

.app-shell.searching-sites .search-scope {
  display: flex;
}

.search-scope-btn {
  min-height: 36px;
  padding: 6px 14px;
}

.search-scope-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.app-shell.searching-sites .library-filters,
.app-shell.searching-sites #categoryFilter,
.app-shell.searching-sites .key-filters,
.app-shell.searching-sites .category-filters {
  display: none;
}

#categoryFilter {
  display: none;
}

.library-rail {
  display: grid;
  gap: 4px;
  overflow: auto;
}

.rail-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 14px 0 4px;
  text-transform: uppercase;
}

.rail-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 10px;
  display: flex;
  font-size: 14px;
  font-weight: 650;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 10px;
  text-align: left;
}

.rail-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rail-item.active {
  background: #e8f3ff;
  color: #1d4ed8;
}

.rail-item.active span {
  color: #1d4ed8;
}

.workspace-brand {
  color: var(--accent);
  display: none;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .app-shell.library-active .nav-tabs {
    display: none;
  }

  .app-shell:not(.library-active) .library-rail {
    display: none;
  }

  .workspace-brand {
    display: block;
  }

  .home-shortcuts {
    display: flex;
    gap: 8px;
  }

  .toolbar {
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .search-panel {
    justify-self: center;
    max-width: 560px;
  }

  .song-list-panel > .library-filters,
  .song-list-panel > .key-filters,
  .song-phone-only {
    display: none !important;
  }

  .song-tools-panel {
    width: 240px;
  }

  #songChordsBtn {
    display: none;
  }
}

.app-shell.song-active,
.app-shell.stage-active {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.song-active .sidebar,
.app-shell.stage-active .sidebar {
  display: none;
}

.site-search-row {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: inherit;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 56px;
  padding: 10px 12px;
  text-decoration: none;
}

.site-search-open {
  color: var(--accent);
  font-weight: 800;
}

.site-search-cta {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 700;
  margin: 8px 12px 12px;
  min-height: 44px;
  width: calc(100% - 24px);
}

.search-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.search-box input {
  background: transparent;
  border: 0;
  color: var(--text);
  min-height: 42px;
  outline: 0;
  width: 100%;
}

.toolbar-group, .form-actions, .stage-controls, .file-grid, .setlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage-controls {
  justify-content: flex-end;
}

.stage-controls button {
  min-height: 38px;
  padding: 8px 10px;
}

.stage-controls output {
  align-items: center;
  color: var(--muted);
  display: inline-flex;
  justify-content: center;
  min-width: 28px;
}

.view { display: none; min-width: 0; padding: 18px; }
.view.active { display: block; }

.song-read,
.stage-shell {
  min-height: calc(100vh - 48px);
}

.song-read-content,
.stage-content {
  min-height: 52vh;
}

.library-layout, .setlist-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
  height: calc(100vh - 82px);
}

.song-list-panel, .editor-panel, .setlist-panel, .setlist-editor, .files-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  min-width: 0;
}

.app-shell.stage-active,
.app-shell.stage-active .workspace,
.app-shell.stage-active .view.active {
  background: var(--stage-bg);
}

.stage-shell {
  background: var(--stage-bg);
  min-height: 100vh;
  height: 100%;
}

.song-list-panel, .setlist-panel {
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
}

.editor-panel,
.setlist-editor {
  display: none;
}

.app-shell.editing-song .song-list-panel,
.app-shell.editing-setlist .setlist-panel {
  display: none;
}

.app-shell.editing-song .editor-panel,
.app-shell.editing-setlist .setlist-editor {
  display: grid;
}

.setlist-panel {
  position: relative;
}

.panel-header, .stage-header {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px;
}

h1 { font-size: 22px; line-height: 1.15; margin: 0; }

.library-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.editor-titlebar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.editor-titlebar-actions {
  align-items: center;
  display: flex;
  flex: none;
  gap: 8px;
}

.editor-titlebar-actions .primary-action {
  min-height: 40px;
  padding: 0 16px;
}

.editor-titlebar h2 {
  font-size: 20px;
  line-height: 1.15;
  margin: 0;
}

.editor-titlebar p {
  color: var(--muted);
  margin: 4px 0 0;
}

.song-list {
  display: grid;
  align-content: start;
  gap: 2px;
  overflow: auto;
  padding: 6px;
}

.song-row {
  align-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 6px;
  min-height: 34px;
  overflow: hidden;
  padding: 7px 10px;
  text-align: left;
}

.song-item {
  border-radius: 10px;
}

.song-item.open {
  background: var(--panel);
  border: 1px solid var(--line);
}

.song-item.open .song-row {
  overflow: visible;
}

.song-preview {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 8px 10px 12px;
}

.song-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.song-preview-actions button {
  background: transparent;
  border: 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  min-height: 32px;
  padding: 4px 8px;
}

.song-preview-actions .primary-action {
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  padding: 4px 12px;
}

.song-preview-chart {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.2;
  max-height: min(46vh, 420px);
  overflow: auto;
}

.song-preview-chart .lyric-row {
  color: var(--text);
}

.song-preview-chart .chord-row,
.song-preview-chart .chord,
.song-preview-chart .chord-only {
  color: #2f54f5;
}

.song-row.active {
  background: var(--panel-strong);
  color: var(--accent);
}

.song-row strong {
  font-size: 18px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.song-open {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

#closeSetlistBtn,
#closeEditorBtn {
  display: inline-flex;
}

.setlist-play {
  background: var(--panel-strong);
  border: 0;
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  min-height: 36px;
  min-width: 36px;
  padding: 4px;
}

.setlist-play:disabled {
  opacity: 0.35;
}

.setlist-list {
  gap: 6px;
}

.setlist-row {
  align-items: center;
  background: transparent;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  padding: 12px 8px 12px 14px;
}

.setlist-row.active {
  background: var(--panel-strong);
}

.setlist-row-main {
  background: transparent;
  border: 0;
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.setlist-row-main strong {
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.setlist-row-main small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.3;
}

:root.dark .setlist-row.active {
  background: #1c2a44;
}

.setlist-song-open {
  background: transparent;
  border: 0;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.setlist-song-open small {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-row small { color: var(--muted); }

.song-form, .files-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.setlist-editor {
  gap: 14px;
  padding: 16px;
}

.setlist-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(220px, 360px) minmax(220px, 240px);
}

.service-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.setlist-board {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
}

.setlist-board section {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 280px;
  overflow: hidden;
}

.setlist-board h2 {
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  margin: 0;
  padding: 10px 12px;
}

.setlist-add {
  border-top: 1px solid var(--line);
  padding: 10px 12px 12px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
}

input, textarea, select {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  outline: 0;
  padding: 10px 12px;
}

textarea {
  font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
  min-height: 420px;
  resize: vertical;
}

.song-read {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: calc(100vh - 48px);
  overflow: hidden;
  position: relative;
}

.song-read-bar {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-height: 44px;
  padding: 6px 8px;
}

.song-read-shortcuts {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-end;
}

.song-read-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  min-height: 0;
}

.song-sheet {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  min-width: 0;
}

.song-sheet-head {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 18px 0;
}

.song-sheet-head strong {
  display: block;
  font-size: 22px;
}

.song-sheet-head span {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.song-tools-panel {
  background: var(--panel-strong);
  border-left: 1px solid var(--line);
  display: grid;
  gap: 12px;
  overflow: auto;
  padding: 16px;
}

.song-tools-handle {
  display: none;
}

.song-tools-body {
  display: contents;
}

.tool-block {
  display: grid;
  gap: 8px;
}

.tool-block > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.tool-stepper {
  align-items: center;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
}

.tool-stepper strong,
.tool-stepper output {
  text-align: center;
}

.switch-row {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 14px;
  gap: 10px;
  justify-content: space-between;
}

.switch-row input {
  accent-color: var(--accent);
  height: 20px;
  width: 36px;
}

.app-shell.hide-chords .chord-row,
.app-shell.hide-chords .chord-only,
.app-shell.hide-chords .chord {
  display: none;
}

.app-shell.hide-lyrics .lyric-row,
.app-shell.hide-lyrics .chord-lyric .lyric {
  display: none;
}

.app-shell.chart-focus .song-tools-panel,
.app-shell.chart-focus .song-read-shortcuts {
  display: none;
}

.stage-nav-btn {
  border-radius: 50%;
  font-size: 28px;
  height: 52px;
  line-height: 1;
  min-width: 52px;
  padding: 0;
}

.stage-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.stage-dot {
  background: #94a3b8;
  border-radius: 50%;
  display: block;
  height: 8px;
  width: 8px;
}

.stage-dot.on {
  background: #60a5fa;
  transform: scale(1.25);
}

.song-read-bar,
.stage-mode-bar,
.stage-mode-footer,
.song-read-tools {
  align-items: center;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.song-read-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  grid-template-columns: none;
  justify-content: space-between;
  padding: 6px 8px;
}

.song-read-bar > button,
.song-read-shortcuts button {
  align-items: center;
  background: #f3f4f6;
  border: 0;
  border-radius: 999px;
  color: #4b5563;
  display: inline-flex;
  font-size: 13px;
  font-weight: 600;
  height: 32px;
  justify-content: center;
  letter-spacing: -0.02em;
  line-height: 1;
  min-height: 32px;
  padding: 0 11px;
}

.song-read-bar > button:hover,
.song-read-shortcuts button:hover {
  background: #e5e7eb;
  border-color: transparent;
}

#songBackBtn {
  color: #6b7280;
  flex: 0 0 auto;
  padding-left: 8px;
  white-space: nowrap;
}

#songFavBtn {
  color: #9ca3af;
  font-size: 15px;
  min-width: 32px;
  padding: 0;
  width: 32px;
}

#songOpenStageBtn.primary-action {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  height: 32px;
  min-height: 32px;
  padding: 0 13px;
}

#songOpenStageBtn.primary-action:hover {
  background: #1d4ed8;
  border-color: transparent;
}

#songEditBtn {
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 700;
}

#songEditBtn:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

:root.dark .song-read-bar > button,
:root.dark .song-read-shortcuts button {
  background: #1c2430;
  color: #cbd5e1;
}

:root.dark .song-read-bar > button:hover,
:root.dark .song-read-shortcuts button:hover {
  background: #273140;
}

:root.dark #songOpenStageBtn.primary-action {
  background: var(--accent);
  color: #0f172a;
}

:root.dark #songOpenStageBtn.primary-action:hover {
  background: #93c5fd;
}

.song-sheet-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.song-key-stepper {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0;
}

.song-capo-stepper {
  background: #f3f4f6;
}

.song-capo-stepper button,
.song-capo-stepper strong {
  color: #374151;
}

.song-key-stepper button {
  background: transparent;
  border: 0;
  color: #1d4ed8;
  font-size: 16px;
  font-weight: 800;
  min-height: 40px;
  min-width: 36px;
  padding: 0 8px;
}

#songKeyBadge,
#songCapoValue {
  font-size: 13px;
  font-weight: 800;
  min-width: 4.5em;
  padding: 0 4px;
  text-align: center;
  white-space: nowrap;
}

.song-key-stepper strong {
  color: #1d4ed8;
}

:root.dark .song-key-stepper {
  background: #1c2a44;
}

:root.dark .song-key-stepper button,
:root.dark .song-key-stepper strong {
  color: #93c5fd;
}

:root.dark .song-capo-stepper {
  background: #1c2430;
}

:root.dark .song-capo-stepper button,
:root.dark .song-capo-stepper strong {
  color: #e5e7eb;
}

.song-tools-transpose {
  display: none !important;
}

.song-key-badge {
  background: #eff6ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.song-read-heading,
.stage-mode-title {
  display: grid;
  min-width: 0;
}

.song-read-heading strong,
.stage-mode-title strong,
.stage-mode-title span,
.song-read-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-read-heading span,
.stage-mode-title span {
  color: var(--muted);
  font-size: 12px;
}

.stage-mode-title span.has-capo {
  color: #7fd4c8;
  font-weight: 700;
}

.stage-cue-note {
  background: #163330;
  border-bottom: 1px solid #2c3532;
  color: #7fd4c8;
  font-size: 13px;
  font-weight: 700;
  grid-area: cue;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  padding: 8px 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-cue-note[hidden] {
  display: none;
}

.song-cue-note {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-cue-note[hidden] {
  display: none;
}

.stage-capo-badge {
  align-self: start;
  background: rgba(12, 16, 14, 0.88);
  border: 1px solid #4fb4a8;
  border-radius: 999px;
  color: #7fd4c8;
  font-size: 12px;
  font-weight: 800;
  grid-area: content;
  justify-self: end;
  letter-spacing: 0.03em;
  margin: 12px;
  padding: 5px 10px;
  pointer-events: none;
  z-index: 16;
}

.stage-capo-badge[hidden] {
  display: none;
}

.stage-shell.menu-open .stage-capo-badge {
  display: none;
}

#songFavBtn.on {
  background: #fff7ed;
  color: #e0a106;
}

:root.dark #songFavBtn.on {
  background: #3b2a10;
}

.song-read-menu {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
}

.song-read-menu[hidden] {
  display: none;
}

.song-read-menu button:disabled {
  opacity: 0.55;
}

.song-sheet,
.song-read-content {
  touch-action: pan-y;
}

.song-read-content {
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--stage-font, 18px);
  line-height: 1.25;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 18px 24px;
}

.song-read-content .lyric-row,
.song-read-content .chord-lyric .lyric {
  color: var(--text);
}

.song-read-content .chord-row,
.song-read-content .chord,
.song-read-content .chord-only {
  color: #2f54f5;
}

.chart-kicker {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 14px;
}

.song-read-tools {
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

#songScrollBtn.on,
#stageScrollBtn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.song-capo-hint {
  align-items: center;
  background: var(--panel-strong);
  border-top: 1px solid var(--line);
  color: var(--text);
  display: flex;
  font-size: 13px;
  font-weight: 650;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 12px;
}

.song-capo-hint[hidden] {
  display: none;
}

.song-capo-hint button {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-size: 13px;
  min-height: 34px;
  padding: 4px 12px;
}

.chord-sheet {
  background: var(--panel);
  display: grid;
  grid-template-rows: auto 1fr;
  inset: 0;
  position: absolute;
  z-index: 24;
}

.chord-sheet[hidden] {
  display: none;
}

.chord-sheet-bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 12px;
}

.chord-sheet-body {
  overflow: auto;
  padding: 12px;
}

.chord-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
}

.chord-card {
  background: var(--panel-strong);
  border-radius: 12px;
  display: grid;
  justify-items: center;
  padding: 10px 6px 8px;
}

.chord-card strong {
  font-size: 14px;
}

.chord-svg {
  color: var(--text);
  height: 112px;
  width: 84px;
}

.chord-svg line {
  stroke: currentColor;
  stroke-width: 1.2;
}

.lang-pills button {
  min-width: 42px;
  padding: 6px 8px;
  text-align: center;
}

.lang-pills button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.app-shell.stage-active {
  background: #0d100f;
  grid-template-columns: minmax(0, 1fr);
  height: 100vh;
  overflow: hidden;
}

.app-shell.stage-active .sidebar {
  display: none;
}

.app-shell.stage-active .view {
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.app-shell.stage-active .workspace,
.app-shell.song-active .workspace {
  min-height: 0;
  overflow: hidden;
}

.app-shell.stage-active #stageView,
.app-shell.song-active #songView {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.stage-shell {
  display: grid;
  grid-template-areas:
    "bar"
    "cue"
    "content"
    "footer";
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.stage-mode-bar {
  grid-area: bar;
}

.stage-content {
  grid-area: content;
  min-height: 0;
}

.stage-mode-footer {
  grid-area: footer;
}

.stage-mode-bar,
.stage-mode-footer {
  background: transparent;
  color: #f5f8f6;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.stage-mode-footer {
  grid-template-columns: auto minmax(0, 1fr) auto;
  position: relative;
  text-align: center;
}

.stage-footer-tools {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 50%;
  position: absolute;
  top: -52px;
  transform: translateX(-50%);
}

.stage-progress {
  display: grid;
  gap: 2px;
  justify-items: center;
  min-width: 0;
}

.stage-next-hint {
  color: #9eaea7;
  font-size: 12px;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-next-hint[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .stage-shell.menu-open .stage-content {
    opacity: 0.32;
  }
}

.mobile-song-menu {
  align-self: end;
  background: rgba(12, 16, 14, 0.96);
  border: 1px solid #2c3532;
  border-radius: 16px 16px 0 0;
  color: #f5f8f6;
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-area: content;
  height: auto;
  max-height: min(58vh, 520px);
  min-height: 0;
  overflow: hidden;
  padding: 14px 14px 12px;
  width: 100%;
  z-index: 22;
}

.mobile-song-menu[hidden] {
  display: none;
}

.stage-cue {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.stage-cue small {
  color: #8aa39a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stage-cue span {
  color: #9eaea7;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.35;
}

.mobile-song-menu input[type="search"] {
  background: #1a211e;
  border: 1px solid #3a4440;
  border-radius: 10px;
  color: #f5f8f6;
  min-height: 42px;
  padding: 0 12px;
  width: 100%;
}

.stage-menu-scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.stage-menu-scope button {
  background: #1a211e;
  border: 1px solid #3a4440;
  border-radius: 999px;
  color: #d5e0db;
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
}

.stage-menu-scope button.active {
  background: #116d6e;
  border-color: #116d6e;
  color: #fff;
}

.stage-menu-toolbar {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: auto auto minmax(0, 1fr);
}

.stage-menu-toolbar > button,
.stage-menu-nav button {
  background: #242a27;
  border-color: #3a4440;
  color: #f5f8f6;
  font-size: 13px;
  font-weight: 700;
  min-height: 40px;
  padding: 6px 10px;
}

.stage-menu-toolbar > button.on {
  background: #116d6e;
  border-color: #116d6e;
  color: #fff;
}

.stage-speed-row {
  align-items: center;
  background: #1a211e;
  border: 1px solid #3a4440;
  border-radius: 10px;
  display: grid;
  gap: 4px;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  min-height: 40px;
  padding: 2px;
}

.stage-speed-row button {
  background: transparent;
  border: 0;
  color: #f5f8f6;
  min-height: 32px;
  min-width: 36px;
  padding: 0;
}

.stage-speed-row span {
  color: #9eaea7;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.stage-menu-nav {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.mobile-song-menu-list {
  align-content: start;
  display: grid;
  flex: 1;
  gap: 6px;
  min-height: 0;
  overflow: auto;
}

.mobile-song-menu-list button,
.stage-set-row {
  align-items: center;
  background: #1a211e;
  border: 1px solid #2c3532;
  border-radius: 10px;
  color: #f5f8f6;
  display: grid;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr);
  min-height: 48px;
  padding: 8px 12px;
  text-align: left;
}

.stage-cue-num {
  color: #7fd4c8;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  min-width: 1.4em;
}

.stage-menu-site {
  grid-template-columns: minmax(0, 1fr) auto;
  text-decoration: none;
}

.mobile-song-menu-list button.active {
  background: #163330;
  border-color: #4fb4a8;
}

.mobile-song-menu-list strong,
.mobile-song-menu-list small,
.stage-menu-site strong,
.stage-menu-site small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-song-menu-list small,
.stage-menu-site small,
.stage-menu-hint {
  color: #8b9b95;
  display: block;
  font-size: 12px;
  font-weight: 600;
}

.stage-menu-hint {
  margin: 0 2px 4px;
}

.mobile-song-menu .site-search-cta {
  margin: 4px 0 0;
  width: 100%;
}

#stageMenuBtn.on {
  background: #116d6e;
  border-color: #116d6e;
  color: #fff;
}

@media (min-width: 768px) {
  .stage-menu-nav {
    display: none;
  }
  .stage-shell.menu-open {
    grid-template-areas:
      "bar bar"
      "cue cue"
      "content menu"
      "footer footer";
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }
  .stage-shell.menu-open .mobile-song-menu {
    align-self: stretch;
    background: #101614;
    border: 0;
    border-left: 1px solid #2c3532;
    border-radius: 0;
    grid-area: menu;
    height: auto;
    margin: 0;
    max-height: none;
    max-width: none;
    width: auto;
  }
  .stage-shell.menu-open .stage-content {
    min-width: 0;
    opacity: 1;
  }
}

.stage-shell.stage-focus .stage-chrome {
  display: none !important;
}

.stage-shell.stage-focus .stage-mode-bar,
.stage-shell.stage-focus .stage-mode-footer {
  background: transparent;
  border: 0;
}

.stage-shell.stage-focus .stage-mode-bar button,
.stage-shell.stage-focus .stage-mode-footer .stage-nav-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: transparent;
}

.app-shell.stage-active.stage-focus {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.stage-active.stage-focus .sidebar {
  display: none;
}

.stage-mode-bar button,
.stage-mode-footer button {
  background: #242a27;
  border-color: #3a4440;
  color: #f5f8f6;
  min-height: 44px;
  min-width: 44px;
}

.stage-tom-btn {
  display: grid;
  gap: 0;
  justify-items: center;
  line-height: 1;
  padding: 6px 8px;
}

.stage-tom-btn::after {
  content: "tom";
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.72;
  text-transform: uppercase;
}

#stagePosition {
  font-weight: 800;
}

.stage-content .lyric-row {
  color: var(--stage-lyric);
}

.stage-content .chord-row,
.stage-content .chord,
.stage-content .chord-only {
  color: var(--stage-chord);
}

.mobile-stage-appbar,
.mobile-stage-fabs,
.mobile-chart-heading {
  display: none;
}

.stage-setlist-bar {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  padding: 10px 14px;
}

.stage-setlist-bar[hidden] {
  display: none;
}

.stage-setlist-title,
.stage-setlist-nav {
  align-items: center;
  display: flex;
  gap: 10px;
}

.stage-setlist-title span {
  color: var(--muted);
  font-size: 13px;
}

.stage-setlist-songs {
  display: flex;
  flex: 1;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
}

.stage-setlist-songs button {
  flex: 0 0 auto;
  max-width: 220px;
  overflow: hidden;
  padding: 7px 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-setlist-songs button.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.stage-content {
  background: var(--stage-bg);
  color: var(--stage-lyric);
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: var(--stage-font, 22px);
  grid-area: content;
  line-height: var(--stage-gap, 1.35);
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 28px;
  white-space: normal;
}

.stage-line {
  margin: 0 0 0.45em;
  min-height: 1.35em;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  width: 100%;
}

.stage-section {
  color: var(--accent);
  font-size: 0.72em;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin: 0.9em 0 0.25em;
}

.stage-content .stage-section {
  color: var(--stage-chord);
}

.stage-line.blank {
  min-height: 1em;
}

.chordpro-line {
  display: block;
  max-width: 100%;
  width: 100%;
}

.chord-lyric {
  align-items: flex-start;
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
  vertical-align: bottom;
}

.chord-lyric .chord {
  color: var(--chord);
  font-weight: 800;
  line-height: 1.05;
  min-height: 1.05em;
  overflow: visible;
  white-space: nowrap;
  width: 0;
}

.chord-lyric .lyric {
  color: var(--text);
  font-weight: 400;
  overflow-wrap: normal;
  white-space: pre;
  word-break: keep-all;
}

.chordpro-line > .lyric {
  white-space: pre;
}

.chord-row {
  color: var(--chord);
  font-size: 1em;
  font-weight: 800;
  min-height: 1.15em;
}

.lyric-row {
  color: var(--stage-lyric);
}

.chord-only,
.chord {
  color: var(--chord);
  font-weight: 800;
}

.picker-list,
.ordered-list {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  max-height: 360px;
  overflow: auto;
  padding: 10px;
}

.picker-list label {
  align-items: center;
  color: var(--text);
  display: flex;
  flex-direction: row;
}

.ordered-list {
  align-content: start;
  border: 0;
  border-radius: 0;
  max-height: none;
}

.ordered-row,
.available-row {
  align-items: center;
  border: 0;
  border-radius: 6px;
  display: grid;
  gap: 8px;
  min-height: 36px;
  padding: 6px 8px;
}

.ordered-row {
  grid-template-columns: 26px minmax(0, 1fr) auto;
}

.available-row {
  background: transparent;
  grid-template-columns: 24px minmax(0, 1fr);
  text-align: left;
}

.ordered-row:nth-child(odd),
.available-row:nth-child(odd) {
  background: var(--panel-strong);
}

.ordered-row strong,
.available-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-actions {
  display: flex;
  gap: 4px;
}

.mini-actions button {
  min-height: 28px;
  min-width: 30px;
  padding: 4px 8px;
}

.file-log {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  margin: 0;
  min-height: 180px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

.toast {
  background: var(--accent);
  border-radius: 8px;
  bottom: 22px;
  box-shadow: var(--shadow);
  color: #fff;
  font-weight: 700;
  left: 50%;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  position: fixed;
  text-align: center;
  transform: translateX(-50%);
  z-index: 40;
}

.toast[hidden] {
  display: none;
}

.sync-banner {
  align-items: center;
  background: #e8f4ff;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 8px 16px;
}

.sync-banner[hidden] {
  display: none;
}

.sync-banner.linked {
  background: #dcfce7;
}

:root.dark .sync-banner {
  background: #16324a;
}

:root.dark .sync-banner.linked {
  background: #14532d;
}

.sync-banner span {
  font-size: 13px;
  font-weight: 700;
}

.sync-banner button {
  flex: none;
  font-size: 13px;
  min-height: 36px;
  padding: 0 12px;
}

.app-shell.stage-active .sync-banner,
.app-shell.song-active .sync-banner,
.app-shell.editing-setlist .sync-banner {
  display: none !important;
}

.sync-panel .more-lead {
  margin: 0;
}

.sync-code {
  font-size: 40px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.1;
  margin: 8px 0;
  text-align: center;
}

.sync-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.sync-join {
  display: grid;
  gap: 6px;
}

.sync-join span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sync-join input {
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.18em;
  min-height: 52px;
  text-align: center;
}

.sync-host-card .sync-code {
  font-size: 52px;
  margin: 12px 0 8px;
}

.editor-preview {
  display: none;
}

.editor-preview-head {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.editor-preview-head strong {
  font-size: 26px;
  letter-spacing: -0.03em;
}

.editor-preview-head span {
  color: var(--muted);
  font-size: 13px;
}

.paste-sheet {
  align-items: end;
  background: rgba(16, 24, 20, 0.45);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 12px;
  position: fixed;
  z-index: 36;
}

.paste-sheet[hidden] {
  display: none;
}

.paste-sheet-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
  max-height: 88dvh;
  max-width: 560px;
  overflow: auto;
  padding: 16px;
  width: min(560px, 100%);
}

.paste-sheet-bar {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.paste-sheet-bar h2 {
  font-size: 20px;
  margin: 0;
}

.paste-sheet-bar p,
.paste-sites-label {
  color: var(--muted);
  font-size: 13px;
  margin: 6px 0 0;
}

.setlist-play-modes {
  display: grid;
  gap: 10px;
}

.setlist-play-mode {
  display: grid;
  gap: 4px;
  justify-items: start;
  padding: 16px;
  text-align: left;
}

.setlist-play-mode strong {
  font-size: 18px;
}

.setlist-play-mode span {
  font-size: 13px;
}

.setlist-play-mode[data-play-mode="song"] {
  background: #f7f1e4;
  border-color: #e4d8c4;
  color: #1a1612;
}

.setlist-play-mode[data-play-mode="song"] span {
  color: #5c5348;
}

.setlist-play-mode[data-play-mode="stage"] {
  background: var(--stage-bg);
  border-color: #2a332f;
  color: var(--stage-lyric);
}

.setlist-play-mode[data-play-mode="stage"] span {
  color: var(--stage-chord);
}

.setlist-play-mode.on {
  box-shadow: 0 0 0 2px var(--accent);
}

.setlist-play-exit {
  position: absolute;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  z-index: 42;
  background: transparent;
  border: 0;
  border-radius: 999px;
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  min-height: 44px;
  min-width: 44px;
  opacity: 0.28;
  padding: 8px 12px;
}

.setlist-play-exit:hover,
.setlist-play-exit:focus-visible {
  opacity: 0.95;
}

.app-shell.setlist-playing.stage-active .setlist-play-exit {
  color: var(--stage-lyric, #f5f8f6);
}

.setlist-play-exit.is-end {
  background: rgba(17, 24, 39, 0.72);
  bottom: max(20px, env(safe-area-inset-bottom));
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  left: 50%;
  letter-spacing: 0.08em;
  opacity: 0.94;
  text-transform: uppercase;
  top: auto;
  transform: translateX(-50%);
}

.app-shell.setlist-playing .bottom-nav,
.app-shell.setlist-playing .sidebar,
.app-shell.setlist-playing .toolbar,
.app-shell.setlist-playing #stageExitBtn {
  display: none !important;
}

.app-shell.setlist-playing.song-active {
  grid-template-columns: minmax(0, 1fr);
}

.app-shell.setlist-playing.song-active .workspace {
  padding: 0;
}

.app-shell.setlist-playing.song-active #songView {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding: 0;
}

.app-shell.setlist-playing.song-active .song-read {
  background: var(--panel);
  border: 0;
  border-radius: 0;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
}

.app-shell.setlist-playing.song-active .song-read-bar,
.app-shell.setlist-playing.song-active .song-read-menu,
.app-shell.setlist-playing.song-active .song-tools-panel,
.app-shell.setlist-playing.song-active .song-key-stepper,
.app-shell.setlist-playing.song-active .song-capo-hint {
  display: none !important;
}

.app-shell.setlist-playing.song-active .song-read-layout {
  grid-template-columns: minmax(0, 1fr);
  height: 100%;
}

.app-shell.setlist-playing.song-active .song-sheet {
  height: 100%;
}

.app-shell.setlist-playing.song-active .song-sheet-head {
  padding: 18px 18px 0 52px;
}

.app-shell.setlist-playing.stage-active .stage-mode-bar {
  padding-left: 52px;
}

.paste-sites-label {
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.paste-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paste-sources a {
  background: var(--panel-strong);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 12px;
  text-decoration: none;
}

.paste-sheet-card textarea {
  min-height: 180px;
}

.paste-sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.paste-sheet-actions .primary-action {
  margin-left: auto;
}

@media (min-width: 768px) {
  .paste-sheet {
    align-items: center;
  }
}

.empty { color: var(--muted); margin: 12px; }
.empty.compact { font-size: 14px; }

@media (max-width: 767px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .nav-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-tab { text-align: center; }
  .library-layout, .setlist-layout, .setlist-board, .setlist-fields, .service-grid { height: auto; grid-template-columns: 1fr; }
  .library-rail { display: none !important; }
  .song-read-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .song-tools-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 38vh;
  }
  .setlist-board section { min-height: 260px; }
  .app-shell.stage-active,
  .app-shell.song-active {
    min-height: 100dvh;
  }
  .app-shell.stage-active .sidebar,
  .app-shell.song-active .sidebar {
    display: none;
  }
  .app-shell.stage-active .brand,
  .app-shell.stage-active .sidebar-actions,
  .app-shell.stage-active .toolbar,
  .app-shell.song-active .brand,
  .app-shell.song-active .sidebar-actions,
  .app-shell.song-active .toolbar {
    display: none;
  }
  .app-shell.stage-active .workspace,
  .app-shell.song-active .workspace {
    display: block;
    height: 100%;
  }
  .app-shell.stage-active .view,
  .app-shell.song-active .view {
    padding: 0;
  }
  .stage-shell {
    border: 0;
    border-radius: 0;
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
  .stage-header {
    background: #111513;
    color: #f5f8f6;
    position: sticky;
    top: 0;
    z-index: 4;
  }
  .stage-header h1 {
    font-size: 20px;
  }
  .stage-controls {
    justify-content: flex-start;
  }
  .stage-content {
    font-size: var(--stage-font, 20px);
    padding: 22px 18px 34px;
  }
}

@media (max-width: 767px) {
  :root,
  :root.dark {
    --bg: #f5f8f6;
    --panel: #ffffff;
    --panel-strong: #eef6f3;
    --text: #18211e;
    --muted: #64736e;
    --line: #d8e4df;
    --accent: #3fb4a7;
    --danger: #b94c43;
    --chord: #111111;
    --shadow: 0 10px 26px rgba(24, 33, 30, 0.08);
  }
  body {
    background: #f4f6f5;
  }
  .app-shell {
    display: block;
    min-height: 100dvh;
  }
  .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf9 100%);
    border-bottom: 1px solid #e5efeb;
    gap: 14px;
    padding: 16px;
  }
  .brand {
    align-items: center;
  }
  .brand-mark {
    background: #54bdb1;
    color: #eafffb;
    height: 46px;
    width: 46px;
  }
  .brand strong {
    color: #17201c;
    font-size: 19px;
  }
  .brand span {
    color: #6c7b75;
    font-size: 13px;
  }
  .nav-tabs,
  .sidebar-actions,
  .nav-desktop-only {
    display: none;
  }
  .sidebar {
    padding: 14px 16px 10px;
  }
  .bottom-nav {
    background: #ffffff;
    border-top: 1px solid #e5efeb;
    bottom: 0;
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 0;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 30;
  }
  .bottom-nav-btn {
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: #64736e;
    display: grid;
    font-size: 11px;
    font-weight: 700;
    gap: 2px;
    justify-items: center;
    min-height: 52px;
    padding: 6px 4px;
  }
  .bottom-nav-btn span {
    font-size: 16px;
    line-height: 1;
  }
  .bottom-nav-btn.active {
    background: #e7f6f3;
    color: #0d736c;
  }
  .toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }
  .library-fab {
    align-items: center;
    background: #2f54f5;
    border: 0;
    border-radius: 50%;
    bottom: calc(78px + env(safe-area-inset-bottom));
    box-shadow: 0 10px 24px rgba(47, 84, 245, 0.35);
    color: #fff;
    display: none;
    font-size: 28px;
    font-weight: 400;
    height: 56px;
    justify-content: center;
    position: fixed;
    right: 18px;
    width: 56px;
    z-index: 25;
  }
  .app-shell.library-active #libraryFab,
  .app-shell.setlists-active:not(.editing-setlist) #setlistFab {
    display: inline-flex;
  }
  .app-shell.stage-active .bottom-nav,
  .app-shell.editing-song .bottom-nav,
  .app-shell.editing-setlist .bottom-nav {
    display: none;
  }
  .app-shell.stage-active .workspace,
  .app-shell.editing-song .workspace,
  .app-shell.editing-setlist .workspace {
    padding-bottom: 0;
  }
  .app-shell.song-active .song-read {
    height: calc(100dvh - 72px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
  }
  .toolbar-group {
    display: none;
  }
  .app-shell:not(.library-active) .toolbar,
  .app-shell.editing-song .toolbar {
    display: none;
  }
  .nav-tab {
    background: #ffffff;
    border: 1px solid #d8e4df;
    border-radius: 10px;
    color: #22302b;
    min-height: 40px;
    font-size: 12px;
    min-width: 0;
    padding: 8px 4px;
  }
  .nav-tab.active {
    background: #e7f6f3;
    border-color: #3fb4a7;
    color: #0d736c;
    font-weight: 700;
  }
  .sidebar-actions {
    gap: 8px;
  }
  .sidebar-actions button {
    border-radius: 10px;
    min-height: 44px;
  }
  .sidebar-actions .primary-action {
    background: #4fb9ae;
    border-color: #4fb9ae;
    color: #ffffff;
    font-weight: 700;
  }
  .workspace {
    display: block;
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .toolbar {
    background: #f5f8f6;
    border-bottom: 1px solid #e1ebe7;
    display: grid;
    gap: 10px;
    padding: 12px 16px 14px;
  }
  .search-box {
    background: #ffffff;
    border-color: #dbe7e2;
    box-shadow: 0 8px 18px rgba(24, 33, 30, 0.04);
    max-width: none;
  }
  .search-panel {
    max-width: none;
  }
  .search-scope-btn {
    background: #ffffff;
    border: 1px solid #dbe7e2;
    border-radius: 999px;
    color: #22302b;
    flex: 1;
    font-weight: 700;
  }
  .search-scope-btn.active {
    background: #3fb4a7;
    border-color: #3fb4a7;
    color: #ffffff;
  }
  .search-box span {
    color: #71807a;
  }
  .search-box input {
    color: #17201c;
  }
  .view {
    padding: 0;
  }
  .view.active {
    display: block;
  }
  .library-layout,
  .setlist-layout {
    display: block;
    height: auto;
  }
  .song-list-panel,
  .editor-panel,
  .setlist-panel,
  .setlist-editor,
  .files-panel {
    background: #ffffff;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .song-list-panel {
    margin-top: 0;
  }
  .panel-header {
    background: #ffffff;
    border-bottom: 1px solid #edf2f0;
    padding: 10px 16px 8px;
  }
  .panel-header h1 {
    color: #17201c;
    font-size: 20px;
  }
  .panel-header p {
    color: #6c7b75;
  }
  #categoryFilter {
    background: #f9fbfa;
    border-color: #dbe7e2;
    color: #22302b;
    min-height: 42px;
  }
  .library-tools {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .library-tools button {
    background: #eaf6f3;
    color: #0d736c;
    font-weight: 700;
  }
  .editor-panel {
    display: none;
  }
  .app-shell.editing-song .song-list-panel {
    display: none;
  }
  .app-shell.editing-song .editor-panel {
    display: block;
  }
  .editor-titlebar {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid #edf2f0;
    margin: -16px -16px 0;
    padding: 16px;
  }
  .editor-titlebar h2 {
    color: #17201c;
    font-size: 23px;
  }
  .editor-titlebar p {
    font-size: 13px;
  }
  .song-form {
    gap: 16px;
    padding: 16px;
  }
  .song-form label {
    color: #596963;
    font-size: 13px;
    font-weight: 700;
  }
  .song-form input,
  .song-form textarea {
    background: #f9fbfa;
    border-color: #dbe7e2;
    color: #17201c;
    font-size: 16px;
    min-height: 46px;
  }
  .song-form textarea {
    font-family: "Cascadia Mono", Consolas, "Courier New", monospace;
    font-size: 15px;
    line-height: 1.28;
    min-height: 320px;
  }
  .form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .form-actions .primary-action {
    grid-column: 1 / -1;
    min-height: 50px;
  }
  .song-list {
    gap: 0;
    max-height: none;
    padding: 8px 8px 96px;
  }
  .setlist-new-desktop {
    display: none;
  }
  #closeSetlistBtn {
    display: inline-flex;
  }
  .setlist-editor {
    display: none;
  }
  .app-shell.editing-setlist .setlist-panel {
    display: none;
  }
  .app-shell.editing-setlist .setlist-editor {
    display: grid;
  }
  .setlist-play {
    background: #eaf6f3;
    color: #0d736c;
    min-height: 44px;
    min-width: 44px;
  }
  .setlist-list {
    gap: 4px;
    padding: 8px 10px 96px;
  }
  .setlist-row {
    background: #ffffff;
    min-height: 72px;
    padding: 14px 8px 14px 14px;
  }
  .setlist-row.active {
    background: #eef4ff;
  }
  .setlist-row-main strong {
    color: #17201c;
    font-size: 18px;
  }
  .setlist-row-main small {
    color: #6c7b75;
  }
  .setlist-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .setlist-actions .primary-action {
    grid-column: 1 / -1;
    min-height: 50px;
  }
  .setlist-board section {
    min-height: 220px;
  }
  .more-panel {
    padding: 18px 16px 96px;
  }
  .more-panel h1 {
    font-size: 23px;
  }
  .more-row {
    background: #f9fbfa;
    border-color: #dbe7e2;
  }
  .file-log {
    min-height: 72px;
  }
  .song-row {
    background: #ffffff;
    border-bottom: 1px solid #edf2f0;
    border-radius: 0;
    color: #1c2723;
    min-height: 58px;
    padding: 10px 8px;
  }
  .song-item.open {
    background: #ffffff;
    border: 1px solid #d8e4df;
    box-shadow: 0 8px 18px rgba(24, 33, 30, 0.06);
    margin: 4px 0;
  }
  .song-item.open .song-row {
    background: #eff8f6;
    border-bottom: 0;
  }
  .song-preview-actions button {
    min-height: 36px;
  }
  .song-preview-chart {
    font-size: 17px;
    max-height: 52vh;
  }
  .song-row.active {
    background: #eff8f6;
    color: #0d736c;
  }
  .song-row strong {
    color: inherit;
    font-size: 17px;
    font-weight: 800;
  }
  .song-row small {
    color: #70807a;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .song-open {
    background: #eaf6f3;
    border-radius: 999px;
    color: #0d736c;
    padding: 5px 9px;
  }
  .song-play {
    min-height: 40px;
    min-width: 44px;
  }
  .app-shell.stage-active {
    --accent: #2f54f5;
    --line: #d8e4df;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .app-shell.song-active {
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .toolbar, .panel-header, .stage-header {
    align-items: stretch;
    flex-direction: column;
  }
  .form-grid { grid-template-columns: 1fr; }
  textarea { min-height: 300px; }
  .app-shell.stage-active .sidebar,
  .app-shell.song-active .sidebar {
    display: none;
  }
  .app-shell.stage-active .nav-tabs {
    gap: 4px;
  }
  .app-shell.stage-active .nav-tab {
    min-height: 36px;
    padding: 7px 6px;
  }
  .app-shell.stage-active .nav-tab:not(.active) {
    display: none;
  }
  .app-shell.stage-active .nav-tabs {
    display: none;
  }
  .stage-shell {
    background: #0d100f;
    border: 0;
    box-shadow: none;
    display: grid;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
    overflow: hidden;
    touch-action: pan-y;
  }
  .mobile-stage-appbar {
    align-items: center;
    background: #2f54f5;
    box-shadow: 0 3px 9px rgba(0, 0, 0, 0.22);
    color: #fff;
    display: grid;
    gap: 4px;
    grid-template-columns: 72px minmax(0, 1fr) 62px 62px;
    grid-template-rows: 34px 30px;
    height: 76px;
    padding: 5px 6px;
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .mobile-stage-appbar button {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    height: 30px;
    line-height: 1;
    min-width: 0;
    padding: 0 4px;
  }
  .mobile-stage-title {
    display: grid;
    grid-column: 2 / 4;
    grid-row: 1;
    min-width: 0;
    text-align: center;
  }
  .mobile-stage-appbar button:nth-of-type(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .mobile-stage-appbar button:nth-of-type(2) {
    grid-column: 4;
    grid-row: 1;
  }
  .mobile-stage-appbar button:nth-of-type(3) {
    grid-column: 1;
    grid-row: 2;
  }
  .mobile-stage-appbar button:nth-of-type(4) {
    grid-column: 2;
    grid-row: 2;
  }
  .mobile-stage-appbar button:nth-of-type(5) {
    grid-column: 3;
    grid-row: 2;
  }
  .mobile-stage-appbar button:nth-of-type(6) {
    grid-column: 4;
    grid-row: 2;
  }
  .mobile-stage-title strong {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.05;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-stage-title span {
    color: rgba(255, 255, 255, 0.94);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.05;
  }
  .mobile-song-menu {
    background: rgba(12, 16, 14, 0.96);
    border: 1px solid #2c3532;
    box-shadow: none;
    color: #f5f8f6;
    height: auto;
    max-height: min(58dvh, 520px);
    overflow: hidden;
    padding: 12px 12px calc(10px + env(safe-area-inset-bottom));
    position: static;
    z-index: 22;
  }
  .mobile-action-menu {
    background: #ffffff;
    border-bottom: 1px solid #d8e4df;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.14);
    max-height: 58dvh;
    overflow: auto;
    padding: 10px;
    position: static;
    z-index: 19;
  }
  .mobile-song-menu[hidden],
  .mobile-action-menu[hidden] {
    display: none;
  }
  .mobile-action-menu {
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
  }
  .mobile-action-menu button {
    background: #eaf6f3;
    border-color: #d8e4df;
    color: #0d736c;
    font-weight: 800;
    min-height: 42px;
  }
  .mobile-song-menu input[type="search"] {
    background: #1a211e;
    border: 1px solid #3a4440;
    color: #f5f8f6;
  }
  .stage-menu-toolbar {
    grid-template-columns: 1fr 1fr;
  }
  .stage-speed-row {
    grid-column: 1 / -1;
  }
  .stage-speed-row span {
    color: #9eaea7;
  }
  .mobile-song-menu-list {
    display: grid;
    gap: 6px;
  }
  .mobile-song-menu-list button,
  .stage-menu-site {
    background: #1a211e;
    border: 1px solid #2c3532;
    border-radius: 10px;
    color: #f5f8f6;
    min-height: 48px;
  }
  .mobile-song-menu-list button.active {
    background: #163330;
    border-color: #4fb4a8;
    color: #f5f8f6;
  }
  .mobile-song-menu-list small,
  .stage-menu-site small {
    color: #8b9b95;
  }
  .stage-header {
    display: none;
  }
  .stage-setlist-bar {
    display: none;
  }
  .stage-content {
    background: var(--stage-bg);
    color: var(--stage-lyric);
    font-family: Arial, Helvetica, sans-serif;
    font-size: var(--stage-font, 22px);
    line-height: var(--stage-gap, 1.22);
    min-height: 0;
    overflow: auto;
    padding: 16px 14px 24px;
    white-space: normal;
  }
  .song-read {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: calc(100dvh - 72px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
    min-height: 0;
    overflow: hidden;
  }
  .song-read-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .song-tools-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    max-height: 42dvh;
  }
  .library-rail {
    display: none !important;
  }
  .stage-shell {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 0;
  }
  .song-read-menu {
    background: #ffffff;
    border: 1px solid #d8e4df;
    border-radius: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    box-shadow: 0 12px 32px rgba(16, 24, 20, 0.18);
    left: 10px;
    max-height: 46dvh;
    overflow: auto;
    position: absolute;
    right: 10px;
    z-index: 24;
  }
  .song-read-tools {
    background: #ffffff;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    grid-template-rows: auto auto;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
  .stage-mode-footer button {
    min-height: 52px;
    min-width: 48px;
    font-size: 22px;
  }
  .stage-tom-btn {
    font-size: 22px;
  }
  .song-read-tools button {
    min-height: 44px;
    font-size: 13px;
    font-weight: 700;
  }
  #songSetlistBtn,
  #songChordsBtn,
  #songScrollBtn {
    min-height: 48px;
  }
  #songSetlistBtn { grid-column: 1 / 2; grid-row: 2; }
  #songScrollBtn { grid-column: 2 / 3; grid-row: 2; }
  #songChordsBtn { grid-column: 3 / 4; grid-row: 2; }
  .song-read-content {
    padding: 12px 12px 28px;
  }
  .song-read-bar,
  .stage-mode-bar,
  .stage-mode-footer {
    position: sticky;
    top: 0;
    z-index: 20;
  }
  .stage-mode-footer {
    bottom: 0;
    top: auto;
  }
  .mobile-chart-heading {
    display: block;
    font-family: Arial, Helvetica, sans-serif;
    margin: 0 0 18px;
    white-space: normal;
  }
  .mobile-chart-heading h2 {
    color: #111;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 2px;
  }
  .mobile-chart-heading p {
    color: #111;
    font-size: 20px;
    line-height: 1.16;
    margin: 0;
  }
  .stage-line {
    margin: 0 0 0.24em;
    min-height: 1.18em;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    width: 100%;
  }
  .stage-line.chord-only {
    margin: 0 0 0.04em;
    min-height: 1.05em;
    white-space: pre-wrap;
  }
  .chordpro-line {
    display: block;
    max-width: 100%;
    width: 100%;
  }
  .chord-row {
    font-size: 1em;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
    min-height: 1.05em;
  }
  .song-read-content .chord-row {
    color: #2f54f5;
    font-family: Arial, Helvetica, sans-serif;
  }
  .lyric-row,
  .chord-lyric .lyric {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
    line-height: 1.18;
  }
  .chord-lyric .lyric {
    white-space: pre;
    word-break: keep-all;
  }
  .song-read-content .lyric-row,
  .song-read-content .chord-lyric .lyric {
    color: #111;
  }
  .stage-content .chord-row,
  .stage-content .lyric-row,
  .stage-content .chord-lyric .lyric {
    font-family: inherit;
  }
  .stage-content .lyric-row {
    color: var(--stage-lyric);
  }
  .chord-only,
  .chord {
    color: #111;
    font-size: 1em;
    font-weight: 800;
    line-height: 1.05;
  }
  .stage-content .chord-row,
  .stage-content .chord,
  .stage-content .chord-only {
    color: var(--stage-chord);
  }
  .look-preview.stage-content {
    font-family: "Cascadia Mono", Consolas, monospace;
    height: 200px;
    max-height: 200px;
    min-height: 200px;
  }
  .mobile-stage-fabs {
    display: none;
    bottom: 56px;
    gap: 14px;
    grid-template-columns: repeat(2, 44px);
    pointer-events: none;
    position: fixed;
    right: 18px;
    z-index: 18;
  }
  .mobile-stage-fabs button {
    align-items: center;
    background: rgba(220, 223, 226, 0.58);
    border: 0;
    border-radius: 999px;
    color: #222;
    display: inline-flex;
    font-size: 15px;
    font-weight: 800;
    height: 56px;
    justify-content: center;
    padding: 0;
    pointer-events: auto;
    width: 56px;
  }
  .mobile-stage-fabs button:active {
    background: rgba(190, 194, 199, 0.78);
  }
  .paste-sheet {
    padding: 10px 10px calc(12px + env(safe-area-inset-bottom));
  }
  .paste-sheet-card textarea {
    min-height: 140px;
  }
  .paste-sheet-actions .primary-action {
    margin-left: 0;
    min-height: 48px;
    width: 100%;
  }
}

.song-chip {
  font-size: 12px;
  font-weight: 600;
  min-height: 32px;
  padding: 0 10px;
}

.song-phone-only {
  display: none;
}

.more-shortcuts {
  grid-template-columns: 1fr 1fr;
}

.more-columns {
  display: grid;
  gap: 8px;
}

.stage-capo-badge {
  display: none !important;
}

#songChordsBtn {
  display: none;
}

.song-list {
  gap: 0;
  padding: 4px 8px 24px;
}

.library-song-row {
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 64px;
  padding: 12px 8px;
}

.song-item.active .library-song-row {
  background: #eef4ff;
}

:root.dark .song-item.active .library-song-row {
  background: #1c2a44;
}

.song-row strong {
  font-size: 16px;
  font-weight: 700;
}

.song-row small {
  font-size: 13px;
}

.stage-mode-footer {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
}

.stage-nav-btn {
  background: rgba(255, 255, 255, 0.08) !important;
  border: 0 !important;
  color: #fff !important;
  height: 56px;
  min-width: 56px;
  opacity: 0.55;
}

.stage-progress {
  flex: 1;
}

.stage-footer-tools {
  bottom: calc(100% + 8px);
  left: 50%;
  position: absolute;
  top: auto;
  transform: translateX(-50%);
}

@media (min-width: 768px) {
  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
    max-width: 1440px;
    margin: 0 auto;
  }

  .app-shell.library-active .brand {
    display: none;
  }

  .more-columns {
    gap: 28px;
    grid-template-columns: 1fr 1fr;
  }

  .song-list-panel,
  .setlist-panel,
  .files-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .panel-header h1 {
    font-size: 28px;
  }
}

@media (max-width: 767px) {
  :root,
  :root.dark {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-strong: #eef2f7;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #2563eb;
    --chord: #2563eb;
  }

  :root.dark {
    --bg: #0f1419;
    --panel: #151b22;
    --text: #f3f6fb;
    --muted: #9aa6b2;
    --line: #2a3442;
    --accent: #60a5fa;
  }

  .sidebar {
    display: none !important;
  }

  .song-wide-only,
  .song-list-panel > .key-filters,
  .library-tools,
  .search-scope {
    display: none !important;
  }

  .app-shell.searching-sites .search-scope {
    display: flex !important;
  }

  .song-phone-only {
    display: inline-flex;
  }

  .bottom-nav {
    background: #f3f4f6;
    border-top: 1px solid var(--line);
  }

  .bottom-nav-btn {
    color: #6b7280;
  }

  .bottom-nav-btn.active {
    background: #dbeafe;
    color: #1d4ed8;
  }

  .library-filter {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #111827;
  }

  .library-filter.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
  }

  .panel-header {
    background: transparent;
    border: 0;
    padding: 8px 16px 0;
  }

  .toolbar {
    background: transparent;
    border: 0;
    display: grid;
    gap: 10px;
    padding: 12px 16px 8px;
  }

  .workspace-brand {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    padding: 2px 2px 0;
  }

  .search-box {
    background: #fff;
    border-color: #e5e7eb;
    box-shadow: none;
  }

  .song-tools-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    display: none;
    left: 10px;
    max-height: 58dvh;
    position: fixed;
    right: 10px;
    z-index: 28;
  }

  .app-shell.tools-open .song-tools-panel {
    display: grid;
  }

  #songOpenStageBtn2 {
    display: none;
  }

  .search-scope-btn.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
  }

  .song-read-shortcuts {
    flex-wrap: nowrap;
  }

  .song-read-bar > button,
  .song-read-shortcuts button,
  #songOpenStageBtn,
  #songOpenStageBtn.primary-action {
    height: 32px;
    min-height: 32px;
    padding: 0 11px;
  }

  #songFavBtn {
    padding: 0;
  }

  #songOpenStageBtn.primary-action {
    padding: 0 13px;
  }

  .library-fab {
    background: #2563eb;
  }

  .song-item.active .library-song-row,
  .song-row.active {
    background: #eef4ff;
    color: inherit;
  }
}

/* Approved ChordBook Lite visual model */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --panel-strong: #f3f4f6;
  --text: #111827;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2563eb;
  --chord: #2563eb;
  --stage-bg: #000000;
  --stage-lyric: #ffffff;
  --stage-chord: #7dd3fc;
}

.sidebar {
  background: #f3f4f6;
}

.brand strong {
  color: var(--accent);
  font-size: 18px;
  letter-spacing: -0.03em;
}

.home-shortcuts {
  display: none;
}

.home-shortcuts button {
  background: transparent;
  border: 0;
  color: var(--text);
  font-weight: 700;
  min-height: 40px;
}

.song-list-panel,
.setlist-panel,
.files-panel,
.editor-panel,
.setlist-editor {
  background: var(--panel);
}

.song-tools-panel {
  background: #f8fafc;
  width: 220px;
}

.song-sheet-head strong {
  font-size: 28px;
  letter-spacing: -0.03em;
}

.song-read-content {
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--stage-font, 22px);
  line-height: var(--stage-gap, 1.35);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 22px 40px;
}

.song-read-content .chord-row,
.song-read-content .chord,
.song-read-content .chord-only {
  color: var(--chord);
  font-weight: 800;
}

.song-read-content .lyric-row,
.song-read-content .chord-lyric .lyric {
  color: var(--text);
}

#songOpenStageBtn2,
#songChordsBtn {
  display: none !important;
}

.stage-shell {
  background: #000;
}

.stage-content {
  background: transparent;
  color: var(--stage-lyric);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--stage-font, 22px);
  line-height: var(--stage-gap, 1.35);
  padding: 24px 72px 80px;
}

.stage-content .chord-row,
.stage-content .chord,
.stage-content .chord-only {
  color: var(--stage-chord);
  font-weight: 800;
}

.stage-content .chord-lyric .lyric {
  color: var(--stage-lyric);
}

.stage-mode-title strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
}

.stage-mode-title span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.stage-shell #stagePrevBtn,
.stage-shell #stageNextBtn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 8;
}

.stage-shell #stagePrevBtn { left: 10px; }
.stage-shell #stageNextBtn { right: 10px; }

.stage-mode-footer {
  display: flex !important;
  justify-content: center;
  pointer-events: none;
}

.stage-mode-footer .stage-progress,
.stage-mode-footer .stage-footer-tools,
.stage-mode-footer button {
  pointer-events: auto;
}

.stage-progress {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
}

@media (min-width: 768px) {
  .app-shell {
    background: var(--bg);
    grid-template-columns: 248px minmax(0, 1fr);
    margin: 0 auto;
    max-width: 1360px;
  }

  .app-shell.library-active .brand,
  .app-shell.setlists-active .brand,
  .app-shell.import-active .brand {
    display: flex;
  }

  .app-shell.library-active .library-rail,
  .app-shell.setlists-active .library-rail,
  .app-shell.import-active .library-rail {
    display: grid;
  }

  .app-shell.library-active .nav-tabs,
  .app-shell.setlists-active .nav-tabs,
  .app-shell.import-active .nav-tabs {
    display: none;
  }

  .workspace-brand {
    display: block;
  }

  .home-shortcuts {
    display: flex;
  }

  .toolbar {
    background: var(--panel);
    display: grid;
    gap: 16px;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .search-box {
    border-radius: 999px;
  }

  .song-list-panel > .library-filters,
  .song-list-panel > .key-filters,
  .song-list-panel > .category-filters,
  .song-phone-only {
    display: none !important;
  }

  .song-wide-only {
    display: inline-flex;
  }

  .library-layout,
  .setlist-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .song-list-panel,
  .setlist-panel,
  .files-panel {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .song-read {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .song-read-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }

  .song-tools-panel {
    display: grid;
  }

  .more-columns {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }

  .more-shortcuts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 1024px) {
  .app-shell.editing-song .editor-panel {
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    height: calc(100dvh - 11rem);
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.editing-song .song-form {
    grid-template-rows: auto auto auto 1fr auto;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell.editing-song .lyrics-field {
    display: grid;
    grid-template-rows: auto 1fr;
    min-height: 0;
  }

  .app-shell.editing-song .lyrics-field textarea {
    height: 100%;
    min-height: 0;
  }

  .app-shell.editing-song .form-actions {
    background: var(--panel);
    padding-top: 4px;
  }

  .editor-preview {
    background: var(--bg);
    border-left: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 22px 24px 36px;
  }

  .editor-preview .song-read-content {
    min-width: 0;
    overflow-x: hidden;
    padding: 0;
  }

  .song-sheet-head strong {
    font-size: 32px;
  }

  .song-read-content,
  .stage-content {
    font-size: calc(var(--stage-font, 22px) + 2px);
  }
}

@media (max-width: 767px) {
  :root,
  :root.dark {
    --bg: #f5f7fb;
    --panel: #ffffff;
    --panel-strong: #eef2f7;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --accent: #2563eb;
    --chord: #2563eb;
  }

  :root.dark {
    --bg: #0f1419;
    --panel: #151b22;
    --panel-strong: #1c2430;
    --text: #f3f6fb;
    --muted: #9aa6b2;
    --line: #2a3442;
    --accent: #60a5fa;
    --chord: #93c5fd;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
  }

  .sidebar,
  .library-rail,
  .home-shortcuts,
  .song-wide-only,
  .nav-tabs,
  .sidebar-actions {
    display: none !important;
  }

  .song-phone-only {
    display: inline-flex !important;
  }

  .bottom-nav {
    background: #f3f4f6;
    border-top: 1px solid var(--line);
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    left: 0;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 30;
  }

  .bottom-nav-btn {
    background: transparent;
    border: 0;
    border-radius: 12px;
    color: #6b7280;
    display: grid;
    font-size: 11px;
    font-weight: 700;
    gap: 2px;
    justify-items: center;
    min-height: 52px;
  }

  .bottom-nav-btn.active {
    background: #dbeafe;
    color: #1d4ed8;
  }

  .workspace {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .toolbar {
    background: transparent;
    border: 0;
    display: grid;
    gap: 10px;
    padding: 12px 16px 8px;
  }

  .workspace-brand {
    display: block;
    font-size: 18px;
    line-height: 1.2;
    padding: 2px 2px 0;
  }

  .search-box {
    border-radius: 12px;
  }

  .song-list {
    padding: 0 8px 28px;
  }

  .library-song-row {
    min-height: 76px;
    padding: 16px 12px;
  }

  .song-row strong {
    font-size: 18px;
    letter-spacing: -0.02em;
  }

  .song-read-layout {
    grid-template-columns: 1fr;
  }

  .song-tools-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
    display: none;
    left: 10px;
    max-height: 58dvh;
    position: fixed;
    right: 10px;
    width: auto;
    z-index: 28;
  }

  .app-shell.tools-open .song-tools-panel {
    display: grid;
  }

  .song-sheet-head strong {
    font-size: 22px;
  }

  .song-read-content,
  .stage-content {
    padding-left: 12px;
    padding-right: 12px;
  }

  .stage-content {
    padding: 16px 12px 88px;
  }

  .app-shell.stage-active .bottom-nav,
  .app-shell.editing-song .bottom-nav,
  .app-shell.editing-setlist .bottom-nav {
    display: none;
  }

  .app-shell.song-active .song-read {
    height: calc(100dvh - 72px - env(safe-area-inset-bottom));
    max-height: calc(100dvh - 72px - env(safe-area-inset-bottom));
  }

  .app-shell.song-active .song-tools-panel,
  .song-tools-panel {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .more-columns,
  .more-shortcuts {
    grid-template-columns: 1fr;
  }

  .setlist-play {
    background: #dbeafe;
    color: #1d4ed8;
  }

  .library-song-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .more-panel {
    padding: 18px 16px 96px;
  }

  .more-panel h1 {
    font-size: 26px;
    margin: 0 0 8px;
  }
}

.look-details {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 12px;
}

.look-details summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.look-details .look-studio {
  margin-top: 12px;
}

#songSetlistBtn {
  display: none;
}

@media (max-width: 767px) {
  #songSetlistBtn {
    display: block;
  }

  .app-shell.song-active .song-read-layout {
    grid-template-rows: minmax(0, 1fr);
  }

  .app-shell.song-active .song-sheet {
    padding-bottom: 28px;
  }

  .song-tools-handle {
    align-items: center;
    background: transparent;
    border: 0;
    color: #6b7280;
    cursor: grab;
    display: grid;
    font-size: 11px;
    font-weight: 700;
    gap: 4px;
    justify-items: center;
    min-height: 32px;
    padding: 6px 12px 8px;
    touch-action: none;
    user-select: none;
    width: 100%;
  }

  .song-tools-handle-bar {
    background: #d1d5db;
    border-radius: 99px;
    display: block;
    height: 5px;
    width: 42px;
  }

  .app-shell.song-active .song-tools-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 18px 18px 0 0;
    bottom: calc(72px + env(safe-area-inset-bottom));
    box-shadow: 0 -10px 28px rgba(15, 23, 42, 0.16);
    display: grid !important;
    gap: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
    left: 0;
    max-height: 52dvh;
    order: 0;
    overflow: hidden;
    padding: 0;
    position: fixed !important;
    right: 0;
    transform: translate3d(0, calc(100% - 32px), 0);
    transition: transform 0.22s ease;
    width: auto;
    z-index: 29;
  }

  .app-shell.song-active.tools-open .song-tools-panel {
    transform: translate3d(0, 0, 0);
  }

  .app-shell.song-active .song-tools-panel.is-dragging {
    transition: none;
  }

  .app-shell.song-active .song-tools-body {
    display: grid;
    gap: 8px 12px;
    grid-template-columns: 1fr 1fr;
    overflow: auto;
    padding: 0 12px 12px;
  }

  .song-tools-transpose,
  .song-tools-switches,
  #songOpenStageBtn2 {
    display: none !important;
  }

  .song-tools-scroll,
  #songSetlistBtn {
    grid-column: 1 / -1;
  }

  .app-shell.song-active .song-tools-panel .tool-block > span {
    font-size: 11px;
  }

  .app-shell.song-active .song-tools-panel .tool-stepper {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  #songEditBtn {
    background: #eef4ff;
    color: #1d4ed8;
  }
}

@media (min-width: 768px) {
  .app-shell.import-active .toolbar {
    display: none;
  }

  .app-shell.import-active .nav-tabs,
  .app-shell.import-active .sidebar-actions {
    display: none;
  }

  .more-panel {
    padding: 8px 8px 40px;
  }

  .more-panel h1 {
    font-size: 28px;
    margin: 0 0 12px;
  }

  .more-shortcuts {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* Home: quieter chrome, keep the song list easy to read */
.sync-banner {
  background: #f7f9fc;
  border-bottom: 1px solid #edf1f6;
  padding: 6px 20px;
}

.sync-banner span {
  color: #6b7280;
  font-size: 13px;
  font-weight: 600;
}

.sync-banner button {
  background: #fff;
  border: 1px solid #d5deea;
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  min-height: 32px;
  padding: 0 12px;
}

.sync-banner.linked {
  background: #f3faf6;
}

:root.dark .sync-banner {
  background: #151b22;
  border-bottom-color: var(--line);
}

:root.dark .sync-banner span {
  color: var(--muted);
}

@media (min-width: 768px) {
  .app-shell {
    margin: 0;
    max-width: none;
  }

  .sidebar {
    padding: 20px 14px 18px;
  }

  .brand-mark {
    border-radius: 12px;
  }

  .brand span {
    font-size: 12px;
  }

  .rail-item {
    border-radius: 12px;
    min-height: 38px;
    padding: 7px 10px;
  }

  .rail-item span {
    background: #eceff3;
    border-radius: 999px;
    min-width: 22px;
    padding: 1px 7px;
    text-align: center;
  }

  .rail-item.active span {
    background: #dbeafe;
  }

  .sidebar-actions .primary-action {
    border-radius: 12px;
    min-height: 42px;
  }

  .workspace-brand {
    display: none;
  }

  .toolbar {
    background: var(--panel);
    border-bottom-color: #edf1f6;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 22px;
  }

  .search-panel {
    justify-self: start;
    max-width: 520px;
  }

  .search-box {
    background: #f7f8fa;
    border-color: transparent;
  }

  .search-box:focus-within {
    background: #fff;
    border-color: #bfdbfe;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }

  .home-shortcuts {
    gap: 2px;
  }

  .home-shortcuts button {
    color: #4b5563;
    font-size: 14px;
    font-weight: 650;
    min-height: 36px;
    padding: 6px 10px;
  }

  .home-shortcuts button:hover {
    background: #f3f4f6;
    border-color: transparent;
    color: var(--accent);
  }

  .panel-header {
    padding: 18px 24px 8px;
  }

  .panel-header h1 {
    font-size: 26px;
    letter-spacing: -0.03em;
  }

  .panel-header p {
    font-size: 13px;
  }

  .song-list {
    padding: 2px 12px 28px;
    scrollbar-color: #d1d5db transparent;
    scrollbar-width: thin;
  }

  .library-song-row {
    border-bottom-color: #eef1f5;
    min-height: 62px;
    padding: 11px 12px;
  }

  .library-song-row:hover {
    background: #f8fafc;
  }

  .song-item.active .library-song-row,
  .song-item.active .library-song-row:hover {
    background: #f3f7ff;
    box-shadow: inset 3px 0 0 var(--accent);
  }

  .song-item:last-child .library-song-row {
    border-bottom: 0;
  }

  .song-row strong {
    font-size: 16px;
    letter-spacing: -0.01em;
  }

  .song-fav {
    color: #e5e7eb;
  }

  .song-fav.on {
    color: #e0a106;
  }

  :root.dark .rail-item span {
    background: #1c2430;
  }

  :root.dark .rail-item.active span {
    background: #1c2a44;
  }

  :root.dark .search-box {
    background: var(--panel-strong);
  }

  :root.dark .library-song-row:hover {
    background: #1a212b;
  }

  :root.dark .song-item.active .library-song-row,
  :root.dark .song-item.active .library-song-row:hover {
    background: #1c2a44;
  }

  :root.dark .home-shortcuts button:hover {
    background: var(--panel-strong);
  }

  :root.dark .song-fav {
    color: #2a3442;
  }
}

.setlist-editor {
  gap: 0;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.app-shell.editing-setlist .setlist-editor {
  grid-template-rows: auto auto auto auto minmax(0, 1fr);
}

.setlist-day-bar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 48px;
  padding: 4px 8px;
}

.setlist-day-actions {
  display: flex;
  gap: 2px;
}

.setlist-day-bar button {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  min-height: 44px;
  min-width: 44px;
  padding: 0;
}

.setlist-day-bar button.on {
  color: var(--accent);
}

.setlist-day-head {
  padding: 18px 20px 10px;
  text-align: center;
}

.setlist-day-head h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.setlist-day-head p {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 0;
}

.setlist-day-menu {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 8px;
}

.setlist-day-menu[hidden] {
  display: none;
}

.setlist-day-menu button {
  background: var(--panel-strong);
  border: 0;
  min-height: 44px;
  text-align: left;
}

.setlist-details {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 12px;
  max-height: min(52vh, 520px);
  overflow: auto;
  padding: 12px 16px 16px;
}

.setlist-details[hidden] {
  display: none;
}

.setlist-details-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.setlist-board {
  min-height: 0;
  overflow: auto;
}

.setlist-board .ordered-list {
  gap: 0;
  padding: 0 0 88px;
}

.setlist-swipe {
  position: relative;
  overflow: hidden;
}

.setlist-swipe-delete {
  background: #ef4444;
  border: 0;
  border-radius: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  height: 100%;
  min-width: 96px;
  padding: 0 12px;
  position: absolute;
  right: 0;
  top: 0;
}

.setlist-swipe-main {
  align-items: center;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  min-height: 72px;
  padding: 12px 16px;
  position: relative;
  transition: transform 0.18s ease;
  width: 100%;
  z-index: 1;
}

.setlist-num {
  color: var(--muted);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.setlist-song-open {
  background: transparent;
  border: 0;
  min-width: 0;
  padding: 0;
  text-align: left;
}

.setlist-song-open strong,
.setlist-song-open small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setlist-song-open strong {
  font-size: 16px;
  font-weight: 800;
}

.setlist-song-open small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.setlist-song-key {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  min-width: 1.6em;
  text-align: right;
}

.setlist-row-remove {
  background: transparent;
  border: 0;
  color: var(--danger);
  display: none;
  font-size: 22px;
  min-height: 40px;
  min-width: 40px;
  padding: 0;
}

.setlist-add-sheet {
  align-items: end;
  background: rgba(15, 23, 42, 0.35);
  display: flex;
  inset: 0;
  position: absolute;
  z-index: 24;
}

.setlist-add-sheet[hidden] {
  display: none;
}

.setlist-editor {
  position: relative;
}

.setlist-add-card {
  background: var(--panel);
  border-radius: 16px 16px 0 0;
  display: grid;
  gap: 10px;
  max-height: 72vh;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  width: 100%;
}

.setlist-add-list {
  display: grid;
  gap: 4px;
  max-height: 48vh;
  overflow: auto;
}

.setlist-add-list button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  min-height: 56px;
  padding: 10px 4px;
  text-align: left;
}

.setlist-add-list strong,
.setlist-add-list small {
  display: block;
}

.setlist-add-list small {
  color: var(--muted);
}

@media (min-width: 768px) {
  .setlist-row-remove {
    display: inline-flex;
  }

  .setlist-swipe-delete {
    display: none;
  }

  .setlist-add-sheet {
    align-items: center;
    justify-content: center;
  }

  .setlist-add-card {
    border-radius: 16px;
    max-width: 420px;
    width: min(420px, calc(100% - 48px));
  }
}


