:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--bg-base);
  font-synthesis: none;
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --paper: var(--bg-surface);
  --bg: var(--bg-base);
  --chart-size: 21px;
}

/* LibreSuite palettes, shared with LibreLog. */
:root,
:root[data-theme="compline"] {
  --bg-deep: #15181c;
  --bg-base: #1a1d21;
  --bg-surface: #1f2229;
  --bg-elevated: #2a2e34;
  --bg-hover: #3d424a;
  --bg-active: #4a5157;
  --text-primary: #f0efeb;
  --text-secondary: #b4bcc4;
  --text-muted: #9aa2ac;
  --text-faint: #848c96;
  --accent: #d4ccb4;
  --accent-hover: #ccc4b0;
  --accent-text: #1a1d21;
  --success: #b8c4b8;
  --success-text: #1a1d21;
  --warning: #d4ccb4;
  --danger: #cdacac;
  --danger-hover: #c4a0a0;
  --info: #b4c0c8;
  --border: #454b54;
  --border-focus: #d4ccb4;
  color-scheme: dark;
}

:root[data-theme="lauds"] {
  --bg-deep: #e8e5df;
  --bg-base: #f0efeb;
  --bg-surface: #f5f4f1;
  --bg-elevated: #e0dcd4;
  --bg-hover: #d5d1c9;
  --bg-active: #c8c4bc;
  --text-primary: #1a1d21;
  --text-secondary: #4e5d69;
  --text-muted: #625846;
  --text-faint: #6f6b64;
  --accent: #6f6237;
  --accent-hover: #62572f;
  --accent-text: #f0efeb;
  --success: #5a6b5a;
  --success-text: #f0efeb;
  --warning: #6f6237;
  --danger: #754c4c;
  --danger-hover: #674141;
  --info: #4e5d69;
  --border: #c4bfb5;
  --border-focus: #6f6237;
  color-scheme: light;
}

:root[data-theme="vigil"] {
  --bg-deep: #000000;
  --bg-base: #000000;
  --bg-surface: #0a0a0a;
  --bg-elevated: #141414;
  --bg-hover: #1e1e1e;
  --bg-active: #2a2a2a;
  --text-primary: #f0efeb;
  --text-secondary: #b4bcc4;
  --text-muted: #9aa2ac;
  --text-faint: #848c96;
  --accent: #d4ccb4;
  --accent-hover: #ccc4b0;
  --accent-text: #000000;
  --success: #b8c4b8;
  --success-text: #000000;
  --warning: #d4ccb4;
  --danger: #cdacac;
  --danger-hover: #c4a0a0;
  --info: #b4c0c8;
  --border: #3f454d;
  --border-focus: #d4ccb4;
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--border-focus);
}
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 0;
  color: inherit;
  background: none;
  font-size: 14px;
  font-weight: 550;
  line-height: 1.35;
}
button:disabled {
  opacity: 0.3;
  cursor: default;
}
button:hover:not(:disabled) {
  filter: brightness(0.95);
}
input,
select,
textarea {
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  font-size: 16px;
  min-width: 0;
}
input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  accent-color: var(--accent);
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  font-weight: 650;
  margin-bottom: 0;
}
h2 {
  font-size: 25px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 17px;
}
p {
  line-height: 1.65;
}
a {
  color: inherit;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 25px 0;
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.icon-button {
  height: 40px;
  width: 40px;
  padding: 8px;
  border-radius: 8px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--bg);
}
.primary {
  background: var(--accent);
  color: var(--accent-text);
  border: 1px solid transparent;
  padding: 13px 20px;
  border-radius: 9px;
  min-height: 46px;
}
.secondary {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 11px 16px;
  border-radius: 8px;
  min-height: 44px;
}
.text-button {
  color: var(--accent);
  padding: 8px 0;
}
.full {
  width: 100%;
}
.muted {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  color: var(--muted);
}
.sidebar {
  width: 206px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  padding: 36px 21px 20px;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -1px;
  margin-bottom: 57px;
}
.brand > .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}
.brand-dot {
  color: var(--accent);
}
.sidebar-caption {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.8px;
  margin: 0 11px 14px;
}
.nav-button {
  display: flex;
  width: 100%;
  justify-content: flex-start;
  padding: 13px 12px;
  gap: 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}
