/* ============================================================
   Mayne Singers — a boutique songbook for sea shantymen.

   Aesthetic: a fine independent music-press chapbook.  One type
   family (Cormorant), set generously.  Hairline rules instead of
   cards.  A single chart device (the compass-rose mark) and no
   other ornament.

   Class names are kept stable so the templates and ChordSheetJS
   output keep working; only the look changes.
   ============================================================ */

/* ---- forge-music token aliases ----------------------------------------
   The boutique-songbook typography + de-tropification base ships from
   forge-music (base.css + /forge-music/instruments.css with `bg/fg/accent`
   tokens scoped under [data-instrument="shanties"]).  This block aliases
   the historical shanties CSS variable names to forge-music's tokens so
   the rest of this file (~1500 lines of layout) keeps working as-is.
   ---------------------------------------------------------------------- */
:root {
  /* Forge-music tokens. Fallbacks match forge-music's defaults so this file
     still renders sensibly if served outside the app (e.g. linted standalone). */
  --paper:        var(--instrument-bg, #f1e8d1);
  --ink:          var(--instrument-fg, #1a2632);
  --ember:        var(--instrument-accent, #8a5c25);

  /* Derivatives — shades of the three base tokens. */
  --paper-deep:   #e3d5b0;
  --paper-edge:   #d8c79a;
  --ink-soft:     #4d5a6a;
  --ink-mute:     #7b8593;
  --ember-deep:   #5d3f14;
  --lantern:      #b8893a;

  /* Maritime depth-of-field — used inside the brand mark and for the
     occasional sea-blue secondary. */
  --pine:         #2a3f55;
  --moss:         #4d6860;

  /* Hairline rules — the dominant structural element on the page */
  --rule:         #b8a988;
  --rule-soft:    #d4c5a0;

  /* Almost-no shadow.  This isn't a card-heavy interface. */
  --shadow:       0 1px 0 rgba(26,38,50,0.04);

  /* Compass-mark brass — referenced by the brand SVG via CSS vars */
  --rune-gold:    #c8a86a;
  --rune-bright:  #e4c682;

  /* One family, three voices.  --font-stamp is no longer typewriter;
     it's an italic serif so the existing class names stay calm. */
  --font-display: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --font-body:    "Cormorant Garamond", Georgia, serif;
  --font-stamp:   "Cormorant Garamond", Georgia, serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  line-height: 1.62;
  font-feature-settings: "liga", "kern";
  -webkit-font-smoothing: antialiased;
}

/* The body gets a single very-faint warmth — no dot grain, no texture pile. */
body {
  background-image: none;
}

/* ---------- Topbar — plain paper, hairline rule beneath ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.6rem 2.2rem 1.1rem;
  background: transparent;
  border-bottom: 1px solid var(--rule);
  box-shadow: none;
  max-width: 1200px;
  margin: 0 auto;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

/* Compass-rose brand mark — the one chart device on the whole page. */
.brand-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}
.brand-shield {
  width: 100%;
  height: 100%;
  display: block;
}

.brand-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.005em;
  color: var(--ink);
}

.topnav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 1.5rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1.05rem;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.topnav a:hover { color: var(--ember); border-color: var(--rule); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2.2rem;
}

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; padding: 1.2rem; gap: 1.4rem; }
  .sidebar { position: static !important; border-left: 0 !important; padding-left: 0 !important; }
}

/* ---------- Sidebar — a printed index, not a card ---------- */
.sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.4rem 0 0.4rem 1.4rem;
  box-shadow: none;
  font-size: 16px;
}

.sidebar h3 {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0 0 0.9rem 0;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.45rem;
}

.chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: chapter-counter;
}

.chapter-list li {
  counter-increment: chapter-counter;
  margin-bottom: 0.55rem;
  position: relative;
  padding-left: 2.1rem;
  line-height: 1.35;
}

.chapter-list li::before {
  content: counter(chapter-counter);
  position: absolute;
  left: 0;
  top: 0.05rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-mute);
  font-weight: 400;
  width: 1.6rem;
  text-align: right;
  padding-right: 0.4rem;
}

.chapter-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}
.chapter-list a:hover { border-color: var(--ember); }
.chapter-list li.current a { color: var(--ember); font-style: italic; }

/* ---------- Main content ---------- */
.content {
  background: transparent;
  padding: 0.4rem 0 3rem;
  max-width: 720px;
}

