:root {
  color-scheme: dark;
  --bg: #20292e;
  --surface: #191f21;
  --border: #303b3e;
  --text: #f2f3ee;
  --muted: #a9b7b7;
  --accent-rgb: 168 222 209;
  --accent: rgb(var(--accent-rgb));
  font-family: "Instrument Sans", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  isolation: isolate;
  background: var(--bg);
  color: var(--text);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at center, rgb(var(--accent-rgb) / .24), transparent 68%);
  animation: ambient-glow 22s ease-in-out infinite alternate;
}
@keyframes ambient-glow {
  from { transform: translate(-16%, -35%) scale(1.08); }
  to { transform: translate(15%, -17%) scale(1.24); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; transform: translateY(-25%); }
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.shell { width: min(1160px, calc(100% - 72px)); margin: auto; }
.header {
  min-height: 82px; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid var(--border);
}
.brand { font-size: 19px; letter-spacing: .13em; font-weight: 600; }
.brand span { font-weight: 400; color: var(--accent); }
.schedule-link { font-size: .9rem; color: var(--muted); padding-block: 10px; }
.schedule-link span { margin-inline-start: .4em; color: var(--accent); }
.hero {
  display: grid; grid-template-columns: 1fr 1fr; margin-top: 40px;
  border: 1px solid var(--border); border-radius: 24px; overflow: hidden;
  background: var(--surface);
}
.cover {
  isolation: isolate; overflow: hidden; position: relative; display: grid;
  grid-template-columns: minmax(0, 1fr); place-content: center; justify-items: center; min-height: 390px;
  border-right: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 100%, var(--glow, #263f3b), #121919 78%);
}
.orbit {
  position: absolute; z-index: -1; width: 75%; aspect-ratio: 1;
  left: 12.5%; top: 50%; border-radius: 50%;
  border: 1px solid rgb(var(--accent-rgb) / .20);
  box-shadow: 0 0 0 30px rgb(var(--accent-rgb) / .10), 0 0 0 61px rgb(var(--accent-rgb) / .07), 0 0 0 94px rgb(var(--accent-rgb) / .05);
}
.cover img { width: min(86%, 450px); height: auto; }
.cover p { margin: 10px 0 0; color: var(--muted); font-size: .73rem; text-transform: uppercase; letter-spacing: .19em; }
.player { padding: clamp(26px, 4vw, 55px); min-width: 0; }
.onair, .label { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 650; }
.onair { display: flex; align-items: center; gap: 9px; }
.onair span { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 4px rgb(var(--accent-rgb) / .13); }
.program { font-size: clamp(2.3rem, 4.5vw, 4rem); letter-spacing: -.065em; font-weight: 520; line-height: 1; margin: 22px 0 12px; }
.info, .current-time { color: var(--muted); margin: 0 0 6px; line-height: 1.55; }
.current-time, .clock, .slot { font-variant-numeric: tabular-nums; }
.current-time { font-size: .85rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 23px; margin-top: 25px; }
#toggle {
  padding: 14px 21px; border: 0; border-radius: 999px; background: var(--accent);
  color: #142321; font-weight: 650; cursor: pointer; min-height: 48px;
}
#toggle:hover { filter: brightness(1.09); }
#toggle:disabled { opacity: .7; cursor: wait; }
.volume { display: inline-flex; gap: 8px; align-items: center; color: var(--muted); font-size: .78rem; }
.volume input { width: 75px; accent-color: var(--accent); cursor: pointer; }
.status { min-height: 1.2em; margin: 9px 0 15px; color: var(--muted); font-size: .8rem; }
.next {
  padding-top: 17px; border-top: 1px solid var(--border);
  display: flex; align-items: end; justify-content: space-between; gap: 10px;
}
.next strong { display: block; margin-top: 6px; font-weight: 550; }
.clock { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.schedule { margin-top: 46px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
h2 { margin: 0; font-size: 1.6rem; letter-spacing: -.035em; font-weight: 550; }
.section-head span { color: var(--muted); font-size: .8rem; }
#schedulebox { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--border); }
#schedulebox li {
  display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center; gap: 12px; min-height: 58px;
  padding: 10px 16px; border-bottom: 1px solid var(--border);
}
#schedulebox li[aria-current] { background: rgb(var(--accent-rgb) / .07); box-shadow: inset 2px 0 var(--accent); }
#schedulebox li[aria-current] .slot { color: var(--accent); }
.slot, .genre { color: var(--muted); font-size: .83rem; }
.show-name { font-weight: 580; }
footer { padding: 26px 0; color: var(--muted); font-size: .75rem; }
#technical:not([hidden]) { padding: 20px; border: 1px solid var(--border); margin: 0 0 28px; }
#diagnostic { white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .header { min-height: 65px; }
  .hero { grid-template-columns: 1fr; margin-top: 24px; }
  .cover { min-height: 210px; border-right: 0; border-bottom: 1px solid var(--border); }
  .cover img { width: min(80%, 370px); }
  .orbit { width: 58%; left: 21%; }
  .schedule { margin-top: 32px; }
  #schedulebox li { grid-template-columns: 100px minmax(0, 1fr); gap: 3px 9px; padding: 12px; }
  .genre { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

:root[data-program="world-morning"] {
  --accent-rgb: 235 199 136; --glow: #463820;
  --scene: url("world-morning.webp"); --scene-position: 52% 60%;
}
:root[data-program="daily-house"] {
  --accent-rgb: 132 228 209; --glow: #16463e;
  --scene: url("daily-house.webp"); --scene-position: 42% 56%;
}
:root[data-program="sunset-grooves"] {
  --accent-rgb: 255 168 143; --glow: #522b25;
  --scene: url("sunset-grooves.webp"); --scene-position: 50% 55%;
}
:root[data-program="club-hours"] {
  --accent-rgb: 200 173 250; --glow: #3b2857;
  --scene: url("club-hours.webp"); --scene-position: 50% 57%;
}
:root[data-program="night-session"] {
  --accent-rgb: 245 142 155; --glow: #4a202b;
  --scene: url("night-session.webp"); --scene-position: 50% 59%;
}
:root[data-program="night-session-light"] {
  --accent-rgb: 200 173 250; --glow: #3b2857;
  --scene: url("night-session.webp"); --scene-position: 50% 59%;
}
.night-light .show-name { color: #c8adfa; }
:root[data-program="afterhours"] {
  --accent-rgb: 155 199 250; --glow: #172e4e;
  --scene: url("afterhours.webp"); --scene-position: 54% 58%;
}

.cover p { text-align: center; padding-inline: 14px; }
/* La escena ocupa la portada completa; el logotipo queda por encima. */
.program-scene { display: none; }
:root[data-scene="true"] .cover {
  align-content: start;
  padding-block: clamp(38px, 5vw, 75px) 24px;
}
:root[data-scene="true"] .orbit { display: none; }
:root[data-scene="true"] .program-scene {
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
}
.program-scene::before,
.program-scene::after {
  content: "";
  position: absolute;
  inset: 0;
}
.program-scene::before {
  background: var(--scene) var(--scene-position) / cover no-repeat;
  animation: coastal-drive 18s ease-in-out infinite alternate;
}
.program-scene::after {
  background: linear-gradient(180deg, #091112e8 0%, #091112b0 28%, #09111216 67%, #09111235 100%);
}
[data-program="daily-house"] .program-scene {
  background: var(--scene) var(--scene-position) / cover no-repeat;
}
[data-program="daily-house"] .program-scene::before {
  /* Desplazamiento localizado en la zona de agua de la imagen. */
  mask-image: radial-gradient(ellipse 29% 9% at 13% 60%, #000 18%, transparent 100%);
  animation: sea-swell 5s ease-in-out infinite alternate;
}
:root[data-scene="true"] .cover p {
  color: #f0f5f4;
  text-shadow: 0 1px 6px #000;
}
@keyframes coastal-drive {
  from { transform: scale(1.01); }
  to { transform: scale(1.09) translate(-1%, 1%); }
}
@keyframes sea-swell {
  from { transform: translate(0, 0); }
  to { transform: translate(3px, -2px); }
}
@media (max-width: 760px) {
  :root[data-scene="true"] .cover {
    min-height: clamp(220px, 62vw, 340px);
    padding-block: 27px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .program-scene::before { animation: none !important; }
}

.volume[hidden] { display: none; }
#schedule-day { margin: 0 0 14px 8px; padding: 6px 10px; border-radius: 8px; color: var(--text); background: var(--surface); border: 1px solid var(--border); }

:root[data-program="special-guest-mingo"] { --accent-rgb: 245 199 116; --glow: #493520; }
#schedulebox .special-show .show-name { color: #f5c774; }
.special-badge {
  display: inline-block;
  margin-inline-start: .6em;
  padding: .17em .45em;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: .65em;
  text-transform: uppercase;
  vertical-align: middle;
  white-space: nowrap;
}
