:root {
  --bg: #0b1424;
  --bg2: #10203a;
  --card: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1);
  --text: #f4f1ea;
  --muted: #a9b4c7;
  --accent: #ff8a3d;
  --accent2: #ffc24b;
  --sea: #2bb5c4;
  --live: #ff4d5e;
  --radius: 20px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, sans-serif;
  color: var(--text);
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(255, 138, 61, 0.28), transparent 60%),
    radial-gradient(90% 50% at 100% 100%, rgba(43, 181, 196, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg2), var(--bg));
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 12px) 18px calc(env(safe-area-inset-bottom) + 28px);
}
.top { display: flex; justify-content: space-between; align-items: center; min-height: 40px; }
.live-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.12em;
  padding: 6px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  color: var(--muted);
}
.live-pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
body.playing .live-pill { color: #fff; border-color: rgba(255, 77, 94, 0.5); }
body.playing .live-pill .dot { background: var(--live); animation: pulse 1.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1);} 50% { opacity: .4; transform: scale(.8);} }
.install-btn {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--bg);
  background: var(--accent2); border: 0; border-radius: 999px; padding: 8px 14px;
}

.player { text-align: center; padding: 18px 0 8px; }
.art-wrap {
  width: min(68vw, 280px); aspect-ratio: 1; margin: 6px auto 20px; border-radius: 28px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.45), 0 0 0 1px var(--line);
  background: linear-gradient(135deg, var(--accent), #c2346b 55%, #3a2a7a);
  position: relative;
}
body.playing .art-wrap { box-shadow: 0 24px 70px rgba(255,138,61,.35), 0 0 0 1px rgba(255,138,61,.4); }
.art { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.art-fallback .freq { font-size: 74px; font-weight: 900; letter-spacing: -0.04em; line-height: 1; }
.art-fallback .brand { margin-top: 6px; font-size: 16px; font-weight: 800; letter-spacing: 0.22em; }
.name { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.meta { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.slogan { margin: 6px 0 0; color: var(--accent2); font-weight: 600; font-size: 15px; font-style: italic; }

.eq { display: flex; gap: 4px; justify-content: center; align-items: flex-end; height: 26px; margin: 16px 0 10px; opacity: .25; transition: opacity .3s; }
.eq i { width: 4px; height: 6px; border-radius: 2px; background: linear-gradient(var(--accent2), var(--accent)); }
body.playing .eq { opacity: 1; }
body.playing .eq i { animation: bar 1s ease-in-out infinite; }
.eq i:nth-child(2){animation-delay:.15s}.eq i:nth-child(3){animation-delay:.3s}.eq i:nth-child(4){animation-delay:.45s}
.eq i:nth-child(5){animation-delay:.2s}.eq i:nth-child(6){animation-delay:.35s}.eq i:nth-child(7){animation-delay:.05s}
@keyframes bar { 0%,100% { height: 6px; } 50% { height: 26px; } }

.play {
  width: 88px; height: 88px; border-radius: 50%; border: 0; cursor: pointer; position: relative;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  box-shadow: 0 12px 30px rgba(255,138,61,.45);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform .15s;
}
.play:active { transform: scale(.94); }
.play svg { width: 40px; height: 40px; fill: #1a0f05; }
.play .ic-pause, .play .spinner { display: none; }
body.playing .play .ic-play { display: none; }
body.playing .play .ic-pause { display: block; }
body.loading .play svg { display: none; }
body.loading .play .spinner {
  display: block; width: 36px; height: 36px; border-radius: 50%;
  border: 4px solid rgba(26,15,5,.25); border-top-color: #1a0f05; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.status { margin: 12px 0 0; min-height: 20px; color: var(--muted); font-size: 14px; }
.status a { color: var(--accent2); }
.vol { display: flex; align-items: center; gap: 10px; max-width: 260px; margin: 14px auto 0; color: var(--muted); }
.vol svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.vol input { width: 100%; accent-color: var(--accent); }

.card {
  margin-top: 16px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); backdrop-filter: blur(10px);
}
.card h2 { margin: 0 0 10px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.card p { margin: 0; line-height: 1.5; font-size: 15px; }
.programs, .links { list-style: none; margin: 0; padding: 0; }
.programs li { padding: 10px 0; border-top: 1px solid var(--line); }
.programs li:first-child { border-top: 0; padding-top: 0; }
.programs strong { display: block; font-size: 16px; }
.programs span { color: var(--muted); font-size: 14px; }
.programs a { color: inherit; text-decoration: none; }
.actions { display: grid; gap: 8px; }
.act {
  display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-weight: 600;
}
.act.accent { background: rgba(255,138,61,.14); border-color: rgba(255,138,61,.4); }
.socials { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.socials a {
  flex: 1; text-align: center; padding: 10px; border-radius: 12px; font-size: 14px; font-weight: 600;
  color: var(--text); text-decoration: none; border: 1px solid var(--line); background: rgba(255,255,255,.04);
}
.links li a {
  display: flex; justify-content: space-between; padding: 12px 0; color: var(--text); text-decoration: none;
  border-top: 1px solid var(--line); font-size: 15px;
}
.links li:first-child a { border-top: 0; padding-top: 2px; }
.links li a::after { content: "↗"; color: var(--muted); }
.about p { color: var(--muted); }
.share-ic { display: inline-block; padding: 0 4px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; margin-top: 22px; }
@media (min-width: 720px) { .app { padding-top: 40px; } }

/* ---------- Episodes / on-demand ---------- */
body.ondemand .live-pill { opacity: .35; }
body.ondemand .live-pill .dot { animation: none; }
.ep-bar { max-width: 320px; margin: 14px auto 0; }
.ep-bar input { width: 100%; accent-color: var(--accent); }
.ep-times { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ep-ctrls { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.chip {
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text);
  padding: 8px 12px; border-radius: 999px; font: 600 13px/1 inherit; font-family: inherit; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip.accent { background: rgba(255,77,94,.16); border-color: rgba(255,77,94,.45); }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--live); }
.chip[aria-selected="true"] { background: rgba(255,138,61,.2); border-color: rgba(255,138,61,.55); }
.filters { display: flex; gap: 6px; overflow-x: auto; margin: 0 -2px 10px; padding: 0 2px 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.episodes { list-style: none; margin: 0; padding: 0; }
.episodes li { border-top: 1px solid var(--line); }
.episodes li:first-child { border-top: 0; }
.ep {
  width: 100%; display: flex; gap: 12px; align-items: center; padding: 10px 0; text-align: left;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
}
.ep img, .ep .ep-ph {
  width: 48px; height: 48px; border-radius: 10px; flex: none; object-fit: cover; background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; color: var(--accent2);
}
.ep .ep-txt { flex: 1; min-width: 0; }
.ep strong { display: block; font-size: 15px; line-height: 1.3; }
.ep span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep .ep-go { flex: none; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255,138,61,.15); }
.ep .ep-go svg { width: 16px; height: 16px; fill: var(--accent2); }
.ep.current strong { color: var(--accent2); }
.more-btn { margin-top: 8px; width: 100%; padding: 11px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--text); font: 600 14px inherit; font-family: inherit; cursor: pointer; }