.content h1 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2.6rem;
  line-height: 1.1;
  margin: 0.6rem 0 0.3rem 0;
  color: var(--ink);
  letter-spacing: 0;
}

.content h1::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  background: var(--rule);
  margin-top: 0.9rem;
}

.content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  margin: 2.4rem 0 0.6rem;
  color: var(--ink);
}

.content h3 {
  font-family: var(--font-body);
  font-weight: 500;
  font-style: italic;
  font-size: 1.15rem;
  text-transform: none;
  letter-spacing: 0;
  margin: 1.8rem 0 0.4rem;
  color: var(--ink);
}

.content p { margin: 0.8rem 0; }
.content ul, .content ol { padding-left: 1.4rem; }
.content li { margin: 0.3rem 0; }

.content a {
  color: var(--ember-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.15s, color 0.15s;
}
.content a:hover { color: var(--ember); border-color: var(--ember); }

.content blockquote {
  border-left: 2px solid var(--rule);
  background: transparent;
  margin: 1.4rem 0;
  padding: 0.4rem 1.2rem;
  font-style: italic;
  color: var(--ink-soft);
}

.content code {
  font-family: var(--font-mono);
  background: var(--paper-deep);
  padding: 1px 6px;
  border-radius: 2px;
  font-size: 0.82em;
  color: var(--ember-deep);
}

.content pre {
  font-family: var(--font-mono);
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.2rem;
  border-radius: 3px;
  overflow-x: auto;
  font-size: 0.85em;
  line-height: 1.5;
}
.content pre code { background: none; color: inherit; padding: 0; }

.content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  font-size: 0.98em;
}

.content th, .content td {
  border-bottom: 1px solid var(--rule-soft);
  padding: 0.55rem 0.7rem 0.55rem 0;
  text-align: left;
}

.content th {
  font-family: var(--font-display);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.85rem;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
}

/* ---------- Chapter prev/next nav ---------- */
.ch-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  gap: 1rem;
}

.ch-nav a {
  background: transparent;
  border: 0;
  padding: 0;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  text-transform: none;
  letter-spacing: 0;
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s, border-color 0.15s;
}
.ch-nav a:hover { color: var(--ember); border-color: var(--ember); }

/* ---------- Homepage hero ---------- */
.hero {
  text-align: center;
  padding: 2.6rem 1rem 2.4rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 2.2rem;
}

.hero-kicker {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 0.4rem 0;
  font-size: 1.05rem;
}

.hero h1 {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 3.4rem;
  line-height: 1.05;
  letter-spacing: 0.002em;
  margin: 0;
}
.hero h1::after { display: none; }

.hero .tagline {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-top: 0.7rem;
  font-size: 1.05rem;
}

.hero .lede {
  max-width: 560px;
  margin: 1.4rem auto 0;
  color: var(--ink);
  font-size: 1.05rem;
  font-style: normal;
  line-height: 1.55;
}

/* ---------- Section "card" — actually just a labelled run, no fill ---------- */
.section-card {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule);
  border-radius: 0;
  padding: 1.6rem 0 0.4rem;
  margin: 2.4rem 0;
  box-shadow: none;
}

.section-card h2 {
  margin: 0 0 0.6rem 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.section-card p {
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 56ch;
}

/* ---------- Song listing — typeset, not tiled ---------- */
.song-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 2.4rem;
  row-gap: 0;
  margin-top: 1rem;
}
@media (max-width: 640px) {
  .song-grid { grid-template-columns: 1fr; }
}

.song-tile {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  background: transparent;
  text-decoration: none;
  color: var(--ink);
  border-radius: 0;
  transition: color 0.15s;
}
.song-tile:hover {
  border-color: var(--rule);
  color: var(--ember);
  transform: none;
  box-shadow: none;
}

.song-tile .song-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.25;
}
.song-tile .song-meta {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.86rem;
  color: var(--ink-mute);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0;
  flex-shrink: 0;
  text-align: right;
}

