/* Radio Forge listener page. Accent is replaced at runtime with a colour sampled from the cover art. */
:root {
  --bg: #f6f4ef; --surface: #ece9e1; --ink: #151514; --muted: #67645c; --line: #d8d4c9;
  --accent: #9c2b1e; --on-accent: #ffffff; --live: #c8321f;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Inter Tight", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121211; --surface: #1c1c1a; --ink: #edebe5; --muted: #9b978d; --line: #2d2c29;
    --accent: #e0806f; --on-accent: #121211; --live: #ef5a43; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1c1c1a; --ink: #edebe5; --muted: #9b978d; --line: #2d2c29;
  --accent: #e0806f; --on-accent: #121211; --live: #ef5a43; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans);
  font-size: 16px; line-height: 1.5; font-feature-settings: "tnum" 1; overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 40px; } }

/* masthead */
.masthead { border-bottom: 1px solid var(--line); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.wordmark { font-family: var(--serif); font-size: 26px; text-decoration: none; letter-spacing: -0.01em; }
.all-link { font-size: 14px; color: var(--muted); text-decoration: none; }
.all-link:hover, .all-link:focus-visible { color: var(--ink); text-decoration: underline; }

/* hero */
.hero { display: grid; gap: 28px; padding: 28px 0 40px; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) {
  .hero { grid-template-columns: minmax(0, 520px) minmax(0, 1fr); gap: 56px; padding: 56px 0 64px; align-items: end; }
}
.cover { position: relative; aspect-ratio: 1 / 1; width: 100%; background: var(--surface); overflow: hidden; }
.cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s ease; }
.cover-img.show { opacity: 1; }
.cover-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.cover-empty span { font-family: var(--serif); font-size: clamp(96px, 30vw, 220px); color: var(--muted); line-height: 1; }

.np { min-width: 0; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 13px;
  text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; }
.eyebrow .sep { color: var(--line); }
.onair { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.onair.off { color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--live); flex: none; }
.onair.off .dot { background: var(--muted); }

.np-text { transition: opacity .28s ease, transform .28s ease; }
.np-text.out { opacity: 0; transform: translateY(6px); }
.song-title { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 7.4vw, 84px); line-height: .98;
  letter-spacing: -0.015em; margin: 0 0 14px; overflow-wrap: anywhere; }
.song-artist { font-size: clamp(19px, 2.4vw, 24px); margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.progress { margin: 32px 0 0; max-width: 560px; }
.track { height: 2px; background: var(--line); position: relative; }
.fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--accent); transition: width 1s linear; }
.times { display: flex; justify-content: space-between; margin-top: 8px; font-size: 13px; color: var(--muted); }

.player { display: flex; align-items: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.play { width: 64px; height: 64px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; padding: 0;
  transition: transform .12s ease, background-color .6s ease; }
.play:hover { transform: scale(1.04); }
.play:active { transform: scale(.97); }
.play:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.play svg { width: 28px; height: 28px; fill: currentColor; }
.play .i-pause, .play .i-load { display: none; }
.play[data-state="playing"] .i-play, .play[data-state="loading"] .i-play { display: none; }
.play[data-state="playing"] .i-pause { display: block; }
.play[data-state="loading"] .i-load { display: block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.player-state { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 140px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); }
.live .dot { background: var(--muted); }
.live.on { color: var(--ink); }
.live.on .dot { background: var(--live); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.status { font-size: 14px; color: var(--muted); }

.volume { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); }
.volume svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.volume input { width: 120px; accent-color: var(--accent); }

/* about + recent */
.columns { display: grid; gap: 0; }
@media (min-width: 860px) { .columns { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 64px; } }
.columns > section { padding: 36px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 860px) { .columns > section { padding: 48px 0; } }
.section-label { font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 500; margin: 0 0 22px; }

.about { transition: opacity .3s ease; }
.about.loading { opacity: .35; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin: 0 0 28px; }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts div { border-top: 1px solid var(--line); padding-top: 10px; min-width: 0; }
.facts dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.facts dd { margin: 4px 0 0; font-size: 17px; font-weight: 500; overflow-wrap: anywhere; }
.wiki { max-width: 64ch; }
.wiki-kicker { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.wiki-text { font-family: var(--serif); font-size: clamp(20px, 2.4vw, 24px); line-height: 1.4; margin: 0 0 16px; }
.wiki-link { font-size: 14px; color: var(--accent); text-underline-offset: 3px; }

.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center;
  padding: 10px 0; border-top: 1px solid var(--line); }
.recent-list li:first-child { border-top: 0; padding-top: 0; }
.thumb { width: 48px; height: 48px; background: var(--surface); object-fit: cover; }
.r-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-artist { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-time { font-size: 13px; color: var(--muted); }

/* station */
.station-card { display: flex; gap: 20px; align-items: flex-start; padding: 40px 0; }
.logo { width: 72px; height: 72px; flex: none; background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.logo img { width: 100%; height: 100%; object-fit: contain; }
.logo span { font-family: var(--serif); font-size: 40px; color: var(--muted); }
.station-name { font-family: var(--serif); font-weight: 400; font-size: 32px; line-height: 1.1; margin: 0 0 6px; }
.station-desc { margin: 0 0 6px; max-width: 60ch; }
.station-meta { margin: 0; font-size: 14px; color: var(--muted); }

/* station list */
.list-title { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 8vw, 80px); line-height: 1; margin: 48px 0 32px; }
.station-list { list-style: none; margin: 0 0 48px; padding: 0; border-top: 1px solid var(--line); }
.station-list a { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px 0;
  border-bottom: 1px solid var(--line); text-decoration: none; }
.station-list a:hover .station-name, .station-list a:focus-visible .station-name { text-decoration: underline; text-underline-offset: 4px; }
.station-list .now { margin: 2px 0 0; font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.empty { color: var(--muted); }

.foot { padding-top: 24px; padding-bottom: 40px; font-size: 13px; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
