/* Backing tracks: the list (index.html) and a song's page (song.html). Built on style.css's
   stage colours; the section strip and chord display are the player's own. */
:root {
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent-soft: rgba(46, 194, 126, 0.14);
  --accent-glow: rgba(46, 194, 126, 0.35);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

.tracks-page { padding-block: 48px 160px; padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px)); max-width: 880px; margin: 0 auto; }

.eyebrow { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-accent); }
.tracks-head { display: grid; gap: 14px; margin-bottom: 28px; }
.tracks-head h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; text-wrap: balance; }
.tracks-head p { color: var(--color-text-muted); max-width: 60ch; font-size: 1.05rem; }

.search { width: 100%; padding: 12px 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--color-bg-alt); color: var(--color-text); font: inherit; font-size: 1rem; }
.search:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 1px; }

/* === The list === */
.track-list { list-style: none; display: grid; margin-top: 18px; border-top: 1px solid var(--line); }
.track-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 14px 4px; border-bottom: 1px solid var(--line); }
.track-row.is-current { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); }
.track-row .title { font-weight: 650; font-size: 1.02rem; color: var(--color-text); display: block;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .title:hover { color: var(--color-accent-hover); }
.track-row .meta { color: var(--color-text-muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-row .where { font: 500 0.78rem/1.3 var(--mono); color: var(--color-accent); min-height: 1em; }
.track-row .open { font-size: 0.85rem; color: var(--color-text-muted); white-space: nowrap; }
.track-row .open:hover { color: var(--color-accent); }
.empty { color: var(--color-text-muted); padding: 24px 4px; }

.play { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--color-card-bg);
  color: var(--color-text); display: grid; place-items: center; cursor: pointer; flex: none; transition: background .15s, border-color .15s; }
.play:hover { border-color: var(--color-accent); }
.play:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.play svg { width: 16px; height: 16px; fill: currentColor; }
.play.is-on { background: var(--color-accent); border-color: var(--color-accent); color: #04140b; }
.play.is-busy svg { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* === Section strip: the song as its sections, to scale === */
.strip { position: relative; display: flex; gap: 2px; height: 34px; border-radius: 8px; overflow: hidden; cursor: pointer;
  background: var(--color-bg-alt); }
.strip .seg { position: relative; flex: 0 0 auto; background: rgba(255, 255, 255, 0.06); min-width: 0;
  display: flex; align-items: center; padding: 0 6px; overflow: hidden; }
.strip .seg span { font: 500 0.68rem/1 var(--mono); color: var(--color-text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; }
.strip .seg.chorus { background: rgba(46, 194, 126, 0.12); }
.strip .seg .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(46, 194, 126, 0.32); }
.strip .seg.is-now span { color: var(--color-text); }
.strip .rendered { position: absolute; inset: auto 0 0 0; height: 2px; background: rgba(255, 255, 255, 0.18);
  transform-origin: left; transform: scaleX(0); }

/* === The bar at the foot of the list === */
.now-bar { position: fixed; inset: auto 0 0 0; z-index: 50; background: rgba(10, 13, 11, 0.92); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line-strong);
  padding-block: 12px calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.now-bar .inner { max-width: 880px; margin: 0 auto; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.now-bar .info { display: flex; justify-content: space-between; gap: 12px; min-width: 0; font-size: 0.9rem; }
.now-bar .info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-bar .info .pos { font: 500 0.8rem/1.6 var(--mono); color: var(--color-text-muted); white-space: nowrap; }
.now-bar .strip { grid-column: 1 / -1; height: 26px; }

/* === A song's page === */
.back { font-size: 0.9rem; color: var(--color-text-muted); display: inline-block; margin-bottom: 22px; }
.song-head { display: grid; gap: 8px; margin-bottom: 26px; }
.song-head h1 { font-size: clamp(2.2rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; text-wrap: balance; }
.song-head .artist { font-size: 1.2rem; color: var(--color-text-muted); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.facts span { font: 500 0.78rem/1 var(--mono); padding: 7px 10px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--color-text-muted); }

.stage { border: 1px solid var(--line-strong); border-radius: 16px; padding: 22px; display: grid; gap: 20px;
  background: radial-gradient(120% 90% at 50% 0%, rgba(46, 194, 126, 0.10), transparent 60%), var(--color-card-bg); }
.stage .top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: center; }
.stage .play { width: 64px; height: 64px; }
.stage .play svg { width: 22px; height: 22px; }
.readout { display: grid; gap: 2px; min-width: 0; }
.readout .section { font: 600 0.82rem/1.2 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.readout .chord { font-size: clamp(2.4rem, 9vw, 3.6rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.readout .next { color: var(--color-text-muted); font-size: 0.9rem; }
.stage .strip { height: 40px; }
.stage .times { display: flex; justify-content: space-between; font: 500 0.8rem/1 var(--mono); color: var(--color-text-muted); }
.stage .status { color: var(--color-text-muted); font-size: 0.9rem; min-height: 1.4em; }

.chart { margin-top: 34px; display: grid; gap: 18px; }
.chart h2 { font-size: 1.2rem; }
#sections { display: grid; gap: 24px; }
.chart-section { display: grid; gap: 14px; }
.chart-section h3 { font: 600 0.78rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }
.chart-section.is-now h3 { color: var(--color-accent); }
.chords { display: flex; flex-wrap: wrap; gap: 6px; }
.chords button { font: 600 0.95rem/1 var(--font-stack); padding: 8px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--color-bg-alt); color: var(--color-text); cursor: pointer; }
.chords button:hover { border-color: var(--line-strong); }
.chords button.is-now { background: var(--color-accent); border-color: var(--color-accent); color: #04140b; }

.get-app { margin-top: 40px; border-radius: 16px; padding: 24px; display: grid; gap: 12px;
  border: 1px solid rgba(46, 194, 126, 0.35); background: var(--accent-soft); }
.get-app h2 { font-size: 1.3rem; text-wrap: balance; }
.get-app p { color: var(--color-text-muted); max-width: 62ch; }
.get-app .cta { justify-self: start; background: var(--color-accent); color: #04140b; font-weight: 700; padding: 12px 18px; border-radius: 10px; }
.get-app .cta:hover { background: var(--color-accent-hover); color: #04140b; }

@media (max-width: 560px) {
  .track-row { grid-template-columns: 44px minmax(0, 1fr); }
  .track-row .open { display: none; }
  .stage { padding: 16px; }
  .stage .top { gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { .play.is-busy svg { animation: none; } }

/* === The band's parts, each switchable === */
.parts-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.parts-row .label { font: 600 0.72rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); margin-right: 4px; }
.parts { display: flex; flex-wrap: wrap; gap: 6px; }
.part { font: 600 0.85rem/1 var(--font-stack); padding: 8px 12px 8px 26px; border-radius: 999px; cursor: pointer; position: relative;
  border: 1px solid var(--line-strong); background: transparent; color: var(--color-text-muted); transition: background .15s, color .15s; }
.part::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%;
  background: transparent; border: 1.5px solid currentColor; }
.part[aria-pressed="true"] { color: var(--color-text); border-color: rgba(46, 194, 126, 0.55); background: var(--accent-soft); }
.part[aria-pressed="true"]::before { background: var(--color-accent); border-color: var(--color-accent); box-shadow: 0 0 8px var(--accent-glow); }
.part:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.now-bar .parts { grid-column: 1 / -1; }
.now-bar .part { padding: 6px 10px 6px 22px; font-size: 0.78rem; }
.now-bar .part::before { left: 9px; width: 7px; height: 7px; margin-top: -3.5px; }

/* === About these tracks === */
.fine-print { margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.fine-print h2 { font: 600 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-muted); }
.fine-print p { font-size: 0.85rem; color: var(--color-text-muted); max-width: 68ch; }

/* A track worked out from the recording, not yet checked by ear (index.json "draft"). */
.draft { color: var(--color-text-muted); font-weight: 500; cursor: help; }
