:root {
  color-scheme: light;
  --ink: #241a31;
  --muted: #6a5d76;
  --border: #e8e0ef;
  --purple: #6636c6;
  --lavender: #f1e9fb;
  --paper: #f9f6fc;
  --surface: #fff;
  --field-border: #dcd0e7;
  --action: var(--purple);
  --action-hover: #4f23aa;
  --action-ink: #fff;
  font: 1rem/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: var(--purple); text-underline-offset: .2em; }
button, input, textarea { font: inherit; }
button, .mark { border-radius: .65rem; }
button { border: 1px solid var(--border); padding: .5rem .85rem; background: var(--surface); color: var(--purple); cursor: pointer; }
button:not(:disabled):hover { background: var(--lavender); }
button:disabled { opacity: .5; cursor: default; }
button.primary { background: var(--action); color: var(--action-ink); border-color: var(--action); font-weight: 650; }
button.primary:not(:disabled):hover { background: var(--action-hover); }
:focus-visible { outline: 3px solid #a879f4; outline-offset: 3px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.6rem; padding: 1rem max(5vw, 1.2rem); background: var(--surface); border-bottom: 1px solid var(--border); }
.top nav { display: flex; flex-wrap: wrap; justify-content: end; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 760; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.mark { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; flex: none; color: white; background: #6636c6; font-weight: 850; font-style: italic; }
main, footer { width: min(1110px, calc(100% - 2.4rem)); margin: 2.3rem auto; }
.card, .song { padding: clamp(1.1rem, 3vw, 2rem); background: var(--surface); border: 1px solid var(--border); border-radius: 24px; min-width: 0; }
h1, h2, h3, p { margin: 0 0 .7rem; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.04; letter-spacing: -.045em; }
h2 { font-size: 1.4rem; line-height: 1.2; }
h3 { font-size: 1.02rem; }
.live-badge { display: inline-block; padding: .2rem .65rem; border-radius: 999px; background: var(--lavender); color: var(--muted); font-weight: 750; font-size: .83rem; }
.live-badge[data-live="true"] { background: #efe4ff; color: #5623ac; }
.live-badge[data-live="true"]::before { content: ""; display: inline-block; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; margin-right: .45rem; vertical-align: .08rem; }
.play-row { margin-top: 1rem; }
.song { position: relative; display: flex; flex-direction: column; justify-content: center; }
.song h2 { font-size: clamp(1.6rem, 3.7vw, 2.6rem); }
.song-border { position: absolute; inset: 0; pointer-events: none; }
.song-trace { width: calc(100% - 4px); height: calc(100% - 4px); fill: none; stroke-width: 2.5; stroke-dasharray: 100 100; stroke-dashoffset: 100; }
.label { color: var(--purple); font-size: .83rem; font-weight: 700; }
.layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 1.25rem; align-items: start; }
.stack { display: grid; gap: 1.25rem; min-width: 0; }
.section-head, .calendar-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .55rem; margin-bottom: .9rem; }
.section-head h2, .calendar-head h3 { margin: 0; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .22rem; }
.calendar-grid > * { text-align: center; }
.calendar-grid button { padding: .45rem .12rem; }
.calendar-grid button[aria-pressed="true"] { background: var(--action); color: var(--action-ink); }
.calendar-grid button.has-show:not([aria-pressed="true"]) { background: var(--lavender); font-weight: 700; }
.weekday, .feedback, footer, time { color: var(--muted); }
.feedback { margin-top: .65rem; }
.entries, #requests, #history-list { list-style: none; padding: 0; margin: .9rem 0 0; }
.entries li, #requests li, #history-list li { padding: .7rem 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
form { display: grid; gap: .75rem; margin: .8rem 0 0; }
label { display: grid; gap: .25rem; font-weight: 600; min-width: 0; }
input, textarea { width: 100%; min-width: 0; border: 1px solid var(--field-border); border-radius: .6rem; color: var(--ink); background: var(--surface); padding: .48rem .6rem; }
textarea { resize: vertical; }
.duo { display: flex; flex-wrap: wrap; gap: .5rem; }
.duo > label { flex: 1 1 12rem; }
.check { display: flex; align-items: center; gap: .5rem; }
.check input { width: auto; }
.login { min-height: 100vh; display: grid; place-items: center; }
.login main { width: min(430px, calc(100% - 2.4rem)); }
.login h1 { margin-top: 1rem; }
@media (max-width: 720px) { .layout { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.listener-page {
  color-scheme: dark;
  --paper: #211f23;
  --surface: #1f1f1f;
  --ink: #dfd6ea;
  --muted: #b9aec4;
  --border: #353337;
  --field-border: #49414d;
  --purple: #b295ef;
  --lavender: #322746;
  --action: #865cda;
  --action-hover: #9b76e9;
  --action-ink: #100919;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: stretch;
  gap: clamp(1rem, 3vw, 2.25rem);
  margin-bottom: 1.25rem;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #433548;
  border-radius: 28px;
  background: linear-gradient(115deg, #2e223f 0%, #2e2337 54%, #35202d 100%);
}

.broadcast-intro {
  min-width: 0;
  align-self: center;
  padding: .25rem clamp(.1rem, 1vw, .75rem);
}

.broadcast-intro h1 {
  margin-top: .45rem;
  margin-bottom: .65rem;
}

.broadcast-intro #show {
  color: var(--muted);
}

.broadcast-intro .live-badge {
  background: #241e28;
  color: var(--muted);
  border: 1px solid #433548;
}

.broadcast-intro .live-badge[data-live="true"] {
  background: var(--lavender);
  color: #d1baf9;
  border-color: #674b86;
}

.broadcast-intro #audio-status:empty,
.song #artist:empty {
  display: none;
}

.hero .song {
  background: #302e2f;
  border-color: #423945;
  box-shadow: 0 4px 16px rgb(16 9 22 / .18);
}

.hero .song h2 {
  margin-bottom: .2rem;
}

.hero .song #artist {
  color: var(--muted);
  margin: 0;
}

.station-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.station-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.station-footer a {
  display: inline-flex;
  flex-wrap: wrap;
  gap: .15rem .35rem;
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--surface);
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.station-footer a:hover {
  background: var(--lavender);
  text-decoration: underline;
}

.station-footer a span {
  color: var(--muted);
  font-weight: 500;
}

@media (max-width: 720px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 440px) {
  .listener-page main, .station-footer { width: calc(100% - 1.5rem); }
  .listener-page main { margin-top: 1rem; }
  .listener-page .top { align-items: flex-start; }
  .listener-page .top nav { gap: .25rem .7rem; }
}

.song-stack {
  display: grid;
  gap: .65rem;
  min-width: 0;
}

.song-neighbours {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: .75rem .9rem;
  border: 1px solid #423945;
  border-radius: 16px;
  background: var(--surface);
}

.song-neighbours > div + div {
  margin-inline-start: .8rem;
  padding-inline-start: .8rem;
  border-inline-start: 1px solid var(--border);
}

.song-neighbours h3 {
  color: var(--purple);
  font-size: .875rem;
  margin-bottom: .2rem;
}

.song-neighbours p { margin: 0; }
.song-neighbours .track-artist { color: var(--muted); font-size: .875rem; }
.song-neighbours .track-artist:empty { display: none; }
