/* 04 — Stitched mockup (retro bar + FM tuner + Night Glow shell) */

*, *::before, *::after { box-sizing: border-box; }

:root {
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-brand: "Syne", sans-serif;
  --font-station-default: "Syne", sans-serif;
  --bg: #121212;
  --bg-elevated: #1a1a1a;
  --text: #ffffff;
  --muted: #888888;
  --hardware-off-white: #f0ead6;
  --hardware-ink: color-mix(in srgb, var(--hardware-off-white) 10%, #5a5548);
  --grille: var(--hardware-off-white);
  --grille-dot-pitch: 9px;
  --grille-band-height: calc(5.75rem + 2 * var(--grille-dot-pitch));
  --dial-sheet: var(--hardware-off-white);
  --station-color: #e8364f;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --input-bg: #16171a;
  --input-border: #3a3a3d;
  --radius: 20px;
  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-screen: 0.52s;
  --duration-panel: 0.5s;
  --duration-fade: 0.58s;
  --duration-quick: 0.28s;
  /* demo sidebar only */
  --sidebar-accent: #e8783a;
}

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  background: #0a0c0f;
  color: var(--text);
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

/* ── Demo panel ── */

.demo-wrap {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 2rem;
  min-height: 100vh;
  padding: 2rem;
  align-items: start;
}

.demo-panel { position: sticky; top: 2rem; }

.back-link {
  display: inline-block;
  margin-bottom: 1.25rem;
  color: #8b939e;
  text-decoration: none;
  font-size: 0.88rem;
}

.back-link:hover { color: var(--sidebar-accent); }

.demo-badge {
  margin: 0 0 0.75rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sidebar-accent);
}