/* ---------- Pills — light, italic, underlined; no rounded fills ---------- */
.pill {
  display: inline-block;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 0.82rem;
  padding: 0 3px;
  border-radius: 0;
  text-transform: none;
  letter-spacing: 0;
  margin-right: 0.5rem;
  background: transparent;
  border-bottom: 1px solid currentColor;
}
.pill-beginner     { color: #4d6860; }
.pill-intermediate { color: #8a5c25; }
.pill-advanced     { color: #2a3f55; }
.pill-tag          { color: var(--ink-mute); border-bottom-color: var(--rule-soft); }

/* ============================================================
   Song page — the chord sheet view
   ============================================================ */

.song-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.song-header h1 {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 2.4rem;
  line-height: 1.1;
}
.song-header h1::after { display: none; }

.song-header .artist {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  margin-top: 0.25rem;
  font-size: 1.02rem;
}

.song-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem 1.1rem;
  align-items: center;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  padding: 0.55rem 0;
  border-radius: 0;
  margin-bottom: 1.5rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.song-toolbar .group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.song-toolbar label {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.song-toolbar button {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  width: 30px;
  height: 30px;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.15s, color 0.15s;
}
.song-toolbar button:hover { border-color: var(--ember); color: var(--ember); background: transparent; }

.song-toolbar select {
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 3px 6px;
  border: 1px solid var(--rule);
  background: transparent;
  border-radius: 2px;
  color: var(--ink);
}

.song-toolbar .key-display {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
  min-width: 38px;
  text-align: center;
}

.song-toolbar .spacer { flex: 1; }

.song-toolbar a.dl {
  text-decoration: none;
  color: var(--ink-soft);
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 2px 0;
  border-radius: 0;
  font-size: 0.9rem;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}
.song-toolbar a.dl:hover { color: var(--ember); border-color: var(--ember); }

/* Rendered ChordSheetJS output */
.chord-sheet {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 2.4;
  background: transparent;
  padding: 1rem 0;
}

.chord-sheet .paragraph { margin: 1rem 0 1.4rem; }

.chord-sheet .row {
  display: flex;
  flex-wrap: wrap;
  margin: 0.4rem 0;
}

.chord-sheet .column {
  display: inline-flex;
  flex-direction: column;
  min-width: fit-content;
}

.chord-sheet .chord {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ember-deep);
  font-size: 0.82em;
  height: 1.2em;
  line-height: 1.2em;
  white-space: pre;
  padding-right: 8px;
}
.chord-sheet .chord:empty::before { content: "\00a0"; }

.chord-sheet .lyrics {
  font-family: var(--font-body);
  font-size: 1.18rem;
  color: var(--ink);
  line-height: 1.5em;
  white-space: pre;
}

.chord-sheet .comment {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-soft);
  margin: 0.7rem 0 0.3rem;
  font-size: 1rem;
}

.chord-sheet .chorus {
  border-left: 1px solid var(--rule);
  padding-left: 1rem;
  margin-left: -1rem;
}

/* Section labels (verse, chorus headings) — small caps, no stamp */
.chord-sheet .label,
.chord-sheet .verse-label,
.chord-sheet .chorus-label {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0.06em;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: 1.4rem;
  margin-bottom: 0.3rem;
  display: block;
}

/* Practice notes / metadata above songs */
.song-notes {
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  padding: 0.4rem 1.2rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 0.96rem;
}

/* ---------- Footer — a colophon line ---------- */
.colophon {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 1.4rem 2.2rem 2.4rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  background: transparent;
}

.colophon-line {
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink-mute);
  font-size: 0.92rem;
  margin: 0;
  letter-spacing: 0.01em;
}

/* Backwards-compat shell for the old `.campfire-footer` class, in case any
   chapter content references it.  Same colophon look. */
.campfire-footer {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 1.4rem 2.2rem 2.4rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  background: transparent;
  color: var(--ink-mute);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
}

/* Lesson plan tables / progression lists — quieter "Week N" markers */
.progression {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  counter-reset: step;
}

.progression li {
  counter-increment: step;
  position: relative;
  padding: 0.7rem 0 0.7rem 4rem;
  margin: 0.4rem 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
}

.progression li::before {
  content: "Week " counter(step);
  position: absolute;
  left: 0;
  top: 0.85rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-mute);
  font-weight: 400;
  letter-spacing: 0;
}

/* ============================================================
   Recordings — audio/video block on song pages
   ============================================================ */

.recordings {
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
  padding: 0.9rem 0 1rem;
  margin: 1.2rem 0 1.5rem;
}
.recordings h3 {
  font-family: var(--font-display);
  text-transform: none;
  letter-spacing: 0.05em;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 0.7rem;
}

.video-embed-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 640px;
  margin: 0.6rem 0;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.audio-player {
  margin: 0.6rem 0;
}
.audio-player audio {
  width: 100%;
  max-width: 640px;
  display: block;
}

