:root {
  color-scheme: dark;
  --bg: #07080d;
  --bg-2: #0c0e15;
  --surface: rgba(18, 21, 31, 0.88);
  --surface-2: rgba(25, 29, 42, 0.92);
  --surface-3: #171a25;
  --ink: #f8f9fc;
  --muted: #9ba3b6;
  --muted-2: #747d91;
  --line: rgba(255, 255, 255, 0.085);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #e64d3f;
  --accent-2: #ffb84d;
  --success: #4bd68a;
  --danger: #ff6262;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.36);
  --shadow-soft: 0 16px 42px rgba(0, 0, 0, 0.24);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --focus: rgba(255, 255, 255, 0.96);
  --station-accent: #e64d3f;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.light {
  color-scheme: light;
  --bg: #eef0f5;
  --bg-2: #f6f7fa;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-2: rgba(255, 255, 255, 0.96);
  --surface-3: #ffffff;
  --ink: #171a22;
  --muted: #626b7d;
  --muted-2: #80889a;
  --line: rgba(18, 24, 38, 0.09);
  --line-strong: rgba(18, 24, 38, 0.16);
  --shadow: 0 28px 80px rgba(25, 31, 44, 0.13);
  --shadow-soft: 0 16px 42px rgba(25, 31, 44, 0.1);
  --focus: #111827;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% -6%, color-mix(in srgb, var(--station-accent) 20%, transparent), transparent 34rem),
    radial-gradient(circle at 92% 16%, rgba(63, 89, 255, 0.10), transparent 30rem),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  color: var(--ink);
  transition: background 300ms ease, color 220ms ease;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
.station-card:focus-visible,
.recent-card:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.app-shell {
  width: min(1540px, calc(100% - 38px));
  margin: 0 auto;
  padding: 18px 0 30px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 10px 0;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 96%, transparent) 74%, transparent);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  width: 48px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 15px;
  background: linear-gradient(145deg, #ff6b4a, #d02f4f 48%, #5d35d5);
  color: white;
  box-shadow: 0 12px 30px rgba(215, 54, 76, .24);
  font-size: .92rem;
  font-weight: 950;
  letter-spacing: -.04em;
}
.brand-copy strong, .brand-copy small { display: block; }
.brand-copy strong { font-size: .98rem; letter-spacing: -.015em; }
.brand-copy small { margin-top: 2px; color: var(--muted); font-size: .73rem; }

.top-status {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.clock {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: .86rem;
  font-weight: 700;
}
.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 85%, transparent);
  color: var(--muted);
  font-size: .73rem;
  font-weight: 750;
}
.connection-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}
.connection-pill.offline i { background: var(--danger); box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 14%, transparent); }
.connection-pill.offline span { color: var(--danger); }

.top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-2) 78%, transparent);
  color: var(--muted);
  transition: transform 160ms ease, color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.icon-button:hover { transform: translateY(-2px); color: var(--ink); border-color: var(--line-strong); }
.icon-button.active { color: white; border-color: color-mix(in srgb, var(--station-accent) 54%, white 8%); background: color-mix(in srgb, var(--station-accent) 35%, var(--surface-3)); }

.main-grid {
  display: grid;
  grid-template-columns: minmax(390px, .86fr) minmax(580px, 1.62fr);
  gap: 22px;
  align-items: start;
}
.player-panel,
.browse-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.player-panel {
  position: sticky;
  top: 86px;
  min-height: calc(100vh - 118px);
  display: flex;
  flex-direction: column;
  padding: 30px;
  isolation: isolate;
}
.player-glow {
  position: absolute;
  z-index: -1;
  inset: -24% -32% auto;
  height: 62%;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--station-accent) 28%, transparent), transparent 58%);
  filter: blur(10px);
  transition: background 400ms ease;
}
.player-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.035), transparent 24%, rgba(0,0,0,.08));
}
.player-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  padding: 8px 11px;
  border: 1px solid color-mix(in srgb, var(--danger) 34%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--danger) 11%, transparent);
  color: #ff8a8a;
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .11em;
}
.live-badge i,
.ambient-live i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff5252;
  box-shadow: 0 0 0 4px rgba(255, 82, 82, .13);
}
.signal-state { color: var(--muted); font-size: .72rem; font-weight: 700; }

.artwork {
  position: relative;
  display: grid;
  width: min(78%, 360px);
  aspect-ratio: 1;
  margin: 26px auto 24px;
  place-items: center;
}
.artwork-halo {
  position: absolute;
  inset: 3%;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--station-accent) 23%, transparent), transparent 66%);
  filter: blur(12px);
  transform: scale(1.12);
}
.station-art {
  position: relative;
  display: grid;
  width: 68%;
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 30%;
  background:
    linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.02)),
    var(--station-accent);
  box-shadow: 0 34px 75px color-mix(in srgb, var(--station-accent) 24%, rgba(0,0,0,.55));
  color: white;
  font-size: clamp(2.8rem, 7vw, 5.7rem);
  font-weight: 950;
  letter-spacing: -.075em;
  text-shadow: 0 6px 22px rgba(0,0,0,.26);
}
.station-art img,
.station-logo img,
.recent-logo img,
.ambient-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.equalizer {
  position: absolute;
  bottom: 1%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 58%;
  height: 44px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 999px;
  background: rgba(7,8,13,.68);
  backdrop-filter: blur(12px);
}
.equalizer i,
.ambient-eq i {
  width: 4px;
  height: 25%;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  transform-origin: bottom;
}
.is-playing .equalizer i,
.ambient-screen.playing .ambient-eq i { animation: eq 760ms ease-in-out infinite alternate; }
.equalizer i:nth-child(2), .ambient-eq i:nth-child(2) { animation-delay: -310ms !important; }
.equalizer i:nth-child(3), .ambient-eq i:nth-child(3) { animation-delay: -120ms !important; }
.equalizer i:nth-child(4), .ambient-eq i:nth-child(4) { animation-delay: -520ms !important; }
.equalizer i:nth-child(5), .ambient-eq i:nth-child(5) { animation-delay: -230ms !important; }
.equalizer i:nth-child(6), .ambient-eq i:nth-child(6) { animation-delay: -430ms !important; }
.equalizer i:nth-child(7), .ambient-eq i:nth-child(7) { animation-delay: -170ms !important; }
.ambient-eq i:nth-child(8) { animation-delay: -610ms !important; }
@keyframes eq { from { height: 22%; } to { height: 100%; } }