.demo-panel h1 {
  margin: 0 0 0.5rem;
  font-family: "Syne", sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.demo-copy {
  margin: 0 0 1rem;
  color: #8b939e;
  line-height: 1.55;
  font-size: 0.88rem;
}

.demo-tips {
  margin: 0;
  padding-left: 1.1rem;
  color: #8b939e;
  font-size: 0.82rem;
  line-height: 1.75;
}

.demo-tips strong { color: #ccc; }

/* ── Galaxy Z Fold7 stage ── */

.fold-stage {
  flex: 1;
  min-width: 0;
  padding: 0.5rem 0 2rem;
}

.fold-stage__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.15rem;
}

.fold-stage__name {
  display: block;
  font-family: "Syne", sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.fold-stage__sub {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: #8b939e;
}

.fold-stage__modes {
  display: inline-flex;
  gap: 0.3rem;
  padding: 0.22rem;
  border-radius: 999px;
  background: #16181d;
  border: 1px solid #2a2e36;
}

.fold-mode-btn {
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #8b939e;
  transition: background 0.2s ease, color 0.2s ease;
}

.fold-mode-btn:hover {
  color: #d8dce4;
}

.fold-mode-btn.is-active {
  background: #2a3038;
  color: #fff;
}

.fold-mode-btn--backend {
  border: 1px solid #3b4048;
}

.fold-mode-btn--backend.is-on {
  background: color-mix(in srgb, #3bbf63 25%, #222831);
  color: #eafff0;
  border-color: color-mix(in srgb, #3bbf63 55%, #3b4048);
}

.fold-stage__devices {
  --fold-device-h: min(690px, calc(100vh - 9rem));
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: flex-end;
  gap: 1.75rem 2rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}

.fold-device--widget {
  flex-shrink: 0;
  align-self: flex-end;
}

/* ── Chirp FM home-screen widgets (2×2 · 4×2 · 4×4) ── */

.widget-sizes {
  --radio-off-color: var(--station-color, #7a7a82);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.35rem 0;
}

.chirp-widget {
  --widget-station: #e8364f;
  --widget-grille: #f0ead6;
  --widget-dial-sheet: #f0ead6;
  --widget-ink: color-mix(in srgb, var(--widget-grille) 10%, #5a5548);
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  color: #fff;
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.45s ease;
}

.chirp-widget.is-static {
  --widget-station: #7a7a82;
}

.chirp-widget__live {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.chirp-widget.is-powered-off .chirp-widget__live {
  display: none;
}

.chirp-widget__off {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem;
  text-align: center;
  background:
    radial-gradient(
      ellipse 85% 55% at 50% 48%,
      color-mix(in srgb, var(--widget-station, var(--radio-off-color, #7a7a82)) 30%, transparent),
      transparent 62%
    ),
    radial-gradient(
      circle at 50% 72%,
      color-mix(in srgb, var(--widget-station, var(--radio-off-color, #7a7a82)) 12%, transparent),
      transparent 58%
    ),
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--widget-station, var(--radio-off-color, #7a7a82)) 14%, #0a0a0c) 0%,
      #0a0a0c 100%
    );
}

.chirp-widget__off[hidden] {
  display: none !important;
}

.chirp-widget.is-powered-off .chirp-widget__off {
  display: flex;
}

.chirp-widget__off-logo {
  height: auto;
  max-width: 55%;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.chirp-widget__off-label {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.chirp-widget__off-station {
  margin: 0;
  font-family: var(--station-font, var(--font-station-default));
  font-size: var(--station-font-size-widget, 0.88rem);
  font-weight: var(--station-font-weight, 800);
  font-style: var(--station-font-style, normal);
  letter-spacing: var(--station-letter-spacing, normal);
}

.chirp-widget__off-hint {
  margin: 0;
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.55);
}

.chirp-widget__off-cta {
  margin-top: 0.35rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--widget-station, var(--radio-off-color, #7a7a82)) 88%, white),
    var(--widget-station, var(--radio-off-color, #7a7a82))
  );
  box-shadow: 0 2px 10px color-mix(in srgb, var(--widget-station, var(--radio-off-color, #7a7a82)) 35%, transparent);
}

.chirp-widget__power {
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  z-index: 6;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.chirp-widget__power svg {
  width: 14px;
  height: 14px;
}

.chirp-widget__power--masthead {
  top: 50%;
  right: 0.45rem;
  transform: translateY(-50%);
}

.chirp-widget--4x2,
.chirp-widget--4x4 {
  display: flex;
  flex-direction: column;
}

.chirp-widget--4x2 .chirp-widget__live,
.chirp-widget--4x4 .chirp-widget__live {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chirp-widget__grille {
  background-color: var(--widget-grille);
  background-image: radial-gradient(circle, var(--widget-station) 1.25px, transparent 1.25px);
  background-size: 7px 7px;
  background-position: 3px 3px;
}

.chirp-widget__face {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--widget-station) 90%, #000) 0%,
    var(--widget-station) 55%,
    color-mix(in srgb, var(--widget-station) 75%, #1a1a1a) 100%
  );
  transition: background 0.45s ease;
}

.chirp-widget__station {
  margin: 0;
  font-family: var(--station-font, var(--font-station-default));
  font-size: var(--station-font-size-widget, 0.72rem);
  font-weight: var(--station-font-weight, 800);
  font-style: var(--station-font-style, normal);
  letter-spacing: var(--station-letter-spacing, normal);
  line-height: 1.05;
  transition: font-family 0.35s ease, letter-spacing 0.35s ease;
}

.chirp-widget__program {
  margin: 0;
  font-family: var(--font-ui);
  opacity: 0.88;
  font-size: 0.62rem;
  line-height: 1.3;
}

.chirp-widget__track {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.chirp-widget__artist {
  margin: 0;
  font-family: var(--font-ui);
  opacity: 0.85;
  line-height: 1.35;
}

/* Decorative dial — blended into widget chrome, animates on tune only */
.chirp-widget__dial-strip {
  flex-shrink: 0;
  padding: 0 0.5rem;
  background: var(--widget-dial-sheet, #f0ead6);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  pointer-events: none;
}

.chirp-widget__dial-rail {
  position: relative;
  height: 16px;
  margin: 0.2rem 0.15rem 0.15rem;
  --dial-tick-color: var(--widget-station, var(--station-color, #e8364f));
  --dial-needle-color: var(--dial-tick-color);
}

.chirp-widget__dial-ticks {
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.chirp-widget__dial-ticks::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 1px;
  height: 0;
  border-top: 1px dotted color-mix(in srgb, var(--dial-tick-color) 55%, #8a8578);
  pointer-events: none;
}

.chirp-widget__dial-tick {
  position: absolute;
  bottom: 4px;
  width: 1px;
  transform: translateX(-50%);
  background: var(--dial-tick-color);
  border-radius: 1px;
  pointer-events: none;
  transition: background 0.45s ease;
}

.chirp-widget__dial-tick--minor {
  height: 3px;
  width: 1px;
  opacity: 0.9;
}

.chirp-widget__dial-tick--mid {
  height: 5px;
  width: 1px;
  opacity: 1;
}

.chirp-widget__dial-tick--station {
  width: 2px;
  height: 9px;
  opacity: 1;
}

.chirp-widget__dial-tick--station.is-active {
  height: 10px;
  opacity: 1;
  background: var(--dial-tick-color);
  box-shadow: none;
}

.chirp-widget__dial-needle,
.chirp-widget__dial-thumb {
  position: absolute;
  transform: translateX(-50%);
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.chirp-widget__dial-strip.is-sliding .chirp-widget__dial-needle,
.chirp-widget__dial-strip.is-sliding .chirp-widget__dial-thumb {
  transition-duration: 0.7s;
}

.chirp-widget__dial-needle {
  bottom: 5px;
  width: 2px;
  height: 9px;
  border-radius: 1px;
  background: var(--dial-needle-color, var(--dial-tick-color));
  box-shadow: none;
  transition: left 0.55s cubic-bezier(0.22, 1, 0.36, 1), background 0.45s ease;
}

.chirp-widget__dial-thumb {
  bottom: 0;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #111;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Widget control deck */
.chirp-widget__deck {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.28);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chirp-widget__deck-controls {
  padding: 0.35rem 0.55rem 0.45rem;
}

.chirp-widget__ctrl-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.chirp-widget__ctrl-row--primary {
  gap: 0.7rem;
  margin-bottom: 0.3rem;
}

.chirp-widget__ctrl-row--secondary {
  gap: 0.65rem;
  padding-top: 0.28rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.chirp-widget__ctrl {
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease, transform 0.12s ease;
}

.chirp-widget__ctrl:active:not(:disabled) {
  transform: scale(0.94);
}

.chirp-widget__ctrl:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.chirp-widget__ctrl--vote {
  width: 30px;
  height: 30px;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
}

.chirp-widget__ctrl--vote svg {
  width: 16px;
  height: 16px;
  opacity: 0.65;
}

.chirp-widget__ctrl--vote.is-active {
  color: #fff;
  background: color-mix(in srgb, var(--widget-station) 28%, rgba(255, 255, 255, 0.12));
}

.chirp-widget__ctrl--vote.is-active svg {
  opacity: 1;
}

.chirp-widget__ctrl--play {
  width: 38px;
  height: 38px;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--widget-station) 88%, white),
    color-mix(in srgb, var(--widget-station) 65%, #fff)
  );
  box-shadow: 0 2px 12px color-mix(in srgb, var(--widget-station) 32%, transparent);
}

.chirp-widget__ctrl--play svg {
  width: 18px;
  height: 18px;
}

.chirp-widget__ctrl--play .icon-play {
  display: block;
}

.chirp-widget__ctrl--play .icon-pause {
  display: none;
}

.chirp-widget.is-playing .chirp-widget__ctrl--play .icon-play {
  display: none;
}

.chirp-widget.is-playing .chirp-widget__ctrl--play .icon-pause {
  display: block;
}

.chirp-widget.is-paused .chirp-widget__ctrl--play .icon-play {
  display: block;
}

.chirp-widget.is-paused .chirp-widget__ctrl--play .icon-pause {
  display: none;
}

.chirp-widget__ctrl--sm {
  width: 28px;
  height: 28px;
  font-size: 0.82rem;
}

.chirp-widget__ctrl--sm svg {
  width: 14px;
  height: 14px;
}

.chirp-widget__ctrl--sm.is-fav {
  color: #ffb4c8;
}

.chirp-widget__ctrl--sm.is-tuning {
  animation: widget-tune-pulse 0.75s ease-in-out infinite alternate;
}

@keyframes widget-tune-pulse {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

/* 2×2 — compact now-playing */
.chirp-widget--2x2 {
  width: 148px;
  height: 148px;
  display: flex;
  flex-direction: column;
  background: #0a0a0c;
}

.chirp-widget--2x2.is-powered-off {
  background: color-mix(in srgb, var(--widget-station, var(--radio-off-color, #7a7a82)) 18%, #0a0a0c);
}

.chirp-widget--2x2 .chirp-widget__live {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.chirp-widget--2x2 .chirp-widget__grille {
  flex-shrink: 0;
  height: 18px;
}

.chirp-widget--2x2 .chirp-widget__body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  padding: 0.28rem 0.45rem 0.22rem;
  text-align: center;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--widget-station) 88%, #000) 0%,
    var(--widget-station) 100%
  );
}

.chirp-widget--2x2 .chirp-widget__logo {
  height: 0.72rem;
  width: auto;
  flex-shrink: 0;
  margin-bottom: 0.08rem;
  filter: brightness(0) invert(1);
  opacity: 0.92;
}

.chirp-widget--2x2 .chirp-widget__track {
  font-size: 0.78rem;
  line-height: 1.12;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.chirp-widget--2x2 .chirp-widget__artist {
  font-size: 0.54rem;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.chirp-widget--2x2 .chirp-widget__dial-strip {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.12rem 0.28rem 0.14rem;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--widget-station) 55%, #000) 0%,
    color-mix(in srgb, var(--widget-grille) 40%, var(--widget-station) 18%) 100%
  );
}

.chirp-widget--2x2 .chirp-widget__dial-rail {
  height: 10px;
  margin: 0.06rem 0.06rem 0;
}

.chirp-widget--2x2 .chirp-widget__off {
  gap: 0.22rem;
  padding: 0.45rem 0.4rem 0.5rem;
  justify-content: center;
}

.chirp-widget--2x2 .chirp-widget__off-logo {
  height: 1.15rem;
  width: auto;
  max-width: 62%;
  object-fit: contain;
}

.chirp-widget--2x2 .chirp-widget__off-label {
  font-size: 0.5rem;
  letter-spacing: 0.1em;
}

.chirp-widget--2x2 .chirp-widget__off-station {
  font-size: 0.76rem;
  line-height: 1.1;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chirp-widget--2x2 .chirp-widget__off-cta {
  margin-top: 0.12rem;
  padding: 0.36rem 0.72rem;
  font-size: 0.64rem;
}

/* 4×2 — station face + hero track + up next */
.chirp-widget--4x2 {
  width: 304px;
  height: 196px;
  display: flex;
  flex-direction: column;
  background: #121212;
}

.chirp-widget--4x2 .chirp-widget__row {
  flex: 1;
  display: grid;
  grid-template-columns: 0.9fr 1.15fr 0.85fr;
  gap: 0.45rem;
  min-height: 0;
  padding: 0.45rem 0.5rem 0.25rem;
}

.chirp-widget--4x2 .chirp-widget__station-face {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  min-width: 0;
}

.chirp-widget--4x2 .chirp-widget__grille--short {
  height: 16px;
  flex-shrink: 0;
}

.chirp-widget--4x2 .chirp-widget__face {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.35rem 0.4rem;
  min-height: 0;
}

.chirp-widget--4x2 .chirp-widget__station {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chirp-widget--4x2 .chirp-widget__program {
  margin-top: 0.12rem;
  font-size: 0.52rem;
}

.chirp-widget--4x2 .chirp-widget__now {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0 0.15rem;
}

.chirp-widget--4x2 .chirp-widget__track {
  font-size: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chirp-widget--4x2 .chirp-widget__artist {
  margin-top: 0.15rem;
  font-size: 0.62rem;
}

.chirp-widget--4x2 .chirp-widget__upnext {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding-left: 0.35rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.chirp-widget--4x2 .chirp-widget__upnext-label {
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--widget-station) 75%, #fff);
  margin-bottom: 0.2rem;
}

.chirp-widget--4x2 .chirp-widget__upnext-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.chirp-widget--4x2 .chirp-widget__upnext-list li {
  font-size: 0.54rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chirp-widget--4x2 .chirp-widget__upnext-list li + li {
  margin-top: 0.12rem;
}

.chirp-widget--4x2 .chirp-widget__deck {
  margin-top: auto;
}

.chirp-widget--4x2 .chirp-widget__dial-rail {
  height: 18px;
}

.chirp-widget--4x2 .chirp-widget__deck-controls {
  padding: 0.32rem 0.5rem 0.4rem;
}

/* 4×4 — full station face + queue */
.chirp-widget--4x4 {
  width: 304px;
  height: 340px;
  display: flex;
  flex-direction: column;
  background: #121212;
}

.chirp-widget--4x4 .chirp-widget__masthead {
  position: relative;
  flex-shrink: 0;
  min-height: 32px;
  padding-right: 2.25rem;
}

.chirp-widget--4x4 .chirp-widget__grille--masthead {
  height: 32px;
}

.chirp-widget--4x4 .chirp-widget__logo--masthead {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 0.95rem;
  width: auto;
  z-index: 1;
  filter: brightness(0) invert(1) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.25));
}

.chirp-widget--4x4 .chirp-widget__face--hero {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem 0.45rem;
  text-align: center;
}

.chirp-widget--4x4 .chirp-widget__station {
  margin-bottom: 0.15rem;
}

.chirp-widget--4x4 .chirp-widget__program {
  font-size: 0.68rem;
  margin-bottom: 0.55rem;
}

.chirp-widget--4x4 .chirp-widget__track {
  font-size: 1.22rem;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chirp-widget--4x4 .chirp-widget__artist {
  font-size: 0.78rem;
}

.chirp-widget--4x4 .chirp-widget__deck {
  flex-shrink: 0;
}

.chirp-widget--4x4 .chirp-widget__dial-rail {
  height: 20px;
}

.chirp-widget--4x4 .chirp-widget__deck-controls {
  padding: 0.4rem 0.65rem 0.5rem;
}

.chirp-widget--4x4 .chirp-widget__ctrl-row--primary {
  gap: 0.85rem;
}

.chirp-widget--4x4 .chirp-widget__ctrl--play {
  width: 42px;
  height: 42px;
}

.chirp-widget--4x4 .chirp-widget__ctrl--play svg {
  width: 20px;
  height: 20px;
}

.chirp-widget--4x4 .chirp-widget__queue {
  flex: 1;
  min-height: 0;
  margin: 0 0.5rem 0.5rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0 0 14px 14px;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top: none;
  overflow: hidden;
}

.chirp-widget--4x4 .chirp-widget__queue-label {
  display: block;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.35rem;
}

.chirp-widget--4x4 .chirp-widget__queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.chirp-widget--4x4 .chirp-widget__queue-list::-webkit-scrollbar {
  display: none;
}

.chirp-widget--4x4 .chirp-widget__queue-list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  line-height: 1.35;
}

.chirp-widget--4x4 .chirp-widget__queue-list li:last-child {
  border-bottom: none;
}

.chirp-widget--4x4 .chirp-widget__queue-list strong {
  display: block;
  font-weight: 600;
  color: #fff;
}

.chirp-widget--4x4 .chirp-widget__queue-list span {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.55);
}

.chirp-widget.is-static .chirp-widget__track,
.chirp-widget.is-static .chirp-widget__artist {
  color: #8a8a92;
}

/* Widget appearance — follows app or own setting */
.widget-sizes[data-appearance="light"] .chirp-widget--4x2,
.widget-sizes[data-appearance="light"] .chirp-widget--4x4 {
  background: #f2f3f6;
  color: #121318;
}

.widget-sizes[data-appearance="light"] .chirp-widget__deck {
  background: rgba(0, 0, 0, 0.06);
  border-top-color: rgba(0, 0, 0, 0.08);
}

.widget-sizes[data-appearance="light"] .chirp-widget__ctrl {
  color: #2a2d35;
  background: rgba(0, 0, 0, 0.06);
}

.widget-sizes[data-appearance="light"] .chirp-widget__ctrl--vote {
  color: rgba(0, 0, 0, 0.35);
}

.widget-sizes[data-appearance="light"] .chirp-widget--4x2 .chirp-widget__upnext {
  border-left-color: rgba(0, 0, 0, 0.1);
}

.widget-sizes[data-appearance="light"] .chirp-widget--4x2 .chirp-widget__upnext-list li {
  color: rgba(0, 0, 0, 0.65);
}

.widget-sizes[data-appearance="light"] .chirp-widget--4x4 .chirp-widget__queue {
  background: rgba(255, 255, 255, 0.65);
  border-color: rgba(0, 0, 0, 0.08);
}

.widget-sizes[data-appearance="light"] .chirp-widget--4x4 .chirp-widget__queue-list strong {
  color: #121318;
}

.widget-sizes[data-appearance="light"] .chirp-widget--4x4 .chirp-widget__queue-list span {
  color: #5c6370;
}

.widget-sizes[data-appearance="light"] .chirp-widget--4x4 .chirp-widget__queue-label {
  color: #5c6370;
}

.widget-sizes[data-appearance="light"] .chirp-widget__logo--masthead,
.widget-sizes[data-appearance="light"] .chirp-widget--2x2 .chirp-widget__logo {
  filter: brightness(0) saturate(1.1);
}

/* Widget animations */
.widget-sizes.is-entering .chirp-widget {
  animation: widget-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.widget-sizes.is-entering .chirp-widget--2x2 { animation-delay: 0.04s; }
.widget-sizes.is-entering .chirp-widget--4x2 { animation-delay: 0.1s; }
.widget-sizes.is-entering .chirp-widget--4x4 { animation-delay: 0.16s; }

@keyframes widget-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.chirp-widget [data-widget-track].is-updating,
.chirp-widget [data-widget-station].is-updating {
  animation: widget-content-pop 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes widget-content-pop {
  0% {
    opacity: 0.45;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.chirp-widget__queue-list.is-updating li,
.chirp-widget__upnext-list.is-updating li {
  animation: widget-queue-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.chirp-widget__queue-list.is-updating li:nth-child(1),
.chirp-widget__upnext-list.is-updating li:nth-child(1) { animation-delay: 0.03s; }
.chirp-widget__queue-list.is-updating li:nth-child(2),
.chirp-widget__upnext-list.is-updating li:nth-child(2) { animation-delay: 0.07s; }
.chirp-widget__queue-list.is-updating li:nth-child(3),
.chirp-widget__upnext-list.is-updating li:nth-child(3) { animation-delay: 0.11s; }
.chirp-widget__queue-list.is-updating li:nth-child(4),
.chirp-widget__upnext-list.is-updating li:nth-child(4) { animation-delay: 0.15s; }

@keyframes widget-queue-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.widget-sizes[data-motion="reduced"] .chirp-widget,
.widget-sizes[data-motion="reduced"] [data-widget-track].is-updating,
.widget-sizes[data-motion="reduced"] [data-widget-station].is-updating,
.widget-sizes[data-motion="reduced"] .chirp-widget__queue-list.is-updating li,
.widget-sizes[data-motion="reduced"] .chirp-widget__upnext-list.is-updating li,
.widget-sizes[data-motion="reduced"] .chirp-widget__dial-needle,
.widget-sizes[data-motion="reduced"] .chirp-widget__dial-thumb {
  animation: none !important;
  transition-duration: 0.01ms !important;
}

.fold-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.fold-device__label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9aa3b0;
}

.fold-device__spec {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #6f7886;
}

.phone-frame {
  position: relative;
  padding: 7px;
  border-radius: 34px;
  background: linear-gradient(155deg, #4a4e56 0%, #25262b 38%, #121316 100%);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.phone-frame--cover {
  padding: 6px;
  border-radius: 38px;
}

.phone-frame--inner {
  padding: 9px 12px;
  border-radius: 26px;
  display: flex;
  justify-content: center;
  align-items: stretch;
  min-width: 0;
}

.phone-frame--inner::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 50%;
  width: 3px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 18%,
    rgba(0, 0, 0, 0.35) 50%,
    rgba(255, 255, 255, 0.1) 82%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

.fold-stage[data-layout="cover"] .fold-device--inner,
.fold-stage[data-layout="cover"] .fold-device--widget {
  display: none;
}

.fold-stage[data-layout="inner"] .fold-device--cover,
.fold-stage[data-layout="inner"] .fold-device--widget {
  display: none;
}

.fold-stage[data-layout="widget"] .fold-device--cover,
.fold-stage[data-layout="widget"] .fold-device--inner {
  display: none;
}

/* ── Phone (app viewport) ── */

.phone {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
  --nav-clearance: 3.55rem;
  --dial-nav-inset: var(--nav-clearance);
  /* station-driven accents — updated in JS when tuning */
  --station-color: #e8364f;
  --grille-dot: var(--station-color);
  --accent: var(--station-color);
  --accent-light: color-mix(in srgb, var(--station-color) 68%, white);
  --accent-glow: var(--accent-light);
  --accent-muted: color-mix(in srgb, var(--station-color) 22%, transparent);
  --gradient: linear-gradient(135deg, var(--station-color), var(--accent-light));
  --glow: 0 0 28px color-mix(in srgb, var(--station-color) 36%, transparent);
  transition: box-shadow 0.45s ease, width 0.35s ease, height 0.35s ease;
}

/* Cover · folded — 2520×1080 portrait (21:9) */
.phone--fold-cover {
  width: auto;
  height: var(--fold-device-h, min(690px, calc(100vh - 9rem)));
  aspect-ratio: 1080 / 2520;
  max-height: var(--fold-device-h, min(690px, calc(100vh - 9rem)));
  border-radius: 32px;
  border: 2px solid #0a0a0c;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(0, 0, 0, 0.65);
}

/* Main · unfolded — 2184×1968 portrait (10:9); same height as cover in dual view */
.phone--fold-inner {
  width: auto;
  height: var(--fold-device-h, min(690px, calc(100vh - 9rem)));
  aspect-ratio: 1968 / 2184;
  max-height: var(--fold-device-h, min(690px, calc(100vh - 9rem)));
  max-width: min(calc(var(--fold-device-h, 690px) * 1968 / 2184), 96vw);
  flex-shrink: 0;
  border-radius: 18px;
  border: 2px solid #0a0a0c;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.fold-stage[data-layout="inner"] #phone-unfolded {
  display: none !important;
}

.phone--mirror {
  pointer-events: none;
  user-select: none;
}

.phone--mirror * {
  pointer-events: none !important;
}

.phone-camera {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a3f48 0%, #050608 72%);
  box-shadow:
    0 0 0 2px #0a0a0c,
    0 0 0 3px rgba(255, 255, 255, 0.06);
  z-index: 50;
  pointer-events: none;
}

.phone--fold-inner .phone-camera {
  display: none;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  padding-bottom: calc(var(--nav-clearance) + 0.35rem);
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  height: 100%;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(18px);
  transition:
    opacity var(--duration-screen) var(--ease-smooth),
    transform var(--duration-screen) var(--ease-smooth),
    visibility var(--duration-screen);
}

.screen[hidden] {
  display: none !important;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.screen.is-leaving {
  opacity: 0;
  transform: translateX(-14px);
  transition-timing-function: ease-in;
}

/* ═══ RADIO — one fluid unit ═══ */

.screen--radio {
  --radio-pad-x: 0;
  padding: 0;
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  overscroll-behavior: contain;
  background: var(--station-color);
}

/* Single faceplate: topbar → controls → grille → tuner → dial */
.radio-unit {
  display: flex;
  flex-direction: column;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  transition: box-shadow 0.45s ease;
}

/* Masthead — cream grille strip + frosted bar over its upper edge */
.radio-unit__masthead {
  position: relative;
  flex-shrink: 0;
  min-height: var(--grille-band-height);
}

.radio-unit__masthead::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: clamp(3.9rem, 11vh, 5.6rem);
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 13, 16, 0.66) 0%, rgba(11, 13, 16, 0.22) 58%, transparent 100%),
    linear-gradient(90deg, color-mix(in srgb, var(--station-color) 22%, transparent), transparent 34%, color-mix(in srgb, var(--station-color) 16%, transparent));
  opacity: 0.78;
  z-index: 1;
}

.radio-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  padding: 0.38rem 0.6rem;
  pointer-events: none;
  color: #fff;
  background: color-mix(in srgb, var(--station-color) 26%, rgba(240, 234, 214, 0.42));
  backdrop-filter: blur(10px) saturate(1.15);
  -webkit-backdrop-filter: blur(10px) saturate(1.15);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 1px 0 color-mix(in srgb, var(--station-color) 18%, rgba(0, 0, 0, 0.1)),
    0 12px 22px rgba(0, 0, 0, 0.12);
  transition:
    background 0.45s ease,
    box-shadow 0.45s ease;
}

.backend-badge {
  position: absolute;
  right: 0.6rem;
  top: calc(100% + 0.24rem);
  z-index: 3;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 0.18rem 0.46rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  background: rgba(17, 21, 28, 0.36);
  opacity: 0.92;
}

.backend-badge--connected {
  border-color: color-mix(in srgb, #42d66f 52%, rgba(255, 255, 255, 0.22));
  background: color-mix(in srgb, #42d66f 14%, rgba(17, 21, 28, 0.36));
}

.backend-badge--error {
  background: color-mix(in srgb, #c0392b 22%, var(--surface-elevated));
  border-color: color-mix(in srgb, #c0392b 45%, transparent);
  color: #ffb4a8;
}

.profile-wiring-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  margin-top: 0.5rem;
}
.profile-wiring-table th,
.profile-wiring-table td {
  text-align: left;
  padding: 0.35rem 0.4rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
  vertical-align: top;
}

.profile-tts-voice-table code {
  font-size: 0.68rem;
  opacity: 0.9;
}

.profile-tts-voice-table .profile-tts-voice-status {
  font-size: 0.68rem;
  max-width: 10rem;
}

.profile-tts-voice-table .btn-link[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.profile-dev-text--warn {
  color: color-mix(in srgb, #f0b24b 88%, var(--text));
  border-left: 3px solid color-mix(in srgb, #f0b24b 70%, transparent);
  padding-left: 0.55rem;
  margin-top: 0.35rem;
}

.backend-badge--fallback {
  border-color: color-mix(in srgb, #f0b24b 52%, rgba(255, 255, 255, 0.22));
  background: color-mix(in srgb, #f0b24b 14%, rgba(17, 21, 28, 0.36));
}

.backend-badge--disconnected {
  border-color: color-mix(in srgb, #ef6573 52%, rgba(255, 255, 255, 0.22));
  background: color-mix(in srgb, #ef6573 14%, rgba(17, 21, 28, 0.36));
}

.backend-badge--local {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(17, 21, 28, 0.32);
}

.phone--fold-cover .radio-topbar {
  /* Clear cover punch-hole camera */
  padding-top: calc(11px + 11px + 0.32rem);
}

.phone--fold-inner .radio-topbar {
  padding-top: 0.45rem;
}

/*
 * Folded cover — vertical stack (no overlap):
 * topbar → grille → station → now playing → controls → guide → dial → nav
 */
.phone--fold-cover .screen--radio {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.phone--fold-cover .radio-unit {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.phone--fold-cover .radio-unit__masthead {
  flex-shrink: 0;
  --grille-band-height: calc(6.35rem + 2 * var(--grille-dot-pitch));
  min-height: var(--grille-band-height);
}

.phone--fold-cover .radio-unit__hardware {
  flex: 1 1 auto;
  min-height: var(--grille-band-height);
  max-height: none;
  height: auto;
}

.phone--fold-cover .grille {
  min-height: var(--grille-band-height);
  height: 100%;
}

.phone--fold-cover .radio-unit__face {
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 0.4rem 0.6rem 0.3rem;
}

.phone--fold-cover .radio-unit__face:has(.schedule-section.is-open) {
  flex: 1 1 0;
  min-height: 0;
}

.phone--fold-cover .radio-face-main {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  justify-content: flex-start;
  align-items: stretch;
  gap: 0.1rem;
  padding: 0;
  overflow: hidden;
}

.phone--fold-cover .station-row {
  flex-shrink: 0;
  margin: 0.08rem 0 0;
}

.phone--fold-cover .station-hero {
  flex-shrink: 0;
  min-height: 0;
  max-height: none;
  max-width: 100%;
  padding-top: 0;
}

.phone--fold-cover .station-hero__wave {
  opacity: 0.32;
}

.phone--fold-cover .station-hero__wave span {
  width: 4px;
}

.phone--fold-cover .station-hero__name {
  line-height: 1.05;
  padding-top: 0;
}

.phone--fold-cover .station-hero .hero-program {
  font-size: 0.64rem;
  line-height: 1.15;
  margin-top: 0.1rem;
}

.phone--fold-cover .now-playing {
  flex-shrink: 0;
  margin-top: 0.02rem;
  padding: 0.34rem 0.5rem 0.3rem;
}

.phone--fold-cover .now-playing__title {
  font-size: 0.8rem;
}

.phone--fold-cover .now-playing__artist {
  font-size: 0.66rem;
}

.phone--fold-cover .radio-controls-deck {
  flex-shrink: 0;
  width: 100%;
  max-width: 100%;
  margin: -0.12rem 0 0;
  padding: 0.22rem 0.4rem 0.24rem;
  gap: 0.22rem;
}

.phone--fold-cover .radio-controls-row--primary {
  gap: 0.85rem;
}

.phone--fold-cover .radio-tune-group {
  max-width: 10rem;
}

.phone--fold-cover .radio-tune-btn__icon {
  width: 16px;
  height: 16px;
}

.phone--fold-cover .radio-tune-btn__label {
  font-size: 0.46rem;
}

.phone--fold-cover .radio-controls-row--secondary {
  gap: 0.55rem;
  padding-top: 0.28rem;
}

.phone--fold-cover .radio-ctrl--play {
  width: 50px;
  height: 50px;
}

.phone--fold-cover .radio-ctrl--play svg {
  width: 24px;
  height: 24px;
}

.phone--fold-cover .radio-ctrl--md {
  width: 36px;
  height: 36px;
}

.phone--fold-cover .radio-ctrl--md svg {
  width: 18px;
  height: 18px;
}

.phone--fold-cover .radio-ctrl--sm {
  width: 30px;
  height: 30px;
}

.phone--fold-cover .radio-unit__chin {
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.phone--fold-cover .schedule-section {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin-top: 0;
  padding-top: 0.28rem;
  padding-left: 0;
  padding-right: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.phone--fold-cover .schedule-toggle {
  padding: 0.28rem 0.1rem;
}

.phone--fold-cover .schedule-toggle-preview {
  font-size: 0.7rem;
}

.phone--fold-cover .radio-unit__dial {
  flex: 0 0 auto;
  margin-top: 0;
  padding: calc(5px + 0.32rem) 0 0;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.phone--fold-cover .dial-rail {
  flex: 1 1 auto;
  min-height: 40px;
  max-height: 62px;
  height: auto;
  margin-bottom: 0.08rem;
}

.phone--fold-cover .dial-labels {
  flex-shrink: 0;
  padding-bottom: calc(var(--nav-clearance) + env(safe-area-inset-bottom, 0px));
}

.radio-topbar-logo {
  grid-column: 2;
  justify-self: center;
  display: block;
  width: auto;
  height: 1.28rem;
  max-width: 5.5rem;
  object-fit: contain;
  object-position: center;
  filter:
    brightness(0) invert(1)
    drop-shadow(0 1px 3px rgba(0, 0, 0, 0.28));
  transition: filter 0.45s ease;
}

.radio-topbar-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  opacity: 0.95;
  pointer-events: auto;
  transition: background 0.2s ease;
}

.radio-topbar-btn svg {
  width: 18px;
  height: 18px;
}

.radio-topbar-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.screen--radio.is-static .radio-topbar {
  background: color-mix(in srgb, #7a7a82 30%, rgba(240, 234, 214, 0.38));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 1px 0 rgba(0, 0, 0, 0.08);
}

.screen--radio.is-static .radio-topbar-logo {
  filter:
    brightness(0) invert(1)
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
  opacity: 0.92;
}

/* Play / tune deck — three button sizes */
.radio-controls-deck {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  width: 100%;
  max-width: 320px;
  margin-top: 0.05rem;
  padding: 0.4rem 0.5rem 0.38rem;
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(0, 0, 0, 0.08) 100%
  );
  border: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.radio-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.radio-controls-row--primary {
  gap: 1.1rem;
  align-items: center;
  justify-content: center;
  padding: 0.15rem 0;
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.radio-controls-row--secondary {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  width: 100%;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.radio-controls-row--secondary #btn-fav {
  grid-column: 1;
  justify-self: start;
}

.radio-controls-row--secondary .radio-tune-group {
  grid-column: 2;
  justify-self: center;
  width: 100%;
  max-width: 11.5rem;
  margin: 0 auto;
}

.radio-ctrl {
  font: inherit;
  cursor: pointer;
  border: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.2s ease, color 0.2s ease;
}

.radio-ctrl:active:not(:disabled) {
  transform: scale(0.94);
}

.radio-ctrl:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Large — play / pause */
.radio-ctrl--play {
  width: 60px;
  height: 60px;
  color: #fff;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent) 88%, white),
    var(--accent-glow)
  );
  box-shadow:
    0 3px 16px color-mix(in srgb, var(--accent) 32%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.radio-ctrl--play svg {
  width: 28px;
  height: 28px;
}

/* Medium — like / dislike */
.radio-ctrl--md {
  width: 44px;
  height: 44px;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.08);
}

.radio-ctrl--vote {
  color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.03);
}

.radio-ctrl--vote svg {
  opacity: 0.55;
}

.radio-ctrl--md svg {
  width: 21px;
  height: 21px;
}

.radio-ctrl--md:hover {
  background: rgba(255, 255, 255, 0.14);
}

.radio-ctrl--vote:hover:not(.is-active) {
  color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.06);
}

.radio-ctrl--vote:hover:not(.is-active) svg {
  opacity: 0.72;
}

.radio-ctrl--md.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: var(--accent-light);
}

.radio-ctrl--vote.is-active {
  color: #fff;
  background: color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, 0.12));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.radio-ctrl--vote.is-active svg {
  opacity: 1;
}

#btn-dislike.is-active {
  color: rgba(255, 210, 210, 0.95);
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* Small — fav / tune */
.radio-ctrl--sm {
  width: 32px;
  height: 32px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.82rem;
}

.radio-ctrl--sm svg {
  width: 15px;
  height: 15px;
}

.radio-ctrl--sm:hover {
  background: rgba(255, 255, 255, 0.1);
}

.radio-ctrl--sm.is-fav {
  color: #ffb4c8;
}

.radio-ctrl--play .icon-play {
  display: block;
}

.radio-ctrl--play .icon-pause {
  display: none;
}

.screen--radio.is-playing .radio-ctrl--play .icon-play,
.radio-ctrl--play.is-playing .icon-play {
  display: none;
}

.screen--radio.is-playing .radio-ctrl--play .icon-pause,
.radio-ctrl--play.is-playing .icon-pause {
  display: block;
}

.radio-tune-group {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  flex: 0 1 auto;
  justify-content: center;
  max-width: 11.5rem;
}

.radio-tune-btn {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  padding: 0.34rem 0.35rem 0.3rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.12s ease,
    box-shadow 0.2s ease;
}

.radio-tune-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.radio-tune-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.radio-tune-btn__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.radio-tune-btn__label {
  font-family: var(--font-ui);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
  white-space: nowrap;
}

.radio-tune-btn--soft {
  border-color: color-mix(in srgb, var(--station-color) 28%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--station-color) 10%, rgba(255, 255, 255, 0.05));
}

.radio-tune-btn--hard {
  border-color: color-mix(in srgb, var(--station-color) 42%, rgba(255, 255, 255, 0.14));
  background: color-mix(in srgb, var(--station-color) 18%, rgba(255, 255, 255, 0.06));
  box-shadow: 0 0 12px color-mix(in srgb, var(--station-color) 15%, transparent);
}

.radio-tune-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.radio-tune-btn--soft:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--station-color) 45%, rgba(255, 255, 255, 0.18));
}

.radio-tune-btn--hard:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--station-color) 55%, rgba(255, 255, 255, 0.2));
  background: color-mix(in srgb, var(--station-color) 24%, rgba(255, 255, 255, 0.08));
}

.radio-tune-btn--soft.is-tuning,
.radio-ctrl--tune.is-tuning,
.radio-tune-btn--hard.is-tuning,
.radio-ctrl--hard.is-tuning {
  animation: tune-pulse 0.8s ease-in-out infinite alternate;
}

@keyframes tune-pulse {
  from { opacity: 0.55; }
  to { opacity: 1; }
}

/* Speaker grille — cream dots; topbar frosts only the upper band */
.radio-unit__hardware {
  flex-shrink: 0;
  min-height: var(--grille-band-height);
  display: flex;
  flex-direction: column;
  background: var(--grille);
}

.grille {
  flex: 1 1 auto;
  min-height: var(--grille-band-height);
  height: 100%;
  position: relative;
  background-color: var(--grille);
  background-image: radial-gradient(circle, var(--station-color) 1.5px, transparent 1.5px);
  background-size: var(--grille-dot-pitch) var(--grille-dot-pitch);
  background-position: 4px 4px;
}

/* FM / AM band switch — old-school toggle at bottom of speaker grille */
.band-switch-wrap {
  position: absolute;
  left: 50%;
  bottom: 0.42rem;
  transform: translateX(-50%);
  z-index: 5;
  pointer-events: auto;
}

.band-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.08rem;
  padding: 0.1rem 0.2rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--grille) 55%, #2a2824 45%);
  border: 1px solid color-mix(in srgb, #1a1917 70%, var(--station-color) 30%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent),
    0 1px 2px rgba(0, 0, 0, 0.18);
  transition: background 0.35s ease, border-color 0.35s ease;
  cursor: pointer;
  touch-action: manipulation;
}

.band-switch__option {
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 1.85rem;
  padding: 0.08rem 0.16rem;
  border: none;
  background: transparent;
  color: color-mix(in srgb, #f5f0e4 45%, #8a8578);
  cursor: pointer;
  border-radius: 999px;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.band-switch__option.is-active {
  color: #f5f0e4;
  opacity: 1;
}

.band-switch__option:not(.is-active) {
  opacity: 0.55;
}

.band-switch__lever {
  width: 0.82rem;
  height: 0.46rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #1a1917 80%, var(--station-color) 20%);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, #fff 18%, #3a3834) 0%,
    #2a2824 100%
  );
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12);
  cursor: pointer;
  position: relative;
  padding: 0;
  transition: transform 0.38s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.band-switch__lever::after {
  content: "";
  position: absolute;
  top: 1px;
  left: 1px;
  width: calc(50% - 2px);
  height: calc(100% - 2px);
  border-radius: 999px;
  background: linear-gradient(180deg, #f0ead6 0%, #c8c0ae 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.38s cubic-bezier(0.34, 1.2, 0.64, 1);
}

.band-switch[data-band="AM"] .band-switch__lever::after {
  transform: translateX(100%);
}

.radio-unit.is-band-am .band-switch {
  background: color-mix(in srgb, var(--grille) 40%, #1e1c18 60%);
}

.radio-unit.is-band-switching {
  animation: band-switch-pulse 0.42s ease;
}

@keyframes band-switch-pulse {
  0% { filter: brightness(1); }
  40% { filter: brightness(0.92); }
  100% { filter: brightness(1); }
}

.radio-unit.is-band-am .dial-tick--station {
  height: 14px;
  opacity: 0.35;
  width: 1px;
}

.radio-unit.is-band-am .dial-tick--station.is-active {
  height: 14px;
  opacity: 0.35;
}

.radio-unit.is-band-am .dial-tick--am-station,
.dial-tick--am-station {
  height: 22px;
  width: 2px;
  opacity: 0.82;
  z-index: 3;
}

.radio-unit.is-band-am .dial-tick--am-station.is-active,
.dial-tick--am-station.is-active {
  height: 26px;
  background: var(--dial-active-color, var(--dial-scale-color, #5a5548));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--dial-active-color, var(--station-color)) 25%, transparent);
}

.radio-unit.is-band-am .dial-label::after {
  content: " kHz";
  font-size: 0.55em;
  opacity: 0.75;
}

.radio-unit:not(.is-band-am) .dial-label::after {
  content: " MHz";
  font-size: 0.55em;
  opacity: 0.75;
}

.queue-am-placeholder {
  list-style: none;
  padding: 0.65rem 0.75rem;
  margin: 0;
  border-radius: 0.65rem;
  background: color-mix(in srgb, var(--station-color) 8%, #1a1917);
  border: 1px solid color-mix(in srgb, var(--station-color) 18%, transparent);
}

.queue-am-placeholder__lead {
  font-size: 0.82rem;
  line-height: 1.45;
  margin: 0 0 0.55rem;
  opacity: 0.92;
}

.queue-am-placeholder__cards {
  display: grid;
  gap: 0.4rem;
}

.queue-am-card {
  padding: 0.45rem 0.55rem;
  border-radius: 0.45rem;
  background: color-mix(in srgb, var(--station-color) 6%, transparent);
  border: 1px dashed color-mix(in srgb, var(--station-color) 22%, transparent);
}

.queue-am-card__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}

.queue-am-card__body {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 0.15rem;
  opacity: 0.88;
}


/* Station face — fills space between grille and dial */
.radio-unit__face {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.65rem 0.85rem 0.85rem;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--station-color) 92%, #000) 0%,
      var(--station-color) 35%,
      color-mix(in srgb, var(--station-color) 78%, #1a1a1a) 100%
    );
  transition: background 0.45s ease;
}

.radio-face-main {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(0.28rem, 1.2vh, 0.5rem);
  width: 100%;
  min-height: 0;
  max-height: none;
  padding: clamp(0.1rem, 0.8vh, 0.35rem) 0 0;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity var(--duration-panel) var(--ease-smooth),
    transform var(--duration-panel) var(--ease-smooth),
    max-height var(--duration-panel) var(--ease-smooth),
    padding var(--duration-panel) ease;
}

/* Open schedule — fade hero stack when queue expands */
.radio-unit__face:has(.schedule-section.is-open) {
  padding: 0;
  overflow: hidden;
}

.radio-unit__face:has(.schedule-section.is-open) .radio-face-main,
.radio-unit__face:has(.schedule-section.is-open) .radio-stack-mid,
.radio-unit__face:has(.schedule-section.is-closing) .radio-face-main,
.radio-unit__face:has(.schedule-section.is-closing) .radio-stack-mid {
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.radio-unit__face:has(.schedule-section.is-closing) .radio-face-main,
.radio-unit__face:has(.schedule-section.is-closing) .radio-stack-mid {
  opacity: 0;
  transform: translateY(-10px);
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.radio-unit__face.is-schedule-expanded,
.radio-unit__face:has(.schedule-section.is-open),
.radio-unit__face:has(.schedule-section.is-closing) {
  position: relative;
  padding: 0;
  overflow: hidden;
}

/* Full-bleed queue overlay — fills the station face, not a strip at the top */
.radio-unit__face.is-schedule-expanded .radio-unit__chin,
.radio-unit__face:has(.schedule-section.is-open) .radio-unit__chin,
.radio-unit__face:has(.schedule-section.is-closing) .radio-unit__chin {
  position: absolute;
  inset: 0;
  z-index: 8;
  flex: none;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.radio-unit__face.is-schedule-expanded .schedule-section,
.radio-unit__face:has(.schedule-section.is-open) .schedule-section,
.radio-unit__face:has(.schedule-section.is-closing) .schedule-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-top: 0;
  border-top: none;
  width: 100%;
}

.radio-unit__face.is-schedule-expanded .schedule-toggle-bar {
  flex: 0 0 auto;
}

.radio-unit__face.is-schedule-expanded .radio-unit__dial,
.radio-unit__face:has(.schedule-section.is-open) .radio-unit__dial,
.radio-unit__face:has(.schedule-section.is-closing) .radio-unit__dial {
  flex: 0 0 0;
  max-height: 0;
  min-height: 0;
  height: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  visibility: hidden;
}

/* JS data-schedule-overlay — wins over stale APK CSS when class sync misses */
.radio-unit__chin[data-schedule-overlay="1"] {
  position: absolute !important;
  inset: 0 !important;
  z-index: 8 !important;
  flex: none !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.schedule-section.is-schedule-overlay-active {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.schedule-section.is-schedule-overlay-active .schedule-panel {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  grid-template-rows: none !important;
}

.schedule-section.is-schedule-overlay-active .schedule-panel__box.queue-schedule-card {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
}

.schedule-section.is-schedule-overlay-active .queue-list {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

.radio-unit__chin[data-schedule-overlay="1"] .radio-unit__dial {
  display: none !important;
}

.station-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  margin-bottom: 0;
}

.station-hero {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: min(100%, 300px);
  min-height: clamp(56px, 9vh, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.station-hero__wave {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 100%;
  padding: 0 0.25rem 0.15rem;
  opacity: 0.38;
  pointer-events: none;
}

.station-hero__wave span {
  width: 5px;
  min-height: 10px;
  border-radius: 2px 2px 0 0;
  background: color-mix(in srgb, var(--station-color, #e8364f) 82%, #fff);
  transform-origin: bottom center;
  will-change: height, transform, opacity;
  animation: wave 1.15s ease-in-out infinite alternate;
  transition:
    height var(--duration-fade) var(--ease-smooth),
    opacity var(--duration-fade) ease,
    background var(--duration-fade) ease;
}

.screen--radio.is-paused .station-hero__wave span {
  animation-play-state: paused;
  opacity: 0.35;
}

.station-hero__wave.is-flat span {
  animation: none;
  transform: none;
  opacity: 0.22;
  background: color-mix(in srgb, var(--station-color, #e8364f) 74%, #d8d8dc);
}

.screen--radio.is-static {
  --station-color: #7a7a82;
}

.screen--radio.is-static .station-hero__name,
.screen--radio.is-static .hero-program,
.screen--radio.is-static .now-playing {
  color: #8a8a92;
}

.screen--radio.is-static .station-hero {
  filter: grayscale(0.85);
}

.screen--radio.is-static .now-playing {
  display: none;
}

.screen--radio.is-mid-stitch .now-playing__label::after {
  content: " · stitch";
  font-weight: 600;
  color: var(--accent-glow);
}

.screen--radio.is-soft-arrival .now-playing__label::after {
  content: " · imaging";
  font-weight: 600;
  color: var(--accent-glow);
}

.radio-unit.is-static {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.4),
    0 12px 48px rgba(0, 0, 0, 0.35);
}

.radio-unit.is-static .radio-unit__dial {
  background: var(--dial-sheet);
}

.radio-face-main > .station-hero__am-host {
  width: 100%;
  max-width: min(100%, 320px);
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  box-sizing: border-box;
}

#hero-fm-hint {
  display: none !important;
}

.station-hero__name {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--station-font, var(--font-station-default));
  font-size: var(--station-font-size, clamp(2.18rem, 7.8vw, 2.94rem));
  font-weight: var(--station-font-weight, 800);
  font-style: var(--station-font-style, normal);
  line-height: 1.05;
  letter-spacing: var(--station-letter-spacing, -0.01em);
  text-align: center;
  max-width: min(100%, 19rem);
  overflow-wrap: anywhere;
  text-wrap: balance;
  transition: font-family 0.35s ease, letter-spacing 0.35s ease;
}

.station-hero__name.is-updating {
  animation: content-pop var(--duration-fade) var(--ease-out);
}

#now-title.is-updating,
.now-playing__title.is-updating {
  animation: content-pop 0.48s var(--ease-out);
}

@keyframes content-pop {
  0% {
    opacity: 0.45;
    transform: scale(0.97);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-program,
.station-hero__program {
  position: relative;
  z-index: 1;
  margin: 0.14rem 0 0;
  font-size: 0.7rem;
  line-height: 1.2;
  font-weight: 500;
  opacity: 0.86;
  text-align: center;
  max-width: min(100%, 19rem);
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* Now playing — transport sides + label / title / artist */
.now-playing {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 68px;
  align-items: stretch;
  width: 100%;
  max-width: 340px;
  min-height: 88px;
  margin: 0.04rem auto 0;
  padding: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  box-sizing: border-box;
}

.now-playing__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.14rem;
  padding: 0.58rem 0.55rem 0.5rem;
  text-align: center;
  min-width: 0;
}

.now-playing__side {
  display: flex;
  flex-direction: column;
}

.now-playing__side--split {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.now-playing__side:not(.now-playing__side--split) {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.now-playing__side--split .now-chip-btn:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.now-playing__label {
  margin: 0;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
}

.now-playing__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
  width: 100%;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

.now-playing__artist {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0.82;
  width: 100%;
  overflow-wrap: anywhere;
}

/* Legacy now-chip (widgets / references) */
.now-chip {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 62px;
  align-items: stretch;
  width: 100%;
  max-width: 320px;
  min-height: 76px;
  padding: 0;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.now-chip__body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  padding: 0.6rem 0.5rem;
  text-align: center;
}

.now-chip__side {
  display: flex;
  flex-direction: column;
}

.now-chip__side--split {
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.now-chip__side:not(.now-chip__side--split) {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.now-chip-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 0;
  padding: 0.25rem 0.2rem;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: none;
  transition: background 0.2s ease, opacity 0.2s ease, transform 0.12s ease, color 0.2s ease;
}

.now-chip-btn--md svg {
  width: 20px;
  height: 20px;
}

.now-chip-btn--md .now-chip-btn__label {
  font-size: 0.52rem;
}

.now-chip-btn--sm .now-chip-btn__label {
  font-size: 0.46rem;
  letter-spacing: 0.03em;
}

.now-chip-btn--md {
  min-height: 44px;
}

.now-chip-btn--sm {
  min-height: 32px;
}

.now-chip-btn__label {
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
  line-height: 1.1;
}

.now-chip__side--split .now-chip-btn:first-child {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.now-chip-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.08);
}

.now-chip-btn:active:not(:disabled) {
  transform: scale(0.96);
}

.now-chip-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.now-chip-btn.is-active {
  color: var(--accent-light);
  background: rgba(255, 255, 255, 0.1);
}

#now-title,
.now-playing__title {
  font-size: 0.88rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
}

.now-chip-label,
.now-playing__label {
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.65;
  width: 100%;
  text-align: center;
}

.now-artist,
.now-playing__artist {
  font-size: 0.76rem;
  opacity: 0.82;
  width: 100%;
  text-align: center;
}

.radio-controls-row--track {
  justify-content: center;
  gap: 1.1rem;
  padding-bottom: 0.12rem;
  margin-top: -0.08rem;
}

.radio-controls-row--track .radio-ctrl--sm {
  width: 34px;
  height: 34px;
}

.radio-controls-row--track .radio-ctrl--sm svg {
  width: 18px;
  height: 18px;
}

.tune-arrow {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  opacity: 0.92;
  flex-shrink: 0;
}

.tune-arrow svg { width: 26px; height: 26px; }

@keyframes wave {
  from { transform: scaleY(0.25); }
  to { transform: scaleY(1); }
}

/* Full-width bottom chin: Current Block + dial */
.radio-unit__chin {
  flex-shrink: 0;
  width: 100%;
  margin-top: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}

.radio-unit__face:not(.is-schedule-expanded) .radio-unit__chin {
  flex: 0 0 auto;
}

.schedule-toggle-bar {
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  width: 100%;
}

.schedule-toggle-bar .schedule-toggle {
  flex: 1 1 auto;
  min-width: 0;
}

.schedule-library-btn {
  flex-shrink: 0;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.12rem;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  min-height: 44px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--station-color) 28%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, #120818 55%, var(--station-color));
  color: rgba(255, 255, 255, 0.92);
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, transform 0.12s ease;
}

.schedule-library-btn:active {
  transform: scale(0.96);
}

.schedule-library-btn__icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.schedule-library-btn__chevron {
  font-size: 0.55rem;
  opacity: 0.8;
  line-height: 1;
}

/* Schedule — collapsible, one connected unit when open */
.schedule-section {
  width: 100%;
  flex-shrink: 0;
  padding-top: 0;
  border-top: none;
  transition: border-color 0.35s ease;
}

.radio-controls-deck + .radio-unit__chin,
.radio-controls-deck + .schedule-section {
  margin-top: 0;
}

.schedule-section.is-open {
  border-top-color: transparent;
}

.schedule-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.35rem 0.15rem;
  color: inherit;
  text-align: left;
  border-radius: 10px;
  border: 1px solid transparent;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    border-radius 0.35s ease,
    padding 0.35s ease;
}

.schedule-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

.schedule-toggle:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}

.schedule-section.is-open .schedule-toggle {
  padding: 0.55rem 0.75rem;
  border-radius: 0;
  border-color: rgba(255, 255, 255, 0.12);
  border-bottom: none;
  border-left: none;
  border-right: none;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.schedule-section.is-open .schedule-toggle:hover {
  background: rgba(0, 0, 0, 0.36);
}

.schedule-toggle-main {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.schedule-toggle-label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.62;
}

.schedule-toggle-preview {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  opacity: 0.9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-toggle-chevron {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-right: 0.15rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
}

.schedule-section.is-open .schedule-toggle-chevron {
  transform: rotate(-135deg);
  opacity: 0.75;
}

.schedule-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-panel) var(--ease-smooth);
}

.schedule-section.is-open .schedule-panel {
  grid-template-rows: 1fr;
}

.schedule-section.is-closing .schedule-panel {
  grid-template-rows: 0fr;
}

.radio-unit__face.is-schedule-expanded .schedule-panel,
.radio-unit__face:has(.schedule-section.is-open) .schedule-panel,
.radio-unit__face:has(.schedule-section.is-closing) .schedule-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  grid-template-rows: none;
  height: auto;
}

.radio-unit__face.is-schedule-expanded .schedule-panel > .schedule-panel__box {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.schedule-section.is-closing .schedule-panel__box.queue-schedule-card {
  opacity: 0;
  transform: translateY(-4px);
  transition:
    opacity 0.42s ease 0.06s,
    transform var(--duration-panel) var(--ease-smooth);
}

.schedule-panel__box.queue-schedule-card {
  overflow: hidden;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  opacity: 0;
  transform: none;
  transition: opacity 0.42s ease 0.08s;
}

.schedule-section.is-open .schedule-panel__box.queue-schedule-card,
.radio-unit__face.is-schedule-expanded .schedule-panel__box.queue-schedule-card {
  opacity: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.radio-unit__face.is-schedule-expanded .queue-schedule-head,
.radio-unit__face.is-schedule-expanded .queue-schedule-foot {
  flex-shrink: 0;
}

.queue-schedule-head,
.queue-schedule-foot {
  position: relative;
  padding: 0.45rem 0.65rem 0.5rem;
}

.queue-schedule-head--compact {
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.queue-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.35rem;
}

.queue-toolbar-label {
  grid-column: 2;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.queue-header-rebuild {
  grid-column: 3;
  justify-self: end;
  white-space: nowrap;
}

.queue-schedule-foot {
  padding-top: 0.35rem;
  padding-bottom: 0.5rem;
  background: rgba(0, 0, 0, 0.18);
}

.queue-schedule-accent {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 8%,
    var(--accent-glow) 50%,
    var(--accent) 92%,
    transparent 100%
  );
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 35%, transparent);
}

.queue-schedule-head .queue-schedule-accent {
  top: 0;
}

.queue-schedule-foot .queue-schedule-accent {
  top: 0;
}

.btn-link {
  font-size: 0.68rem;
  color: var(--accent-glow);
  text-decoration: underline;
  background: none;
  padding: 0;
}

.btn-link[disabled],
.btn-link.is-running {
  opacity: 0.65;
  cursor: default;
  text-decoration: none;
  pointer-events: none;
}

.queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 9.5rem;
  overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.radio-unit__face.is-schedule-expanded .queue-list,
.radio-unit__face:has(.schedule-section.is-open) .queue-list,
.radio-unit__face:has(.schedule-section.is-closing) .queue-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.queue-list::-webkit-scrollbar {
  display: none;
}

.queue-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  line-height: 1.35;
  text-align: center;
}

.queue-list li:last-child {
  border-bottom: none;
}

.queue-list.is-updating li {
  animation: widget-queue-in 0.38s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.queue-list.is-updating li:nth-child(1) { animation-delay: 0.02s; }
.queue-list.is-updating li:nth-child(2) { animation-delay: 0.05s; }
.queue-list.is-updating li:nth-child(3) { animation-delay: 0.08s; }
.queue-list.is-updating li:nth-child(4) { animation-delay: 0.11s; }
.queue-list.is-updating li:nth-child(5) { animation-delay: 0.14s; }
.queue-list.is-updating li:nth-child(6) { animation-delay: 0.17s; }

.queue-active {
  background: color-mix(in srgb, var(--accent) 14%, rgba(0, 0, 0, 0.22));
}

.queue-row-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  width: 100%;
  min-width: 0;
}

.queue-type {
  flex-shrink: 0;
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.queue-title {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.queue-debug {
  font-size: 0.56rem;
  color: rgba(255, 255, 255, 0.42);
}

.queue-next-block {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.15rem 0.35rem;
  padding-top: 0.35rem;
  font-size: 0.68rem;
  line-height: 1.35;
  text-align: center;
}

.queue-next-block-label {
  flex-basis: 100%;
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.queue-next-block-name {
  font-weight: 500;
  color: #fff;
}

.queue-next-block-vibe {
  color: rgba(255, 255, 255, 0.55);
  font-style: italic;
}

.queue-next-block-time {
  flex-basis: 100%;
  font-size: 0.62rem;
  color: var(--accent-glow);
}

/* Dial chin — compact; nav clearance only under frequency labels */
.radio-unit__dial {
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  margin-left: 0;
  padding: calc(5px + 0.38rem) 0.1rem 0;
  color: var(--hardware-ink);
  background: var(--dial-sheet);
  border-top: none;
  transition: background 0.45s ease;
}

/* 5px grille strip — matches speaker grill, no color spill */
.radio-unit__dial::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background-color: var(--grille);
  background-image: radial-gradient(circle, var(--station-color) 1.15px, transparent 1.15px);
  background-size: 7px 7px;
  background-position: 2px 1px;
  pointer-events: none;
}

/* ═══ Unfolded (main) radio — station + controls left, now + queue right ═══ */
.phone--fold-inner .radio-unit__masthead {
  --grille-band-height: calc(5.25rem + 2 * var(--grille-dot-pitch));
  min-height: var(--grille-band-height);
}

.phone--fold-inner .radio-unit__hardware {
  flex: 1 1 auto;
  min-height: var(--grille-band-height);
  max-height: none;
}

.phone--fold-inner .grille {
  min-height: var(--grille-band-height);
}

.phone--fold-inner .screen--radio {
  display: flex;
  flex-direction: column;
}

.phone--fold-inner .radio-unit {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.phone--fold-inner .radio-unit__face {
  flex: 1 1 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  grid-template-rows: auto auto auto;
  gap: 0.4rem 0.75rem;
  align-items: start;
  align-content: space-between;
  overflow: hidden;
  padding: 0.65rem 0.75rem 0.35rem;
}

/* Children of face-main participate in the face grid */
.phone--fold-inner .radio-face-main {
  display: contents;
}

.phone--fold-inner .station-row {
  grid-column: 1;
  grid-row: 1;
  margin: 0.22rem 0 0;
}

.phone--fold-inner .station-hero {
  max-width: none;
  min-height: clamp(64px, 10vh, 88px);
}

.phone--fold-inner .station-hero .hero-program {
  font-size: 0.68rem;
  margin-top: 0.1rem;
}

.phone--fold-inner .radio-controls-deck {
  grid-column: 1;
  grid-row: 3;
  align-self: start;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.45rem 0.5rem 0.4rem;
}

.phone--fold-inner .radio-controls-row--primary {
  gap: 1.1rem;
}

.phone--fold-inner .now-playing {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  max-width: none;
  width: 100%;
  min-height: 0;
  margin: 0;
}

/* Pinned guide — always expanded under now playing (not a dropdown) */
.phone--fold-inner .schedule-section {
  grid-column: 2;
  grid-row: 2 / 4;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 0;
  border-top: none;
}

.phone--fold-inner .schedule-toggle {
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: none;
  background: rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.45rem 0.55rem;
  cursor: default;
  pointer-events: none;
}

.phone--fold-inner .schedule-toggle-chevron {
  display: none;
}

.phone--fold-inner .schedule-panel {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  grid-template-rows: 1fr;
  overflow: hidden;
}

.phone--fold-inner .schedule-panel__box.queue-schedule-card {
  opacity: 1;
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.phone--fold-inner .queue-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
}

.phone--fold-inner .radio-unit__dial {
  flex: 0 0 auto;
  margin-top: 0;
  padding: calc(5px + 0.32rem) 0.1rem 0;
  display: flex;
  flex-direction: column;
}

.phone--fold-inner .dial-rail {
  flex: 1 1 auto;
  min-height: 42px;
  max-height: 68px;
  height: auto;
  margin-bottom: 0.08rem;
}

.phone--fold-inner .dial-labels {
  flex-shrink: 0;
  padding-bottom: calc(var(--nav-clearance) + env(safe-area-inset-bottom, 0px));
}

/* Unfolded: override cover dropdown — keep two-column layout, never collapse main stack */
.phone--fold-inner .radio-unit__face:has(.schedule-section) .radio-face-main {
  display: contents !important;
  opacity: 1 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  transform: none !important;
  pointer-events: none;
}

.phone--fold-inner .radio-unit__face:has(.schedule-section.is-open) .radio-face-main,
.phone--fold-inner .radio-unit__face:has(.schedule-section.is-closing) .radio-face-main {
  display: contents !important;
}

.phone--fold-inner .radio-unit__face:has(.schedule-section.is-open) .station-row,
.phone--fold-inner .radio-unit__face:has(.schedule-section.is-open) .radio-controls-deck,
.phone--fold-inner .radio-unit__face:has(.schedule-section.is-open) .now-playing {
  opacity: 1;
  transform: none;
  max-height: none;
  pointer-events: auto;
}

.phone--fold-inner .radio-unit__face:has(.schedule-section.is-open) .radio-face-main {
  opacity: 1;
  transform: none;
  max-height: none;
  overflow: visible;
  pointer-events: none;
}

/* Re-enable interaction inside the pinned panel */
.phone--fold-inner .schedule-panel,
.phone--fold-inner .schedule-panel * {
  pointer-events: auto;
}

.dial-rail {
  position: relative;
  height: 48px;
  margin-bottom: 0.1rem;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  --dial-scale-color: color-mix(
    in srgb,
    var(--station-color, #e8364f) 70%,
    var(--hardware-ink, #5a5548)
  );
  --dial-tick-color: var(--dial-scale-color);
  --dial-active-color: var(--station-color, #e8364f);
  --dial-needle-color: var(--dial-active-color);
}

.dial-rail.is-dragging .dial-thumb,
.dial-rail.is-dragging .dial-needle {
  transition: none;
}

.dial-ticks {
  position: absolute;
  inset: 0;
  left: 0;
  right: 0;
  pointer-events: none;
}

.dial-ticks::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 0;
  border-top: 1px dotted color-mix(in srgb, var(--station-color, #e8364f) 62%, #8a8578);
  pointer-events: none;
  z-index: 0;
}

.dial-track-line {
  display: none;
}

.dial-tick {
  position: absolute;
  bottom: 12px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--dial-tick-color);
  pointer-events: none;
  border-radius: 1px;
  z-index: 1;
  transition: background 0.45s ease;
}

.dial-tick--minor {
  height: 9px;
  width: 1px;
  opacity: 0.9;
  z-index: 1;
}

.dial-tick--mid {
  height: 15px;
  width: 2px;
  opacity: 1;
  z-index: 2;
}

.dial-tick--station {
  height: 26px;
  width: 2px;
  opacity: 1;
  z-index: 3;
}

.dial-tick--station.is-active {
  height: 30px;
  width: 2px;
  background: var(--dial-active-color, var(--dial-scale-color, #5a5548));
  box-shadow: none;
}

.dial-tick--am-station.is-active {
  background: var(--dial-active-color, var(--dial-scale-color, #5a5548));
}

.dial-indicator {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
}

.dial-needle {
  position: absolute;
  left: var(--dial-edge, 0%);
  bottom: 10px;
  width: 2px;
  height: calc(100% - 12px);
  max-height: 34px;
  transform: translateX(-50%);
  background: var(--dial-needle-color, var(--dial-tick-color));
  border-radius: 1px;
  transition: left 0.28s ease, background 0.45s ease;
  z-index: 2;
}

.dial-thumb {
  position: absolute;
  left: var(--dial-edge, 0%);
  bottom: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #111;
  transform: translateX(-50%);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.32);
  transition: left 0.28s ease;
  z-index: 3;
}

.dial-labels {
  position: relative;
  min-height: 1.05rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  padding-bottom: calc(var(--nav-clearance) + env(safe-area-inset-bottom, 0px));
}

.dial-label {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.7rem;
  font-weight: 600;
  color: color-mix(in srgb, var(--hardware-ink) 70%, var(--station-color, #e8364f));
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color 0.35s ease;
}

/* ═══ STATIONS (menu) ═══ */

.screen--stations {
  flex-direction: column;
  background: var(--bg);
}

.stations-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stations-pane--list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.stations-pane--preview {
  display: none;
}

.stations-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 3.25rem 1rem 0.85rem;
  background: var(--bg);
  color: #fff;
  border-bottom: 1px solid #2a2a2a;
}

.stations-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  transition: background 0.2s ease;
}

.stations-back:hover {
  background: rgba(255, 255, 255, 0.08);
}

.stations-back svg {
  width: 22px;
  height: 22px;
}

.stations-header-title {
  flex: 1;
  margin: 0;
  padding-right: 40px;
  text-align: center;
  font-family: "Syne", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.stations-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.15rem calc(var(--nav-clearance) + 1.25rem);
  scrollbar-width: none;
}

.stations-scroll::-webkit-scrollbar { display: none; }

.stations-lead {
  margin: 0 0 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.45;
}

.stations-subhead {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.stations-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stations-list li {
  border-radius: var(--radius);
  overflow: hidden;
  isolation: isolate;
  contain: paint;
}

.station-card {
  position: relative;
  width: 100%;
  min-height: 92px;
  border-radius: inherit;
  overflow: hidden;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
  color: #fff;
  border: none;
  background: linear-gradient(
    145deg,
    var(--card-color) 0%,
    color-mix(in srgb, var(--card-color) 68%, #252530) 100%
  );
  transition:
    filter 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.station-card:active {
  transform: scale(0.98);
}

.station-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.42), transparent 62%);
  pointer-events: none;
}

.station-card:hover {
  filter: brightness(1.06);
}

.station-card.is-active {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.35),
    0 8px 28px rgba(0, 0, 0, 0.35);
}

.station-card__heart {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  font-size: 0.95rem;
  padding: 0.2rem;
}

.station-card__heart.is-fav {
  color: #ffb4c8;
}

.station-card__head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 0.75rem;
  width: 100%;
  padding-right: 1.35rem;
}

.station-card__name {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
  font-family: var(--station-font, var(--font-station-default));
  font-weight: var(--station-font-weight, 700);
  font-style: var(--station-font-style, normal);
  font-size: clamp(0.9rem, 3.8vw, 1.05rem);
  letter-spacing: var(--station-letter-spacing, normal);
  line-height: 1.05;
}

.station-card__now {
  flex: 1 1 46%;
  min-width: 0;
  max-width: 58%;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
  text-align: right;
  padding-top: 0.06rem;
}

.station-card__segment {
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.station-card__track {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}

.station-card__artist {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.25;
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.station-card.is-active .station-card__now {
  opacity: 1;
}

.station-card.is-active .station-card__now.is-live .station-card__segment {
  opacity: 1;
}

.station-card.is-active .station-card__now.is-live .station-card__track {
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.station-card__desc {
  position: relative;
  z-index: 1;
  margin: 0.28rem 0 0;
  font-size: 0.68rem;
  opacity: 0.88;
  line-height: 1.35;
}

.station-card.is-preview-selected {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.5),
    0 6px 20px rgba(0, 0, 0, 0.28);
}

.stations-preview__inner {
  min-height: 0;
}

.stations-preview__empty {
  margin: 1.5rem 0;
  text-align: center;
  color: #888;
  font-size: 0.88rem;
}

.stations-preview__hero {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  background: linear-gradient(
    145deg,
    var(--preview-color) 0%,
    color-mix(in srgb, var(--preview-color) 62%, #1a1a22) 100%
  );
}

.stations-preview__name {
  margin: 0;
  font-family: var(--station-font, var(--font-station-default));
  font-weight: var(--station-font-weight, 700);
  font-style: var(--station-font-style, normal);
  font-size: clamp(1.1rem, 3.2vw, 1.45rem);
  letter-spacing: var(--station-letter-spacing, normal);
  line-height: 1.05;
  color: #fff;
}

.stations-preview__format {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  opacity: 0.9;
  color: #fff;
}

.stations-preview__eyebrow {
  display: block;
  margin-bottom: 0.28rem;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #888;
}

.stations-preview__block,
.stations-preview__now,
.stations-preview__queue {
  margin-bottom: 0.85rem;
}

.stations-preview__block-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
  color: #eee;
}

.stations-preview__block-time {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: #888;
}

.stations-preview__track {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.stations-preview__artist {
  margin: 0.18rem 0 0;
  font-size: 0.78rem;
  color: #aaa;
  line-height: 1.35;
}

.stations-preview__now.is-live .stations-preview__track {
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.15);
}

.stations-preview__queue-list {
  margin: 0;
  padding: 0;
}

.stations-preview__queue-list .queue-title {
  font-size: 0.78rem;
}

.stations-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding-top: 0.15rem;
}

.stations-preview__fav,
.stations-preview__tune {
  flex: 1 1 auto;
  min-height: 42px;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.15s ease;
}

.stations-preview__fav {
  border: 1px solid #444;
  color: #ddd;
  background: rgba(255, 255, 255, 0.04);
}

.stations-preview__fav.is-fav {
  border-color: #ff8fa8;
  color: #ffb4c8;
}

.stations-preview__tune {
  border: none;
  color: #0a0a0c;
  background: linear-gradient(135deg, #f5f5f5, #d8d8de);
}

.stations-preview__tune:active,
.stations-preview__fav:active {
  transform: scale(0.98);
}

/* Unfolded — stations split (list + live preview) */
.phone--fold-inner .screen--stations {
  min-height: 0;
  overflow: hidden;
}

.phone--fold-inner .stations-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 0;
}

.phone--fold-inner .stations-pane--preview {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-left: 1px solid #2a2a2a;
  background: #0e0e10;
}

.phone--fold-inner .stations-preview__inner {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.75rem 0.95rem calc(var(--nav-clearance) + 1rem);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.phone--fold-inner .stations-pane--list .stations-scroll {
  padding: 0.65rem 0.8rem calc(var(--nav-clearance) + 0.85rem);
}

.phone--fold-inner .stations-lead {
  font-size: 0.82rem;
  margin-bottom: 0.65rem;
}

.phone--fold-inner .pills {
  margin-bottom: 0.75rem;
}

.phone--fold-inner .stations-subhead {
  font-size: 0.82rem;
  margin-bottom: 0.55rem;
}

.phone--fold-inner .stations-list {
  gap: 0.45rem;
}

.phone--fold-inner .station-card {
  min-height: 54px;
  padding: 0.55rem 0.7rem;
  justify-content: center;
}

.phone--fold-inner .station-card__name {
  font-size: 0.88rem;
}

.phone--fold-inner .station-card__desc {
  margin-top: 0.12rem;
  font-size: 0.62rem;
}

.phone--fold-inner .station-card__heart,
.phone--fold-inner .station-card__now,
.phone--fold-inner .station-card__head {
  display: none;
}

.pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1.15rem;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}

.pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  border: 1px solid #444;
  color: #ccc;
  font-size: 0.78rem;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease;
}

.pill:active {
  transform: scale(0.96);
}

.pill.is-active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 700;
  box-shadow: var(--glow);
}

/* ═══ FAVORITES ═══ */

.fav-title {
  margin: 0;
  padding: 3.5rem 1.15rem 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.fav-list {
  list-style: none;
  margin: 0;
  padding: 0 1.15rem;
  flex: 1;
  overflow-y: auto;
}

.fav-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.85rem 0;
  border-bottom: 1px solid #2a2a2a;
  text-align: left;
  color: #fff;
}

.fav-row__swatch {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  flex-shrink: 0;
}

.fav-row__name {
  margin: 0;
  font-weight: 600;
  font-size: 0.92rem;
}

.fav-row__meta {
  margin: 0.12rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.fav-empty {
  padding: 2rem 0;
  text-align: center;
  color: var(--muted);
}

/* ═══ HOME (radio off) ═══ */

.screen--home {
  --radio-off-color: var(--station-color);
  padding-bottom: 0;
  height: 100%;
  min-height: 100%;
  position: relative;
  overflow: hidden;
  transform: translateY(22px);
  transition:
    opacity var(--duration-screen) var(--ease-smooth),
    transform var(--duration-screen) var(--ease-smooth),
    visibility var(--duration-screen);
}

.screen--home.is-active {
  flex-direction: column;
  transform: translateY(0);
}

.screen--home.is-leaving {
  transform: translateY(12px);
}

.home-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 85% 55% at 50% 58%,
      color-mix(in srgb, var(--radio-off-color, var(--station-color)) 30%, transparent),
      transparent
    ),
    radial-gradient(
      circle at 50% 68%,
      color-mix(in srgb, var(--radio-off-color, var(--station-color)) 18%, transparent),
      transparent 62%
    );
}

.home-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  box-sizing: border-box;
  padding: 0 1.5rem 14vh;
  max-height: 100%;
}

.home-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-light);
}

.home-logo {
  display: block;
  width: clamp(6.75rem, 44vw, 9.25rem);
  height: auto;
  margin: 0 auto 1.15rem;
  object-fit: contain;
  filter:
    brightness(0) invert(1)
    drop-shadow(
      0 0 22px color-mix(in srgb, var(--radio-off-color, var(--station-color)) 45%, transparent)
    );
  transition: filter 0.45s ease;
}

.home-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.home-lamp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #5a6578;
  box-shadow: 0 0 0 3px rgba(90, 101, 120, 0.25);
}

.home-status-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.home-heading {
  margin: 0 0 0.35rem;
  font-family: "Syne", sans-serif;
  font-size: 1.35rem;
  font-weight: 700;
}

.home-hint {
  margin: 0 0 1.35rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.home-last {
  width: 100%;
  max-width: 300px;
  margin-bottom: 1.35rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--radio-off-color, var(--station-color)) 22%, #2e2e2e);
  background: color-mix(in srgb, var(--radio-off-color, var(--station-color)) 6%, rgba(255, 255, 255, 0.03));
  text-align: left;
}

.home-last-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.home-last-name {
  margin: 0 0 0.2rem;
  font-weight: 700;
  font-size: 0.95rem;
}

.home-last-format {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--accent-light);
}

.home-cta {
  width: 100%;
  max-width: 300px;
  padding: 0.95rem 1rem;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: var(--glow);
}

.home-resume {
  margin: 0.75rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.home-backend-status {
  width: 100%;
  max-width: 300px;
  margin: 0.75rem 0 0;
  padding: 0.65rem 0.7rem;
  border: 1px solid rgba(255, 111, 97, 0.35);
  border-radius: 12px;
  background: rgba(255, 111, 97, 0.08);
  color: #ffd5d0;
  font-size: 0.68rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-align: left;
  white-space: pre-wrap;
}

/* ═══ SCHEDULES PAGE ═══ */

.screen--schedules {
  flex-direction: column;
  padding: 3.25rem 0 0;
  background: var(--bg);
  --sched-accent: var(--station-color);
}

.schedules-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem calc(var(--nav-clearance) + 1.25rem);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.schedules-scroll::-webkit-scrollbar {
  display: none;
}

.schedules-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 0 0.85rem;
  margin-bottom: 0.1rem;
}

.schedules-hero__glyph {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.4rem;
  border-radius: 50%;
  color: var(--sched-accent, var(--station-color));
  background: color-mix(in srgb, var(--sched-accent, var(--station-color)) 14%, var(--bg-elevated));
  border: 1px solid color-mix(in srgb, var(--sched-accent, var(--station-color)) 28%, #2a2a2a);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--sched-accent, var(--station-color)) 18%, transparent);
}

.schedules-hero__icon {
  width: 1.25rem;
  height: 1.25rem;
}

.schedules-hero__title {
  margin: 0 0 0.2rem;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sched-accent, var(--station-color));
}

.schedules-hero__lead {
  margin: 0;
  max-width: 18rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.schedules-page.pref-page {
  padding-top: 0;
  gap: 0.65rem;
}

.schedules-shared {
  display: none;
}

.schedules-station-day-context {
  margin-top: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sched-station-day-context__row {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted, #bbb);
}

.sched-station-day-context__row:last-child {
  margin-bottom: 0;
}

.sched-station-day-context__label {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: var(--detail-color, var(--accent-light));
}

.sched-station-day-context__row--special {
  color: #ddd;
}

.sched-station-day-context__note {
  color: var(--detail-color, var(--accent-light));
  font-size: 0.68rem;
}

.sched-block__special {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 45%, #000);
}

.schedules-shared__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.schedules-layout {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.schedules-pane.pref-card {
  overflow: hidden;
}

.schedules-pane__body {
  padding-top: 0.35rem;
}

.schedules-pane--list {
  min-width: 0;
}

.schedules-pane--block {
  display: none;
}

.schedules-detail__lead {
  margin-bottom: 0.55rem;
}

.schedules-block-preview__empty {
  margin: 1.5rem 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
}

.schedules-station-row {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.schedules-station-row::-webkit-scrollbar {
  display: none;
}

.sched-station-pill {
  flex: 1 0 0;
  min-width: 58px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.5rem 0.32rem;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--muted);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease,
    box-shadow 0.25s ease;
}

.sched-station-pill:active {
  transform: scale(0.96);
}

.sched-station-pill.is-active {
  color: #fff;
  border-color: var(--pill-color, var(--accent));
  background: color-mix(in srgb, var(--pill-color, var(--accent)) 16%, var(--bg-elevated));
  box-shadow: 0 0 16px color-mix(in srgb, var(--pill-color, var(--accent)) 28%, transparent);
  transform: scale(1.02);
}

.sched-station-pill__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pill-color, var(--accent));
}

.sched-station-pill__name {
  font-size: 0.58rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.schedules-detail-head {
  margin-bottom: 0.75rem;
}

.schedules-detail-name {
  margin: 0 0 0.15rem;
  font-family: "Syne", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.schedules-detail-meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.schedules-day-tabs {
  margin: 0;
}

.screen--schedules .pref-segment {
  border-color: color-mix(in srgb, var(--sched-accent, var(--station-color)) 22%, rgba(255, 255, 255, 0.06));
}

.screen--schedules .pref-segment__btn.is-active {
  color: color-mix(in srgb, var(--sched-accent, var(--station-color)) 90%, #fff);
  background: color-mix(in srgb, var(--sched-accent, var(--station-color)) 14%, #fff);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px color-mix(in srgb, var(--sched-accent, var(--station-color)) 35%, transparent);
}

.sched-blocks {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.14);
}

.sched-blocks--modern {
  border-color: var(--border-subtle, #2a2a2a);
}

.sched-blocks li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sched-blocks li:last-child {
  border-bottom: none;
}

.sched-block-item:last-child {
  border-bottom: none;
}

.sched-block-item.is-expanded {
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 4%, var(--bg-elevated));
}

.sched-block-item.is-closing {
  background: transparent;
}

.sched-block-item.is-closing .sched-block.is-selected {
  border-bottom-color: transparent;
}

.sched-block {
  width: 100%;
  padding: 0.68rem 0.75rem;
  text-align: left;
  color: inherit;
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.sched-block:hover {
  background: rgba(255, 255, 255, 0.04);
}

.sched-block.is-live {
  border-left-color: var(--detail-color, var(--accent));
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 10%, transparent);
}

.sched-block__live-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.15rem;
  margin-left: 0.4rem;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 70%, #000);
  color: #fff;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  vertical-align: middle;
}

.sched-block.is-selected {
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--detail-color, var(--accent)) 32%, transparent);
}

.sched-block-item.is-expanded .sched-block.is-selected {
  box-shadow: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sched-block-detail-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--duration-panel) var(--ease-smooth);
}

.sched-block-item.is-expanded .sched-block-detail-wrap,
.sched-block-item.is-closing .sched-block-detail-wrap {
  grid-template-rows: 1fr;
}

.sched-block-item.is-closing .sched-block-detail-wrap {
  grid-template-rows: 0fr;
}

.sched-block-detail-inner {
  overflow: hidden;
  min-height: 0;
}

.sched-block__time {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--detail-color, var(--accent-light));
  margin-bottom: 0.2rem;
}

.sched-block__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  margin-bottom: 0.12rem;
}

.sched-block__host {
  display: block;
  font-size: 0.76rem;
  color: #bbb;
  margin-bottom: 0.25rem;
}

.sched-block__notes {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Block summary panel — expands under clicked row */
.sched-block-detail {
  padding: 0.75rem 0.8rem;
  border-top: 1px solid color-mix(in srgb, var(--detail-color, var(--accent)) 22%, rgba(255, 255, 255, 0.06));
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 8%, rgba(0, 0, 0, 0.12));
  opacity: 0;
  transform: translateY(-4px);
  animation: sched-detail-in var(--duration-fade) var(--ease-out) 0.1s forwards;
}

.sched-block-detail.is-closing {
  animation: sched-detail-out 0.42s var(--ease-smooth) forwards;
}

@keyframes sched-detail-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sched-detail-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.sched-block-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.sched-block-detail__head-main {
  min-width: 0;
}

.sched-block-detail__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1.15rem;
  line-height: 1;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
  transition: background 0.2s ease, color 0.2s ease;
}

.sched-block-detail__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sched-block-detail__reset {
  flex-shrink: 0;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: #ddd;
  border: 1px solid #444;
  background: rgba(255, 255, 255, 0.06);
  white-space: nowrap;
}

.sched-block-detail__reset:hover {
  color: #fff;
  border-color: color-mix(in srgb, var(--detail-color, var(--accent)) 55%, #444);
}

/* Unfolded — schedules split (list + block detail) */
.phone--fold-inner .screen--schedules {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.phone--fold-inner .schedules-scroll {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(var(--nav-clearance) + 0.5rem);
}

.phone--fold-inner .schedules-hero,
.phone--fold-inner .schedules-hero__lead {
  flex-shrink: 0;
}

.phone--fold-inner .schedules-hero {
  padding-bottom: 0.55rem;
}

.phone--fold-inner .schedules-shared.pref-card {
  display: block;
  flex-shrink: 0;
}

.phone--fold-inner .schedules-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 0.65rem;
  align-items: stretch;
}

.phone--fold-inner .schedules-pane.pref-card {
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.phone--fold-inner .schedules-pane--list .schedules-detail,
.phone--fold-inner .schedules-pane--block .schedules-block-preview {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
}

.phone--fold-inner .schedules-pane--block {
  display: flex;
}

.phone--fold-inner .schedules-block-preview__inner {
  min-height: 100%;
}

.phone--fold-inner .schedules-detail-inner--split {
  padding: 0;
}

.phone--fold-inner .schedules-detail-inner--split .sched-blocks--modern {
  border: none;
  background: rgba(0, 0, 0, 0.1);
}

.phone--fold-inner .sched-block {
  padding: 0.62rem 0.72rem;
}

.phone--fold-inner .sched-block__notes {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.68rem;
  line-height: 1.35;
}

.phone--fold-inner .sched-block-detail--pane {
  border-top: none;
  animation: none;
  opacity: 1;
  transform: none;
  min-height: 100%;
  padding: 0.15rem 0.05rem 0.35rem;
  background: transparent;
}

.phone--fold-inner .schedules-pane--block .pref-card__body {
  padding-top: 0.2rem;
}

.schedules-block-preview .sched-block-detail__heading {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

.schedules-block-preview .sched-block-detail__list li {
  font-size: 0.76rem;
  line-height: 1.4;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.schedules-block-preview .sched-block-detail__list li:last-child {
  border-bottom: none;
}


.phone[data-appearance="light"] .sched-blocks {
  background: #f4f5f8;
  border-color: var(--border-subtle);
}

.phone[data-appearance="light"] .sched-station-pill {
  background: #eef0f4;
  border-color: var(--border-subtle);
}

.phone[data-appearance="light"] .sched-block.is-live,
.phone[data-appearance="light"] .sched-block.is-selected {
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 10%, #fff);
}

.sched-block-detail__status {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sched-block-item.is-expanded .sched-block__name,
.sched-block-item.is-expanded .sched-block__host,
.sched-block-item.is-expanded .sched-block__notes,
.sched-block-item.is-expanded .sched-block__status {
  display: none;
}

.sched-block-item.is-expanded .sched-block__time {
  margin-bottom: 0;
  opacity: 0.72;
}

.sched-block-detail__intro {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-secondary, #ccc);
}

.sched-block-detail__status--live {
  color: #fff;
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 55%, #000);
}

.sched-block-detail__status--past {
  color: #aaa;
  background: rgba(255, 255, 255, 0.08);
}

.sched-block-detail__status--upcoming {
  color: color-mix(in srgb, var(--detail-color, var(--accent)) 70%, #fff);
  background: color-mix(in srgb, var(--detail-color, var(--accent)) 14%, transparent);
}

.sched-block-detail__title {
  margin: 0 0 0.12rem;
  font-family: "Syne", sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.sched-block-detail__meta {
  margin: 0;
  font-size: 0.74rem;
  color: #bbb;
}

.sched-block-detail__section {
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sched-block-detail__section:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.sched-block-detail__heading {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sched-block-detail__text {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.5;
  color: #ccc;
}

.sched-block-detail__planned-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sched-block-detail__planned-list li {
  position: relative;
  padding: 0.28rem 0 0.28rem 0.85rem;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #ccc;
}

.sched-block-detail__planned-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--sched-accent, #6eb5ff);
  opacity: 0.85;
}

.sched-block-detail__song-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: sched-song;
}

.sched-block-detail__song-list li {
  counter-increment: sched-song;
  padding: 0.4rem 0 0.4rem 1.6rem;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #e8e8e8;
}

.sched-block-detail__song-list li::before {
  content: counter(sched-song) ".";
  position: absolute;
  left: 0;
  top: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sched-accent, #6eb5ff);
  opacity: 0.9;
}

.sched-block-detail__song-list li:last-child {
  border-bottom: none;
}

.sched-block-detail__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sched-block-detail__list li {
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.76rem;
  line-height: 1.4;
  color: #ddd;
}

.sched-block-detail__list li:last-child {
  border-bottom: none;
}

.sched-block-detail__empty {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
  font-style: italic;
}

/* ═══ BOTTOM NAV ═══ */

.bottom-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0.28rem 0.55rem 0.48rem;
  background: rgba(18, 18, 18, 0.97);
  backdrop-filter: blur(14px);
  border-top: 1px solid color-mix(in srgb, var(--station-color) 18%, #2a2a2a);
  z-index: 100;
  transition:
    border-color 0.45s ease,
    transform 0.48s var(--ease-smooth),
    opacity 0.48s ease;
}

.bottom-nav.is-hidden {
  transform: translateY(110%);
  opacity: 0;
  pointer-events: none;
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.08rem;
  color: #666;
  font-size: 0.52rem;
  min-width: 0;
  padding: 0.08rem;
  justify-self: center;
  transition:
    color 0.3s ease,
    filter 0.3s ease,
    transform 0.2s ease;
}

.nav-btn:active {
  transform: scale(0.92);
}

.nav-btn[data-go="radio"] svg {
  width: 21px;
  height: 21px;
}

.nav-btn svg { width: 19px; height: 19px; }

.nav-btn.is-active {
  color: var(--accent-light);
  filter: drop-shadow(0 0 6px var(--accent-muted));
  transform: translateY(-1px) scale(1.02);
}

.nav-btn[data-go="radio"].is-active {
  transform: translateY(-1px) scale(1.03);
}

.nav-btn.is-active::after {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transition: background 0.35s ease;
}

.toast {
  position: absolute;
  bottom: calc(var(--nav-clearance) + 0.35rem);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  margin: 0;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.88);
  color: #fff;
  font-size: 0.78rem;
  line-height: 1.35;
  max-width: min(92%, 22rem);
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-quick) ease, transform var(--duration-quick) ease;
  z-index: 160;
  border: 1px solid var(--accent-muted);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
}

/* ═══ MOTION — staggered entrances ═══ */

.sched-blocks.is-entering .sched-block-item {
  animation: fade-up var(--duration-fade) var(--ease-out) backwards;
}

.sched-blocks.is-entering .sched-block-item:nth-child(1) { animation-delay: 0.04s; }
.sched-blocks.is-entering .sched-block-item:nth-child(2) { animation-delay: 0.09s; }
.sched-blocks.is-entering .sched-block-item:nth-child(3) { animation-delay: 0.14s; }
.sched-blocks.is-entering .sched-block-item:nth-child(4) { animation-delay: 0.19s; }
.sched-blocks.is-entering .sched-block-item:nth-child(5) { animation-delay: 0.24s; }
.sched-blocks.is-entering .sched-block-item:nth-child(6) { animation-delay: 0.29s; }

.stations-list.is-entering li {
  animation: fade-up var(--duration-fade) var(--ease-out) backwards;
}

.stations-list.is-entering li:nth-child(1) { animation-delay: 0.05s; }
.stations-list.is-entering li:nth-child(2) { animation-delay: 0.1s; }
.stations-list.is-entering li:nth-child(3) { animation-delay: 0.15s; }
.stations-list.is-entering li:nth-child(4) { animation-delay: 0.2s; }
.stations-list.is-entering li:nth-child(5) { animation-delay: 0.25s; }

.schedules-detail-inner.is-entering .schedules-detail-head,
.schedules-detail-inner.is-entering .schedules-day-tabs {
  animation: fade-up var(--duration-fade) var(--ease-out) backwards;
}

.schedules-detail-inner.is-entering .schedules-day-tabs {
  animation-delay: 0.08s;
}

.screen--stations.is-active .stations-header {
  animation: fade-up 0.52s var(--ease-out) backwards;
}

.stations-scroll.is-entering .stations-lead {
  animation: fade-up 0.55s var(--ease-out) 0.05s backwards;
}

.stations-scroll.is-entering .stations-subhead {
  animation: fade-up 0.55s var(--ease-out) 0.12s backwards;
}

.pills.is-entering .pill {
  animation: fade-up 0.48s var(--ease-out) backwards;
}

.pills.is-entering .pill:nth-child(1) { animation-delay: 0.04s; }
.pills.is-entering .pill:nth-child(2) { animation-delay: 0.08s; }
.pills.is-entering .pill:nth-child(3) { animation-delay: 0.12s; }
.pills.is-entering .pill:nth-child(4) { animation-delay: 0.16s; }
.pills.is-entering .pill:nth-child(5) { animation-delay: 0.2s; }

.screen--profile-settings.is-active .profile-settings-header,
.screen--profile-taste.is-active .profile-taste-header,
.screen--profile-theme.is-active .profile-theme-header {
  animation: fade-up 0.52s var(--ease-out) backwards;
}

.screen--profile-settings.is-active .settings-tabs {
  animation: fade-up 0.52s var(--ease-out) 0.06s backwards;
}

.gd-popover.is-opening .gd-popover__backdrop {
  opacity: 0;
}

.gd-popover.is-opening .gd-popover__panel {
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.gd-popover.is-open .gd-popover__backdrop {
  opacity: 1;
  transition: opacity var(--duration-quick) var(--ease-out);
}

.gd-popover.is-closing .gd-popover__backdrop {
  opacity: 0;
  transition: opacity 0.22s ease;
}

.gd-popover.is-closing .gd-popover__panel {
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  transition:
    opacity 0.22s ease,
    transform 0.22s var(--ease-out);
}

.gd-popover.is-open .gd-popover__panel {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--duration-quick) var(--ease-out),
    transform var(--duration-quick) var(--ease-out);
}

.bottom-nav .nav-btn {
  transition:
    color 0.3s ease,
    transform 0.22s var(--ease-out),
    filter 0.3s ease;
}

.bottom-nav .nav-btn.is-active {
  transform: translateY(-1px);
}

.home-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52vh;
  padding: 2rem 1rem 1rem;
  transition: opacity 0.45s var(--ease-out);
}

.screen--home.home--splash {
  --splash-intro: 2.6s;
  --splash-idle: 3s;
  --splash-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --splash-ease-soft: cubic-bezier(0.37, 0, 0.63, 1);
}

.home-splash-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.85rem;
}

.home-splash-logo-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(0);
}

.home-splash-logo-glow {
  position: absolute;
  width: 150%;
  height: 175%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse at center,
    color-mix(in srgb, var(--station-color, #e8364f) 52%, transparent),
    transparent 72%
  );
  opacity: 0;
  filter: blur(16px);
  pointer-events: none;
  will-change: opacity;
  animation:
    home-splash-glow-in var(--splash-intro) var(--splash-ease) forwards,
    home-splash-glow-breathe var(--splash-idle) var(--splash-ease-soft) var(--splash-intro) infinite;
}

.home-splash-logo {
  position: relative;
  z-index: 1;
  display: block;
  width: clamp(7.5rem, 48vw, 10.5rem);
  height: auto;
  object-fit: contain;
  opacity: 0;
  filter: brightness(0) invert(1)
    drop-shadow(0 0 24px color-mix(in srgb, var(--station-color, #e8364f) 48%, transparent));
  transform: scale(0.94) translateY(6px);
  backface-visibility: hidden;
  will-change: transform, opacity;
  animation:
    home-splash-logo-in var(--splash-intro) var(--splash-ease) forwards,
    home-splash-logo-breathe var(--splash-idle) var(--splash-ease-soft) var(--splash-intro) infinite;
}

.home-splash-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: clamp(1.28rem, 5vw, 1.78rem);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.home-splash-name-chirp {
  display: inline-block;
  letter-spacing: 0.18em;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(14px) scale(1.06);
  background: linear-gradient(
    118deg,
    #faf6ee 8%,
    color-mix(in srgb, var(--station-color, #e8364f) 22%, #faf6ee) 55%,
    #f0e8d8 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  will-change: transform, opacity, filter;
  animation: home-splash-chirp-in 1.15s var(--splash-ease) 0.52s forwards;
}

.home-splash-name-sep {
  display: block;
  width: 1px;
  height: 0.95em;
  align-self: center;
  opacity: 0;
  transform: scaleY(0.2);
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--station-color, #e8364f) 75%, #f2ebe0),
    transparent
  );
  box-shadow: 0 0 10px color-mix(in srgb, var(--station-color, #e8364f) 40%, transparent);
  animation: home-splash-sep-in 0.7s var(--splash-ease) 0.88s forwards;
}

.home-splash-name-fm {
  display: inline-block;
  letter-spacing: 0.22em;
  color: color-mix(in srgb, var(--station-color, #e8364f) 82%, #f6efe4);
  opacity: 0;
  filter: blur(8px);
  transform: translateX(-10px);
  text-shadow: 0 0 18px color-mix(in srgb, var(--station-color, #e8364f) 35%, transparent);
  will-change: transform, opacity, filter;
  animation:
    home-splash-fm-in 1s var(--splash-ease) 0.92s forwards,
    home-splash-fm-shimmer var(--splash-idle) ease-in-out calc(var(--splash-intro) + 0.2s) infinite;
}

@keyframes home-splash-logo-in {
  0% {
    opacity: 0;
    transform: scale(0.94) translateY(6px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes home-splash-logo-breathe {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.008) translateY(0);
  }
}

@keyframes home-splash-glow-in {
  0% {
    opacity: 0;
    transform: scale(0.88);
  }
  100% {
    opacity: 0.68;
    transform: scale(1);
  }
}

@keyframes home-splash-glow-breathe {
  0%,
  100% {
    opacity: 0.62;
  }
  50% {
    opacity: 0.82;
  }
}

@keyframes home-splash-chirp-in {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(14px) scale(1.06);
    letter-spacing: 0.22em;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(1);
    letter-spacing: 0.04em;
  }
}

@keyframes home-splash-sep-in {
  0% {
    opacity: 0;
    transform: scaleY(0.2);
  }
  100% {
    opacity: 0.85;
    transform: scaleY(1);
  }
}

@keyframes home-splash-fm-in {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateX(-10px);
    letter-spacing: 0.34em;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateX(0);
    letter-spacing: 0.14em;
  }
}

@keyframes home-splash-fm-shimmer {
  0%,
  100% {
    opacity: 1;
    text-shadow: 0 0 14px color-mix(in srgb, var(--station-color, #e8364f) 28%, transparent);
  }
  50% {
    opacity: 0.94;
    text-shadow:
      0 0 22px color-mix(in srgb, var(--station-color, #e8364f) 48%, transparent),
      0 0 36px color-mix(in srgb, var(--station-color, #e8364f) 18%, transparent);
  }
}

.home-splash-status {
  margin: 1.35rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  animation: home-splash-status-fade 0.85s var(--splash-ease) 1.85s backwards;
}

@keyframes home-splash-status-fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.screen--home.home--splash .home-inner {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.screen--home.home--splash .home-splash {
  opacity: 1;
}

.screen--home.home--revealed .home-splash {
  opacity: 0;
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
}

.screen--home.home--revealed .home-splash-logo,
.screen--home.home--revealed .home-splash-logo-glow,
.screen--home.home--revealed .home-splash-name-chirp,
.screen--home.home--revealed .home-splash-name-sep,
.screen--home.home--revealed .home-splash-name-fm {
  animation: none;
}

.screen--home.home--revealed .home-inner {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  position: relative;
  z-index: 1;
  animation: fade-up 0.55s var(--ease-out) backwards;
}

.screen--home.home--revealed .home-inner[hidden] {
  display: block;
}

.screen--home.home--bootstrap-error .home-splash-status {
  display: block;
  color: #f0a060;
}

.screen--home.is-active .home-logo {
  animation: fade-up 0.68s var(--ease-out) 0.14s backwards;
}

.screen--home.is-active .home-status {
  animation: fade-up 0.62s var(--ease-out) 0.22s backwards;
}

.screen--home.is-active .home-heading,
.screen--home.is-active .home-hint {
  animation: fade-up 0.62s var(--ease-out) 0.28s backwards;
}

.screen--home.is-active .home-last {
  animation: fade-up 0.62s var(--ease-out) 0.36s backwards;
}

.screen--home.is-active .home-cta {
  animation: fade-up 0.62s var(--ease-out) 0.44s backwards;
}

.screen--home.is-active .home-resume {
  animation: fade-up 0.58s var(--ease-out) 0.52s backwards;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ═══ PROFILE ═══ */

.screen--profile,
.screen--profile-taste,
.screen--profile-settings,
.screen--profile-theme {
  flex-direction: column;
  padding: 3.25rem 0 0;
  background: var(--bg);
}

.profile-scroll,
.profile-taste-scroll,
.profile-settings-scroll,
.profile-theme-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 1rem calc(var(--nav-clearance) + 1.25rem);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.profile-scroll::-webkit-scrollbar,
.profile-taste-scroll::-webkit-scrollbar,
.profile-settings-scroll::-webkit-scrollbar,
.profile-theme-scroll::-webkit-scrollbar {
  display: none;
}

.phone[data-appearance="light"] {
  --bg: #f2f3f6;
  --bg-elevated: #ffffff;
  --text: #121318;
  --muted: #5c6370;
  --hardware-off-white: #f0ead6;
  --hardware-ink: color-mix(in srgb, var(--hardware-off-white) 10%, #5a5548);
  --grille: var(--hardware-off-white);
  --dial-sheet: var(--hardware-off-white);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --input-bg: #eef0f4;
  --input-border: #c8ccd4;
  border-color: #c5cad3;
  box-shadow: 0 32px 72px rgba(15, 20, 30, 0.14);
}

.phone[data-appearance="light"] .profile-card,
.phone[data-appearance="light"] .settings-group,
.phone[data-appearance="light"] .theme-group,
.phone[data-appearance="light"] .pref-card {
  border-color: #d8dce4;
}

.phone[data-appearance="light"] .pref-segment {
  background: #e8eaef;
  border-color: #d0d4dc;
}

.phone[data-appearance="light"] .pref-segment__btn.is-active {
  background: #fff;
  color: #1a1a1f;
}

.phone[data-appearance="light"] .pref-switch__track {
  background: #c8ccd4;
}

.phone[data-appearance="light"] .profile-link-row,
.phone[data-appearance="light"] .settings-row,
.phone[data-appearance="light"] .pref-row__label {
  color: #2a2d35;
}

.phone[data-appearance="light"] .profile-taste-back,
.phone[data-appearance="light"] .profile-settings-back,
.phone[data-appearance="light"] .profile-theme-back,
.phone[data-appearance="light"] .profile-hero-btn {
  color: #121318;
}

.phone[data-appearance="light"] .screen--radio .radio-grille {
  filter: brightness(0.97);
}

.phone[data-appearance="light"] .radio-topbar {
  color: color-mix(in srgb, var(--station-color) 72%, #1a1a22);
  background: color-mix(in srgb, var(--hardware-off-white) 72%, rgba(255, 255, 255, 0.45));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.65),
    0 1px 0 rgba(0, 0, 0, 0.06);
}

.phone[data-appearance="light"] .radio-topbar-logo {
  filter: brightness(0) saturate(1.2);
  opacity: 1;
}

.phone[data-appearance="light"] .radio-topbar-btn:hover {
  background: color-mix(in srgb, var(--station-color) 12%, transparent);
}

.phone[data-appearance="light"] .bottom-nav {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top-color: color-mix(in srgb, var(--station-color) 22%, #d8dce4);
}

.phone[data-appearance="light"] .nav-btn {
  color: #8a919e;
}

.phone[data-appearance="light"] .nav-btn.is-active {
  color: var(--station-color);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--station-color) 28%, transparent));
}

.phone[data-appearance="light"] .toast {
  background: rgba(255, 255, 255, 0.96);
  color: #121318;
  border: 1px solid #d8dce4;
  box-shadow: 0 8px 24px rgba(15, 20, 30, 0.12);
}

.profile-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.9rem 0 1.15rem;
}

.profile-hero--compact {
  padding: 0.65rem 0 0.85rem;
  margin-bottom: 0.15rem;
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  margin-bottom: 0.45rem;
  border-radius: 50%;
  font-family: var(--font-brand);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--station-color, #e8364f) 88%, #fff),
    color-mix(in srgb, var(--station-color, #e8364f) 55%, #1a1a22)
  );
  box-shadow: 0 4px 16px color-mix(in srgb, var(--station-color, #e8364f) 35%, transparent);
}

.profile-hero--compact .profile-hero__name {
  font-size: 1.2rem;
}

.profile-hero--compact .profile-hero__sub {
  font-size: 0.72rem;
  color: var(--muted);
}

#profile-page-root .pref-page {
  padding-top: 0;
}

.pref-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  padding: 0.42rem 0;
  text-align: left;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.pref-nav-row + .pref-nav-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pref-nav-row:hover {
  opacity: 0.88;
}

.pref-nav-row:active {
  opacity: 0.72;
}

.pref-row__label--solo {
  display: block;
  margin: 0 0 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
}

.profile-listening--compact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.profile-listening--compact .profile-listening-row {
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.profile-listening--compact .profile-listening-row + .profile-listening-row {
  margin-top: 0;
  border-top: none;
}

.profile-listening--compact .profile-listening-icon {
  width: 1.65rem;
  height: 1.65rem;
  font-size: 0.58rem;
}

.profile-listening--compact .profile-listening-name {
  font-size: 0.72rem;
}

.profile-listening--compact .profile-listening-pct {
  font-size: 0.62rem;
}

.profile-listening--compact .profile-listening-pct strong {
  font-size: 0.72rem;
}

.profile-spotify--compact {
  gap: 0.45rem;
}

.profile-spotify--compact .btn-spotify {
  width: 100%;
  padding: 0.5rem 0.65rem;
  font-size: 0.72rem;
}

.profile-spotify--compact .profile-dev-text {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--muted);
}

.profile-dev-wrap .profile-dev__panel {
  padding: 0;
}

.profile-dev-wrap .profile-dev-section + .profile-dev-section {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-dev-wrap .profile-dev-heading {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-dev-wrap .profile-dev-text,
.profile-dev-wrap .profile-dev-meta {
  margin: 0 0 0.25rem;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--text);
}

.profile-dev-wrap .profile-gemini {
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  font-size: 0.68rem;
}

.profile-hero-btn {
  position: absolute;
  top: 0.15rem;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s var(--ease-smooth);
}

.profile-hero-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-settings-btn {
  left: 0;
}

.profile-theme-btn {
  right: 0;
}

.profile-hero-btn__icon {
  width: 24px;
  height: 24px;
}

.profile-theme-btn__icon {
  width: 24px;
  height: 24px;
}

.profile-hero__name {
  margin: 0;
  font-family: "Syne", sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
}

.profile-hero__sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.profile-block {
  margin-bottom: 1.15rem;
}

.profile-block__title {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-block__kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #888;
}

.profile-card {
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  padding: 0.95rem 1rem;
}

.profile-card--account {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.profile-account-email {
  margin: 0;
  font-size: 0.88rem;
  color: #ccc;
}

.profile-spotify {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.profile-spotify-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #bbb;
}

.profile-spotify-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  flex-shrink: 0;
}

.profile-spotify-dot.is-on {
  background: #1db954;
  box-shadow: 0 0 8px rgba(29, 185, 84, 0.55);
}

.btn-spotify {
  width: 100%;
  padding: 0.72rem 1rem;
  border-radius: 999px;
  background: #1db954;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
}

.btn-spotify:hover {
  filter: brightness(1.06);
}

.btn-spotify--outline {
  background: transparent;
  border: 1px solid #1db954;
  color: #1db954;
}

.profile-card--bars {
  padding: 0.85rem 0.95rem 1rem;
  background:
    radial-gradient(ellipse 120% 85% at 10% 0%, rgba(255, 255, 255, 0.06), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 38%),
    #0f1013;
  border-color: rgba(255, 255, 255, 0.12);
}

.profile-listening-row {
  --row-color: #666;
  position: relative;
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 14px;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--row-color) 100%, #16181d) 0%,
      #14161b 38%,
      #111318 100%
    );
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 10px 22px rgba(0, 0, 0, 0.35);
}

.profile-listening-row + .profile-listening-row {
  margin-top: 0.55rem;
}

.profile-listening-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-family: "Syne", sans-serif;
  font-weight: 800;
  font-size: 0.62rem;
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15) inset;
}

.profile-listening-main {
  min-width: 0;
}

.profile-listening-name {
  margin: 0 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.profile-listening-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.profile-listening-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f05423 0%, #e8364f 100%);
  transition: width 0.6s var(--ease-smooth);
}

.profile-listening-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}

.profile-listening-pct em {
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}

.profile-link-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  text-align: left;
  color: #fff;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-link-row:hover {
  border-color: #3a3a3a;
  background: #222;
}

.profile-link-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.profile-link-row__title {
  font-weight: 700;
  font-size: 0.92rem;
}

.profile-link-row__sub {
  font-size: 0.74rem;
  color: var(--muted);
}

.profile-link-row__chev {
  font-size: 1.35rem;
  color: var(--muted);
  line-height: 1;
}

.profile-block--dev {
  margin-bottom: 2rem;
}

.profile-dev {
  border-radius: 16px;
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  overflow: hidden;
}

.profile-dev__summary {
  padding: 0.95rem 1rem;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  list-style: none;
}

.profile-dev__summary::-webkit-details-marker {
  display: none;
}

.profile-dev[open] .profile-dev__summary {
  border-bottom: 1px solid #2a2a2a;
}

.profile-dev__panel {
  padding: 0.85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.profile-dev-section + .profile-dev-section {
  padding-top: 0.85rem;
  border-top: 1px solid #2a2a2a;
}

.profile-dev-heading {
  margin: 0 0 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-dev-text {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  color: #aaa;
  line-height: 1.45;
}

.profile-dev-meta {
  margin: 0;
  font-size: 0.7rem;
  font-family: ui-monospace, monospace;
  color: #777;
}

.profile-gemini {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #333;
}

.profile-gemini strong {
  display: block;
  font-size: 0.78rem;
  margin-bottom: 0.2rem;
}

.profile-gemini span {
  font-size: 0.72rem;
  color: var(--muted);
}

.profile-gemini--active {
  border-color: rgba(29, 185, 84, 0.35);
}

.profile-gemini--fallback {
  border-color: rgba(245, 166, 35, 0.35);
}

.profile-tune-verify {
  font-size: 0.75rem;
}

.profile-tune-verify summary {
  cursor: pointer;
  color: #8fd48f;
}

.profile-tune-verify-warn summary {
  color: #f5a623;
}

.profile-tune-verify dl {
  margin: 0.45rem 0 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  font-family: ui-monospace, monospace;
  font-size: 0.68rem;
  color: #888;
}

.profile-tune-verify dt {
  color: #666;
}

.profile-taste-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

.profile-settings-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

.profile-taste-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.profile-settings-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.profile-taste-back:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-settings-back:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-taste-back svg {
  width: 22px;
  height: 22px;
}

.profile-settings-back svg {
  width: 22px;
  height: 22px;
}

.profile-taste-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--station-color);
}

.profile-settings-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--station-color);
}

.settings-tabs {
  display: flex;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.22rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid #2a2a2a;
}

.settings-tab {
  flex: 1 1 0;
  min-height: 2.1rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.22s ease,
    color 0.22s ease,
    box-shadow 0.22s ease;
}

.settings-tab.is-active {
  color: #fff;
  background: color-mix(in srgb, var(--station-color) 28%, #252530);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.settings-panel {
  display: none;
}

.settings-panel.is-active {
  display: block;
}

.settings-panel[hidden] {
  display: none !important;
}

.settings-group__hint,
.settings-hint {
  margin: -0.35rem 0 0.65rem;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
}

.settings-hint {
  margin: 0.35rem 0 0;
}

/* ═══ Modern preference UI (settings + colors) ═══ */

.pref-page {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding-bottom: 0.5rem;
}

.pref-grid {
  display: grid;
  gap: 0.65rem;
}

.pref-grid--2 {
  grid-template-columns: 1fr 1fr;
}

.phone--fold-cover .schedules-pane--block {
  display: none !important;
}

.phone--fold-cover .schedules-shared.pref-card {
  display: block;
}

.phone--fold-cover .schedules-shared .pref-card__body {
  padding-top: 0.35rem;
  padding-bottom: 0.5rem;
}

.phone--fold-cover .schedules-layout {
  gap: 0.55rem;
}

.phone--fold-cover .schedules-pane--list .pref-card__body {
  padding: 0.55rem 0.7rem 0.65rem;
}

.phone--fold-cover .pref-grid--2 {
  grid-template-columns: 1fr;
}

.pref-tabs {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle, #2a2a2a);
}

.pref-tabs__btn {
  flex: 1;
  padding: 0.45rem 0.65rem;
  border-radius: 9px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted);
  transition: background 0.2s, color 0.2s;
}

.pref-tabs__btn.is-active {
  background: var(--input-bg);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.pref-card {
  border-radius: 14px;
  border: 1px solid var(--border-subtle, #2a2a2a);
  background: var(--bg-elevated);
  overflow: hidden;
}

.pref-card__head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.pref-card__head--summary {
  list-style: none;
  cursor: pointer;
}

.pref-card__head--summary::-webkit-details-marker {
  display: none;
}

.pref-card__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pref-card__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex: 1;
  margin: 0;
  font-family: var(--font-brand);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.pref-card__badge {
  flex-shrink: 0;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.08);
}

.pref-card__lead--tight {
  margin-top: 0;
  margin-bottom: 0.45rem;
}

.profile-listening-taste {
  margin-top: 0.45rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-listening-taste .pref-nav-row {
  padding: 0.35rem 0;
}

.pref-page--taste {
  padding-top: 0.15rem;
}

.pref-page__lead {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted);
}

.pref-list {
  list-style: none;
  margin: 0 0 0.45rem;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.pref-list__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
}

.pref-list__item + .pref-list__item {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pref-list__item--empty {
  justify-content: center;
  color: var(--muted);
  font-size: 0.72rem;
}

.pref-list__main {
  flex: 1;
  min-width: 0;
}

.pref-list__title {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
}

.pref-list__title--station {
  font-size: 0.78rem;
}

.pref-list__sub {
  margin: 0.08rem 0 0;
  font-size: 0.64rem;
  line-height: 1.3;
  color: var(--muted);
}

.pref-list__remove {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
}

.pref-list__remove:hover {
  background: rgba(232, 54, 79, 0.15);
  color: #ff8fa8;
}

.pref-add-btn {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 9px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: transparent;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  transition: background 0.15s, border-color 0.15s;
}

.pref-add-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
}

.pref-rec-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pref-rec-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.5rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pref-rec-row__dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rec-color, #e8364f);
}

.pref-rec-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
  flex-shrink: 0;
}

.pref-rec-row__weight {
  font-size: 0.62rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.pref-rec-row__edit {
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s;
}

.pref-rec-row__edit:hover {
  background: rgba(255, 255, 255, 0.14);
}

.pref-card--rose .pref-card__head,
.pref-card--rose .pref-card__icon { color: #ff8fa8; }

/* Taste — collapsible liked / disliked when list is long */
.pref-taste-dd > summary {
  list-style: none;
  cursor: pointer;
}

.pref-taste-dd > summary::-webkit-details-marker {
  display: none;
}

.pref-taste-dd__summary {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.pref-taste-dd__titles {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  text-align: left;
}

.pref-taste-dd__titles .pref-card__title {
  display: block;
  justify-content: flex-start;
}

.pref-taste-dd__titles .pref-card__sub {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pref-taste-dd__chev {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-right: 0.15rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.55;
  transition: transform 0.2s var(--ease-out, ease);
}

.pref-taste-dd[open] .pref-taste-dd__chev {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.pref-taste-dd > .pref-card__body {
  animation: fade-up 0.32s var(--ease-out);
}

.profile-dd[open] > .profile-dd__body {
  animation: fade-up 0.28s var(--ease-out);
}

.station-library-dropdown__close:focus-visible,
.schedule-library-btn:focus-visible,
.gd-popover__close:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 65%, transparent);
  outline-offset: 2px;
}

.pref-taste-dd__scroll--tall {
  max-height: min(12.5rem, 42vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-bottom: 0.45rem;
  padding-right: 0.15rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.pref-taste-dd__scroll--tall::-webkit-scrollbar {
  width: 4px;
}

.pref-taste-dd__scroll--tall::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.18);
}

.pref-card__sub {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--muted);
}

.pref-card__lead {
  margin: 0 0 0.5rem;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}

.pref-card__subtle {
  margin: -0.15rem 0 0.45rem;
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.3;
}

.pref-card__body {
  padding: 0.5rem 0.65rem 0.6rem;
}

.pref-card--orange .pref-card__head,
.pref-card--orange .pref-card__icon { color: #e8a04a; }

.pref-card--purple .pref-card__head,
.pref-card--purple .pref-card__icon { color: #b48cff; }

.pref-card--teal .pref-card__head,
.pref-card--teal .pref-card__icon { color: #5ec9b8; }

.pref-card--blue .pref-card__head,
.pref-card--blue .pref-card__icon { color: #6eb0ff; }

.pref-card--gold .pref-card__head,
.pref-card--gold .pref-card__icon { color: #d4b84a; }

.pref-card--violet .pref-card__head,
.pref-card--violet .pref-card__icon { color: #c49bff; }

.pref-card--slate .pref-card__head,
.pref-card--slate .pref-card__icon { color: #9aa3b0; }

.pref-card--rose .pref-card__head,
.pref-card--rose .pref-card__icon { color: #ff8fa8; }

/* Profile — section labels: plain UI type + tuned station accent */
#profile-page-root .pref-card__title,
.screen--profile-taste .pref-card__title,
.screen--profile-settings .pref-card__title,
.screen--profile-theme .pref-card__title,
#profile-page-root .pref-card__head--summary .pref-card__title {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--station-color);
}

#profile-page-root .pref-card__icon,
.screen--profile-taste .pref-card__icon,
.screen--profile-settings .pref-card__icon,
.screen--profile-theme .pref-card__icon,
#profile-page-root .pref-card__head--summary .pref-card__icon {
  color: var(--station-color);
}

#profile-page-root .pref-card[class*="pref-card--"] .pref-card__icon,
#profile-page-root .pref-card[class*="pref-card--"] .pref-card__title,
.screen--profile-taste .pref-card[class*="pref-card--"] .pref-card__icon,
.screen--profile-taste .pref-card[class*="pref-card--"] .pref-card__title,
.screen--profile-settings .pref-card[class*="pref-card--"] .pref-card__icon,
.screen--profile-settings .pref-card[class*="pref-card--"] .pref-card__title,
.screen--profile-theme .pref-card[class*="pref-card--"] .pref-card__icon,
.screen--profile-theme .pref-card[class*="pref-card--"] .pref-card__title {
  color: var(--station-color);
}

/* Schedules — section labels + chrome use selected station in picker */
.screen--schedules .pref-card__title,
.screen--schedules .pref-card__icon,
.screen--schedules .pref-card[class*="pref-card--"] .pref-card__title,
.screen--schedules .pref-card[class*="pref-card--"] .pref-card__icon {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--sched-accent, var(--station-color));
}

.phone[data-appearance="light"] #profile-page-root .pref-card__title {
  color: color-mix(in srgb, var(--station-color) 88%, #1a1a22);
}

.phone[data-appearance="light"] .screen--schedules .pref-card__title,
.phone[data-appearance="light"] .schedules-hero__title {
  color: color-mix(in srgb, var(--sched-accent, var(--station-color)) 88%, #1a1a22);
}

.phone[data-appearance="light"] .schedules-hero__glyph {
  background: color-mix(in srgb, var(--sched-accent, var(--station-color)) 12%, #fff);
  border-color: color-mix(in srgb, var(--sched-accent, var(--station-color)) 35%, #d8dce4);
}

.pref-card--details {
  border-style: dashed;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.38rem 0;
  min-height: 2.1rem;
}

.pref-row + .pref-row,
.pref-field + .pref-field,
.pref-field + .pref-row,
.pref-row + .pref-field {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pref-row__main {
  display: flex;
  flex-direction: column;
  gap: 0.06rem;
  min-width: 0;
  flex: 1;
}

.pref-row__label {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

.pref-row__sub {
  font-size: 0.62rem;
  color: var(--muted);
  line-height: 1.25;
}

.pref-row__caption {
  margin: 0.15rem 0 0.35rem;
  font-size: 0.6rem;
  color: var(--muted);
  line-height: 1.3;
}

.pref-row--stacked {
  flex-direction: column;
  align-items: stretch;
  gap: 0.38rem;
  padding: 0.55rem 0;
  min-height: 0;
}

.pref-row--stacked .pref-segment {
  width: 100%;
}

.pref-row--stacked + .pref-row--stacked {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.pref-page--taste .pref-segment__btn {
  font-size: 0.6rem;
  padding: 0.38rem 0.15rem;
  letter-spacing: 0.01em;
}

.pref-page--taste .pref-segment__btn.is-active {
  font-weight: 800;
}

.pref-onair-note {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.55rem;
  font-size: 0.62rem;
  line-height: 1.35;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pref-onair-note em {
  font-style: normal;
  color: var(--text);
  font-weight: 600;
}

.pref-segment__btn--custom.is-active {
  border-color: rgba(232, 160, 74, 0.45);
  background: rgba(232, 160, 74, 0.12);
}

.pref-row__control {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}

.pref-row__chev {
  font-size: 1rem;
  color: var(--muted);
  line-height: 1;
}

.pref-switch {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
}

.pref-switch__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pref-switch__track {
  position: relative;
  display: block;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #3a3a42;
  transition: background 0.2s ease;
  cursor: pointer;
}

.pref-switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s var(--ease-out, ease);
}

.pref-switch__input:checked + .pref-switch__track {
  background: color-mix(in srgb, var(--station-color, #e8364f) 75%, #3a3a42);
}

.pref-switch__input:checked + .pref-switch__track::after {
  transform: translateX(18px);
}

.pref-switch__input:disabled + .pref-switch__track {
  opacity: 0.45;
  cursor: not-allowed;
}

.pref-segment {
  display: flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.pref-segment__btn {
  flex: 1;
  min-width: 0;
  padding: 0.38rem 0.4rem;
  border-radius: 8px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.pref-segment__btn.is-active {
  background: #fff;
  color: #1a1a1f;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* Radio style presets — must follow base .pref-segment (flex) */
.pref-segment.pref-segment--radio-style {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem;
  width: 100%;
  box-sizing: border-box;
}

.pref-segment.pref-segment--radio-style .pref-segment__btn {
  flex: none;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
  text-align: center;
}

.pref-segment.pref-segment--radio-style .pref-preset__label {
  display: block;
  font-weight: 800;
}

.pref-segment.pref-segment--radio-style .pref-preset__desc {
  display: block;
  margin-top: 0.12rem;
  font-size: 0.52rem;
  font-weight: 600;
  opacity: 0.8;
}

.pref-segment.pref-segment--radio-style .pref-segment__btn--preset {
  min-height: 2.35rem;
  padding: 0.45rem 0.35rem;
  font-size: 0.58rem;
}

.pref-page--taste .pref-segment.pref-segment--radio-style .pref-segment__btn--preset {
  font-size: 0.58rem;
  padding: 0.45rem 0.3rem;
  letter-spacing: 0;
}

.pref-debug-json {
  margin: 0.1rem 0 0;
  padding: 0.45rem 0.5rem;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.56rem;
  line-height: 1.3;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 11.5rem;
  overflow: auto;
}

@media (max-width: 340px) {
  .pref-segment.pref-segment--radio-style {
    grid-template-columns: 1fr;
  }
}

.pref-field {
  padding: 0.35rem 0;
}

.pref-field--inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.45rem;
  margin-top: 0.35rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pref-field__label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.pref-field--inline .pref-field__label {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.72rem;
}

.pref-select {
  min-width: 0;
  max-width: 9.5rem;
  padding: 0.32rem 1.4rem 0.32rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 600;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
}

.pref-select--block {
  display: block;
  width: 100%;
  max-width: none;
  margin-top: 0.4rem;
}

.pref-details {
  margin-top: 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

.pref-details summary {
  padding: 0.45rem 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.pref-details summary::-webkit-details-marker {
  display: none;
}

.pref-details--dev {
  opacity: 0.85;
}

.pref-danger {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(232, 54, 79, 0.4);
  background: rgba(232, 54, 79, 0.1);
  color: #ffd1d8;
  font-size: 0.72rem;
  font-weight: 700;
}

.theme-adjust--compact .theme-adjust__btn {
  flex: 0;
  width: 2rem;
  padding: 0.35rem;
  font-size: 1rem;
  line-height: 1;
}

.theme-palette-grid--compact {
  margin-top: 0.45rem;
}

.theme-palette-card--compact {
  padding: 0.45rem 0.55rem;
  margin-bottom: 0.45rem;
}

.theme-custom-list--grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.5rem;
}

.phone--fold-cover .theme-custom-list--grid {
  grid-template-columns: 1fr;
}

.settings-group {
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  background: var(--bg-elevated);
}

.settings-group__title {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0;
  font-size: 0.82rem;
  color: #d7d7db;
}

.settings-row + .settings-row {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.settings-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent, #e8783a);
  flex-shrink: 0;
}

.settings-row--select {
  align-items: flex-start;
}

.settings-row--select select {
  min-width: 140px;
  padding: 0.32rem 0.45rem;
  border-radius: 8px;
  border: 1px solid #3a3a3d;
  background: #16171a;
  color: #f1f1f2;
  font-size: 0.76rem;
}

.settings-danger {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 54, 79, 0.45);
  background: rgba(232, 54, 79, 0.1);
  color: #ffd1d8;
  font-weight: 700;
  font-size: 0.78rem;
}

/* ═══ PROFILE — theme / colors ═══ */
.profile-theme-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem 0.75rem;
  border-bottom: 1px solid #2a2a2a;
}

.profile-theme-back {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
}

.profile-theme-back:hover {
  background: rgba(255, 255, 255, 0.08);
}

.profile-theme-back svg {
  width: 22px;
  height: 22px;
}

.profile-theme-title {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--station-color);
}

.theme-group {
  margin-bottom: 1rem;
  padding: 0.8rem 0.9rem;
  border-radius: 14px;
  border: 1px solid #2a2a2a;
  background: var(--bg-elevated);
}

.theme-group__title {
  margin: 0 0 0.55rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-group__hint {
  margin: -0.25rem 0 0.65rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.theme-segment {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.theme-segment__btn {
  flex: 1;
  min-width: 4.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.theme-segment__btn.is-active {
  border-color: color-mix(in srgb, var(--station-color) 55%, transparent);
  background: color-mix(in srgb, var(--station-color) 18%, var(--input-bg));
  color: var(--text);
}

.theme-adjust {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-adjust__btn {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-adjust__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.theme-adjust__btn:not(:disabled):hover {
  border-color: color-mix(in srgb, var(--station-color) 45%, transparent);
}

.theme-adjust__level {
  min-width: 2.5rem;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.theme-palette-grid {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.theme-scheduled-status {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.76rem;
  line-height: 1.4;
  color: var(--accent-light, #e8783a);
  background: color-mix(in srgb, var(--station-color, #e8364f) 12%, var(--bg-elevated));
  border: 1px solid color-mix(in srgb, var(--station-color, #e8364f) 22%, transparent);
}

.theme-scheduled-toggle {
  margin-bottom: 0.35rem;
}

.theme-select-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
  font-size: 0.82rem;
}

.theme-select-row span {
  font-weight: 600;
}

.theme-select-row select {
  width: 100%;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.78rem;
}

.theme-select-row--preview {
  margin-top: 0.5rem;
}

.theme-group__hint--dev {
  margin-top: 0.25rem;
  font-size: 0.68rem;
  opacity: 0.75;
}

.theme-scheduled-details {
  margin: 0.5rem 0 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle, #2a2a2a);
  background: rgba(0, 0, 0, 0.15);
}

.theme-scheduled-details summary {
  padding: 0.55rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.theme-scheduled-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0.5rem 0.55rem;
  max-height: 9rem;
  overflow-y: auto;
  scrollbar-width: none;
}

.theme-scheduled-list::-webkit-scrollbar {
  display: none;
}

.theme-scheduled-event {
  display: flex;
  gap: 0.45rem;
  padding: 0.4rem 0.35rem;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
}

.theme-scheduled-event.is-active {
  background: color-mix(in srgb, var(--station-color, #e8364f) 14%, transparent);
}

.theme-scheduled-event__type {
  flex-shrink: 0;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.theme-scheduled-event__main {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.theme-scheduled-event__main strong {
  font-weight: 600;
}

.theme-scheduled-event__main span {
  color: var(--muted);
  font-size: 0.66rem;
}

.theme-palette-card {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.theme-palette-card.is-active {
  border-color: color-mix(in srgb, var(--station-color) 60%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--station-color) 25%, transparent);
}

.theme-palette-card__swatches {
  display: flex;
  flex-shrink: 0;
}

.theme-palette-card__swatches span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  margin-left: -4px;
  border: 1.5px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.theme-palette-card__swatches span:first-child {
  margin-left: 0;
}

.theme-palette-card__main {
  flex: 1;
  min-width: 0;
}

.theme-palette-card__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
}

.theme-palette-card__desc {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.theme-custom-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.theme-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.4rem 0;
}

.theme-custom-row + .theme-custom-row {
  border-top: 1px solid var(--border-subtle);
}

.theme-custom-row__label {
  font-size: 0.8rem;
  font-weight: 600;
}

.theme-custom-row input[type="color"] {
  width: 42px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--input-border);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
}

.theme-custom-row input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.theme-custom-row input[type="color"]::-webkit-color-swatch {
  border-radius: 5px;
  border: none;
}

.profile-taste-section {
  margin-bottom: 1.35rem;
}

.profile-taste-section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.profile-taste-section__title {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.profile-taste-count {
  font-size: 0.72rem;
  color: #666;
}

.profile-taste-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
  overflow: hidden;
}

.profile-taste-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.85rem;
}

.profile-taste-item + .profile-taste-item {
  border-top: 1px solid #2a2a2a;
}

.profile-taste-item__main {
  flex: 1;
  min-width: 0;
}

.profile-taste-item__title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.profile-taste-item__artist {
  margin: 0.1rem 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.profile-taste-remove {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #888;
  font-size: 1.1rem;
  line-height: 1;
}

.profile-taste-remove:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #e8364f;
}

.profile-taste-add {
  margin-top: 0.6rem;
}

.profile-taste-add-btn {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: center;
}

.profile-taste-add-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-rec-card {
  padding: 0.85rem;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid #2a2a2a;
}

.profile-rec-card + .profile-rec-card {
  margin-top: 0.55rem;
}

.profile-rec-card--inline {
  margin-top: 0;
}

.profile-rec-card label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.profile-rec-card select,
.profile-rec-card textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #333;
  background: #151515;
  color: #fff;
  font-size: 0.78rem;
  margin-bottom: 0.55rem;
}

.profile-rec-card textarea {
  min-height: 56px;
  resize: vertical;
}

.profile-rec-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.profile-rec-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.1rem;
}

.profile-rec-row__main {
  flex: 1;
  min-width: 0;
}

.profile-rec-row__name {
  margin: 0 0 0.15rem;
  font-size: 0.84rem;
  font-weight: 600;
}

.profile-rec-row__note {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.profile-rec-row__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}

.profile-rec-row__weight {
  font-size: 0.78rem;
  font-weight: 600;
  color: #ccc;
}

.profile-rec-row__edit {
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.profile-rec-row__edit:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-rec-editor {
  margin-top: 0.7rem;
}

.profile-rec-weight {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.profile-rec-weight input[type="range"] {
  flex: 1;
}

.profile-rec-weight output {
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 2.5rem;
  text-align: right;
}

.profile-rec-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.45rem;
  gap: 0.45rem;
}

.profile-rec-remove {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(232, 54, 79, 0.12);
  color: rgba(255, 210, 210, 0.95);
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid rgba(232, 54, 79, 0.25);
}

.profile-rec-remove:hover {
  background: rgba(232, 54, 79, 0.18);
}

.profile-rec-save {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.74rem;
  font-weight: 600;
}

.profile-rec-save:hover {
  background: rgba(255, 255, 255, 0.12);
}

.profile-rec-actions--add {
  justify-content: space-between;
}

.profile-rec-cancel {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: transparent;
  color: #ccc;
  font-size: 0.74rem;
}

/* Popover (used for add-song + edit-rec) */
.gd-popover {
  position: absolute;
  inset: 0;
  z-index: 140;
  pointer-events: none;
}

.gd-popover__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: auto;
  opacity: 0;
}

.gd-popover__panel {
  position: absolute;
  width: min(330px, calc(100% - 24px));
  max-height: min(520px, calc(100% - 24px));
  overflow: auto;
  border-radius: 16px;
  background: rgba(18, 18, 18, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
}

.gd-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem 0.25rem;
}

.gd-popover__title {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.gd-popover__close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.25rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
}

.gd-popover__close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.gd-popover__close--solo {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
}

.gd-popover__body {
  padding: 0.65rem 0.85rem 0.85rem;
}

/* ═══ Profile dropdowns (Liked / Disliked / Station recs) ═══ */
.profile-dd {
  width: 100%;
}

.profile-dd summary {
  list-style: none;
}

.profile-dd summary::-webkit-details-marker {
  display: none;
}

.profile-dd__summary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0 0.25rem 0.25rem;
}

.profile-dd__body {
  padding-top: 0.2rem;
}

.phone[data-motion="reduced"] .screen,
.phone[data-motion="reduced"] .screen.is-leaving,
.phone[data-motion="reduced"] .toast,
.phone[data-motion="reduced"] .sched-block-detail,
.phone[data-motion="reduced"] .sched-block-detail-wrap,
.phone[data-motion="reduced"] .schedule-panel,
.phone[data-motion="reduced"] .schedule-panel__box,
.phone[data-motion="reduced"] .radio-face-main,
.phone[data-motion="reduced"] .station-hero__name.is-updating,
.phone[data-motion="reduced"] #now-title.is-updating,
.phone[data-motion="reduced"] .sched-blocks.is-entering .sched-block-item,
.phone[data-motion="reduced"] .stations-list.is-entering li,
.phone[data-motion="reduced"] .schedules-detail-inner.is-entering .schedules-detail-head,
.phone[data-motion="reduced"] .schedules-detail-inner.is-entering .schedules-day-tabs,
.phone[data-motion="reduced"] .screen--stations.is-active .stations-header,
.phone[data-motion="reduced"] .stations-scroll.is-entering .stations-lead,
.phone[data-motion="reduced"] .stations-scroll.is-entering .stations-subhead,
.phone[data-motion="reduced"] .pills.is-entering .pill,
.phone[data-motion="reduced"] .screen--profile-settings.is-active .profile-settings-header,
.phone[data-motion="reduced"] .screen--profile-taste.is-active .profile-taste-header,
.phone[data-motion="reduced"] .screen--profile-theme.is-active .profile-theme-header,
.phone[data-motion="reduced"] .screen--profile-settings.is-active .settings-tabs,
.phone[data-motion="reduced"] .gd-popover.is-open .gd-popover__backdrop,
.phone[data-motion="reduced"] .gd-popover.is-open .gd-popover__panel,
.phone[data-motion="reduced"] .gd-popover.is-closing .gd-popover__backdrop,
.phone[data-motion="reduced"] .gd-popover.is-closing .gd-popover__panel,
.phone[data-motion="reduced"] .station-library-dropdown.is-closing.is-overlay .station-library-dropdown__panel,
.phone[data-motion="reduced"] .station-library-dropdown.is-open.is-overlay .station-library-dropdown__panel,
.phone[data-motion="reduced"] .screen--home.is-active .home-logo,
.phone[data-motion="reduced"] .screen--home.is-active .home-status,
.phone[data-motion="reduced"] .screen--home.is-active .home-heading,
.phone[data-motion="reduced"] .screen--home.is-active .home-hint,
.phone[data-motion="reduced"] .screen--home.is-active .home-last,
.phone[data-motion="reduced"] .screen--home.is-active .home-cta,
.phone[data-motion="reduced"] .screen--home.is-active .home-resume,
.phone[data-motion="reduced"] .station-hero__wave span,
.phone[data-motion="reduced"] .radio-tune-btn--soft.is-tuning,
.phone[data-motion="reduced"] .radio-tune-btn--hard.is-tuning,
.phone[data-motion="reduced"] .radio-ctrl--tune.is-tuning,
.phone[data-motion="reduced"] .radio-ctrl--hard.is-tuning {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}

.phone[data-motion="reduced"] .screen,
.phone[data-motion="reduced"] .screen.is-leaving {
  transform: none !important;
}

.phone[data-motion="reduced"] .bottom-nav .nav-btn.is-active {
  transform: none;
}

.phone[data-motion="reduced"] .home-splash-logo,
.phone[data-motion="reduced"] .home-splash-logo-glow,
.phone[data-motion="reduced"] .home-splash-name-chirp,
.phone[data-motion="reduced"] .home-splash-name-sep,
.phone[data-motion="reduced"] .home-splash-name-fm {
  animation: none !important;
}

.phone[data-motion="reduced"] .home-splash-logo {
  opacity: 1;
  transform: none;
  filter: brightness(0) invert(1)
    drop-shadow(0 0 24px color-mix(in srgb, var(--station-color, #e8364f) 45%, transparent));
}

.phone[data-motion="reduced"] .home-splash-name-chirp {
  opacity: 1;
  filter: none;
  transform: none;
  letter-spacing: 0.04em;
  color: #f2ebe0;
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.phone[data-motion="reduced"] .home-splash-name-sep {
  opacity: 0.85;
  transform: none;
}

.phone[data-motion="reduced"] .home-splash-name-fm {
  opacity: 1;
  filter: none;
  transform: none;
  letter-spacing: 0.14em;
}

.phone[data-motion="reduced"] .home-splash-logo-glow {
  opacity: 0.6;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .phone:not([data-motion="full"]) .screen,
  .phone:not([data-motion="full"]) .screen.is-leaving {
    transform: none !important;
  }
}

@media (max-width: 1100px) {
  .fold-stage__toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 900px) {
  .fold-stage__devices {
    --fold-device-h: min(640px, calc(100vh - 12rem));
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-end;
    padding-inline: 0.25rem 1rem;
  }

  .widget-sizes {
    align-items: center;
  }

  .chirp-widget--4x2 {
    width: min(304px, 88vw);
    height: auto;
    min-height: 196px;
  }

  .chirp-widget--4x4 {
    width: min(304px, 88vw);
    height: auto;
    min-height: 340px;
  }

  .chirp-widget--2x2 {
    width: min(148px, 42vw);
    height: min(148px, 42vw);
    aspect-ratio: 1;
  }

  .phone--fold-cover,
  .phone--fold-inner {
    max-width: min(92vw, 520px);
  }
}

@media (max-width: 820px) {
  .demo-wrap {
    grid-template-columns: 1fr;
    padding: 1.25rem;
  }

  .demo-panel { position: static; }

  .fold-stage__devices {
    --fold-device-h: min(600px, calc(100vh - 14rem));
  }
}

/* Sports personalization — Favorite Teams layout */
.screen--favorite-teams {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.screen--favorite-teams .profile-taste-scroll.favorite-teams-layout {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}
.favorite-teams-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
}
.favorite-teams-page {
  max-width: 100%;
}
.favorite-teams-actions {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--bg, #0d0d12) 24%,
    var(--bg, #0d0d12) 100%
  );
  border-top: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  z-index: 2;
}
.favorite-teams-actions .pref-btn {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
  display: block;
}
@media (min-width: 720px) {
  .favorite-teams-actions {
    display: flex;
    justify-content: flex-end;
    padding-right: 1.5rem;
  }
  .favorite-teams-actions .pref-btn {
    width: auto;
    min-width: 12rem;
    margin: 0;
  }
}
.sports-team-count {
  font-size: 0.75rem;
  opacity: 0.65;
  margin: 0 0 0.5rem;
}
.sports-selected-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  max-height: 5.5rem;
  overflow-y: auto;
}
.sports-selected-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: rgba(196, 30, 58, 0.25);
  border: 1px solid var(--accent, #c41e3a);
}
.sports-selected-chip__remove {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.15rem;
  opacity: 0.85;
}
.sports-selected-empty {
  font-size: 0.75rem;
  opacity: 0.55;
  font-style: italic;
}
.sports-flock-hint {
  font-size: 0.8rem;
  opacity: 0.65;
  margin: 0 0 0.75rem;
  font-style: italic;
}
.sports-league-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.sports-league-tab {
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: transparent;
  color: inherit;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
}
.sports-league-tab.is-active {
  background: var(--accent, #c41e3a);
  border-color: transparent;
}
.sports-team-search {
  width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.15));
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}
.sports-team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  width: 100%;
}
.sports-team-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-align: left;
  padding: 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  cursor: pointer;
}
.sports-team-card__logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}
.sports-team-card__text {
  min-width: 0;
  flex: 1;
}
.sports-team-card.is-selected {
  border-color: var(--accent, #c41e3a);
  box-shadow: 0 0 0 1px var(--accent, #c41e3a);
}
.sports-team-card__name {
  display: block;
  font-weight: 600;
  font-size: 0.85rem;
}
.sports-team-card__meta {
  display: block;
  font-size: 0.7rem;
  opacity: 0.7;
  margin-top: 0.2rem;
}
.schedules-shared--special-day {
  outline: 2px solid var(--sched-accent, #c41e3a);
  outline-offset: 2px;
  border-radius: 12px;
}
.team-feed-gameday-banner {
  background: linear-gradient(90deg, rgba(196, 30, 58, 0.35), rgba(212, 175, 55, 0.25));
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.team-feed-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.team-feed-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.team-feed-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.team-feed-item h4 {
  margin: 0.25rem 0;
  font-size: 0.95rem;
}
.team-feed-item__tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  opacity: 0.65;
}
.team-feed-empty h3 {
  margin: 0 0 0.5rem;
}

/* Developer / Diagnostics full-page screen */
.screen--developer-diagnostics {
  flex-direction: column;
  padding: 3.25rem 0 0;
  background: var(--bg);
}
.developer-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  min-height: 3.25rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  border-bottom: 1px solid var(--border-subtle);
}
.developer-back {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
}
.developer-back svg {
  width: 1.2rem;
  height: 1.2rem;
}
.developer-title {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.15;
}
.developer-subtitle {
  margin: 0.1rem 0 0;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.3;
}
.developer-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  scrollbar-width: thin;
}
.developer-page,
.developer-card {
  display: flex;
  flex-direction: column;
}
.developer-page {
  gap: 0.75rem;
  padding-bottom: 1rem;
}
.developer-card {
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}
.developer-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.developer-card-head h3 {
  margin: 0 0 0.18rem;
  color: var(--station-color);
  font-size: 0.82rem;
}
.developer-card-head p,
.developer-muted,
.developer-rule {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.developer-status {
  flex: 0 0 auto;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  font-size: 0.52rem;
  font-weight: 800;
  text-transform: uppercase;
}
.developer-status--ok { color: #a6e3b5; border-color: rgba(90, 190, 120, 0.45); }
.developer-status--warning,
.developer-status--missing-config { color: #ffd28a; border-color: rgba(255, 190, 95, 0.45); }
.developer-status--error { color: #ffaaa5; border-color: rgba(255, 120, 120, 0.5); }
.developer-status--preview { color: var(--station-color); border-color: color-mix(in srgb, var(--station-color) 55%, transparent); }
.developer-actions,
.developer-result-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.developer-actions--top {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 0.25rem;
  background: var(--bg);
}
.developer-btn,
.developer-pill-btn {
  min-height: 2.25rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
  overflow-wrap: anywhere;
}
.developer-pill-btn {
  text-align: left;
}
.developer-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.5rem;
}
.developer-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
  color: var(--muted);
  font-size: 0.58rem;
}
.developer-form-grid input,
.developer-form-grid select {
  min-width: 0;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 9px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.68rem;
}
.developer-checks,
.developer-field-grid,
.developer-card-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
}
.developer-checks label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 0.66rem;
  overflow-wrap: anywhere;
}
.developer-field-grid {
  margin: 0;
}
.developer-field-grid div,
.developer-card-list li {
  min-width: 0;
  padding: 0.5rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.2);
}
.developer-field-grid dt {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.55rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.developer-field-grid dd {
  margin: 0;
  font-size: 0.66rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.developer-card-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.developer-card-list strong,
.developer-card-list span,
.developer-card-list small {
  display: block;
  overflow-wrap: anywhere;
}
.developer-card-list strong {
  color: var(--station-color);
  font-size: 0.58rem;
  text-transform: uppercase;
}
.developer-card-list span {
  margin-top: 0.18rem;
  font-size: 0.7rem;
}
.developer-card-list small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.6rem;
}
.developer-json,
.developer-raw pre {
  max-height: 13rem;
  overflow: auto;
  margin: 0;
  padding: 0.55rem;
  border-radius: 9px;
  background: rgba(0, 0, 0, 0.28);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.58rem;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.developer-raw {
  padding: 0.55rem;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
}
.developer-raw summary {
  cursor: pointer;
  color: var(--station-color);
  font-size: 0.68rem;
  font-weight: 800;
}
.developer-warning,
.developer-notice {
  margin: 0;
  padding: 0.55rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 190, 95, 0.35);
  background: rgba(255, 190, 95, 0.1);
  color: #ffd28a;
  font-size: 0.66rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.developer-notice--error {
  border-color: rgba(255, 120, 120, 0.45);
  color: #ffaaa5;
}
@media (max-width: 430px) {
  .developer-card-head,
  .developer-actions,
  .developer-result-grid {
    flex-direction: column;
  }
  .developer-btn,
  .developer-pill-btn {
    width: 100%;
  }
  .developer-form-grid {
    grid-template-columns: 1fr;
  }
}