.recording-credits {
  margin-top: 0.7rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule-soft);
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-style: italic;
}
.recording-credits .credit {
  margin: 0.2rem 0;
}

/* ============================================================
   Playlist page
   ============================================================ */

.play-all-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 1.4rem;
  text-align: center;
}

#play-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.1rem;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition: background 0.15s, color 0.15s;
}
#play-all-btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: none;
  box-shadow: none;
}
#play-all-btn:active {
  transform: none;
  box-shadow: none;
}
#play-all-btn.is-playing {
  background: var(--ember);
  color: var(--paper);
  border-color: var(--ember);
}

.play-all-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.play-all-count {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
  margin-left: 0.3rem;
  opacity: 0.85;
}

.play-all-note {
  max-width: 520px;
  margin: 0.7rem auto 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--ink-soft);
}
.play-all-note em {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ember-deep);
}

.play-all-yt {
  margin: 0.4rem auto 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
}
.play-all-yt a {
  color: var(--ember-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.play-all-yt a:hover {
  color: var(--ember);
  border-color: var(--ember);
}

.play-all-frame {
  max-width: 800px;
  margin: 0 auto 2rem;
  background: transparent;
  border: 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
  padding: 0.8rem 0;
  box-shadow: none;
}
.play-all-frame[hidden] {
  display: none;
}

.player-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #000;
  border-radius: 2px;
  overflow: hidden;
}
.player-stage iframe,
.player-stage > div {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0 0.6rem;
  border-bottom: 1px solid var(--rule-soft);
}
.player-bar button {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  width: 36px;
  height: 36px;
  font-size: 0.95rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.player-bar button:hover {
  border-color: var(--ember);
  color: var(--ember);
  background: transparent;
}
.player-bar #btn-playpause {
  width: 46px;
  font-size: 1.1rem;
}

.now-playing {
  flex: 1;
  min-width: 0;
  padding-left: 0.6rem;
}
.np-position {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
}
.np-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.np-artist {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  letter-spacing: 0;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-notice {
  margin: 0.5rem 0 0;
  padding: 0.4rem 0.8rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ember-deep);
  background: transparent;
  border-left: 2px solid var(--rule);
  border-radius: 0;
}
.player-notice[hidden] {
  display: none;
}

.queue-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0.8rem 0 0.3rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--ink);
  font-weight: 500;
}
.queue-header .queue-hint {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
  font-weight: 400;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(60vh, 560px);
  min-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--rule-soft);
  border-radius: 2px;
  background: transparent;
  font-size: 0.95rem;
  scrollbar-width: thin;
  scrollbar-color: var(--rule) var(--paper);
}
.queue-list::-webkit-scrollbar { width: 8px; }
.queue-list::-webkit-scrollbar-track { background: transparent; }
.queue-list::-webkit-scrollbar-thumb {
  background: var(--rule);
  border-radius: 4px;
}
.queue-list::-webkit-scrollbar-thumb:hover { background: var(--ink-mute); }
.queue-item {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.5rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.1s;
}
.queue-item:last-child { border-bottom: none; }
.queue-item:hover { background: rgba(184,169,136,0.18); }
.queue-item.is-current {
  background: transparent;
  color: var(--ember);
  font-style: italic;
}
.queue-item.is-current .queue-pos,
.queue-item.is-current .queue-artist {
  color: var(--ember);
}
.queue-pos {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--ink-mute);
  flex-shrink: 0;
  min-width: 22px;
  text-align: right;
}
.queue-title {
  font-family: var(--font-body);
  font-weight: 500;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.queue-artist {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.85rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  flex-shrink: 0;
  max-width: 35%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.2rem;
  margin: 1.5rem 0;
}

.playlist-card {
  display: block;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: border-color 0.15s, color 0.15s;
  padding-bottom: 0.6rem;
}
.playlist-card:hover {
  border-color: var(--ember);
  color: var(--ember);
  transform: none;
  box-shadow: none;
}

.playlist-card img,
.playlist-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 2px;
}

.playlist-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--paper-deep);
  color: var(--ink-mute);
  border: 1px solid var(--rule-soft);
}
.playlist-thumb-audio {
  background: var(--paper-deep);
  color: var(--pine);
}
.playlist-thumb-empty {
  background: var(--paper);
  color: var(--rule);
}
.audio-glyph {
  font-size: 2.4rem;
  line-height: 1;
  font-family: var(--font-body);
  font-style: italic;
}

