/* ============================================
   RITHM - Song Library pages (/songs/, /songs/<slug>/)
   Stage tokens only; shared components (panels, nameplates,
   hardware buttons, LEDs) come from stage-components.css.
   ============================================ */

/* ── Trust strip (index header) ─────────────────────────── */

.songs-trust {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--stage-panel-hi);
}

.songs-trust-count {
  font-family: var(--stage-font-mono);
  font-size: 12px;
  color: var(--stage-ink-soft);
}

.songs-trust-count strong {
  color: var(--stage-amber);
  font-size: 15px;
}

.songs-pd-chip {
  font-family: var(--stage-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--stage-led-green);
  border: 1px solid var(--stage-led-green);
  border-radius: var(--radius-full);
  padding: 4px 10px;
}

.songs-trust-note {
  font-family: var(--stage-font-mono-alt);
  font-size: 12px;
  color: var(--stage-ink-soft);
}

.songs-trust-grow {
  margin-left: auto;
  font-family: var(--stage-font-mono);
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--stage-mute);
}

/* ── Shelves (index) + related rail ─────────────────────── */

.songs-shelf { margin-bottom: 26px; }

.songs-shelf-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.songs-shelf-name {
  font-family: var(--stage-font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--stage-amber);
  margin: 0;
  white-space: nowrap;
}

.songs-shelf-rule {
  flex: 1;
  height: 1px;
  background: var(--stage-panel-hi);
}

.songs-shelf-count {
  font-family: var(--stage-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--stage-mute);
  white-space: nowrap;
}

.songs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.songs-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--stage-panel-lo);
  border: 1px solid #000;
  border-radius: var(--stage-radius);
  box-shadow: var(--stage-shadow-down);
  text-decoration: none;
  min-width: 0;
}

.songs-tile:hover { border-color: var(--stage-rail); }
.songs-tile:focus-visible { outline: 2px solid var(--stage-amber); outline-offset: 1px; }

.songs-tile-glyph {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 176, 32, 0.12);
  border: 1px solid var(--stage-amber-dim);
  border-radius: var(--stage-radius);
  color: var(--stage-amber);
  font-size: 24px;
}

.songs-tile-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.songs-tile-title {
  font-family: var(--stage-font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--stage-ink);
  line-height: 1.35;
}

.songs-tile-meta {
  font-family: var(--stage-font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--stage-ink-soft);
}

.songs-empty { margin-bottom: 20px; }

/* ── Song page ──────────────────────────────────────────── */

.songs-crumb {
  display: flex;
  gap: 8px;
  align-items: center;
  font-family: var(--stage-font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--stage-mute);
  margin-bottom: 12px;
}

.songs-crumb a {
  color: var(--stage-ink-soft);
  text-decoration: none;
}

.songs-crumb a:hover { color: var(--stage-amber); }

.song-transport {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 20px;
}

.song-play-disc {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid #000;
  background: var(--stage-amber);
  color: #1a1714;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--stage-amber-dim), 0 6px 14px rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
}

.song-play-disc:hover { background: var(--stage-amber-bright); }
.song-play-disc:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--stage-amber-dim), 0 4px 10px rgba(0, 0, 0, 0.55); }
.song-play-disc:focus-visible { outline: 2px solid var(--stage-ink); outline-offset: 2px; }

.song-transport-main { flex: 1; min-width: 0; }

.song-transport-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.song-play-label {
  font-family: var(--stage-font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--stage-ink);
}

.song-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.song-pill {
  font-family: var(--stage-font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--stage-ink-soft);
  background: var(--stage-panel);
  border: 1px solid #000;
  border-radius: var(--radius-full);
  padding: 7px 13px;
  cursor: pointer;
}

.song-pill:hover { color: var(--stage-ink); }
.song-pill:focus-visible { outline: 2px solid var(--stage-amber); outline-offset: 1px; }

.song-pill[aria-pressed="true"] {
  background: var(--stage-amber);
  color: #1a1714;
  font-weight: 700;
}

.song-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.song-time {
  font-family: var(--stage-font-mono);
  font-size: 11px;
  color: var(--stage-ink-soft);
  white-space: nowrap;
}

.song-progress {
  flex: 1;
  height: 8px;
  background: var(--stage-panel-deep);
  border: 1px solid #000;
  border-radius: var(--radius-full);
  overflow: hidden;
}

.song-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--stage-amber);
}

.song-layout {
  display: grid;
  grid-template-columns: 1fr 302px;
  gap: 20px;
  align-items: start;
}

.song-main { min-width: 0; }

/* Sheet music paper card: warm paper, dark print. Small text
   uses #5d5540 (≈6.4:1 on the paper) to stay AA-legible. */
.song-sheet-card {
  background: #f2ead9;
  border: 1px solid #d8cdb2;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 18px 20px;
  color: #241f16;
}

.song-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--stage-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #5d5540;
  border-bottom: 1px solid #d8cdb2;
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.song-sheet-credit { font-weight: 600; }

.song-sheet-body svg {
  width: 100%;
  height: auto;
  display: block;
}

.song-sheet-missing { height: 100%; }

.song-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.song-facts-list { margin: 0; }

.song-fact {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--stage-panel-hi);
}

.song-fact:last-child { border-bottom: none; }

.song-fact dt {
  font-family: var(--stage-font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--stage-mute);
}

.song-fact dd {
  font-family: var(--stage-font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--stage-ink);
  margin: 0;
  text-align: right;
}

.song-pd-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
}

.song-pd-title {
  font-family: var(--stage-font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--stage-led-green);
}

.song-pd-note {
  font-family: var(--stage-font-mono-alt);
  font-size: 12px;
  line-height: 1.55;
  color: var(--stage-ink-soft);
  margin: 0 0 8px;
}

.song-pd-note:last-child { margin-bottom: 0; }

.song-related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.song-ctas {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.song-cta-note {
  font-family: var(--stage-font-mono-alt);
  font-size: 11px;
  line-height: 1.5;
  color: var(--stage-ink-soft);
  margin: 0 0 6px;
}

.song-cta-note:last-child { margin-bottom: 0; }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 1100px) {
  .songs-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .song-layout { grid-template-columns: 1fr; }
  .songs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .song-fact--extra { display: none; }
  .songs-trust-grow { margin-left: 0; }
  .songs-tile { padding: 10px; gap: 9px; }
  .songs-tile-glyph { width: 40px; height: 40px; font-size: 19px; }
}

@media (max-width: 480px) {
  .song-transport { flex-direction: column; align-items: stretch; }
  .song-play-disc { align-self: center; }
  .song-sheet-card { padding: 14px 12px; }
}