.now-playing { text-align: center; }
.eyebrow {
  margin: 0 0 8px;
  color: color-mix(in srgb, var(--station-accent) 68%, var(--muted));
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .105em;
  text-transform: uppercase;
}
h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 3.35vw, 4.25rem);
  line-height: .98;
  letter-spacing: -.055em;
}
h2 { margin-bottom: 8px; font-size: clamp(1.55rem, 2.3vw, 2.45rem); letter-spacing: -.04em; }
h3 { margin-bottom: 0; }
.now-playing > p:last-child {
  max-width: 38rem;
  margin: 0 auto;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.transport {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  margin-top: auto;
  padding-top: 26px;
}
.play-button {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border: 0;
  border-radius: 22px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--station-accent) 82%, white 8%), var(--station-accent));
  color: white;
  box-shadow: 0 18px 38px color-mix(in srgb, var(--station-accent) 26%, transparent);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.play-button:hover { transform: translateY(-2px) scale(1.02); }
.play-button svg { width: 29px; height: 29px; fill: currentColor; stroke: none; }
.status-block { min-width: 0; }
.status-block span, .status-block small { display: block; }
.status-block span { font-size: .92rem; font-weight: 800; }
.status-block small { margin-top: 3px; color: var(--muted); font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.volume-control {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.volume-control > span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 700;
}
.volume-control output { color: var(--ink); }
input[type="range"] { width: 100%; accent-color: var(--station-accent); }

.player-actions { display: flex; gap: 9px; margin-top: 17px; }
.soft-action,
.secondary-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-decoration: none;
  font-size: .78rem;
  font-weight: 800;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}
.soft-action {
  flex: 1;
  background: rgba(255,255,255,.035);
  color: var(--muted);
}
.soft-action:hover:not(:disabled) { transform: translateY(-1px); color: var(--ink); border-color: var(--line-strong); }
.soft-action.active { color: #ffc853; border-color: rgba(255,200,83,.26); background: rgba(255,200,83,.07); }
.soft-action:disabled, .soft-action[aria-disabled="true"] { opacity: .42; pointer-events: none; }

.browse-panel { padding: 28px; min-height: calc(100vh - 118px); }
.browse-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.browse-hero > div:first-child > p:last-child { margin: 0; color: var(--muted); font-size: .86rem; }
.browse-actions { display: flex; align-items: center; gap: 10px; }
.secondary-action { background: rgba(255,255,255,.035); color: var(--ink); }
.secondary-action:hover { background: rgba(255,255,255,.07); border-color: var(--line-strong); }
.primary-action { border-color: transparent; background: var(--station-accent); color: white; }
.primary-action:hover { transform: translateY(-1px); }
.station-count {
  display: inline-flex;
  align-items: center;
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
  font-size: .76rem;
  font-weight: 750;
  white-space: nowrap;
}

.controls-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 12px; align-items: center; margin-bottom: 24px; }
.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 47px;
  padding: 0 12px 0 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.035);
}
.search-box svg { width: 19px; height: 19px; color: var(--muted); }
.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.search-box input::placeholder { color: var(--muted-2); }
.clear-search {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
.segmented {
  display: flex;
  gap: 5px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.025);
}
.segment {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: .73rem;
  font-weight: 800;
}
.segment:hover { color: var(--ink); }
.segment.active { background: var(--surface-3); color: var(--ink); box-shadow: 0 7px 18px rgba(0,0,0,.16); }

.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.section-heading h3 { font-size: 1rem; }
.recent-section { margin-bottom: 24px; }
.recent-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(154px, 190px);
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}
.recent-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255,255,255,.027);
  color: var(--ink);
  text-align: left;
}
.recent-logo {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--station-color);
  color: white;
  font-size: .72rem;
  font-weight: 950;
}
.recent-card strong, .recent-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-card strong { font-size: .73rem; }
.recent-card small { margin-top: 2px; color: var(--muted); font-size: .64rem; }