.playlist-meta {
  padding: 0.5rem 0 0;
}

.playlist-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.02rem;
  line-height: 1.2;
}

.playlist-artist {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-mute);
  margin-top: 0.15rem;
}

.playlist-icons {
  margin-top: 0.3rem;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink-mute);
  font-style: italic;
}
.playlist-tag {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink-soft);
  background: transparent;
  padding: 0;
  border-radius: 0;
  margin-left: auto;
}

/* ============================================================
   Chord charts (top-of-song fretboard diagrams)
   ============================================================ */

.chord-charts-section {
  margin: 1.2rem 0 1rem;
  padding: 0.6rem 0 0.4rem;
  background: transparent;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
  border-radius: 0;
}
.chord-charts-section[hidden] { display: none; }

.chord-charts-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  text-transform: none;
  letter-spacing: 0.05em;
  color: var(--ink);
  font-weight: 500;
}
.chord-charts-hint {
  font-family: var(--font-body);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  color: var(--ink-mute);
  font-weight: 400;
}

.chord-charts-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 0.8rem;
  align-items: flex-start;
}

.chord-diagram {
  flex: 0 0 auto;
  background: transparent;
  border-radius: 2px;
  padding: 2px;
}
.chord-diagram svg.chord-diagram,
svg.chord-diagram {
  width: 70px;
  height: 95px;
  display: block;
}

.chord-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  fill: var(--ink);
}
.chord-fret-num {
  font-family: var(--font-mono);
  font-size: 7px;
  fill: var(--ink-mute);
}
.chord-nut {
  stroke: var(--ink);
}
.chord-fret {
  stroke: var(--rule);
  stroke-width: 0.5;
}
.chord-string {
  stroke: var(--ink-soft);
  stroke-width: 0.6;
}
.chord-marker {
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
  fill: var(--ink);
}
.chord-mute {
  fill: var(--ember-deep);
}
.chord-open {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}
.chord-dot {
  fill: var(--ink);
}
.chord-finger {
  font-family: var(--font-mono);
  font-size: 6px;
  font-weight: 700;
  fill: var(--paper);
}
.chord-barre {
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  opacity: 0.55;
}

.chord-fiddle {
  width: 130px;
  padding: 6px 8px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--rule);
  border-radius: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}
.chord-fiddle .chord-label {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.chord-fiddle .fiddle-scale {
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.78rem;
  letter-spacing: 0;
}
.chord-fiddle .fiddle-notes {
  font-family: var(--font-mono);
  color: var(--ink-mute);
  margin: 2px 0;
  font-size: 0.7rem;
}
.chord-fiddle .fiddle-drone {
  font-style: italic;
  color: var(--ink-mute);
}

.chord-unknown {
  width: 70px;
  height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  background: transparent;
  border: 1px dashed var(--rule);
  border-radius: 2px;
  font-size: 0.7rem;
  color: var(--ink-mute);
  text-align: center;
}
.chord-unknown .chord-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
}
.chord-na {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.7rem;
  text-transform: lowercase;
  color: var(--ink-mute);
}

/* ============================================================
   Auto-scroll controls in the song toolbar
   ============================================================ */

.autoscroll-group input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 70px;
  height: 2px;
  background: var(--rule);
  border-radius: 1px;
  outline: none;
}
.autoscroll-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
}
.autoscroll-group input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  cursor: pointer;
  border: none;
}
.autoscroll-group #autoscroll-toggle {
  width: 30px;
  height: 30px;
  font-size: 0.85rem;
}
.autoscroll-group #autoscroll-toggle.is-playing {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.autoscroll-value {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-mute);
  min-width: 22px;
  text-align: right;
}

.song-toolbar { flex-wrap: wrap; }
.autoscroll-group { gap: 0.4rem; }

