:root {
  --ink: #132033;
  --muted: #657286;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --line: rgba(219, 228, 239, 0.82);
  --red: #f26f64;
  --red-deep: #c91522;
  --teal: #00aaa1;
  --teal-deep: #087f78;
  --gold: #f0b64b;
  --shadow: 0 24px 70px rgba(16, 31, 52, 0.22);
  --glass-blur: blur(14px);
}

body.dark {
  --ink: #f4f7fb;
  --muted: #b4c0d2;
  --surface: rgba(12, 21, 34, 0.82);
  --surface-strong: rgba(17, 28, 44, 0.96);
  --line: rgba(190, 205, 225, 0.18);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --glass-blur: blur(14px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(11, 20, 32, 0.22), rgba(246, 249, 253, 0.94) 54%, #ffffff 100%),
    url("background.jpg") center top / cover no-repeat,
    #f4f7fb;
  font: 15px/1.5 Arial, Helvetica, sans-serif;
  transition: background-color 260ms ease, color 260ms ease;
}

body.dark {
  background:
    linear-gradient(180deg, rgba(3, 9, 18, 0.48), rgba(10, 17, 28, 0.90) 50%, #07111e 100%),
    url("background.jpg") center top / cover no-repeat,
    #07111e;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 96px;
}

.hero {
  min-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.topbar,
.band,
.dock {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  border-radius: 8px;
}

.eyebrow,
.label,
.kicker {
  margin: 0;
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

body.dark .eyebrow,
body.dark .label,
body.dark .kicker {
  color: #60f1e8;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.top-actions,
.status-row,
.quick-actions,
.controls,
.volume-row,
.section-head,
.now-strip,
.dock {
  display: flex;
  align-items: center;
}

.top-actions {
  gap: 10px;
}

.live-dot {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(228, 247, 244, 0.92);
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.icon-button,
.mini-button,
.dock-volume-button,
.skip,
.play,
.pause,
.dock-play {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(330px, 0.92fr) minmax(320px, 1.08fr);
  gap: 24px;
  align-items: stretch;
}

.player-panel,
.onair-panel {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.player-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 610px;
  padding: 42px 28px 34px;
  border-radius: 28px 28px 8px 8px;
}

.art {
  width: min(250px, 70vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 38px;
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 255, 255, 0.95), transparent 44%),
    linear-gradient(135deg, var(--teal), #14c8be 55%, var(--red));
  box-shadow: 0 24px 58px rgba(8, 127, 120, 0.26);
}

.art-card {
  width: 54%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 42px rgba(14, 32, 50, 0.16);
}

.note {
  color: var(--red);
  font-size: 70px;
  transform: rotate(-18deg);
}

.track {
  width: 100%;
  margin-top: 28px;
  text-align: center;
}

.track h2 {
  min-height: 64px;
  margin: 7px auto 8px;
  font-size: clamp(22px, 2.9vw, 34px);
  line-height: 1.18;
}

.track p:last-child {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--muted);
  font-weight: 800;
}

.controls {
  gap: 12px;
  margin-top: 26px;
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--surface-strong);
  box-shadow: 0 16px 38px rgba(16, 31, 52, 0.14);
}

.skip {
  width: 42px;
  height: 42px;
  color: #bdc6d3;
  background: transparent;
  font-size: 34px;
  line-height: 1;
}

.play,
.pause,
.dock-play {
  width: 62px;
  height: 62px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(242, 111, 100, 0.34);
}

.play {
  background: var(--red);
}

.pause {
  background: var(--teal);
  box-shadow: 0 14px 32px rgba(0, 170, 161, 0.30);
}

.volume-row {
  width: min(360px, 100%);
  gap: 12px;
  margin-top: 18px;
}

.mini-button {
  width: 36px;
  height: 36px;
  background: transparent;
}

.vol-step,
.dock-volume-button {
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 18px;
  font-weight: 900;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
  touch-action: pan-y;
}

.onair-panel {
  display: flex;
  flex-direction: column;
  min-height: 610px;
  padding: 28px;
  border-radius: 8px 28px 8px 8px;
}

.status-row {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.status-row span:last-child {
  padding: 7px 12px;
  border-radius: 999px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--red-deep), var(--teal-deep));
}

.onair-panel h2 {
  margin-bottom: 16px;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.08;
}

.onair-panel p {
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.countdown {
  margin-top: auto;
  padding: 22px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 111, 100, 0.13), rgba(0, 170, 161, 0.15)),
    var(--surface-strong);
}

.countdown span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.countdown strong {
  display: block;
  margin-top: 7px;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
}

.quick-actions {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 900;
  text-decoration: none;
}

.install-action {
  display: none;
}

body.can-install .install-action {
  display: inline-flex;
}

.band {
  margin-top: 24px;
  border-radius: 8px;
  padding: 22px 24px;
}

.now-strip {
  justify-content: space-between;
  gap: 18px;
}

.now-strip strong {
  display: block;
  margin-top: 3px;
  font-size: 19px;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: right;
  text-transform: uppercase;
}

.section-head {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: 30px;
}

#todayLabel {
  color: var(--muted);
  font-weight: 900;
}

.schedule-section {
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}

.schedule-list {
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.72);
}