.station-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.station-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--station-color) 7%, transparent), transparent 46%),
    rgba(255,255,255,.025);
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease, box-shadow 170ms ease;
}
.station-card:hover { transform: translateY(-3px); border-color: var(--line-strong); background-color: rgba(255,255,255,.04); }
.station-card.active {
  border-color: color-mix(in srgb, var(--station-color) 48%, rgba(255,255,255,.2));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--station-color) 15%, transparent), transparent 52%),
    rgba(255,255,255,.045);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--station-color) 18%, transparent);
}
.station-card.active::before {
  content: "";
  position: absolute;
  top: 16px;
  right: 16px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--success) 12%, transparent);
}
.station-head { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; }
.station-logo {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 15px;
  background: var(--station-color);
  color: white;
  font-size: .82rem;
  font-weight: 950;
  letter-spacing: -.04em;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--station-color) 18%, transparent);
}
.station-title { min-width: 0; }
.station-title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; letter-spacing: -.02em; }
.station-location { margin: 3px 0 0; color: var(--muted); font-size: .68rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.favorite-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--muted-2);
}
.favorite-button:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.favorite-button.active { color: #ffc853; }
.favorite-button.active svg { fill: currentColor; }
.station-description { min-height: 2.6em; margin: 13px 0 12px; color: var(--muted); font-size: .72rem; line-height: 1.46; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.station-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 23px; }
.tag, .quality {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .6rem;
  font-weight: 850;
  text-transform: uppercase;
}
.tag.rock { color: #ff8e81; border-color: rgba(255,108,91,.15); background: rgba(255,108,91,.05); }
.tag.pop { color: #72ded2; border-color: rgba(76,207,194,.15); background: rgba(76,207,194,.05); }
.quality { margin-left: auto; text-transform: none; }
.station-actions { display: flex; gap: 8px; margin-top: 13px; }
.station-actions button,
.station-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  background: rgba(255,255,255,.035);
  color: var(--ink);
  font-size: .7rem;
  font-weight: 800;
}
.station-actions button { flex: 1; }
.station-actions a { width: 40px; }
.station-actions button:hover, .station-actions a:hover { border-color: var(--line-strong); background: rgba(255,255,255,.07); }
.station-actions svg { width: 17px; height: 17px; }
.empty-state { padding: 36px 10px; color: var(--muted); text-align: center; }

.footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 4px 0;
  color: var(--muted-2);
  font-size: .66rem;
}
.footer-bar strong { color: var(--muted); }
.tv-help { display: none; align-items: center; gap: 5px; }
kbd {
  min-width: 22px;
  padding: 3px 5px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: inset 0 -1px rgba(0,0,0,.18);
  font: inherit;
  text-align: center;
}

.mobile-player { display: none; }
.toast {
  position: fixed;
  z-index: 200;
  left: 50%;
  bottom: 24px;
  max-width: min(520px, calc(100% - 30px));
  padding: 11px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(14, 17, 24, .92);
  color: white;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: 180ms ease;
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(16px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.admin-dialog {
  width: min(760px, calc(100% - 26px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-3) 96%, transparent);
  color: var(--ink);
  box-shadow: 0 34px 100px rgba(0,0,0,.54);
}
.admin-dialog::backdrop { background: rgba(3,4,8,.68); backdrop-filter: blur(8px); }
.admin-dialog.fallback-open { display: block; position: fixed; inset: 50% auto auto 50%; transform: translate(-50%,-50%); z-index: 180; }
.manual-form { padding: 26px; }
.dialog-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.dialog-head p:last-child { max-width: 36rem; margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.dialog-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 1.4rem;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid label { display: grid; gap: 7px; }
.form-grid label > span { color: var(--muted); font-size: .7rem; font-weight: 800; }
.form-wide { grid-column: 1 / -1; }
.form-grid input, .form-grid select {
  width: 100%;
  min-height: 47px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: rgba(255,255,255,.035);
  color: var(--ink);
}
.form-grid option { background: var(--surface-3); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }

.ambient-screen {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--station-accent) 31%, transparent), transparent 33%),
    linear-gradient(145deg, #07080c, #0b0d14 55%, #05060a);
  color: white;
}
.ambient-screen::before {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 130deg, transparent, color-mix(in srgb, var(--station-accent) 10%, transparent), transparent 30%, rgba(255,255,255,.02), transparent 70%);
  animation: ambientDrift 24s linear infinite;
}
@keyframes ambientDrift { to { transform: rotate(360deg) scale(1.08); } }
.ambient-mode .ambient-screen { display: grid; place-items: center; }
.ambient-clock { position: absolute; top: 5vh; right: 5vw; color: rgba(255,255,255,.66); font-size: clamp(1.2rem, 2vw, 2rem); font-variant-numeric: tabular-nums; font-weight: 700; }
.ambient-center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: min(72vw, 900px); text-align: center; }
.ambient-art {
  display: grid;
  width: clamp(150px, 20vw, 310px);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 29%;
  background: var(--station-accent);
  box-shadow: 0 42px 100px color-mix(in srgb, var(--station-accent) 28%, rgba(0,0,0,.5));
  font-size: clamp(3rem, 8vw, 7.5rem);
  font-weight: 950;
  letter-spacing: -.08em;
}
.ambient-live { display: inline-flex; align-items: center; gap: 9px; margin: 28px 0 11px; color: #ff8c8c; font-size: .85rem; font-weight: 900; letter-spacing: .13em; }
.ambient-center h2 { margin: 0; font-size: clamp(2rem, 5vw, 5.2rem); letter-spacing: -.055em; }
.ambient-center > p:nth-of-type(2) { margin: 11px 0 0; color: rgba(255,255,255,.62); font-size: clamp(.95rem, 1.7vw, 1.55rem); }
.ambient-eq { display: flex; align-items: flex-end; gap: 7px; width: 210px; height: 46px; margin-top: 27px; }
.ambient-eq i { flex: 1; width: auto; background: rgba(255,255,255,.74); }
.ambient-hint { position: absolute; bottom: 4vh; left: 50%; transform: translateX(-50%); margin: 0; color: rgba(255,255,255,.38); font-size: .78rem; }

/* Tablet */
@media (max-width: 1120px) {
  .main-grid { grid-template-columns: 1fr; }
  .player-panel { position: relative; top: auto; min-height: auto; display: grid; grid-template-columns: minmax(250px, .72fr) 1fr; gap: 22px 34px; }
  .player-topline { grid-column: 1 / -1; }
  .artwork { grid-row: 2 / span 3; grid-column: 1; width: min(100%, 330px); margin: 10px auto; }
  .now-playing { align-self: end; text-align: left; }
  .now-playing > p:last-child { margin-left: 0; }
  .transport { align-self: start; margin-top: 0; }
  .player-actions { align-self: start; }
  .browse-panel { min-height: auto; }
}

/* Mobile */
@media (max-width: 720px) {
  .app-shell { width: min(100% - 22px, 620px); padding-top: 8px; padding-bottom: 104px; }
  .topbar { grid-template-columns: 1fr auto; min-height: 62px; }
  .top-status { display: none; }
  .brand-mark { width: 42px; border-radius: 13px; }
  .brand-copy small { display: none; }
  .top-actions { gap: 5px; }
  .icon-button { width: 39px; height: 39px; border-radius: 12px; }
  #fullscreenButton, #tvModeButton { display: none; }
  .player-panel, .browse-panel { border-radius: 23px; }
  .player-panel { display: flex; min-height: auto; padding: 20px; }
  .player-topline { order: 0; }
  .artwork { order: 1; width: min(67vw, 270px); margin: 20px auto 18px; }
  .now-playing { order: 2; text-align: center; }
  .transport { order: 3; margin-top: 6px; }
  .player-actions { order: 4; }
  h1 { font-size: clamp(1.75rem, 9vw, 2.65rem); }
  .station-art { border-radius: 28%; }
  .browse-panel { padding: 19px; }
  .browse-hero { display: block; }
  .browse-actions { margin-top: 16px; }
  .browse-actions .secondary-action { flex: 1; }
  .controls-row { grid-template-columns: 1fr; }
  .segmented { overflow-x: auto; }
  .segment { flex: 1 0 auto; }
  .station-grid { grid-template-columns: 1fr; }
  .station-description { min-height: auto; }
  .footer-bar { display: none; }
  .mobile-player:not([hidden]) {
    position: fixed;
    z-index: 120;
    left: 11px;
    right: 11px;
    bottom: max(11px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 11px;
    align-items: center;
    min-height: 68px;
    padding: 9px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 19px;
    background: rgba(13,15,22,.9);
    color: white;
    box-shadow: 0 20px 55px rgba(0,0,0,.44);
    backdrop-filter: blur(18px);
  }
  .mobile-station-logo { display: grid; width: 48px; height: 48px; place-items: center; overflow: hidden; border-radius: 14px; color: white; font-size: .74rem; font-weight: 950; }
  .mobile-player-copy { min-width: 0; }
  .mobile-player-copy strong, .mobile-player-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-player-copy strong { font-size: .8rem; }
  .mobile-player-copy small { margin-top: 3px; color: rgba(255,255,255,.6); font-size: .65rem; }
  .mobile-player button { display: grid; width: 45px; height: 45px; place-items: center; border: 0; border-radius: 14px; background: white; color: #111; }
  .mobile-player button svg { fill: currentColor; stroke: none; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wide { grid-column: auto; }
  .manual-form { padding: 20px; }
}

/* TV / 10-foot UI. Activated manually or automatically by JS. */
body.tv-mode {
  --radius-xl: 34px;
  overflow: hidden;
  background: #07080d;
}
body.tv-mode .app-shell {
  width: 100%;
  height: 100vh;
  padding: 2.25vh 2.5vw 1.7vh;
  overflow: hidden;
}
body.tv-mode .topbar {
  position: relative;
  grid-template-columns: 1fr auto 1fr;
  height: 8vh;
  min-height: 0;
  padding: 0;
  background: transparent;
  backdrop-filter: none;
}
body.tv-mode .brand-mark { width: clamp(54px, 3.8vw, 76px); border-radius: 20px; font-size: clamp(.95rem, 1vw, 1.25rem); }
body.tv-mode .brand-copy strong { font-size: clamp(1rem, 1.25vw, 1.55rem); }
body.tv-mode .brand-copy small { font-size: clamp(.68rem, .72vw, .92rem); }
body.tv-mode .clock { font-size: clamp(.85rem, 1vw, 1.2rem); }
body.tv-mode .connection-pill { padding: .65vh .7vw; font-size: clamp(.65rem, .72vw, .9rem); }
body.tv-mode .icon-button { width: clamp(48px, 3.2vw, 64px); height: clamp(48px, 3.2vw, 64px); border-radius: 17px; }
body.tv-mode .icon-button svg { width: clamp(20px, 1.5vw, 29px); height: clamp(20px, 1.5vw, 29px); }
body.tv-mode .main-grid {
  grid-template-columns: minmax(32vw, .78fr) minmax(0, 1.72fr);
  gap: 1.35vw;
  height: 84vh;
}
body.tv-mode .player-panel,
body.tv-mode .browse-panel { min-height: 0; height: 100%; border-radius: 1.8vw; }
body.tv-mode .player-panel { position: relative; top: auto; padding: 2.1vw; }
body.tv-mode .player-topline { font-size: 1vw; }
body.tv-mode .live-badge { padding: .65vh .75vw; font-size: clamp(.65rem, .65vw, .88rem); }
body.tv-mode .signal-state { font-size: clamp(.62rem, .65vw, .85rem); }
body.tv-mode .artwork { width: min(44vh, 78%); margin: 2.4vh auto 1.8vh; }
body.tv-mode .station-art { font-size: clamp(4rem, 6.6vw, 8.2rem); border-radius: 27%; }
body.tv-mode .equalizer { height: 4.5vh; min-height: 36px; }
body.tv-mode .now-playing h1 { font-size: clamp(2.2rem, 3.15vw, 4.25rem); }
body.tv-mode .now-playing > p:last-child { font-size: clamp(.85rem, .92vw, 1.18rem); }
body.tv-mode .eyebrow { font-size: clamp(.68rem, .7vw, .9rem); }
body.tv-mode .transport { gap: 1vw; padding-top: 2vh; }
body.tv-mode .play-button { width: clamp(68px, 4.5vw, 90px); height: clamp(68px, 4.5vw, 90px); border-radius: 1.25vw; }
body.tv-mode .status-block span { font-size: clamp(.85rem, .95vw, 1.2rem); }
body.tv-mode .status-block small { font-size: clamp(.65rem, .72vw, .9rem); }
body.tv-mode .volume-control > span { font-size: clamp(.64rem, .65vw, .82rem); }
body.tv-mode .soft-action { min-height: 5vh; border-radius: .8vw; font-size: clamp(.7rem, .72vw, .95rem); }
body.tv-mode .browse-panel { padding: 1.75vw; overflow: hidden auto; scrollbar-width: thin; scroll-behavior: smooth; }
body.tv-mode .browse-hero { margin-bottom: 1.6vh; }
body.tv-mode .browse-hero h2 { font-size: clamp(1.8rem, 2.25vw, 3rem); }
body.tv-mode .browse-hero > div:first-child > p:last-child { font-size: clamp(.75rem, .8vw, 1rem); }
body.tv-mode #manageButton { display: none; }
body.tv-mode .station-count { height: 4.2vh; min-height: 38px; font-size: clamp(.65rem, .67vw, .85rem); }
body.tv-mode .controls-row { grid-template-columns: minmax(250px, .82fr) 1.18fr; gap: .75vw; margin-bottom: 1.7vh; }
body.tv-mode .search-box { min-height: 5.2vh; border-radius: .85vw; padding-inline: 1vw; }
body.tv-mode .search-box input { font-size: clamp(.8rem, .88vw, 1.08rem); }
body.tv-mode .segmented { border-radius: .85vw; padding: .3vw; }
body.tv-mode .segment { min-height: 4.2vh; border-radius: .6vw; font-size: clamp(.7rem, .72vw, .92rem); }
body.tv-mode .recent-section { margin-bottom: 1.8vh; }
body.tv-mode .recent-rail { grid-auto-columns: minmax(10vw, 12.5vw); gap: .65vw; padding-bottom: .7vh; }
body.tv-mode .recent-card { min-height: 6.3vh; padding: .55vw; border-radius: .8vw; }
body.tv-mode .recent-logo { width: 2.8vw; min-width: 48px; height: 2.8vw; min-height: 48px; border-radius: .7vw; }
body.tv-mode .recent-card strong { font-size: clamp(.66rem, .72vw, .9rem); }
body.tv-mode .recent-card small { font-size: clamp(.57rem, .6vw, .76rem); }
body.tv-mode .station-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75vw; }
body.tv-mode .station-card { padding: .9vw; border-radius: 1vw; }
body.tv-mode .station-logo { width: clamp(48px, 3.35vw, 68px); height: clamp(48px, 3.35vw, 68px); border-radius: .85vw; font-size: clamp(.75rem, .78vw, 1rem); }
body.tv-mode .station-title h3 { font-size: clamp(.78rem, .88vw, 1.12rem); }
body.tv-mode .station-location { font-size: clamp(.62rem, .64vw, .8rem); }
body.tv-mode .favorite-button { width: 2.4vw; min-width: 40px; height: 2.4vw; min-height: 40px; }
body.tv-mode .station-description { margin: 1.2vh 0 1vh; min-height: 2.65em; font-size: clamp(.64rem, .66vw, .84rem); }
body.tv-mode .tag, body.tv-mode .quality { min-height: 2.25vh; padding: 0 .5vw; font-size: clamp(.53rem, .54vw, .68rem); }
body.tv-mode .station-actions { margin-top: 1vh; gap: .45vw; }
body.tv-mode .station-actions button, body.tv-mode .station-actions a { min-height: 4vh; border-radius: .65vw; font-size: clamp(.62rem, .65vw, .82rem); }
body.tv-mode .station-actions a { width: 2.75vw; min-width: 42px; }
body.tv-mode .footer-bar { height: 3vh; padding: .55vh .25vw 0; font-size: clamp(.57rem, .6vw, .78rem); }
body.tv-mode .tv-help { display: inline-flex; }
body.tv-mode .mobile-player { display: none !important; }
body.tv-mode button:focus-visible,
body.tv-mode a:focus-visible,
body.tv-mode input:focus-visible,
body.tv-mode select:focus-visible,
body.tv-mode .station-card:focus-visible,
body.tv-mode .recent-card:focus-visible {
  outline: clamp(4px, .32vw, 7px) solid white;
  outline-offset: clamp(3px, .28vw, 6px);
  box-shadow: 0 0 0 .5vw rgba(255,255,255,.10), 0 1.4vw 3vw rgba(0,0,0,.42);
  transform: scale(1.035);
  z-index: 8;
}
body.tv-mode .station-card:focus-visible { border-color: white; }

@media (min-width: 2300px) {
  body.tv-mode .station-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

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

/* Compatibilidad con navegadores de Smart TV que todavía no implementan color-mix(). */
@supports not (color: color-mix(in srgb, red, blue)) {
  body {
    background: radial-gradient(circle at 8% -6%, rgba(230,77,63,.15), transparent 34rem), #07080d;
  }
  body.light { background: #eef0f5; }
  .topbar { background: linear-gradient(to bottom, rgba(7,8,13,.97) 74%, transparent); }
  body.light .topbar { background: linear-gradient(to bottom, rgba(238,240,245,.97) 74%, transparent); }
  .player-panel, .browse-panel { background: var(--surface); }
  .player-glow { background: radial-gradient(circle at 50% 45%, rgba(230,77,63,.25), transparent 58%); }
  .station-art { background: linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.03)), var(--station-accent); box-shadow: 0 34px 75px rgba(0,0,0,.42); }
  .artwork-halo { background: radial-gradient(circle, rgba(230,77,63,.2), transparent 66%); }
  .play-button { background: var(--station-accent); box-shadow: 0 18px 38px rgba(0,0,0,.28); }
  .station-card { background: rgba(255,255,255,.028); }
  .station-card.active { background: rgba(255,255,255,.055); border-color: var(--line-strong); }
  .ambient-screen { background: radial-gradient(circle at 50% 42%, rgba(230,77,63,.25), transparent 33%), #07080d; }
  .ambient-art { box-shadow: 0 42px 100px rgba(0,0,0,.52); }
  .eyebrow { color: #e8877e; }
}

/* =========================================================
   ROCK•ON V2.4 — Mobile editorial experience
   Desktop/TV preserve the V2.x player. Mobile becomes a
   magazine + live radio experience rather than a directory.
   ========================================================= */
.mobile-experience,
.mobile-bottom-nav,
.mobile-now-playing-sheet { display: none; }

.rock-editor-dialog .rock-editor-shell { min-width: min(940px, 92vw); }
.editor-tabs {
  display: flex;
  gap: 8px;
  margin: 0 24px 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}
.editor-tabs button {
  flex: 1;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}
.editor-tabs button.active { background: var(--ink); color: var(--bg); }
.editor-panel { display: none; }
.editor-panel.active { display: block; }
.editor-unlock {
  margin: 0 24px 18px;
  padding: 16px;
  border: 1px solid rgba(230,77,63,.34);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(230,77,63,.12), rgba(255,184,77,.05));
}
.editor-unlock > div:first-child { display: grid; gap: 4px; }
.editor-unlock strong { font-size: .92rem; }
.editor-unlock span { color: var(--muted); font-size: .78rem; }
.editor-unlock-row { display: flex; gap: 10px; margin-top: 13px; }
.editor-unlock-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(0,0,0,.2);
  color: var(--ink);
}
.rock-editor-dialog:not(.unlocked) .editor-panel { opacity: .34; pointer-events: none; filter: saturate(.55); }
.rock-editor-dialog.unlocked .editor-panel { opacity: 1; pointer-events: auto; }
.manual-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 94px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  color: var(--ink);
  font: inherit;
}
.check-label { display: flex !important; align-items: center; gap: 10px; min-height: 44px; }
.check-label input { width: 20px; height: 20px; accent-color: var(--accent); }
.editorial-admin-list { padding: 0 24px 24px; }
.editorial-admin-list > h3 { margin: 8px 0 12px; font-size: .95rem; }
.editorial-admin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.editorial-admin-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
.editorial-admin-row span { color: var(--accent-2); font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.editorial-admin-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.editorial-admin-row small { color: var(--muted); font-size: .7rem; }
.editorial-admin-row > div:last-child { display: flex; gap: 7px; }
.danger-action {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255,98,98,.28);
  border-radius: 10px;
  background: rgba(255,98,98,.08);
  color: #ff8585;
  font-weight: 800;
}

@media (max-width: 720px) {
  :root { --mobile-nav-h: 72px; }
  body {
    background:
      radial-gradient(circle at 72% -8%, rgba(230,77,63,.22), transparent 28rem),
      radial-gradient(circle at -15% 28%, rgba(101,60,190,.15), transparent 24rem),
      #07080d;
  }
  body.light { background: #07080d; color: #fff; color-scheme: dark; }
  body::before { opacity: .09; background-size: 34px 34px; }
  .app-shell { width: 100%; padding: 0 0 170px; }
  .topbar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    grid-template-columns: 1fr auto;
    min-height: 62px;
    padding: 8px 17px;
    background: transparent;
    backdrop-filter: none;
    pointer-events: none;
  }
  .topbar .brand { pointer-events: auto; }
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: .72rem; box-shadow: 0 10px 28px rgba(230,77,63,.24); }
  .brand-copy strong { font-size: .82rem; letter-spacing: .02em; }
  .brand-copy small { display: none; }
  .top-status, .top-actions { display: none !important; }
  .main-grid, .footer-bar { display: none !important; }

  .mobile-experience {
    display: block;
    width: 100%;
    min-height: 100vh;
    padding: 74px 16px 30px;
    color: #fff;
  }
  .mobile-home-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin: 6px 2px 18px;
  }
  .mobile-overline,
  .mobile-section-head span,
  .mobile-panel-head span {
    display: block;
    margin-bottom: 5px;
    color: #ef685b;
    font-size: .61rem;
    font-weight: 950;
    letter-spacing: .18em;
  }
  .mobile-home-head h1 { margin: 0; font-size: clamp(1.85rem, 9vw, 2.55rem); line-height: .95; letter-spacing: -.055em; }
  .mobile-admin-button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(255,255,255,.055);
    color: rgba(255,255,255,.72);
    backdrop-filter: blur(15px);
  }
  .mobile-admin-button svg { width: 18px; height: 18px; }

  .rock-feature {
    position: relative;
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 30px;
    background:
      radial-gradient(circle at 72% 24%, rgba(255,104,82,.46), transparent 23%),
      radial-gradient(circle at 22% 18%, rgba(115,65,184,.34), transparent 30%),
      linear-gradient(145deg, #231014 0%, #11121a 55%, #08090f 100%);
    box-shadow: 0 30px 65px rgba(0,0,0,.38);
    isolation: isolate;
  }
  .rock-feature::after {
    content: "ROCK";
    position: absolute;
    top: 26px;
    right: -13px;
    z-index: 0;
    color: rgba(255,255,255,.035);
    font-size: 6.6rem;
    font-weight: 1000;
    letter-spacing: -.1em;
    transform: rotate(90deg) translateX(43%);
    transform-origin: right top;
    pointer-events: none;
  }
  .rock-feature-media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    opacity: .67;
    filter: saturate(.82) contrast(1.05);
    transform: scale(1.02);
  }
  .rock-feature-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(7,8,13,.06) 8%, rgba(7,8,13,.38) 46%, rgba(7,8,13,.97) 100%);
  }
  .rock-feature-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 26px 23px 24px;
  }
  .rock-feature-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 0 10px;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    background: rgba(0,0,0,.26);
    color: #ffb84d;
    font-size: .62rem;
    font-weight: 950;
    letter-spacing: .14em;
    backdrop-filter: blur(12px);
  }
  .rock-feature h2 {
    margin: 13px 0 10px;
    max-width: 92%;
    font-size: clamp(2rem, 10.5vw, 3.15rem);
    line-height: .93;
    letter-spacing: -.055em;
    text-wrap: balance;
  }
  .rock-feature p { margin: 0; max-width: 94%; color: rgba(255,255,255,.68); font-size: .82rem; line-height: 1.52; }
  .rock-feature-actions { display: flex; gap: 9px; margin-top: 18px; }
  .rock-feature-button,
  .rock-feature-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    padding: 0 15px;
    border: 0;
    border-radius: 13px;
    font-weight: 900;
    text-decoration: none;
    font-size: .74rem;
  }
  .rock-feature-button { background: #fff; color: #090a0f; box-shadow: 0 12px 30px rgba(0,0,0,.26); }
  .rock-feature-link { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; backdrop-filter: blur(12px); }

  .mobile-section { margin-top: 29px; }
  .mobile-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin: 0 2px 13px; }
  .mobile-section-head h2,
  .mobile-panel-head h2 { margin: 0; font-size: 1.38rem; letter-spacing: -.035em; }
  .text-button { border: 0; background: transparent; color: rgba(255,255,255,.58); font-size: .72rem; font-weight: 800; }

  .editorial-rail,
  .mobile-station-rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(235px, 76vw);
    gap: 12px;
    margin: 0 -16px;
    padding: 0 16px 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .editorial-rail::-webkit-scrollbar,
  .mobile-station-rail::-webkit-scrollbar { display: none; }

  .editorial-card {
    position: relative;
    min-height: 230px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 23px;
    background: linear-gradient(145deg, #2a1818, #10121a 65%, #08090f);
    scroll-snap-align: start;
    box-shadow: 0 18px 42px rgba(0,0,0,.23);
    cursor: pointer;
  }
  .editorial-card-image { position: absolute; inset: 0; background-image: var(--story-image); background-position: center; background-size: cover; opacity: .74; }
  .editorial-card-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 12%, rgba(8,9,15,.2) 40%, rgba(8,9,15,.96) 100%); }
  .editorial-card-copy { position: absolute; left: 17px; right: 17px; bottom: 17px; z-index: 1; }
  .editorial-card-copy > span { color: #ffb84d; font-size: .58rem; font-weight: 950; letter-spacing: .14em; }
  .editorial-card h3 { margin: 7px 0 5px; font-size: 1.23rem; line-height: 1.02; letter-spacing: -.035em; }
  .editorial-card small { color: rgba(255,255,255,.55); font-size: .66rem; }
  .editorial-card p { margin: 9px 0 0; color: rgba(255,255,255,.68); font-size: .76rem; line-height: 1.45; }
  .editorial-card-full { min-height: 330px; margin-bottom: 14px; }
  .editorial-feed { margin-top: 18px; }
  .editorial-empty { display: grid; gap: 5px; min-width: 260px; padding: 20px; border: 1px dashed rgba(255,255,255,.13); border-radius: 19px; background: rgba(255,255,255,.025); }
  .editorial-empty strong { font-size: .86rem; }
  .editorial-empty span { color: rgba(255,255,255,.48); font-size: .72rem; line-height: 1.45; }

  .mobile-rock-station {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 82px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--station-color) 19%, #11131a), #0d0f16 70%);
  }
  .mobile-rock-station.compact { min-height: 132px; align-items: stretch; scroll-snap-align: start; }
  .mobile-rock-main { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; width: 100%; min-width: 0; padding: 12px; border: 0; background: transparent; color: #fff; text-align: left; }
  .compact .mobile-rock-main { grid-template-columns: auto minmax(0,1fr); align-content: end; padding: 15px; background: radial-gradient(circle at 85% 5%, color-mix(in srgb, var(--station-color) 44%, transparent), transparent 52%); }
  .mobile-rock-logo { display: grid; width: 56px; height: 56px; place-items: center; overflow: hidden; border-radius: 16px; background: var(--station-color); color: white; box-shadow: 0 12px 28px rgba(0,0,0,.28); font-size: .75rem; font-weight: 950; }
  .compact .mobile-rock-logo { width: 68px; height: 68px; border-radius: 19px; }
  .mobile-rock-logo img { width: 100%; height: 100%; object-fit: cover; }
  .mobile-rock-copy { display: grid; min-width: 0; gap: 4px; }
  .mobile-rock-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
  .mobile-rock-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(255,255,255,.52); font-size: .67rem; }
  .mobile-rock-main i { color: rgba(255,255,255,.45); font-size: .55rem; font-style: normal; font-weight: 950; letter-spacing: .08em; }
  .compact .mobile-rock-main i { position: absolute; right: 15px; top: 15px; padding: 5px 7px; border-radius: 999px; background: rgba(0,0,0,.25); color: rgba(255,255,255,.68); backdrop-filter: blur(10px); }
  .mobile-rock-fav { width: 48px; align-self: stretch; border: 0; border-left: 1px solid rgba(255,255,255,.06); background: transparent; color: rgba(255,255,255,.42); font-size: 1.15rem; }
  .mobile-rock-fav.active { color: #ffb84d; }
  .mobile-station-list { display: grid; gap: 9px; margin-top: 16px; }

  .mood-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .mood-card { position: relative; min-height: 112px; overflow: hidden; padding: 15px; border: 1px solid rgba(255,255,255,.08); border-radius: 20px; background: #141721; color: #fff; text-align: left; }
  .mood-card::after { content: "♫"; position: absolute; right: 9px; bottom: -19px; color: rgba(255,255,255,.055); font-size: 5.6rem; font-weight: 1000; transform: rotate(-12deg); }
  .mood-card:nth-child(1) { background: linear-gradient(145deg, #462018, #17131a); }
  .mood-card:nth-child(2) { background: linear-gradient(145deg, #1a244c, #10141d); }
  .mood-card:nth-child(3) { background: linear-gradient(145deg, #342035, #120f17); }
  .mood-card:nth-child(4) { background: linear-gradient(145deg, #54243d, #171019); }
  .mood-card b, .mood-card small { position: relative; z-index: 1; display: block; }
  .mood-card b { font-size: .96rem; }
  .mood-card small { margin-top: 5px; color: rgba(255,255,255,.5); font-size: .66rem; }

  .mobile-view-panel { min-height: calc(100vh - 170px); }
  .mobile-panel-head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; margin: 7px 0 20px; }
  .mobile-back { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: rgba(255,255,255,.045); color: #fff; font-size: 1.05rem; }
  .mobile-search { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; min-height: 52px; padding: 0 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 16px; background: rgba(255,255,255,.045); }
  .mobile-search svg { width: 19px; height: 19px; color: rgba(255,255,255,.42); }
  .mobile-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #fff; font: inherit; font-size: .82rem; }
  .my-rock-block + .my-rock-block { margin-top: 30px; }
  .my-rock-block h3 { margin: 0 0 10px; font-size: .92rem; }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 118;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(4,1fr);
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    padding: 8px 9px max(8px, env(safe-area-inset-bottom));
    border-top: 1px solid rgba(255,255,255,.075);
    background: rgba(8,9,14,.91);
    backdrop-filter: blur(22px) saturate(1.25);
  }
  .mobile-bottom-nav button { display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 14px; background: transparent; color: rgba(255,255,255,.4); }
  .mobile-bottom-nav svg { width: 21px; height: 21px; }
  .mobile-bottom-nav span { font-size: .56rem; font-weight: 800; }
  .mobile-bottom-nav button.active { color: #fff; background: rgba(255,255,255,.055); }
  .mobile-bottom-nav button.active svg { color: #ef685b; }

  .mobile-player:not([hidden]) {
    left: 10px;
    right: 10px;
    bottom: calc(var(--mobile-nav-h) + max(8px, env(safe-area-inset-bottom)));
    z-index: 119;
    min-height: 64px;
    border-radius: 18px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--station-accent) 24%, #10121a), rgba(11,13,20,.95));
    box-shadow: 0 18px 50px rgba(0,0,0,.43);
  }

  .mobile-now-playing-sheet { position: fixed; inset: 0; z-index: 250; pointer-events: none; opacity: 0; transition: opacity .28s ease; }
  .mobile-now-playing-sheet.open { display: block; pointer-events: auto; opacity: 1; }
  .sheet-backdrop { position: absolute; inset: 0; width: 100%; border: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(9px); }
  .sheet-card {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 82vh;
    padding: 13px 24px calc(30px + env(safe-area-inset-bottom));
    border: 1px solid rgba(255,255,255,.1);
    border-bottom: 0;
    border-radius: 34px 34px 0 0;
    background:
      radial-gradient(circle at 50% 27%, color-mix(in srgb, var(--sheet-accent, #e64d3f) 36%, transparent), transparent 29%),
      linear-gradient(180deg, #151720, #090a0f 67%);
    transform: translateY(104%);
    transition: transform .36s cubic-bezier(.2,.75,.2,1);
    box-shadow: 0 -30px 80px rgba(0,0,0,.5);
    text-align: center;
  }
  .mobile-now-playing-sheet.open .sheet-card { transform: translateY(0); }
  .sheet-handle { width: 42px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: rgba(255,255,255,.18); }
  .sheet-close { position: absolute; top: 20px; right: 20px; display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; background: rgba(255,255,255,.05); color: #fff; font-size: 1.2rem; }
  .sheet-live { display: inline-block; margin: 15px auto 20px; color: #ff6b60; font-size: .61rem; font-weight: 950; letter-spacing: .14em; }
  .sheet-art { display: grid; width: min(68vw, 270px); aspect-ratio: 1; place-items: center; margin: 0 auto 24px; overflow: hidden; border: 1px solid rgba(255,255,255,.16); border-radius: 29%; color: white; font-size: 4.6rem; font-weight: 1000; box-shadow: 0 35px 70px rgba(0,0,0,.46); }
  .sheet-art img { width: 100%; height: 100%; object-fit: cover; }
  .sheet-eyebrow { margin: 0 0 7px; color: rgba(255,255,255,.43); font-size: .62rem; font-weight: 900; letter-spacing: .13em; }
  .sheet-card h2 { margin: 0; font-size: 1.75rem; letter-spacing: -.045em; }
  .sheet-card > p:not(.sheet-eyebrow) { margin: 7px auto 0; max-width: 310px; color: rgba(255,255,255,.52); font-size: .72rem; line-height: 1.4; }
  .sheet-play { display: grid; width: 72px; height: 72px; place-items: center; margin: 24px auto 19px; border: 0; border-radius: 24px; background: #fff; color: #090a0f; box-shadow: 0 20px 40px rgba(0,0,0,.3); }
  .sheet-play svg { width: 28px; height: 28px; fill: currentColor; stroke: none; }
  .sheet-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; max-width: 290px; margin: 0 auto; }
  .sheet-actions button, .sheet-actions a { display: grid; grid-template-columns: auto 1fr; gap: 8px; align-items: center; justify-content: center; min-height: 49px; padding: 0 14px; border: 1px solid rgba(255,255,255,.09); border-radius: 15px; background: rgba(255,255,255,.045); color: rgba(255,255,255,.72); text-decoration: none; font-size: .75rem; font-weight: 800; }
  .sheet-actions button.active { color: #ffb84d; }
  body.mobile-sheet-open { overflow: hidden; }

  .rock-editor-dialog { width: calc(100vw - 18px); max-width: none; max-height: 92vh; margin: auto; border-radius: 25px; }
  .rock-editor-dialog .rock-editor-shell { min-width: 0; }
  .rock-editor-dialog .dialog-head { padding: 20px 18px 13px; }
  .rock-editor-dialog .dialog-head h2 { font-size: 1.25rem; }
  .rock-editor-dialog .dialog-head p:last-child { font-size: .7rem; }
  .editor-tabs, .editor-unlock { margin-left: 15px; margin-right: 15px; }
  .editor-unlock-row { display: grid; grid-template-columns: 1fr auto; }
  .manual-form { padding: 15px; }
  .editorial-admin-list { padding: 0 15px 20px; }
  .editorial-admin-row { grid-template-columns: 1fr; }
  .editorial-admin-row > div:last-child { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .mood-card:nth-child(5) { background: linear-gradient(145deg, #4a321a, #17120e); }
  .mood-card:nth-child(6) { background: linear-gradient(145deg, #183d42, #0e1518); }
  .mobile-rock-station { background-color: #11131a; }
}
