/* Byby FM: night-time radio, on the site's tokens from /style.css */
body.radio {
  background: var(--night);
  color: #f3eee6;
  background-image:
    radial-gradient(ellipse 80% 50% at 15% 0%, rgba(217, 96, 59, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 30%, rgba(93, 156, 194, 0.16), transparent 60%);
  background-attachment: fixed;
}
.radio .kicker { color: #f0a070; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.fm-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px clamp(16px, 4vw, 40px);
}
.fm-top .back { font-weight: 700; font-size: 0.95rem; text-decoration: none; opacity: 0.85; }
.fm-top .back:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }

.fm {
  width: min(1160px, 100% - 32px);
  margin: 10px auto 80px;
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  grid-template-areas: "deck sing" "list list";
  gap: 22px;
}
.deck, .sing, .list {
  background: rgba(31, 38, 80, 0.72);
  border: 1px solid #343c72;
  border-radius: 24px;
  padding: 26px;
}
.deck { grid-area: deck; align-self: start; }
.sing { grid-area: sing; display: flex; flex-direction: column; min-height: 0; }
.list { grid-area: list; }

/* station header */
.station { display: flex; align-items: center; gap: 14px; }
.fm-logo {
  flex: none; display: grid; place-items: center;
  width: 58px; height: 64px;
  background: var(--roof);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.fm-logo svg { width: 30px; height: 30px; fill: none; stroke: var(--cream); stroke-width: 2.4; stroke-linecap: round; }
.fm-logo circle { fill: var(--cream); stroke: none; }
.station h1 { font-size: 2.1rem; font-weight: 700; }
.slogan { margin: 2px 0 0; color: #c9c4d8; font-size: 0.95rem; }
.onair {
  margin-left: auto; align-self: flex-start; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid #4a537f;
  font: 800 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase;
  color: #c9c4d8;
}
.onair .dot { width: 8px; height: 8px; border-radius: 50%; background: #6a7096; }
.onair.live { color: #fff; border-color: var(--roof); background: rgba(217, 96, 59, 0.18); }
.onair.live .dot { background: #ff6b47; animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.3; } }

/* now playing */
.now { display: flex; gap: 18px; align-items: center; margin-top: 26px; }
.cover {
  flex: none; width: 120px; height: 120px; object-fit: cover;
  border-radius: 14px; background: #0d1128;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}
.meta { min-width: 0; }
.meta .kicker { margin-bottom: 8px; }
.meta h2 { font-size: 1.6rem; font-weight: 600; overflow-wrap: anywhere; }
.artist { margin: 6px 0 0; color: #c9c4d8; font-weight: 700; }

.bar { margin-top: 24px; height: 8px; border-radius: 999px; background: #0d1128; overflow: hidden; }
.bar.seekable { cursor: pointer; }
.fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--roof), #f0a070); border-radius: inherit; }
.times { display: flex; justify-content: space-between; margin-top: 8px; font: 700 0.82rem/1 var(--body); color: #9a96b4; font-variant-numeric: tabular-nums; }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 20px; }
.play {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px; border: 0; border-radius: 999px;
  background: var(--roof); color: #fff; cursor: pointer;
  font: 600 1.1rem/1 var(--display);
  box-shadow: 0 5px 0 var(--roof-deep);
  transition: transform 0.12s, box-shadow 0.12s;
}
.play:hover { transform: translateY(-1px); }
.play:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--roof-deep); }
.play svg { width: 20px; height: 20px; fill: currentColor; }
.play .i-pause, .play.playing .i-play { display: none; }
.play.playing .i-pause { display: block; }
.ghost {
  padding: 11px 16px; border-radius: 999px;
  border: 1px solid #4a537f; background: transparent; color: #f3eee6; cursor: pointer;
  font: 700 0.92rem/1 var(--body);
}
.ghost:hover { border-color: #f0a070; color: #fff; }
.ghost.small { padding: 7px 12px; font-size: 0.8rem; }
.ghost[aria-pressed="false"] { opacity: 0.6; }
.vol { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.vol svg { width: 20px; height: 20px; fill: #c9c4d8; stroke: #c9c4d8; stroke-width: 1.6; stroke-linecap: round; }
.vol input { width: 96px; accent-color: var(--roof); }

/* hosts */
.hosts {
  margin-top: 22px; padding: 16px 18px;
  border-radius: 16px; background: #10153a; border: 1px dashed #4a537f;
}
.hosts-label { margin: 0 0 10px; font: 800 0.72rem/1 var(--body); letter-spacing: 0.14em; text-transform: uppercase; color: #8fdc5a; }
.hosts p.line { margin: 6px 0 0; color: #e4dff0; font-size: 0.98rem; line-height: 1.45; }
.hosts b { font-family: var(--display); font-weight: 600; color: #f0a070; }

/* coming up */
.upnext { margin-top: 24px; }
.upnext .kicker { margin-bottom: 10px; }
.upnext ol { list-style: none; margin: 0; padding: 0; }
.upnext li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #2c3466; font-weight: 700; }
.upnext li span:last-child { color: #9a96b4; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* lyrics */
.sing-head { display: flex; align-items: center; justify-content: space-between; }
.sing-head .kicker { margin: 0; }
.lyrics {
  position: relative;
  margin-top: 16px;
  height: min(62vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding: 30% 4px;
  -webkit-mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(transparent, #000 18%, #000 82%, transparent);
}
.lyrics::-webkit-scrollbar { display: none; }
.placeholder { color: #9a96b4; font-size: 1.15rem; text-align: center; }
.section-tag {
  margin: 26px 0 8px;
  font: 800 0.72rem/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase;
  color: #6a7096;
}
.section-tag:first-child { margin-top: 0; }
.lyric {
  /* room on the right for the active line, which grows 4% from its left edge */
  margin: 0; padding: 5px 5% 5px 0;
  font: 600 clamp(1.3rem, 2.6vw, 2rem)/1.25 var(--display);
  color: rgba(243, 238, 230, 0.32);
  transition: color 0.3s, transform 0.3s;
  transform-origin: left center;
  cursor: default;
}
.lyric.adlib { font-size: clamp(1.05rem, 2vw, 1.4rem); font-style: italic; }
/* a line in the lyrics sheet that isn't sung (a duplicate): shown, never lit */
.lyric.unsung { font-size: clamp(1.05rem, 2vw, 1.4rem); color: rgba(243, 238, 230, 0.18); }
.lyric.done { color: rgba(243, 238, 230, 0.55); }
.lyric.on {
  transform: scale(1.04);
  color: transparent;
  background: linear-gradient(90deg, #ffd27a 0, #ffd27a var(--p, 0%), #fff var(--p, 0%), #fff 100%);
  -webkit-background-clip: text; background-clip: text;
  text-shadow: none;
}
/* word by word: the active line is white, sung words gold, the word being sung fills up */
.lyric.on.words { background: none; color: #fff; }
.lyric.on.words span.w-sung { color: #ffd27a; }
.lyric.on.words span.w-now {
  color: transparent;
  background: linear-gradient(90deg, #ffd27a 0, #ffd27a var(--p, 0%), #fff var(--p, 0%), #fff 100%);
  -webkit-background-clip: text; background-clip: text;
}
.lyrics.seekable .lyric { cursor: pointer; }
.lyrics.seekable .lyric:hover { color: rgba(243, 238, 230, 0.75); }

/* tracklist */
.list-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.list-head h2 { font-size: 1.8rem; font-weight: 600; }
.list-head p { margin: 0; color: #c9c4d8; }
.tracks {
  list-style: none; margin: 20px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px;
}
.tracks button {
  width: 100%; display: flex; align-items: center; gap: 12px;
  padding: 8px; border-radius: 14px;
  background: transparent; border: 1px solid transparent; color: inherit; cursor: pointer;
  text-align: left; font: inherit;
}
.tracks button:hover { background: #262e5e; border-color: #343c72; }
.tracks li.current button { background: rgba(217, 96, 59, 0.16); border-color: var(--roof); }
.tracks img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; flex: none; background: #0d1128; }
.tracks .t { display: block; font: 600 1.05rem/1.2 var(--display); }
.tracks .d { display: block; margin-top: 3px; color: #9a96b4; font-size: 0.85rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.radio .foot { border-top-color: #2c3466; color: #9a96b4; }

@media (max-width: 860px) {
  .fm { grid-template-columns: 1fr; grid-template-areas: "deck" "sing" "list"; }
  .lyrics { height: 52vh; }
  .vol { margin-left: 0; }
}
@media (max-width: 480px) {
  .deck, .sing, .list { padding: 20px; border-radius: 20px; }
  .cover { width: 92px; height: 92px; }
  .meta h2 { font-size: 1.35rem; }
  .vol { display: none; }
  .upnext { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .onair.live .dot { animation: none; }
  .lyric { transition: none; }
}