body.dark .schedule-item {
  background: rgba(255, 255, 255, 0.06);
}

.schedule-item.active {
  background:
    linear-gradient(135deg, rgba(242, 111, 100, 0.17), rgba(0, 170, 161, 0.18)),
    var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(0, 170, 161, 0.36);
}

.schedule-time {
  color: var(--teal-deep);
  font-weight: 900;
}

body.dark .schedule-time {
  color: #60f1e8;
}

.schedule-title {
  margin: 0;
  font-weight: 900;
}

.schedule-desc {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  width: min(760px, calc(100% - 28px));
  min-height: 72px;
  transform: translateX(-50%);
  gap: 14px;
  padding: 10px 14px;
  border-radius: 999px;
}

.dock-play {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  background: var(--red);
  font-size: 18px;
}

.dock strong,
.dock span {
  display: block;
}

.dock span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

#dockVolume {
  width: min(180px, 24vw);
}

.dock-volume-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.qr-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(6, 12, 22, 0.54);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.qr-modal.open {
  display: flex;
}

.qr-card {
  position: relative;
  width: min(360px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-card h2 {
  margin: 6px 0 18px;
}

.qr-card img {
  width: min(240px, 82vw);
  height: min(240px, 82vw);
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
}

.qr-card p {
  margin: 14px 0 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.qr-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font-size: 24px;
  line-height: 1;
}

@media (max-width: 820px) {
  :root,
  body.dark {
    --shadow: 0 10px 30px rgba(16, 31, 52, 0.14);
    --glass-blur: none;
  }

  body {
    background:
      linear-gradient(180deg, rgba(11, 20, 32, 0.12), rgba(246, 249, 253, 0.97) 42%, #ffffff 100%),
      url("background.jpg") center top / auto 360px no-repeat,
      #f6f8fb;
  }

  body.dark {
    background:
      linear-gradient(180deg, rgba(3, 9, 18, 0.40), rgba(10, 17, 28, 0.96) 42%, #07111e 100%),
      url("background.jpg") center top / auto 360px no-repeat,
      #07111e;
  }

  .topbar,
  .band,
  .dock,
  .player-panel,
  .onair-panel,
  .qr-modal {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .shell {
    width: min(100% - 20px, 560px);
    padding-top: 10px;
  }

  .hero {
    min-height: 0;
    justify-content: flex-start;
  }

  .topbar,
  .hero-grid {
    display: block;
  }

  .topbar {
    padding: 18px;
  }

  .top-actions {
    margin-top: 14px;
  }

  .player-panel,
  .onair-panel {
    min-height: 0;
    margin-top: 14px;
    border-radius: 8px;
  }

  .player-panel {
    padding: 28px 16px;
  }

  .onair-panel {
    padding: 20px;
  }

  .art {
    width: min(210px, 64vw);
    border-radius: 30px;
    box-shadow: 0 10px 26px rgba(8, 127, 120, 0.16);
  }

  .art-card,
  .controls,
  .play,
  .pause,
  .dock-play {
    box-shadow: none;
  }

  .controls {
    gap: 6px;
    padding: 10px;
  }

  .play,
  .pause {
    width: 56px;
    height: 56px;
  }

  .section-head,
  .now-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-item {
    grid-template-columns: 1fr;
  }

  .dock {
    gap: 9px;
    min-height: 68px;
    padding: 8px 10px;
  }

  .dock > div {
    min-width: 0;
    flex: 1 1 auto;
  }

  .dock strong,
  .dock span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #dockVolume {
    width: 82px;
    flex: 0 0 82px;
  }

  .dock-volume-button {
    width: 36px;
    height: 36px;
  }
}
