:root {
  color-scheme: dark;
  --bg: #131515;
  --panel: #151718;
  --text: #f0f1ed;
  --muted: #a7aaa5;
  --line: #2e3130;
  --lime: #ccfa73;
  --purple: #bb9af8;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
body::before, body::after { position: fixed; inset: 0; content: ""; pointer-events: none; z-index: -1; }
body::before {
  background: linear-gradient(90deg, var(--bg) 8%, transparent 85%),
              linear-gradient(0deg, var(--bg) 20%, transparent 95%),
              url("forest.jpg") top right / auto 100% no-repeat;
  height: min(58vh, 570px);
  opacity: .8;
}
body::after {
  background-image: repeating-conic-gradient(#fff 0 .002%, transparent .002% .005%, #000 .005% .009%);
  background-size: 137px 109px;
  opacity: .035;
}
.station { width: min(100% - 112px, 1260px); margin-inline: auto; padding: 48px 0 28px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand svg { width: 43px; flex: none; fill: none; stroke: var(--lime); stroke-width: 1.4; stroke-linejoin: round; }
.brand p { margin: 0 0 3px; font-size: 1.4rem; font-weight: 850; letter-spacing: -.045em; }
.brand span { color: var(--muted); font-size: .875rem; }
.on-air { margin: 70px 0 46px; }
.on-air h1 { margin: 0 0 14px; display: flex; align-items: center; gap: 11px; color: var(--lime); font-size: 1.15rem; }
.on-air h1 span { border-radius: 50%; width: 9px; height: 9px; background: currentColor; box-shadow: 0 0 14px #cafa7370; }
.track { font-size: clamp(2.6rem, 7vw, 6.7rem); font-weight: 790; line-height: .98; letter-spacing: -.062em; margin: 0; overflow-wrap: anywhere; }
.artist { color: var(--muted); margin: 17px 0 0; min-height: 1.25em; font-size: clamp(1.05rem, 2vw, 1.5rem); }
.timeline { border: 1px solid var(--line); background: #141617d9; border-radius: 18px; overflow: hidden; }
.track-labels { display: grid; grid-template-columns: 24fr 52fr 24fr; border-bottom: 1px solid var(--line); }
.track-labels > div { min-width: 0; padding: 17px clamp(8px, 2vw, 22px); }
.track-labels > div + div { border-left: 1px solid var(--line); }
.track-labels span, .track-labels strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-labels span { color: var(--muted); font-size: .8rem; margin-bottom: 5px; }
.track-labels strong { font-size: 1rem; }
.track-labels > :first-child strong { color: #b1b5b2; }
.track-labels > :nth-child(2) strong { color: var(--lime); }
.track-labels > :last-child strong { color: var(--purple); }
.scope { position: relative; height: clamp(160px, 26vw, 260px); overflow: hidden; }
#wave { width: 100%; height: 100%; display: block; }
.cursor { position: absolute; width: 1px; top: 0; bottom: 28px; left: 24%; background: var(--lime); }
.cursor time {
  position: absolute; bottom: -19px; left: 50%; transform: translateX(-50%);
  color: var(--lime); padding: 2px 6px; border: 1px solid #536238; background: #1c2218;
  border-radius: 4px; white-space: nowrap; font: .75rem ui-monospace, monospace;
}
.transition {
  position: absolute; top: 10px; height: 22px; white-space: nowrap; transform: translateX(-50%);
  background: #24202c; color: #ded0fc; border: 1px solid #4d405d; border-radius: 5px;
  font-size: .72rem; line-height: 20px; padding: 0 6px;
}
.transition:empty { display: none; }
.controls { display: grid; grid-template-columns: auto minmax(0, 1fr) min(17%, 150px); align-items: center; gap: clamp(16px, 3.2vw, 41px); margin-top: 23px; }
#play { display: grid; place-items: center; width: 74px; aspect-ratio: 1; border: none; border-radius: 50%; background: var(--lime); color: #141a0c; cursor: pointer; }
#play:hover { background: #e0ffa7; }
#play svg { width: 31px; fill: currentColor; }
:focus-visible { outline: 2px solid #fff; outline-offset: 5px; }
.position { display: flex; align-items: center; gap: 14px; }
.position time { min-width: 4ch; font: .875rem ui-monospace, monospace; color: var(--muted); }
progress { flex: 1; min-width: 0; height: 6px; border: 0; border-radius: 9px; overflow: hidden; background: #343734; color: var(--lime); }
progress::-webkit-progress-bar { background: #343734; }
progress::-webkit-progress-value { background: var(--lime); border-radius: 9px; }
progress::-moz-progress-bar { background: var(--lime); }
.volume { display: flex; align-items: center; gap: 8px; }
.volume svg { width: 21px; flex: none; fill: none; stroke: var(--muted); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.volume input { width: 100%; min-width: 0; margin: 0; height: 44px; accent-color: var(--lime); cursor: pointer; }
#status { color: var(--muted); font-size: .875rem; min-height: 1.2em; }
#status[data-error="true"] { color: #fbb6ab; }
@media (max-width: 600px) {
  .station { width: calc(100% - 32px); padding-top: max(25px, env(safe-area-inset-top)); }
  body::before { height: 340px; background-position: top right; }
  .on-air { margin: 55px 0 31px; }
  .track { font-size: clamp(2.5rem, 13vw, 4.9rem); }
  .track-labels { grid-template-columns: 20fr 60fr 20fr; }
  .track-labels > div { padding: 11px 6px; }
  .track-labels span { font-size: clamp(.49rem, 2.2vw, .72rem); }
  .track-labels strong { font-size: .78rem; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .scope { height: 175px; }
  .controls { grid-template-columns: auto 1fr; gap: 8px 14px; margin-top: 19px; }
  #play { width: 62px; grid-row: span 2; }
  .position { gap: 8px; }
  .position time { font-size: .75rem; }
  .volume { justify-self: end; width: 115px; }
  .volume input { height: 44px; }
}

.favorites { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 12px 20px; margin-top: 20px; }
#like, .favorites summary {
  min-height: 44px; color: var(--text); font: inherit; font-size: .875rem;
  padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel);
}
#like { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
#like svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#like[aria-pressed="true"] { color: #ff9aaf; border-color: #835059; }
#like[aria-pressed="true"] svg { fill: currentColor; }
#like:disabled { opacity: .6; cursor: default; }
#like time { color: var(--muted); font: .8rem ui-monospace, monospace; }
.favorites details { min-width: 0; justify-self: end; width: min(100%, 400px); }
.favorites summary { cursor: pointer; width: fit-content; margin-left: auto; line-height: 24px; }
#like-count { color: var(--lime); margin-left: 4px; }
#like-total { font-size: .875rem; color: var(--muted); margin: 14px 0 6px; }
#like-list { margin: 0; padding: 0; list-style: none; }
#like-list li { display: grid; gap: 6px; padding: 9px 0; border-top: 1px solid var(--line); }
#like-list strong { font-size: .875rem; overflow-wrap: anywhere; }
#like-list button { width: 44px; min-height: 44px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--text); font-size: 1.15rem; cursor: pointer; }
.like-times { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.like-times .remove-like { font-size: .875rem; width: auto; padding: 5px 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 425px) {
  .favorites { display: block; }
  .favorites details { width: 100%; }
  .favorites summary { margin-top: 8px; margin-left: 0; }
}

.track-labels .live-label {
  display: inline-flex;
  align-items: center;
  gap: .38em;
  margin: 0 0 5px;
  padding: .18em .55em;
  color: #ff7b82;
  background: #401b22;
  border: 1px solid #6f343e;
  border-radius: 999px;
  font-weight: 720;
  line-height: 1;
  animation: on-air-pulse 2s ease-in-out infinite;
}
.live-label::before {
  content: "";
  flex: none;
  width: .44em;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ff5664;
  box-shadow: 0 0 8px #fa4f62b0;
}
@keyframes on-air-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 11px #ff44542e; }
  50% { opacity: .63; box-shadow: 0 0 0 #ff445400; }
}
@media (prefers-reduced-motion: reduce) {
  .track-labels .live-label { animation: none; }
}