@media print {
  /* Print: white paper, ink-only.  Strip rules and toolbars. */
  body { background: #fff; }
  .topbar, .sidebar, .colophon, .campfire-footer,
  .song-toolbar, .chord-charts-label, .autoscroll-group,
  .recordings, .play-all-controls, .play-all-frame,
  .setlist-actions, .setlist-seeds, .setlist-saved { display: none; }
  .layout { display: block; padding: 0; }
  .content { max-width: none; padding: 0; }
  .chord-charts-row { gap: 4px; }
}

/* ============================================================
   Working-name candidates (homepage section-card)
   ============================================================ */

.band-name-candidates {
  list-style: none;
  padding: 0;
  margin: 0.6rem 0 0;
  columns: 2;
  column-gap: 2rem;
}
.band-name-candidates li {
  font-family: var(--font-body);
  font-size: 1.05rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--rule-soft);
  break-inside: avoid;
}
.band-name-candidates .band-name-alt {
  font-style: italic;
  color: var(--ink-mute);
  font-size: 0.92rem;
  margin-left: 0.3rem;
}
@media (max-width: 540px) {
  .band-name-candidates { columns: 1; }
}

/* ============================================================
   Set-list builder (/setlists)
   ============================================================ */

.setlist-intro {
  max-width: 56ch;
  margin: 0.4rem 0 1.8rem;
  color: var(--ink-soft);
  font-size: 1rem;
  font-style: italic;
  line-height: 1.55;
}
.setlist-intro em {
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}

.setlist-seeds {
  margin: 1.6rem 0 1.2rem;
}
.setlist-seeds h3,
.setlist-saved h3,
.setlist-group h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.05em;
  text-transform: none;
  color: var(--ink);
  margin: 0 0 0.7rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--rule);
}

.setlist-seed-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.7rem;
}
.seed-btn {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  padding: 0.35rem 0.85rem;
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.seed-btn:hover { border-color: var(--ember); color: var(--ember); }
.seed-btn.seed-clear { color: var(--ink-mute); }
.seed-btn.seed-clear:hover { color: var(--ember); }

/* Saved sets — a quiet listing, not a card */
.setlist-saved { margin: 1.8rem 0 1.2rem; }
.setlist-saved-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.setlist-saved-item {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--rule-soft);
}
.setlist-saved-item .saved-name {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.setlist-saved-item .saved-count {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--ink-mute);
  flex-shrink: 0;
}
.setlist-saved-item .saved-actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}
.setlist-saved-item .saved-actions button {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  padding: 1px 4px;
  cursor: pointer;
  border-radius: 0;
  transition: color 0.15s, border-color 0.15s;
}
.setlist-saved-item .saved-actions button:hover {
  color: var(--ember);
  border-color: var(--ember);
}

/* Song groups + checkboxes — typeset listing, hairline separators */
.setlist-form { margin-top: 1.4rem; }
.setlist-group { margin: 1.8rem 0 1.4rem; }
.setlist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.setlist-item {
  border-bottom: 1px solid var(--rule-soft);
}
.setlist-item label {
  display: grid;
  grid-template-columns: 24px 1fr auto;
  align-items: baseline;
  gap: 0.6rem 0.9rem;
  padding: 0.5rem 0;
  cursor: pointer;
}
.setlist-cb {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--ember);
  cursor: pointer;
  align-self: center;
}
.setlist-title {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  line-height: 1.25;
}
.setlist-artist {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin-left: 0.4rem;
}
.setlist-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.88rem;
  color: var(--ink-mute);
  text-align: right;
  white-space: nowrap;
}
.setlist-key {
  font-style: italic;
  color: var(--ink-mute);
}

/* Sticky footer action bar — live count + Save / Print buttons */
.setlist-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin: 2rem -2.2rem 0;
  padding: 0.8rem 2.2rem;
  background: var(--paper);
  border-top: 1px solid var(--rule);
}
.setlist-count {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  margin-right: auto;
}
.setlist-count strong {
  font-family: var(--font-body);
  font-style: normal;
  font-weight: 500;
  color: var(--ink);
}
.setlist-actions button {
  background: transparent;
  border: 1px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.98rem;
  padding: 0.4rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.setlist-actions button:hover {
  background: var(--ink);
  color: var(--paper);
}
.setlist-actions button#setlist-print {
  background: var(--ink);
  color: var(--paper);
}
.setlist-actions button#setlist-print:hover {
  background: var(--ember);
  border-color: var(--ember);
  color: var(--paper);
}

@media (max-width: 640px) {
  .setlist-item label {
    grid-template-columns: 22px 1fr;
  }
  .setlist-meta {
    grid-column: 2 / 3;
    text-align: left;
    margin-top: 0.1rem;
  }
  .setlist-actions {
    margin: 1.4rem -1.2rem 0;
    padding: 0.7rem 1.2rem;
    flex-wrap: wrap;
  }
  .setlist-count { flex: 1 0 100%; margin: 0 0 0.4rem; }
}