.nav-button.active {
  background: var(--bg-elevated);
  color: var(--accent);
}
.sidebar-rule {
  border-top: 1px solid var(--border);
  margin: 28px 10px;
}
.sidebar-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
}
.sidebar-label span {
  color: var(--text-secondary);
}
.sidebar-hint {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 21px;
  line-height: 1.65;
  color: var(--text-secondary);
  padding: 20px 10px;
}
.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 11px;
}
.import-side {
  width: 100%;
  padding-inline: 9px;
}
.sidebar-bottom .nav-button {
  font-size: 12px;
  padding-inline: 5px;
}
.storage-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11px;
  border-top: 1px solid var(--border);
  padding: 17px 0 0;
}
.storage-status .icon {
  width: 13px;
  height: 13px;
}
.workspace {
  margin-left: 206px;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  height: 100dvh;
}
.browser-panel {
  background: var(--bg);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
}
.browser-head {
  padding: 37px 26px 23px;
}
.browser-head .eyebrow {
  margin-bottom: 13px;
}
.heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.round-button {
  width: 35px;
  height: 35px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
}
.panel-subtitle {
  color: var(--muted);
  font-size: 12px;
  margin: 12px 0 0;
}
#browser-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.library-controls {
  padding: 0 21px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  padding: 0 11px;
  color: var(--muted);
}
.search-box .icon {
  width: 17px;
  height: 17px;
}
.search-box input {
  border: 0;
  outline-offset: -2px;
  background: transparent;
  width: 100%;
  font-size: 13px;
  padding: 13px 0;
  color: var(--ink);
  border-radius: 0;
}
.search-box kbd {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 10px;
  padding: 1px 4px;
}
.filter-tabs {
  display: flex;
  gap: 18px;
  margin-top: 21px;
  border-bottom: 1px solid var(--line);
}
.filter-tabs button {
  padding: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.filter-tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
}
.filter-tabs .icon {
  width: 15px;
  height: 15px;
}
.filters {
  display: flex;
  gap: 8px;
  margin: 16px 0;
}
.filters select {
  width: 50%;
  font-size: 12px;
  padding: 9px;
  background: transparent;
}
.list-caption {
  display: flex;
  justify-content: space-between;
  padding: 3px 28px 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.1px;
}
.song-list {
  overflow: auto;
  flex: 1;
  padding: 0 10px 16px;
  min-height: 80px;
  scrollbar-width: thin;
}
.song-row {
  display: flex;
  width: 100%;
  min-height: 86px;
  text-align: left;
  border-radius: 8px;
  padding: 15px 14px;
  gap: 13px;
  position: relative;
  align-items: flex-start;
  margin-bottom: 3px;
}
.song-row.selected {
  background: var(--bg-elevated);
}
.song-row.selected:before {
  content: "";
  position: absolute;
  left: 0;
  top: 20px;
  bottom: 20px;
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
}
.song-symbol {
  margin-top: 3px;
  color: var(--text-faint);
}
.song-symbol .icon {
  width: 17px;
  height: 17px;
}
.song-row.selected .song-symbol {
  color: var(--accent);
}
.song-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}
.song-info strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}
.song-info > span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}
.song-info small {
  font-size: 10px;
  color: var(--warning);
  font-weight: 400;
}
.key-badge {
  font-size: 11px;
  white-space: nowrap;
  font-weight: 600;
  color: var(--muted);
  min-width: 27px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 3px;
  margin-top: 1px;
}
.browser-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 10px 23px;
  min-height: 57px;
}
.browser-footer .text-button {
  font-size: 12px;
}
.browser-footer .icon {
  width: 15px;
  height: 15px;
}
.browser-footer > span {
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--text-faint);
}
.load-more {
  width: 100%;
  padding: 16px;
  color: var(--accent);
}
.reader-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: var(--paper);
}
.reader-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 30px;
  border-bottom: 1px solid var(--line);
  min-height: 76px;
  gap: 16px;
}
.reader-context {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}
.reader-context > .icon {
  width: 12px;
  height: 12px;
}
.reader-context > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
}
.reader-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.reader-actions > .icon-button {
  color: var(--muted);
}
.reader-actions > .is-favorite {
  color: var(--accent);
}
.is-favorite .icon {
  fill: var(--accent);
}
.stage-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 13px;
  white-space: nowrap;
  font-size: 12px;
}
.stage-button.active {
  background: var(--accent);
  color: var(--accent-text);
}
.stage-button > .icon {
  width: 16px;
  height: 16px;
}
.reader-controls {
  display: flex;
  align-items: center;
  gap: 25px;
  padding: 17px 34px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.control-label {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  font-weight: 600;
}
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 7px;
  height: 35px;
  overflow: hidden;
}
.stepper > button {
  font-size: 19px;
  width: 33px;
  height: 100%;
}
.stepper > span {
  font-size: 14px;
  text-align: center;
  min-width: 66px;
  padding: 0 8px;
}
.stepper small {
  font-size: 9px;
  margin-left: 5px;
  color: var(--muted);
  font-weight: 400;
}
.control-group select {
  font-size: 12px;
  height: 35px;
  padding: 5px 10px;
  min-width: 80px;
}
.font-stepper {
  display: flex;
  gap: 3px;
  height: 35px;
}
.font-stepper button {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 6px;
  padding: 5px 9px;
  font-size: 12px;
}
.sounding-key {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.sounding-key strong {
  color: var(--accent);
  margin-left: 5px;
}
.chart-scroll {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  scroll-behavior: auto;
  overscroll-behavior: contain;
}
.chart {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 60px 32px;
  color: var(--ink);
}
.chart-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
  margin-bottom: 28px;
}
.chart-heading > .eyebrow {
  font-size: 10px;
  letter-spacing: 1.6px;
  color: var(--text-muted);
  margin-bottom: 15px;
}
.chart-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(32px, 3vw, 45px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -1.2px;
  margin: 0 0 14px;
  overflow-wrap: anywhere;
}
.chart-artist {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.chart-artist > span {
  font-size: 12px;
  margin-left: 5px;
}
.song-notes {
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 620px;
}
.song-notes summary {
  cursor: pointer;
  display: list-item;
}
.song-notes summary span {
  font-size: 10px;
  background: var(--bg);
  border-radius: 4px;
  padding: 2px 5px;
  margin-left: 5px;
}
.song-notes p {
  line-height: 1.6;
  overflow-wrap: anywhere;
  margin: 10px 0;
}
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.8px;
  margin: 24px 0 13px;
}
.chart-lines > .section-label:first-child {
  margin-top: 0;
}
.lyric-line {
  font-size: var(--chart-size);
  line-height: 1.7;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 3px;
}
.chord-phrase {
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
  vertical-align: bottom;
  line-height: 1.7;
  min-width: 0;
}
.chord {
  display: block;
  text-align: left;
  color: var(--accent);
  font-weight: 650;
  font-size: 0.74em;
  line-height: 1.45;
  min-height: 1.8em;
  padding: 0 10px 0 0;
  border-radius: 3px;
  align-self: flex-start;
  min-width: 30px;
}
.chord:hover {
  background: var(--bg-hover);
}
.chord-spacer {
  height: 1.332em;
}
.lyric-line:not(.has-chords) .chord-spacer {
  display: none;
}
.lyric {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  min-height: 1.7em;
}
.line-break {
  height: 13px;
}
.chart-comment {
  font-size: 14px;
  font-style: italic;
  color: var(--muted);
  margin: 12px 0;
  white-space: pre-wrap;
}
.tab-line {
  font-size: 0.72em;
  line-height: 1.45;
  white-space: pre;
  overflow-x: auto;
  margin: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.chart-end {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: center;
  margin: 45px 0 12px;
  font-size: 9px;
  letter-spacing: 1.6px;
  color: var(--text-faint);
}
.chart-end .icon {
  width: 13px;
  height: 13px;
}
.playback {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 73px;
  padding: 13px 30px;
  border-top: 1px solid var(--line);
  background: var(--paper);
  z-index: 2;
}
.scroll-controls {
  display: flex;
  align-items: center;
  gap: 24px;
}
.scroll-button {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 15px;
  font-size: 12px;
  min-width: 115px;
}
.scroll-button.playing {
  background: var(--accent);
  color: var(--accent-text);
}
.scroll-button .icon {
  width: 14px;
  height: 14px;
}
.speed-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}
.speed-control input {
  width: 74px;
}
.song-navigation {
  display: flex;
  align-items: center;
  gap: 7px;
}
.song-navigation > span {
  font-size: 12px;
  white-space: nowrap;
}
.song-navigation i {
  font-style: normal;
  color: var(--muted);
  margin-left: 4px;
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 50px 25px;
}
.empty-state > .icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  margin-bottom: 20px;
}
.empty-state h3 {
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.3;
}
.empty-state p {
  color: var(--muted);
  font-size: 14px;
}
.reader-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  padding: 70px;
  max-width: 670px;
}
.empty-record {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  margin-bottom: 40px;
  border: 1px solid var(--line);
}
.empty-record .icon {
  width: 32px;
  height: 32px;
}
.reader-empty .eyebrow {
  margin-bottom: 16px;
}
.reader-empty h2 {
  font-family: Georgia, serif;
  font-size: 54px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.reader-empty p {
  color: var(--muted);
  font-size: 15px;
  max-width: 340px;
  margin-bottom: 25px;
}
.reader-empty .text-button {
  margin-top: 15px;
}
.setlist-collection {
  padding: 0 16px 18px;
}
.set-card {
  display: flex;
  gap: 13px;
  width: 100%;
  padding: 14px 9px;
  border-radius: 8px;
  text-align: left;
  margin-bottom: 7px;
}
.set-card.selected {
  background: var(--bg-elevated);
}
.set-art {
  display: grid;
  place-items: center;
  background: var(--bg-elevated);
  border-radius: 9px;
  min-width: 42px;
  height: 46px;
  color: var(--accent);
}
.set-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.set-card strong {
  font-size: 14px;
}
.set-card small {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
}
.set-card > .icon {
  width: 14px;
  height: 14px;
}
.set-detail {
  border-top: 1px solid var(--line);
  padding: 22px 19px;
}
.set-detail-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.set-detail-title h2 {
  font-size: 17px;
  margin: 0;
}
.set-detail-title button {
  font-size: 12px;
}
.set-detail > .secondary {
  font-size: 12px;
}
.set-entries {
  margin-top: 15px;
}
.set-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 8px;
  border-radius: 8px;
  width: 100%;
  text-align: left;
}
.set-entry.selected {
  background: var(--bg-elevated);
}
.track-number {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  min-width: 20px;
}
.set-entry > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.set-entry strong {
  font-size: 13px;
}
.set-entry small {
  font-size: 11px;
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 28px;
  max-width: min(540px, calc(100vw - 32px));
  width: 100%;
  max-height: calc(100dvh - 40px);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 20px 100px #00000040;
  overflow-y: auto;
}
dialog::backdrop {
  background: #000000a6;
  backdrop-filter: blur(3px);
}
.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 20px;
}
.modal-head h2 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 29px;
  font-weight: 500;
}
.modal-head button {
  margin-right: -8px;
}
.modal-intro {
  font-size: 15px;
  color: var(--muted);
}
.import-options {
  display: grid;
  gap: 12px;
  margin: 25px 0 20px;
}
.import-option {
  display: grid;
  grid-template-columns: 32px 1fr;
  grid-template-rows: auto auto;
  text-align: left;
  justify-items: start;
  column-gap: 14px;
  row-gap: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 19px;
  background: var(--bg);
}
.import-option .icon {
  grid-row: 1/3;
  align-self: center;
  width: 25px;
  height: 25px;
  color: var(--accent);
}
.import-option strong {
  font-size: 15px;
}
.import-option span {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
.import-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  margin-bottom: 20px;
}
.inline-button {
  padding: 0;
  color: var(--accent);
  text-decoration: underline;
}
.import-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 30px 0;
}
.import-summary > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  background: var(--bg);
  padding: 18px 8px;
  border-radius: 10px;
}
.import-summary strong {
  font-size: 30px;
}
.import-summary span {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.import-errors {
  font-size: 13px;
  margin: 15px 0;
  color: var(--warning);
  overflow-wrap: anywhere;
}
progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent);
  margin: 20px 0;
}
.field-label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
#set-name {
  width: 100%;
  margin-bottom: 15px;
}
.inline-form {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.inline-form button {
  margin-bottom: 15px;
}
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 24px;
}
.reorder-list {
  max-height: 400px;
  overflow: auto;
}
.reorder-row {
  display: flex;
  align-items: center;
  gap: 5px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.reorder-row strong {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
}
.reorder-row .icon-button {
  width: 32px;
  height: 38px;
  padding: 5px;
}
.reorder-row .icon {
  width: 16px;
  height: 16px;
}
.danger {
  color: var(--danger);
}
.danger-button {
  padding: 13px 20px;
  background: var(--danger);
  color: var(--bg-deep);
  border-radius: 8px;
}
.add-song-results {
  max-height: 45dvh;
  min-height: 130px;
  overflow: auto;
  margin-top: 16px;
}
.add-song-row {
  display: flex;
  width: 100%;
  padding: 13px 7px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  text-align: left;
}
.add-song-row > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.add-song-row strong {
  font-size: 14px;
  font-weight: 550;
}
.add-song-row small {
  font-size: 12px;
  color: var(--muted);
}
.add-song-row > .icon {
  color: var(--accent);
  width: 18px;
  height: 18px;
}
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin: 24px 0;
}
.setting-row > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.setting-row strong {
  font-size: 14px;
}
.setting-row small {
  font-size: 12px;
  color: var(--muted);
}
.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.webdav-fields { display: grid; gap: 8px; }
.webdav-fields label { margin-top: 8px; font-size: 13px; }
.webdav-fields input { width: 100%; min-width: 0; }
.webdav-endpoint, #webdav-status { overflow-wrap: anywhere; }
#webdav-status { font-size: 13px; }
.storage-detail {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  padding: 12px;
  border-radius: 8px;
}
.menu-options {
  display: grid;
  gap: 5px;
}
.menu-button {
  justify-content: flex-start;
  padding: 14px;
  border-radius: 8px;
}
.menu-button:hover {
  background: var(--bg);
}
.editor-modal {
  max-width: min(800px, calc(100vw - 32px));
}
#song-source {
  width: 100%;
  height: 50dvh;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 14px;
  line-height: 1.7;
  tab-size: 4;
}
.chord-modal {
  max-width: 370px;
}
.chord-modal .modal-head h2 {
  font-family: inherit;
  font-size: 36px;
  font-weight: 650;
}
.chord-dialog {
  text-align: center;
}
.fretboard {
  display: block;
  width: 260px;
  max-width: 100%;
  height: auto;
  margin: 15px auto 0;
  color: var(--accent);
}
.chord-notes {
  font-size: 17px;
  letter-spacing: 3px;
  margin: 0 0 15px;
}
.voicing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 15px 0;
}
.voicing-nav > span {
  font-size: 13px;
  color: var(--muted);
}
#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  width: max-content;
  background: var(--accent);
  color: var(--accent-text);
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 20px #0002;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  z-index: 50;
  font-size: 14px;
}
#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 30px;
  text-align: center;
}
.mobile-nav,
.mobile-back {
  display: none;
}
.stage .sidebar,
.stage .browser-panel,
.stage .mobile-nav {
  display: none;
}
.stage .workspace {
  margin-left: 0;
  grid-template-columns: 1fr;
}
.stage .reader-panel {
  display: flex;
}
.stage .chart {
  max-width: 1000px;
}
.stage .reader-header {
  padding-block: 10px;
  min-height: 60px;
}
.stage .reader-controls {
  padding-block: 10px;
}
@media (min-width: 1500px) {
  .workspace {
    grid-template-columns: 380px minmax(0, 1fr);
  }
  .chart {
    padding-top: 58px;
  }
  .sidebar {
    width: 220px;
  }
  .workspace {
    margin-left: 220px;
  }
  .song-row {
    min-height: 92px;
  }
  .song-info strong {
    font-size: 15px;
  }
}
@media (max-width: 1150px) {
  .sidebar {
    width: 176px;
    padding-inline: 14px;
  }
  .brand {
    font-size: 21px;
    gap: 6px;
  }
  .workspace {
    margin-left: 176px;
    grid-template-columns: 300px minmax(0, 1fr);
  }
  .reader-header {
    padding-inline: 20px;
  }
  .reader-context > span:last-child {
    display: none;
  }
  .reader-context > .icon {
    display: none;
  }
  .reader-controls {
    padding: 14px 22px;
    gap: 18px;
  }
  .sounding-key {
    display: none;
  }
  .chart {
    padding: 35px 32px;
  }
  .scroll-controls {
    gap: 14px;
  }
  .playback {
    padding-inline: 18px;
  }
  .speed-control > span {
    display: none;
  }
  .song-navigation {
    gap: 2px;
  }
  .sidebar-bottom .nav-button {
    font-size: 11px;
  }
  .sidebar-hint {
    font-size: 19px;
  }
}
@media (max-width: 900px) and (min-width: 721px) {
  .sidebar {
    width: 78px;
    padding-inline: 12px;
    align-items: center;
  }
  .brand > span,
  .sidebar-caption,
  .sidebar-rule,
  .sidebar-label,
  .sidebar-hint,
  .storage-status {
    display: none;
  }
  .brand {
    margin-bottom: 40px;
  }
  .brand > .icon {
    width: 30px;
    height: 30px;
  }
  .sidebar nav {
    width: 100%;
  }
  .nav-button {
    font-size: 0;
    gap: 0;
    justify-content: center;
    margin-bottom: 10px;
  }
  .nav-button > .icon {
    width: 24px;
    height: 24px;
  }
  .import-side {
    font-size: 0;
    gap: 0;
    width: 50px;
  }
  .workspace {
    margin-left: 78px;
    grid-template-columns: 270px minmax(0, 1fr);
  }
  .browser-head {
    padding: 30px 20px 24px;
  }
  .chart {
    padding: 30px 24px;
  }
  .reader-actions {
    gap: 3px;
  }
  .stage-button {
    font-size: 0;
    gap: 0;
  }
  .stage-button > .icon {
    width: 20px;
    height: 20px;
  }
  .speed-control input {
    width: 55px;
  }
  .song-info strong {
    font-size: 13px;
  }
  .library-controls {
    padding-inline: 15px;
  }
}
@media (max-width: 720px) {
  body {
    height: 100dvh;
  }
  .sidebar {
    display: none;
  }
  .workspace {
    margin-left: 0;
    grid-template-columns: 1fr;
    height: calc(100dvh - 65px - env(safe-area-inset-bottom));
  }
  .browser-panel {
    border: 0;
    width: 100%;
  }
  .browser-head {
    padding: 30px 23px 22px;
  }
  .browser-head h1 {
    font-size: 36px;
  }
  .panel-subtitle {
    font-size: 13px;
  }
  .library-controls {
    padding: 0 22px;
  }
  .search-box input {
    font-size: 15px;
    padding-block: 15px;
  }
  .filters select {
    font-size: 14px;
  }
  .filter-tabs button {
    font-size: 14px;
  }
  .song-list {
    padding-inline: 12px;
  }
  .song-row {
    min-height: 87px;
    padding: 17px 15px;
    gap: 15px;
  }
  .song-info strong {
    font-size: 16px;
  }
  .song-info > span {
    font-size: 13px;
  }
  .song-info small {
    font-size: 11px;
  }
  .key-badge {
    font-size: 12px;
  }
  .song-symbol > .icon {
    width: 20px;
    height: 20px;
  }
  .list-caption {
    padding: 9px 30px 12px;
  }
  .browser-footer {
    padding-inline: 25px;
  }
  .browser-footer .text-button {
    font-size: 14px;
  }
  .reader-panel {
    display: none;
  }
  .mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    justify-content: space-around;
    background: var(--bg-deep);
    color: var(--text-secondary);
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    height: calc(65px + env(safe-area-inset-bottom));
    z-index: 10;
  }
  .mobile-nav button {
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
    font-weight: 500;
    min-width: 65px;
  }
  .mobile-nav button.active {
    color: var(--accent);
  }
  .mobile-nav .icon {
    width: 21px;
    height: 21px;
  }
  .mobile-reader .browser-panel {
    display: none;
  }
  .mobile-reader .reader-panel {
    display: flex;
  }
  .mobile-reader .mobile-nav {
    display: none;
  }
  .mobile-reader .workspace {
    height: 100dvh;
  }
  .reader-header {
    padding: 9px 14px;
    min-height: 60px;
    gap: 5px;
  }
  .reader-context {
    gap: 5px;
  }
  .reader-context > span {
    display: none;
  }
  .reader-context .mobile-back {
    display: inline-flex;
  }
  .reader-actions {
    gap: 4px;
  }
  .reader-actions > .icon-button {
    width: 37px;
  }
  .stage-button {
    font-size: 11px;
    padding: 9px;
  }
  .reader-controls {
    padding: 12px 18px;
    gap: 20px;
    justify-content: flex-start;
  }
  .control-label {
    font-size: 10px;
  }
  .stepper {
    height: 38px;
  }
  .stepper > button {
    width: 35px;
  }
  .stepper > span {
    min-width: 70px;
  }
  .control-group select {
    height: 38px;
    font-size: 14px;
  }
  .font-control {
    margin-left: auto;
  }
  .font-stepper {
    height: 38px;
  }
  .font-stepper button {
    padding: 6px 9px;
  }
  .sounding-key {
    display: none;
  }
  .chart {
    padding: 30px 23px 25px;
  }
  .chart-heading h2 {
    font-size: 35px;
    letter-spacing: -0.8px;
  }
  .chart-heading {
    padding-bottom: 22px;
    margin-bottom: 25px;
  }
  .chart-artist {
    font-size: 14px;
  }
  .chart-heading > .eyebrow {
    font-size: 10px;
  }
  .chart-lines {
    line-height: 1.8;
  }
  .lyric-line {
    font-size: calc(var(--chart-size) * 0.94);
    margin-bottom: 5px;
  }
  .chord {
    min-height: 1.95em;
    padding-right: 9px;
    font-size: 0.78em;
  }
  .chord-spacer {
    height: 1.521em;
  }
  .playback {
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    min-height: 70px;
    gap: 8px;
  }
  .scroll-button {
    min-width: 104px;
    padding: 11px 13px;
    font-size: 12px;
  }
  .scroll-controls {
    gap: 12px;
  }
  .speed-control input {
    width: 65px;
  }
  .song-navigation > .icon-button {
    width: 34px;
  }
  .song-navigation > span {
    font-size: 11px;
  }
  .song-navigation {
    gap: 1px;
  }
  .empty-state {
    max-width: 440px;
    margin: 0 auto;
  }
  .setlist-collection {
    padding-inline: 20px;
  }
  .set-card {
    padding: 15px;
  }
  .set-card strong {
    font-size: 16px;
  }
  .set-card small {
    font-size: 13px;
  }
  .set-detail {
    padding: 22px 26px;
  }
  .set-detail-title h2 {
    font-size: 21px;
  }
  .set-entry {
    padding: 16px 8px;
  }
  .set-entry strong {
    font-size: 15px;
  }
  .set-entry small {
    font-size: 12px;
  }
  .set-entry .track-number {
    font-size: 13px;
  }
  .set-detail > .secondary {
    font-size: 14px;
  }
  .set-detail-title button {
    font-size: 14px;
  }
  .setlist-collection .empty-state {
    padding-bottom: 10px;
  }
  .stage .workspace {
    height: 100dvh;
  }
  .stage .mobile-back {
    display: none;
  }
  .stage .reader-context > span:first-of-type {
    display: block;
    font-size: 11px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  dialog {
    padding: 22px;
    max-width: calc(100vw - 24px);
  }
  .modal-head h2 {
    font-size: 27px;
  }
  .import-option {
    padding: 17px 14px;
  }
  .import-option strong {
    font-size: 15px;
  }
  .import-option span {
    font-size: 11px;
  }
  .reorder-row strong {
    font-size: 14px;
  }
  .reorder-row .icon-button {
    width: 35px;
  }
  .button-row > button {
    flex: 1;
  }
  .chart-end {
    margin-top: 35px;
  }
  #toast {
    bottom: 85px;
    font-size: 13px;
    line-height: 1.5;
  }
}
@media (max-width: 370px) {
  .reader-controls {
    gap: 12px;
    padding-inline: 12px;
  }
  .font-stepper button {
    padding-inline: 6px;
  }
  .stepper > span {
    min-width: 58px;
  }
  .speed-control {
    display: none;
  }
  .chart {
    padding-inline: 18px;
  }
  .lyric-line {
    font-size: calc(var(--chart-size) * 0.88);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
@media print {
  body {
    height: auto;
    overflow: visible;
    background: #fff;
    color: #000;
    --paper: #fff;
    --ink: #000;
    --muted: #555;
    --line: #ccc;
    --accent: #222;
  }
  .sidebar,
  .browser-panel,
  .reader-header,
  .reader-controls,
  .playback,
  .mobile-nav,
  #toast,
  dialog {
    display: none !important;
  }
  .workspace {
    display: block;
    margin: 0;
    height: auto;
  }
  .reader-panel,
  .chart-scroll {
    display: block;
    height: auto;
    overflow: visible;
    background: #fff;
  }
  .chart {
    padding: 0;
    max-width: none;
  }
  .chart-heading h2 {
    font-size: 30px;
  }
  .chart {
    --chart-size: 15px !important;
  }
  .song-notes {
    display: none;
  }
  .chord {
    color: #222;
  }
  .chord-spacer {
    display: block;
  }
  .chart-end {
    display: none;
  }
  .lyric-line {
    break-inside: avoid;
  }
  .section-label {
    break-after: avoid;
  }
  .chart-heading {
    break-after: avoid;
  }
  .chart-heading > .eyebrow {
    display: none;
  }
  @page {
    margin: 18mm;
  }
}
/* Readable supporting labels at arm's length. */
.eyebrow,
.sidebar-caption,
.sidebar-label,
.list-caption,
.control-label,
.chart-heading > .eyebrow,
.browser-footer > span,
.chart-end {
  font-size: 12px;
  letter-spacing: 1.1px;
}
.panel-subtitle,
.song-info > span,
.song-info small,
.key-badge,
.reader-context,
.stepper small,
.sounding-key,
.chart-artist > span,
.song-notes,
.scroll-button,
.speed-control,
.song-navigation > span,
.set-card small,
.set-entry small,
.track-number,
.storage-status,
.import-option span,
.import-note,
.import-summary span,
.setting-row small,
.storage-detail {
  font-size: 12px;
}
.search-box input,
.filter-tabs button,
.filters select,
.stage-button,
.control-group select,
.font-stepper button,
.set-detail > .secondary,
.set-detail-title button {
  font-size: 14px;
}
.sidebar-bottom .nav-button,
.browser-footer .text-button {
  font-size: 13px;
}
.chart-warning {
  background: var(--bg-elevated);
  color: var(--warning);
  border: 1px solid var(--border);
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.6;
  margin: 15px 0;
}
@media (max-width: 900px) and (min-width: 721px) {
  .stage-button {
    font-size: 0;
  }
  .sidebar .nav-button {
    font-size: 0;
  }
  .import-side {
    font-size: 0;
  }
  .library-controls {
    padding-inline: 12px;
  }
  .filters select {
    font-size: 12px;
  }
}
@media (max-width: 720px) {
  .control-label {
    font-size: 12px;
  }
  .stage-button {
    font-size: 12px;
  }
  .stepper small {
    display: none;
  }
  .font-stepper button {
    font-size: 14px;
  }
  .mobile-nav button {
    font-size: 12px;
  }
  .chart-heading > .eyebrow {
    font-size: 12px;
  }
  .browser-footer > span {
    font-size: 12px;
  }
}

/* LibreSong identity and the shared LibreSuite theme selector. */
.brand {
  margin-bottom: 8px;
}
.suite-label {
  color: var(--text-muted);
  font-size: 12px;
  letter-spacing: 1.4px;
  margin: 0 0 38px 34px;
}
.theme-picker {
  margin: 0 0 26px;
  padding: 0;
  border: 0;
}
.theme-picker legend {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
}
.theme-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.theme-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  background: var(--bg);
}
.theme-card:has(input:checked) {
  border-color: var(--accent);
  outline: 1px solid var(--accent);
}
.theme-card:has(input:focus-visible) {
  outline: 3px solid var(--border-focus);
  outline-offset: 3px;
}
.theme-card input {
  position: absolute;
  top: 14px;
  right: 12px;
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.theme-card strong {
  font-size: 14px;
  font-weight: 600;
}
.theme-card small {
  color: var(--muted);
  font-size: 12px;
}
.theme-swatch {
  display: flex;
  align-items: flex-end;
  width: 100%;
  height: 42px;
  background: var(--preview-bg);
  border: 1px solid var(--preview-border);
  border-radius: 5px;
  padding: 8px;
  margin-top: 22px;
}
.theme-swatch:after {
  content: "";
  display: block;
  width: 44%;
  height: 5px;
  border-radius: 2px;
  background: var(--preview-accent);
}
.app-identity {
  margin: 23px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
}
.app-identity span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}
@media (max-width: 900px) and (min-width: 721px) {
  .suite-label {
    display: none;
  }
  .brand {
    margin-bottom: 40px;
  }
}
@media (max-width: 400px) {
  .theme-options {
    gap: 8px;
  }
  .theme-card {
    padding: 10px;
  }
  .theme-card strong {
    font-size: 13px;
  }
}
