:root {
  --station-primary: #14171f;
  --station-accent: #ff5b36;
  --page: #0d0f14;
  --card: #171a22;
  --card-2: #1d2029;
  --text: #f5f7fa;
  --muted: #aab0bd;
  --border: rgba(255,255,255,.1);
  --success: #45d483;
  --danger: #ff6978;
  --shadow: 0 22px 70px rgba(0,0,0,.28);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; }
.container { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(13,15,20,.88); backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.header-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand img, .brand-fallback { width: 48px; height: 48px; border-radius: 14px; object-fit: cover; }
.brand-fallback { display: grid; place-items: center; background: var(--station-accent); color: #fff; font-weight: 900; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.02rem; }
.brand small { color: var(--muted); margin-top: 2px; }
.main-nav { display: flex; gap: 24px; font-size: .92rem; color: #d8dce4; }
.main-nav a:hover { color: var(--station-accent); }
.hero { padding: 72px 0 66px; background: radial-gradient(circle at 15% 25%, color-mix(in srgb, var(--station-accent) 22%, transparent), transparent 32%), linear-gradient(135deg, var(--station-primary), #0c0f15 62%); border-bottom: 1px solid var(--border); }
.hero-grid { display: grid; grid-template-columns: minmax(260px, .85fr) minmax(0, 1.5fr); gap: 54px; align-items: center; }
.cover-wrap { position: relative; }
.cover-wrap::after { content: ''; position: absolute; inset: 12% -8% -8% 12%; background: var(--station-accent); filter: blur(55px); opacity: .25; z-index: 0; }
.current-cover { position: relative; z-index: 1; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); background: #242832; }
.onair-card { min-width: 0; }
.eyebrow { color: var(--station-accent); text-transform: uppercase; font-weight: 800; letter-spacing: .14em; font-size: .72rem; }
.eyebrow.onair { display: flex; align-items: center; gap: 8px; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff3b4e; box-shadow: 0 0 0 5px rgba(255,59,78,.12); }
.onair-card h1 { font-size: clamp(2rem, 5vw, 4.35rem); line-height: 1.02; margin: 16px 0 10px; letter-spacing: -.045em; overflow-wrap: anywhere; }
.now-artist { font-size: clamp(1.1rem, 2vw, 1.45rem); color: #d4d8e1; margin: 0 0 20px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 12px 24px; color: var(--muted); font-size: .9rem; }
#connection-state.error { color: var(--danger); }
.player-controls { margin-top: 30px; display: flex; gap: 22px; align-items: center; }
.play-button { width: 68px; height: 68px; border-radius: 50%; border: 0; background: var(--station-accent); color: white; font-size: 1.4rem; cursor: pointer; box-shadow: 0 10px 35px color-mix(in srgb, var(--station-accent) 32%, transparent); }
.play-button:hover { transform: translateY(-1px); }
.volume-group { display: grid; gap: 7px; min-width: min(250px, 55vw); color: var(--muted); font-size: .8rem; }
.volume-group input { accent-color: var(--station-accent); width: 100%; }
.next-track { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--border); border-radius: 16px; background: rgba(255,255,255,.035); display: grid; gap: 3px; }
.next-track span { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; }
.next-track strong { font-size: 1.03rem; overflow-wrap: anywhere; }
.content-section { padding: 72px 0; }
.content-section.alternate { background: #11141a; border-block: 1px solid var(--border); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; }
.section-heading h2 { margin: 8px 0 0; font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.03em; }
.recent-grid { display: grid; gap: 12px; }
.track-card { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; }
.track-number { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: var(--card-2); color: var(--station-accent); font-weight: 800; font-size: .8rem; }
.track-card strong, .track-card span { display: block; }
.track-card span { color: var(--muted); margin-top: 2px; }
.track-card small { color: #7f8695; text-align: right; }
.schedule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.schedule-day { background: var(--card); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.schedule-day h3 { margin: 0; padding: 18px 20px; border-bottom: 1px solid var(--border); font-size: 1rem; }
.schedule-show { display: grid; grid-template-columns: 105px 1fr; gap: 12px; padding: 15px 20px; border-bottom: 1px solid rgba(255,255,255,.065); }
.schedule-show:last-child { border-bottom: 0; }
.schedule-show span { color: var(--station-accent); font-variant-numeric: tabular-nums; font-size: .88rem; }
.schedule-show strong { font-size: .94rem; }
.schedule-show > div { min-width: 0; }
.schedule-show small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }
.schedule-show { box-shadow: inset 3px 0 0 var(--programme-color, transparent); }
.calendar-frame-wrap { overflow: hidden; border: 1px solid var(--border); border-radius: 18px; background: var(--card); }
.calendar-frame { display: block; width: 100%; min-height: 900px; border: 0; background: #07111f; }
.empty-card { padding: 24px; background: var(--card); border: 1px dashed rgba(255,255,255,.15); color: var(--muted); border-radius: 16px; }
.social-strip { padding: 30px 0; }
.social-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.social-links { display: flex; flex-wrap: wrap; gap: 10px; }
.social-links a { padding: 9px 13px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; font-size: .86rem; }
.social-links a:hover { border-color: var(--station-accent); }
.site-footer { border-top: 1px solid var(--border); color: #737b8a; padding: 28px 0 38px; font-size: .85rem; }
.site-footer span { margin: 0 7px; }

/* Installer */
.installer-body { background: #0e1117; }
.installer-shell { width: min(920px, calc(100% - 32px)); margin: 42px auto 80px; }
.installer-card { background: #161a22; border: 1px solid var(--border); border-radius: 24px; padding: clamp(24px, 5vw, 48px); box-shadow: var(--shadow); }
.installer-card h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.04em; margin: 8px 0 6px; }
.installer-card h2 { margin: 34px 0 15px; font-size: 1.1rem; }
.muted, .hint { color: var(--muted); }
.hint { font-size: .86rem; }
.requirements { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 24px 0; }
.requirement { display: flex; align-items: center; gap: 8px; padding: 10px 11px; border: 1px solid var(--border); border-radius: 10px; font-size: .8rem; }
.requirement span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.requirement.ok span { background: rgba(69,212,131,.14); color: var(--success); }
.requirement.bad span { background: rgba(255,105,120,.14); color: var(--danger); }
.alert { padding: 15px 17px; border-radius: 12px; margin: 18px 0; font-size: .9rem; }
.alert ul { margin: 8px 0 0; padding-left: 20px; }
.alert-error { background: rgba(255,105,120,.1); border: 1px solid rgba(255,105,120,.3); }
.alert-success { background: rgba(69,212,131,.1); border: 1px solid rgba(69,212,131,.3); }
.alert-info { background: rgba(91,154,255,.09); border: 1px solid rgba(91,154,255,.28); }
.alert-info strong { display: block; margin-bottom: 5px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.span-2 { grid-column: span 2; }
.setup-form label { display: grid; gap: 7px; font-weight: 650; font-size: .88rem; }
.setup-form label small { font-weight: 400; color: var(--muted); }
.setup-form input:not([type=color]), .setup-form textarea { width: 100%; background: #0f1218; color: #f5f7fa; border: 1px solid #313744; border-radius: 10px; padding: 11px 12px; outline: none; }
.setup-form input:focus, .setup-form textarea:focus { border-color: var(--station-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--station-accent) 14%, transparent); }
.setup-form input[type=color] { width: 100%; min-height: 44px; background: #0f1218; border: 1px solid #313744; border-radius: 10px; padding: 4px; }
.setup-form textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.setup-form .checkbox-row { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.setup-form .checkbox-row input[type=checkbox] { width: auto; min-width: 18px; height: 18px; margin: 0; accent-color: var(--station-accent); }
.setup-form .hint a { color: var(--station-accent); text-decoration: underline; text-underline-offset: 2px; }

code { background: rgba(255,255,255,.07); border-radius: 5px; padding: 2px 5px; }
.button { border: 0; border-radius: 10px; padding: 11px 15px; font-weight: 800; cursor: pointer; }
.button-primary { background: var(--station-accent); color: white; }
.button-secondary { margin-top: 14px; background: #282e39; color: #fff; border: 1px solid #3b4351; }
.install-actions { margin-top: 30px; display: flex; justify-content: flex-end; }

@media (max-width: 820px) {
  .main-nav { display: none; }
  .hero { padding-top: 42px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .cover-wrap { max-width: 430px; width: 100%; margin-inline: auto; }
  .schedule-grid { grid-template-columns: 1fr 1fr; }
  .calendar-frame { min-height: 820px; }
  .requirements { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .container { width: min(100% - 26px, 1120px); }
  .header-inner { min-height: 68px; }
  .brand img, .brand-fallback { width: 42px; height: 42px; border-radius: 12px; }
  .brand small { display: none; }
  .hero-grid { gap: 24px; }
  .onair-card h1 { font-size: 2.25rem; }
  .player-controls { align-items: center; }
  .play-button { width: 60px; height: 60px; flex: 0 0 auto; }
  .track-card { grid-template-columns: 54px 1fr; }
  .track-cover { width: 54px; height: 54px; border-radius: 10px; }
  .track-card small { grid-column: 2; text-align: left; }
  .schedule-grid { grid-template-columns: 1fr; }
  .schedule-show { grid-template-columns: 95px 1fr; }
  .calendar-frame { min-height: 720px; }
  .social-inner { align-items: flex-start; flex-direction: column; }
  .form-grid.two, .requirements { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .installer-shell { margin-top: 16px; }
}

/* v0.1.5: dedicated full-width programme schedule page */
.main-nav a[aria-current="page"] { color: var(--station-accent); }
.schedule-page-section { padding-top: 44px; }
.calendar-page-container { width: min(1760px, calc(100% - 28px)); margin-inline: auto; }
.schedule-page-heading { align-items: center; }
.schedule-page-heading h1 { margin: 8px 0 0; font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -.035em; }
.schedule-back-link { color: var(--muted); font-size: .9rem; }
.schedule-back-link:hover { color: var(--station-accent); }
.schedule-grid-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.calendar-frame-wrap-wide { overflow: hidden; border-radius: 14px; }
.calendar-frame-auto { width: 100%; min-height: 1150px; overflow: hidden; }
.calendar-note { margin: 12px 4px 0; color: var(--muted); font-size: .8rem; }
@media (max-width: 1180px) {
  .schedule-grid-wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .calendar-page-container { width: min(100% - 18px, 1760px); }
  .schedule-page-heading { align-items: flex-start; gap: 14px; flex-direction: column; }
  .schedule-grid-wide { grid-template-columns: 1fr; }
  .calendar-frame-auto { min-height: 1050px; }
}

/* v0.1.6: visual polish */
.site-header { box-shadow: 0 10px 35px rgba(0,0,0,.12); }
.header-inner { min-height: 82px; }
.brand img, .brand-fallback { width: 52px; height: 52px; border-radius: 15px; }
.brand strong { font-size: 1.08rem; letter-spacing: -.01em; }
.main-nav a { position: relative; padding: 10px 2px; font-weight: 650; }
.main-nav a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; border-radius: 999px; background: var(--station-accent); transform: scaleX(0); transform-origin: center; transition: transform .18s ease; }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }

.hero { padding: 58px 0 62px; }
.hero-grid { grid-template-columns: minmax(250px, 390px) minmax(0, 1fr); gap: clamp(34px, 5vw, 72px); }
.cover-wrap { isolation: isolate; }
.cover-wrap::before { content: ''; position: absolute; inset: -1px; z-index: 0; border-radius: 30px; background: linear-gradient(145deg, color-mix(in srgb, var(--station-accent) 70%, #fff), transparent 38%, rgba(255,255,255,.08)); opacity: .55; }
.current-cover { border: 1px solid rgba(255,255,255,.11); }
.onair-card { padding: clamp(4px, 1.2vw, 14px) 0; }
.eyebrow.onair { width: max-content; padding: 7px 11px; border-radius: 999px; background: rgba(255,59,78,.09); border: 1px solid rgba(255,59,78,.18); }
.meta-row { margin-top: 4px; }
.meta-row span { display: inline-flex; align-items: center; min-height: 31px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.035); }
.player-controls { margin-top: 28px; }
.play-button { transition: transform .18s ease, box-shadow .18s ease; }
.play-button:hover { transform: translateY(-2px) scale(1.02); }

.content-section { padding: 62px 0 70px; }
.section-heading { margin-bottom: 24px; }

.social-strip { border-top: 1px solid rgba(255,255,255,.05); background: rgba(255,255,255,.018); }
.social-links a { transition: transform .16s ease, border-color .16s ease; }
.social-links a:hover { transform: translateY(-1px); }

@media (max-width: 980px) {
}
@media (max-width: 820px) {
  .main-nav { display: flex; max-width: 55vw; overflow-x: auto; gap: 18px; scrollbar-width: none; white-space: nowrap; }
  .main-nav::-webkit-scrollbar { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .cover-wrap { max-width: 390px; }
}
@media (max-width: 560px) {
  .header-inner { min-height: 70px; gap: 12px; }
  .brand { flex: 0 1 auto; }
  .brand span:last-child { min-width: 0; }
  .brand strong { max-width: 38vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand img, .brand-fallback { width: 42px; height: 42px; }
  .main-nav { max-width: 45vw; gap: 14px; font-size: .84rem; }
  .main-nav a:first-child { display: none; }
  .hero { padding-top: 34px; }
  .cover-wrap { max-width: 330px; }
}


/* v0.1.7: information/legal page and cookie notice */
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a:hover { color: var(--station-accent); }
.info-page-section { padding-top: 46px; }
.info-container { max-width: 980px; }
.info-heading h1 { margin: 8px 0 0; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.04em; }
.info-jump-nav { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 28px; }
.info-jump-nav a { padding: 9px 13px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); color: #dce1e9; font-size: .86rem; }
.info-jump-nav a:hover { border-color: var(--station-accent); color: var(--station-accent); }
.info-card { scroll-margin-top: 100px; margin: 0 0 20px; padding: clamp(22px, 4vw, 34px); border: 1px solid var(--border); border-radius: 20px; background: var(--card); }
.info-card h2 { margin: 7px 0 18px; font-size: clamp(1.35rem, 2.5vw, 1.85rem); }
.info-card p { margin: 0 0 14px; }
.info-email { color: var(--station-accent); font-weight: 750; }
.prose-text { color: #d8dce4; line-height: 1.75; overflow-wrap: anywhere; }
.cookie-notice { position: fixed; z-index: 60; right: 18px; bottom: 18px; left: 18px; }
.cookie-notice[hidden] { display: none !important; }
.cookie-notice-inner { width: min(940px, 100%); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 17px 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 16px; background: rgba(19,22,29,.97); box-shadow: 0 18px 60px rgba(0,0,0,.42); backdrop-filter: blur(18px); }
.cookie-notice strong { display: block; margin-bottom: 3px; }
.cookie-notice p { max-height: 4.5em; overflow: hidden; margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.cookie-notice a { display: inline-block; margin-top: 5px; color: var(--station-accent); font-size: .82rem; }
.cookie-notice-button { flex: 0 0 auto; min-width: 64px; min-height: 42px; border: 0; border-radius: 10px; background: var(--station-accent); color: #fff; font-weight: 850; cursor: pointer; }
@media (max-width: 700px) {
  .footer-inner { align-items: flex-start; flex-direction: column; }
  .cookie-notice { right: 10px; bottom: 10px; left: 10px; }
  .cookie-notice-inner { align-items: stretch; flex-direction: column; gap: 12px; }
  .cookie-notice-button { width: 100%; }
}

/* v0.1.8: keep the Next block visible and preserve the compact Recently Played list. */
.next-track { visibility: visible; }


/* v0.1.9: optional operator-supplied homepage welcome area. */
.welcome-section {
  padding: clamp(46px, 6vw, 78px) 0;
  background: #0e1117;
  border-bottom: 1px solid var(--border);
}
.welcome-inner {
  max-width: 940px;
}
.welcome-inner h2 {
  margin: 0 0 16px;
  font-size: clamp(1.85rem, 3.5vw, 2.8rem);
  letter-spacing: -.035em;
}
.welcome-text {
  max-width: 860px;
  color: #d5dae3;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.welcome-text:only-child {
  margin-top: 0;
}
@media (max-width: 560px) {
  .welcome-section { padding: 38px 0 44px; }
}
