:root {
  color-scheme: dark;
  --primary: #bec6e0;
  --secondary: #3b82f6;
  --tertiary: #d0bcff;
  --neutral: #94a3b8;
  --deep: #0d1c2d;
  --raised: #131b2e;
  --line: rgba(190, 198, 224, 0.2);
  --shadow: 0 24px 80px rgba(3, 12, 24, 0.42);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 20rem; background: var(--deep); }
body { min-height: 100vh; margin: 0; color: #f8fbff; background: var(--deep); }
a { color: inherit; }
button, input { font: inherit; }
:focus-visible { outline: 3px solid var(--tertiary); outline-offset: 4px; }

.scene, .scene-shade { position: fixed; inset: 0; }
.scene { z-index: 0; }
.scene img { width: 100%; height: 100%; object-fit: cover; }
.scene-shade { z-index: 1; background: linear-gradient(90deg, rgba(7, 22, 38, 0.78) 0%, rgba(9, 29, 48, 0.50) 42%, rgba(9, 29, 48, 0.12) 78%, rgba(9, 29, 48, 0.04) 100%); }
.landing-shell, .listen-shell { position: relative; z-index: 2; width: min(100% - 3rem, 80rem); min-height: 100vh; margin-inline: auto; display: grid; }
.landing-shell { grid-template-rows: auto 1fr auto; }
.site-header { padding-block: 2rem; }
.wordmark { font-size: 1.05rem; font-weight: 800; letter-spacing: .14em; text-decoration: none; text-transform: uppercase; }
.landing-main { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(20rem, .7fr); align-items: center; gap: clamp(2rem, 6vw, 6rem); padding-block: 3rem; }
.landing-copy { width: min(100%, 42rem); }
.eyebrow { margin: 0 0 1.25rem; color: var(--primary); font-size: .78rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(3rem, 7vw, 6.75rem); line-height: .94; letter-spacing: -.055em; text-wrap: balance; }
.lede { max-width: 34rem; margin: 1.75rem 0 2.25rem; color: #e4eaf5; font-size: clamp(1.05rem, 2vw, 1.3rem); line-height: 1.65; }
.primary-action { display: inline-flex; align-items: center; gap: 2.5rem; min-height: 3.5rem; padding: .9rem 1.25rem; border: 1px solid rgba(255,255,255,.38); border-radius: .8rem; background: rgba(190,198,224,.95); color: var(--deep); font-weight: 800; text-decoration: none; box-shadow: var(--shadow); transition: transform .2s ease, background .2s ease; }
.primary-action:hover { transform: translateY(-2px); background: #fff; }
.site-footer { padding-block: 2rem; color: var(--primary); font-size: .85rem; letter-spacing: .08em; }

.listen-shade { background: linear-gradient(115deg, rgba(5,18,31,.62) 0%, rgba(8,27,45,.44) 48%, rgba(18,24,45,.18) 100%); }
.listen-shell { grid-template-rows: auto 1fr auto; }
.listen-header, .listen-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 2rem; }
.broadcast-status { margin: 0; padding: .55rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--primary); font-size: .7rem; font-weight: 800; letter-spacing: .16em; }
.playing .broadcast-status { border-color: rgba(59,130,246,.7); background: rgba(59,130,246,.18); color: #dbeafe; }
.reconnecting .broadcast-status { border-color: rgba(208,188,255,.65); color: var(--tertiary); }
.player-layout { align-self: center; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(18rem, .65fr); gap: 1.5rem; padding-block: 2rem; }
.player-card, .history-card, .schedule-card { border: 1px solid var(--line); border-radius: 1.5rem; background: rgba(13,28,45,.55); box-shadow: var(--shadow); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.player-card { display: grid; grid-template-columns: minmax(13rem, .75fr) minmax(16rem, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding: clamp(1.25rem, 3vw, 2.5rem); }
.cover { width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 1rem; object-fit: cover; background: rgba(19,27,46,.55); }
.track-copy { min-width: 0; }
.track-title { font-size: clamp(2rem, 4vw, 4rem); overflow-wrap: anywhere; }
.track-artist { margin: 1rem 0 0; color: var(--tertiary); font-size: clamp(1rem, 2vw, 1.25rem); overflow-wrap: anywhere; }
.controls { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.play-button { width: 4rem; height: 4rem; padding: 0; border: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--deep); background: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.play-button:hover { background: #fff; }
.play-button svg { grid-area: 1 / 1; width: 1.5rem; fill: currentColor; }
.pause-icon, .playing .play-icon, .reconnecting .play-icon { display: none; }
.playing .pause-icon, .reconnecting .pause-icon { display: block; }
.signal-bars { height: 2rem; display: flex; align-items: end; gap: .3rem; }
.signal-bars span { width: .28rem; height: 28%; border-radius: 999px; background: var(--neutral); }
.playing .signal-bars span { background: var(--secondary); animation: signal 1.1s ease-in-out infinite alternate; }
.signal-bars span:nth-child(2) { height: 52%; animation-delay: -.4s; }
.signal-bars span:nth-child(3) { height: 88%; animation-delay: -.7s; }
.signal-bars span:nth-child(4) { height: 64%; animation-delay: -.2s; }
.signal-bars span:nth-child(5) { height: 38%; animation-delay: -.6s; }
@keyframes signal { to { height: 95%; } }
.history-card { padding: 1.5rem; }
.section-heading { padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.section-heading .eyebrow { margin-bottom: .45rem; }
.section-heading h2 { margin: 0; font-size: 1.35rem; }
.history-list { margin: 0; padding: 0; list-style: none; }
.history-list li { display: grid; grid-template-columns: 4.5rem 1fr; gap: .75rem; padding: 1rem 0; border-bottom: 1px solid var(--line); color: var(--primary); line-height: 1.45; }
.history-list li:last-child { border-bottom: 0; }
.history-list time { color: var(--neutral); font-size: .8rem; font-variant-numeric: tabular-nums; }
.history-list .empty { display: block; color: var(--neutral); }
.schedule-card { min-width: 0; padding: 1.5rem; overflow: hidden; }
.schedule-card--landing { background: linear-gradient(145deg, rgba(13,28,45,.68), rgba(19,27,46,.42)); }
.schedule-card--player { grid-column: 1 / -1; }
.schedule-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .35rem 1rem; }
.schedule-heading .eyebrow { grid-column: 1 / -1; }
.schedule-status { margin: 0; color: var(--neutral); font-size: .78rem; line-height: 1.45; text-align: right; }
.schedule-list { position: relative; margin: 0; padding: .25rem 0 0; list-style: none; }
.schedule-list::before { content: ""; position: absolute; top: 1.65rem; bottom: 1.65rem; left: .34rem; width: 1px; background: linear-gradient(var(--secondary), rgba(190,198,224,.18)); }
.schedule-row { position: relative; display: grid; grid-template-columns: .75rem minmax(0, 1fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.schedule-row:last-child { border-bottom: 0; }
.schedule-marker { position: relative; z-index: 1; width: .7rem; height: .7rem; margin-top: .35rem; border: 2px solid var(--neutral); border-radius: 50%; background: var(--deep); }
.schedule-row[aria-current="time"] .schedule-marker { border-color: #dbeafe; background: var(--secondary); box-shadow: 0 0 0 .35rem rgba(59,130,246,.16), 0 0 1.5rem rgba(59,130,246,.8); }
.schedule-row--fallback .schedule-marker { border-style: dashed; }
.schedule-row-copy { min-width: 0; }
.schedule-name { margin: 0; color: #f8fbff; font-size: 1rem; font-weight: 800; line-height: 1.35; overflow-wrap: anywhere; }
.schedule-row[aria-current="time"] .schedule-name { color: #dbeafe; }
.schedule-time { margin: .3rem 0 0; color: var(--neutral); font-size: .78rem; line-height: 1.5; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.schedule-placeholder { padding: 1.25rem 0; color: var(--neutral); line-height: 1.5; }
.schedule-card.is-stale { border-color: rgba(208,188,255,.48); }
.schedule-card.is-stale .schedule-status, .schedule-card.is-unavailable .schedule-status { color: var(--tertiary); }
.listen-footer { color: var(--primary); font-size: .8rem; }
.listen-footer a { text-underline-offset: .3em; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.login-page { display: flex; align-items: center; justify-content: center; }
.login-shell { position: relative; z-index: 2; width: min(100% - 2rem, 22rem); padding: 2.5rem 2rem; border: 1px solid var(--line); border-radius: 1.5rem; background: rgba(13,28,45,.55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: var(--shadow); }
.login-title { margin: 0 0 .25rem; font-size: 1.25rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.login-sub { margin: 0 0 1.75rem; color: var(--neutral); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.login-form { display: flex; flex-direction: column; gap: .75rem; }
.login-form input { padding: .7rem 1rem; border: 1px solid var(--line); border-radius: .6rem; background: rgba(190,198,224,.06); color: inherit; }
.login-form input::placeholder { color: var(--neutral); }
.login-form button { margin-top: .25rem; padding: .8rem; border: 0; border-radius: .6rem; background: rgba(190,198,224,.95); color: var(--deep); font-weight: 800; cursor: pointer; letter-spacing: .05em; transition: background .2s ease; }
.login-form button:hover { background: #fff; }
.login-error { margin: 1rem 0 0; color: #fca5a5; font-size: .875rem; text-align: center; }

@media (max-width: 640px) {
  .landing-shell, .listen-shell { width: min(100% - 2rem, 80rem); }
  .scene-shade { background: linear-gradient(180deg, rgba(8,26,43,.62), rgba(8,26,43,.80) 62%, rgba(8,26,43,.90)); }
  .listen-shade { background: linear-gradient(135deg, rgba(5,18,31,.62) 0%, rgba(8,27,45,.44) 48%, rgba(18,24,45,.18) 100%); }
  .site-header { padding-block: 1.5rem; }
  .landing-main { grid-template-columns: 1fr; align-items: end; gap: 2.5rem; padding-block: 4rem 2rem; }
  h1 { font-size: clamp(2.7rem, 15vw, 4.2rem); }
  .primary-action { width: 100%; justify-content: space-between; }
  .listen-header, .listen-footer { align-items: flex-start; padding-block: 1.5rem; }
  .player-layout { grid-template-columns: 1fr; padding-block: 1rem 2rem; }
  .player-card { grid-template-columns: 1fr; }
  .cover { max-width: 24rem; margin-inline: auto; }
  .track-copy { text-align: center; }
  .track-title { font-size: clamp(2rem, 12vw, 3.2rem); }
  .controls { justify-content: center; }
  .schedule-card { padding: 1.25rem; }
  .schedule-heading { grid-template-columns: 1fr; align-items: start; }
  .schedule-status { text-align: left; }
  .listen-footer { flex-direction: column; }
}

@media (min-width: 641px) and (max-width: 960px) {
  .landing-main { grid-template-columns: 1fr; align-items: end; }
  .landing-copy { max-width: 48rem; }
  .schedule-card--landing { width: min(100%, 42rem); }
  .player-layout { grid-template-columns: 1fr; }
  .schedule-card--player { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
