@font-face {
  font-family: Lora;
  src: url('/assets/assets/fonts/Lora-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Lora;
  src: url('/assets/assets/fonts/Lora-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('/assets/assets/fonts/Manrope-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: Manrope;
  src: url('/assets/assets/fonts/Manrope-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans';
  src: url('/assets/assets/fonts/NotoSans-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans';
  src: url('/assets/assets/fonts/NotoSans-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('/assets/assets/fonts/NotoSerif-Regular.ttf') format('truetype');
  font-display: swap;
}
@font-face {
  font-family: 'Noto Serif';
  src: url('/assets/assets/fonts/NotoSerif-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
:root {
  --paper: #fcf9f4;
  --ink: #221b16;
  --muted: #65574f;
  --accent: #992e28;
  --rule: #c9bcb1;
  --strong-rule: #8b776a;
  --wash: #f2eae1;
  --display: Lora, Georgia, serif;
  --sans: Manrope, system-ui, sans-serif;
  color-scheme: light;
  font-family: var(--sans);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); }
body:has(.reader[data-theme='soft']) { --paper: #f3ece0; --wash: #eae0cf; }
body:has(.reader[data-theme='dark']) {
  color-scheme: dark;
  --paper: #24201e;
  --ink: #f9efe6;
  --muted: #d1bcb0;
  --accent: #f6a193;
  --rule: #68564d;
  --strong-rule: #a68d80;
  --wash: #352c28;
}
a { color: inherit; text-decoration: none; }
button, select, input { color: inherit; font: inherit; }
button, select, summary, input[type='checkbox'], input[type='range'] { cursor: pointer; }
button { background: transparent; border: 0; }
button:disabled, select:disabled { cursor: default; opacity: .5; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--wash); color: var(--accent); }
.frame { width: min(calc(100% - 5rem), 74rem); margin-inline: auto; }
.skip { position: fixed; z-index: 5; top: 1rem; left: 1rem; padding: .65rem 1rem; background: var(--paper); transform: translateY(-200%); }
.skip:focus { transform: none; }
.sr-only { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.masthead { display: flex; align-items: center; gap: 1.4rem; min-height: 5.15rem; border-bottom: 1px solid var(--strong-rule); }
.brand { display: inline-flex; align-items: center; gap: .55rem; margin-right: auto; font: 700 clamp(1.8rem, 3.1vw, 2.55rem)/1 var(--display); letter-spacing: -.085em; }
.brand img { width: 2.4rem; height: 2.4rem; }
.masthead nav { display: flex; align-items: center; gap: clamp(1rem, 3.3vw, 2.6rem); }
.masthead nav a { display: grid; align-items: center; min-height: 3rem; font-weight: 700; font-size: .92rem; white-space: nowrap; }
.masthead nav a[aria-current], .masthead nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: .62rem; text-decoration-thickness: .095rem; }
.icon-button { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; padding: 0; border-radius: .45rem; }
.icon-button:hover { background: var(--wash); color: var(--accent); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-items { position: absolute; z-index: 2; inset: calc(100% + .5rem) 0 auto auto; min-width: 13rem; background: var(--paper); border: 1px solid var(--rule); border-radius: .45rem; box-shadow: 0 8px 22px #32150b15; padding: .3rem; }
.menu-items a { display: grid; align-items: center; padding: .35rem .7rem; min-height: 2.75rem; border-radius: .25rem; font-size: .93rem; }
.menu-items a:hover { background: var(--wash); color: var(--accent); }
.mobile-search { display: none; }
.spread { display: grid; grid-template-columns: minmax(0, .77fr) minmax(0, 1fr); column-gap: clamp(3.5rem, 10vw, 9rem); align-items: start; padding-block: clamp(2.9rem, 6vw, 5.8rem) 4rem; }
.margin { min-width: 0; position: relative; }
.margin::after { content: ''; position: absolute; top: -.8rem; right: clamp(-5.4rem, -6.5vw, -2rem); height: clamp(14.5rem, 26vw, 24rem); width: 1px; background: var(--accent); transform: rotate(17deg); pointer-events: none; }
h1 { margin: 0; font: 700 clamp(3.2rem, 6.2vw, 6.1rem)/.97 var(--display); letter-spacing: -.06em; overflow-wrap: anywhere; }
.reader h1.long-title { font-size: clamp(2.5rem, 4.7vw, 4.35rem); }
.directory h1 { max-width: 6.4ch; font-size: clamp(4.4rem, 8.8vw, 8.2rem); }
.directory h1:where(#catalog-title) { text-wrap: balance; }
body:has(.masthead nav a[href='/?favorites=1'][aria-current]) .directory h1 { max-width: none; font-size: clamp(2.8rem, 5vw, 4.8rem); }
.demo { color: var(--muted); margin: 1.2rem 0 0; font-size: .85rem; }
.alphabet { display: flex; flex-wrap: wrap; gap: .05rem .35rem; max-width: 22rem; margin-top: 1.6rem; padding-bottom: .25rem; border-bottom: 1px solid var(--strong-rule); }
.alphabet button { min-width: 2.75rem; min-height: 2.75rem; color: var(--muted); padding: .35rem; }
.alphabet button[aria-pressed='true'], .alphabet button:hover { color: var(--accent); font-weight: 700; }
.spread-content { min-width: 0; }
.search { display: flex; align-items: center; gap: .75rem; min-height: 3.5rem; border-bottom: 2px solid var(--accent); }
.search svg { flex: none; }
.search input { width: 100%; min-height: 3.25rem; border: 0; background: none; padding: .4rem .1rem; font-size: clamp(.98rem, 1.8vw, 1.22rem); }
.search input::placeholder { color: var(--muted); opacity: 1; }
.search:focus-within { background: var(--wash); }
.search input:focus-visible { outline-offset: -2px; }
.songs { list-style: none; margin: 1.1rem 0 0; padding: 0; }
.songs a { display: flex; align-items: center; justify-content: space-between; gap: .85rem; min-height: 3.2rem; border-bottom: 1px solid var(--rule); padding: .52rem .35rem .52rem 0; font-size: clamp(1rem, 2vw, 1.22rem); overflow-wrap: anywhere; }
.songs a svg, .back svg, .app-link svg { flex: none; width: 1.15rem; height: 1.15rem; }
.songs a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.songs a:hover svg { transform: translateX(3px); }
#no-songs { color: var(--muted); }
.back, .app-link { display: inline-flex; gap: .55rem; align-items: center; min-height: 2.75rem; color: var(--accent); font-size: .91rem; font-weight: 700; }
.back svg { transform: rotate(180deg); }
.back:hover, .app-link:hover { text-decoration: underline; text-underline-offset: .24rem; }
.reader-margin .eyebrow { color: var(--accent); font: 700 clamp(.95rem, 1.4vw, 1.16rem)/1.3 var(--display); margin: .65rem 0 .8rem; }
.reader-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .85rem; margin-top: 1.45rem; }
.key-control { display: grid; position: relative; grid-template-columns: 2.75rem minmax(3.2rem, auto) 2.75rem; align-items: center; min-height: 2.75rem; border: 1px solid var(--strong-rule); border-radius: .56rem; }
.key-control button { min-height: 2.75rem; border-radius: .5rem; font-size: 1.1rem; }
.key-control button:hover:enabled { background: var(--wash); color: var(--accent); }
.key-control select { position: absolute; inset: 0 2.75rem; width: calc(100% - 5.5rem); opacity: 0; }
.key-control:has(select:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.key-control output { pointer-events: none; text-align: center; color: var(--accent); padding-inline: .2rem; font-weight: 700; }
.chord-toggle { position: relative; display: inline-flex; align-items: center; min-height: 2.75rem; gap: .55rem; cursor: pointer; }
.chord-toggle input { position: absolute; inset: 0; margin: 0; width: 100%; opacity: 0; }
.chord-toggle span { display: flex; align-items: center; width: 2.55rem; height: 1.45rem; padding: .18rem; border: 1px solid var(--strong-rule); background: var(--rule); border-radius: 2rem; }
.chord-toggle span::after { content: ''; width: 1rem; height: 1rem; border-radius: 50%; background: var(--paper); }
.chord-toggle input:checked + span { justify-content: flex-end; background: var(--accent); border-color: var(--accent); }
.chord-toggle input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.song-actions { display: flex; flex-wrap: wrap; align-items: center; margin-top: 1rem; gap: .15rem; }
.song-actions button[aria-pressed='true'] { color: var(--accent); }
.song-actions button[aria-pressed='true'] svg { fill: currentColor; }
.share-status { color: var(--accent); font-size: .81rem; }
#share-url { flex-basis: 100%; min-width: 0; background: var(--paper); border: 1px solid var(--rule); padding: .3rem .5rem; }
.notation { font-family: var(--reader-font, 'Noto Sans', system-ui, sans-serif); font-size: calc(clamp(1.075rem, 1.8vw, 1.375rem) * var(--scale, 1)); line-height: 1.49; overflow-wrap: anywhere; }
.reader[data-font='notoSerif'] { --reader-font: 'Noto Serif', Georgia, serif; }
.reader[data-font='manrope'] { --reader-font: var(--sans); }
.reader[data-font='lora'] { --reader-font: var(--display); }
.notation section + section { margin-top: 1.6rem; }
.notation h2 { display: flex; gap: .75rem; align-items: center; margin: 0 0 .6rem; font: 700 clamp(.93rem, 1.7vw, 1.05rem)/1.5 var(--sans); }
.notation h2::after { content: ''; flex: 1; height: 1px; background: var(--strong-rule); }
.song-line { margin: .16em 0; white-space: pre-wrap; }
.song-line:empty { min-height: .65em; }
.fragment { display: inline-grid; max-width: 100%; min-width: 0; vertical-align: bottom; }
.fragment > span { min-width: 0; }
.chords { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .35em; color: var(--accent); font: 700 .75em/1.25 ui-monospace, SFMono-Regular, Consolas, monospace; }
.chorus .song-line { font-weight: 700; }
.chords-hidden .chords, .chords-hidden .instrumental { display: none; }
.chords-hidden .fragment { display: inline; }
.app-link { margin-top: 1.6rem; }
.appearance-button { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); width: 3.2rem; height: 3.2rem; background: var(--paper); border: 1px solid var(--strong-rule); border-radius: .7rem; font: 700 1.18rem/1 var(--display); box-shadow: 0 3px 14px #32150b13; }
.appearance-button:hover { color: var(--accent); border-color: var(--accent); }
#appearance { width: min(calc(100% - 2rem), 25rem); max-height: calc(100% - 2rem); padding: 1.05rem 1.2rem 1.35rem; color: var(--ink); background: var(--paper); border: 1px solid var(--strong-rule); border-radius: .75rem; }
#appearance::backdrop { background: #21171061; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.dialog-head h2 { margin: 0; font: 700 1.23rem/1.2 var(--display); }
.dialog-head button { font-size: 1.5rem; }
.appearance-row { display: flex; align-items: center; justify-content: space-between; gap: .45rem; min-height: 3.2rem; border-top: 1px solid var(--rule); }
.appearance-row select { background: var(--paper); padding: .3rem; min-height: 2.75rem; border: 1px solid var(--rule); border-radius: .4rem; }
#reader-size { width: 100%; margin: 0 0 .85rem; accent-color: var(--accent); }
@media (max-width: 50rem) {
  .frame { width: min(calc(100% - 2.5rem), 40rem); }
  .masthead { gap: .3rem; min-height: 4.25rem; }
  .masthead nav { display: none; }
  .mobile-search { display: inline-grid; }
  .spread { display: block; padding-block: 1.5rem 4.5rem; }
  .margin::after { display: none; }
  .directory h1, body:has(.masthead nav a[href='/?favorites=1'][aria-current]) .directory h1 { max-width: none; font-size: clamp(2.8rem, 12vw, 4rem); text-wrap: wrap; }
  .directory-content { margin-top: .75rem; }
  .alphabet { margin-top: .55rem; }
  .reader h1 { font-size: clamp(2.45rem, 11vw, 4rem); }
  .reader h1.long-title { font-size: clamp(2.05rem, 8.5vw, 3.3rem); }
  .reader-margin .eyebrow { display: none; }
  .reader-controls { margin-top: 1.1rem; }
  .song-actions { margin-top: .3rem; }
  .notation { margin-top: .9rem; padding-top: 1.1rem; border-top: 1px solid var(--strong-rule); }
}
@media (min-width: 50.01rem) {
  .reader .notation { padding-top: .25rem; }
}
