/* Zona Radio PWA — Modern High-End Audio Interface */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Space+Grotesk:wght@600;700&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: #07090e;
  --panel: #0f131c;
  --panel2: #161c28;
  --panel-glass: rgba(15, 19, 28, 0.78);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --tx: #f3f6fc;
  --tx-sub: #c5cedd;
  --mut: #7d899d;
  --acc: #10b981;
  --ad-txt: #d1fae5;
  --acc-glow: rgba(16, 185, 129, 0.28);
  --acc-soft: rgba(16, 185, 129, 0.12);
  --acc-contrast: #ffffff;
  --danger: #f43f5e;
  --logo-text: #ffffff;
  --logo-sub: #10b981;
  --logo-icon-bg: linear-gradient(135deg, #10b981 0%, #047857 100%);
  --logo-icon-glow: 0 4px 14px rgba(16, 185, 129, 0.35);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  --sheet-shadow: 0 -8px 32px rgba(0, 0, 0, 0.55);
}

html[data-theme="light"] {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --panel2: #edf2f7;
  --panel-glass: rgba(255, 255, 255, 0.85);
  --line: rgba(15, 23, 42, 0.08);
  --line-strong: rgba(15, 23, 42, 0.14);
  --tx: #0b1324;
  --tx-sub: #334155;
  --mut: #64748b;
  --acc: #059669;
  --ad-txt: #063d2e;
  --acc-glow: rgba(5, 150, 105, 0.22);
  --acc-soft: rgba(5, 150, 105, 0.10);
  --acc-contrast: #ffffff;
  --danger: #e11d48;
  --logo-text: #0b1324;
  --logo-sub: #059669;
  --logo-icon-bg: linear-gradient(135deg, #10b981 0%, #047857 100%);
  --logo-icon-glow: 0 4px 12px rgba(5, 150, 105, 0.28);
  --card-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --sheet-shadow: 0 -8px 28px rgba(15, 23, 42, 0.10);
}

html, body {
  height: 100%; overflow: hidden; overscroll-behavior: none;
  background: var(--bg); color: var(--tx);
  font: 14.5px/1.45 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
}

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
button:active { transform: scale(.96); }
svg { display: block; }

#app {
  display: flex; flex-direction: column;
  height: 100dvh; max-width: 540px; margin: 0 auto;
  position: relative;
}

/* ── HEADER & PREMIUM LOGO ── */
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(env(safe-area-inset-top, 0px) + 12px) 18px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  z-index: 10;
}
header h1 { margin: 0; font-size: 0; }
#logo {
  display: inline-flex; align-items: center; gap: 10px;
  color: inherit; text-decoration: none !important;
}
.logo-icon {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--logo-icon-bg);
  box-shadow: var(--logo-icon-glow);
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 34px;
}
.logo-icon svg { width: 20px; height: 20px; color: #ffffff; }
.logo-text {
  font-family: 'Space Grotesk', 'Plus Jakarta Sans', sans-serif;
  font-size: 17px; font-weight: 700; letter-spacing: -0.02em;
  color: var(--logo-text);
  display: flex; align-items: baseline; gap: 4px;
}
.logo-text b {
  color: var(--logo-sub);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.hdr-right { display: flex; align-items: center; gap: 8px; }
.hdr-btn {
  width: 36px; height: 36px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--tx); flex: 0 0 auto;
  transition: all .15s ease;
}
.hdr-btn:active { background: var(--panel2); }
.hdr-btn svg { width: 18px; height: 18px; }
#lang-btn {
  width: auto; min-width: 36px; padding: 0 10px;
  border-radius: 18px; font-size: 11px; font-weight: 800; letter-spacing: .5px;
  color: var(--acc); background: var(--acc-soft);
  border-color: var(--acc-glow);
}
#burger.on { background: var(--panel2); border-color: var(--acc); color: var(--acc); }

/* ── BURGER MENU ── */
#menu-veil { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.45); backdrop-filter: blur(4px); }
#menu {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 58px); right: 14px;
  z-index: 41; min-width: 240px; padding: 8px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 18px;
  box-shadow: 0 20px 48px rgba(0,0,0,.5);
  animation: menuIn .16s ease-out;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.menu-link {
  display: block; padding: 11px 14px; border-radius: 12px;
  color: var(--tx); text-decoration: none !important;
  transition: background .12s;
}
.menu-link:hover, .menu-link:active { background: var(--panel2); text-decoration: none !important; }
.menu-link b { display: block; font-size: 13.5px; font-weight: 700; }
.menu-link span { display: block; font-size: 11.5px; color: var(--mut); margin-top: 2px; }
.menu-sep { position: relative; margin-top: 8px; padding-top: 14px; }
.menu-sep::before { content: ''; position: absolute; top: 0; left: 14px; right: 14px; height: 1px; background: var(--line-strong); }
#menu-count { padding: 9px 14px 6px; border-top: 1px solid var(--line); margin-top: 6px; color: var(--mut); font-size: 11px; font-weight: 600; letter-spacing: .3px; }
/* install popup (bottom sheet) — pola sama .req-modal.
   Popup, bukan banner/header: tidak mengganggu layout, dan seperti aplikasi
   pada umumnya: muncul sekali setelah user sempat pakai, lalu hilang. */
.install-modal[hidden] { display: none; }
.ib-body {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 4px 24px calc(28px + env(safe-area-inset-bottom)); text-align: center;
}
.ib-ic {
  width: 60px; height: 60px; display: grid; place-items: center;
  border-radius: 18px; background: var(--acc-soft); color: var(--acc);
  margin-top: 4px;
}
.ib-ic svg { width: 28px; height: 28px; }
.ib-body p { font-size: 13.5px; color: var(--mut); line-height: 1.55; margin: 0 0 2px; }
.ib-body .req-send { width: 100%; }
/* tombol sekunder (Nanti dulu) — struktur yang sama, tanpa glow hijau */
.req-send-sec {
  background: var(--panel2); border: 1px solid var(--line-strong);
  color: var(--tx-sub); box-shadow: none; font-weight: 700; margin-top: -4px;
}
.req-send-sec:active { background: var(--line); }

/* ── MAIN VIEWS ── */
main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 18px calc(150px + env(safe-area-inset-bottom)); }
.view { display: none; }
.view.on { display: block; }

#search {
  width: 100%; padding: 13px 16px; margin-bottom: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  color: var(--tx); font: inherit; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#search:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-glow); }

.sect {
  font-size: 11px; font-weight: 800; color: var(--mut);
  text-transform: uppercase; letter-spacing: 1.5px;
  margin: 18px 0 10px; display: flex; align-items: center; gap: 8px;
}
.sect-ic { width: 14px; height: 14px; color: var(--acc); }

/* ── GENRE CHIPS ── */
#chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
#chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 16px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line);
  color: var(--tx-sub); font-size: 12px; font-weight: 700;
  transition: all .15s ease;
}
.chip:active { transform: scale(.95); }
.chip.on {
  background: var(--acc); border-color: var(--acc); color: var(--acc-contrast);
  box-shadow: 0 4px 14px var(--acc-glow);
}

/* ── STATION LIST ── */
.station {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 10px 10px; border-radius: 14px; text-align: left; position: relative;
  transition: background .12s ease;
}
.station:active { background: var(--panel2); }
.cover {
  width: 50px; height: 50px; flex: 0 0 50px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--h, 160) 45% 24%);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 800; color: rgba(255,255,255,.96); text-transform: uppercase;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  transition: transform .15s, box-shadow .15s;
  overflow: hidden; position: relative;
}
/* favicon asli (di-proxy /api/img) — bikin daftar instantly "bukan template" */
.cover img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  background: hsl(var(--h, 160) 45% 24%);
}
.cover img + span { position: relative; z-index: 1; }
.cover.has-img { background: var(--panel2); }
.station:active .cover { transform: scale(.96); }
.s-info { flex: 1; min-width: 0; }
.s-info b {
  display: block; font-size: 14.5px; font-weight: 700;
  color: var(--tx); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s-info i {
  display: block; font-style: normal; font-size: 12px;
  color: var(--mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px;
}
/* badge kualitas: bitrate + buffering */
.s-meta { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.q-badge {
  font-size: 9.5px; font-weight: 700; letter-spacing: .2px;
  padding: 1.5px 5px; border-radius: 5px; white-space: nowrap;
  color: var(--mut); background: var(--panel2); border: 1px solid var(--line);
}
.q-badge.hi { color: var(--acc); border-color: rgba(16,185,129,.35); background: var(--acc-soft); }
.q-badge.lo { color: #fbbf24; border-color: rgba(251,191,36,.3); background: rgba(251,191,36,.1); }
.busy-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #fbbf24;
  animation: busyPulse .9s ease-in-out infinite;
}
@keyframes busyPulse { 0%,100% { opacity: .35; } 50% { opacity: 1; } }

/* EQUALIZER */
.eq { display: none; align-items: flex-end; gap: 2.5px; height: 14px; flex: 0 0 auto; }
.station.playing .eq { display: flex; }
.eq i { width: 3px; border-radius: 2px; background: var(--acc); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(1) { height: 6px; }
.eq i:nth-child(2) { height: 12px; animation-delay: .25s; }
.eq i:nth-child(3) { height: 8px; animation-delay: .5s; }
.station.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%,100% { transform: scaleY(.45);} 50% { transform: scaleY(1);} }

.fav-dot { position: absolute; right: 12px; top: 50%; margin-top: -3.5px; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 8px var(--acc); }
.station.playing .s-info b { color: var(--acc); }
.station.playing .cover { box-shadow: 0 0 0 2px var(--acc), inset 0 0 0 1px rgba(255,255,255,.2); }
.empty { color: var(--mut); font-size: 13.5px; padding: 22px 6px; }

/* ── MINI PLAYER ── */
#mini {
  display: none; align-items: center; gap: 12px;
  margin: 0 14px 8px; padding: 10px 12px 10px 12px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 16px;
  width: calc(100% - 28px); text-align: left;
  animation: rise .22s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--sheet-shadow);
  backdrop-filter: blur(12px);
}
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
#mini.on { display: flex; }
#mini-cover {
  width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: hsl(var(--h, 160) 45% 24%); font-family: 'Space Grotesk', sans-serif;
  font-weight: 800; font-size: 16px; color: rgba(255,255,255,.96); text-transform: uppercase;
}
#mini .m-info { flex: 1; min-width: 0; pointer-events: none; }
#mini-name { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
#mini-status { display: block; font-size: 11.5px; color: var(--acc); font-weight: 600; margin-top: 1px; }
#mini-toggle {
  width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%;
  background: var(--acc); color: #ffffff !important;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px var(--acc-glow);
}
#mini-toggle svg { width: 20px; height: 20px; fill: #ffffff !important; color: #ffffff !important; }

/* ── BOTTOM TABS ── */
nav.tabs {
  display: flex; align-items: stretch; gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--panel); border-top: 1px solid var(--line);
  z-index: 20;
}
.tabs-l { display: flex; flex: 0 0 auto; min-width: 0; gap: 4px; }
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--mut); font-size: 11px; font-weight: 700; padding: 6px 4px;
  min-width: 96px; min-height: 52px;
  border-radius: 12px; transition: color .15s, background .15s;
}
.tab:active { background: var(--panel2); }
.tab .tab-ic { width: 22px; height: 22px; }
.tab.on { color: var(--acc); }

.tabs-ad {
  flex: 1 1 auto; min-width: 0; margin: 4px 0;
  display: flex; align-items: center; justify-content: center; padding: 8px 12px;
  background: var(--acc-soft);
  border: 1.5px dashed var(--acc-glow);
  border-radius: 14px; overflow: hidden; cursor: default;
}
.tabs-ad > span {
  /* teks gelap di atas hijau muda: CR ~7 (AA lolos). hijau accent di sini
     cuma dekoratif (border dashed) — bukan warna teks. */
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--ad-txt); user-select: none;
}
.ad-dot, .ad-txt { display: none; }

/* ── FULLSCREEN NOW PLAYING OVERLAY ── */
#now-view {
  position: fixed; inset: 0; z-index: 50;
  background: var(--bg); max-width: 540px; margin: 0 auto;
  display: none; flex-direction: column;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 24px calc(24px + env(safe-area-inset-bottom));
  /* Scroll di DALAM player, bukan body (body overflow:hidden).
     Tanpa ini, list "Lagu terakhir" yang panjang tidak bisa di-scroll ke atas:
     flex column meluber keluar viewport dan scroll container-nya justru body. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
/* flex child tidak menyusut — tinggi ikuti konten, bukan dipaksa memenuhi layar */
#now-view > * { flex: 0 0 auto; }
#now-view > .now-controls { flex: 0 0 auto; margin-top: auto; }
#now-view.on { display: flex; animation: fadeup .25s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeup { from { opacity: 0; transform: translateY(22px); } }
#now-close {
  align-self: flex-start; color: var(--tx-sub); padding: 10px; margin: -6px 0 0 -8px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: color .15s, background .15s;
}
#now-close:active { background: var(--panel2); }
#now-close svg { width: 24px; height: 24px; }

/* LIVING SPECTRUM ART COVER */
#now-art {
  width: min(46vw, 200px) !important;
  width: min(72vw, 280px); aspect-ratio: 1; border-radius: 28px; margin: 4px auto 4px;
  position: relative; overflow: hidden;
  background:
    radial-gradient(130% 100% at 50% -10%, hsl(var(--h, 160) 45% 26%) 0%, hsl(var(--h, 160) 40% 14%) 52%, hsl(var(--h, 160) 35% 8%) 100%);
  box-shadow:
    0 24px 64px rgba(0,0,0,.65),
    0 0 0 1px rgba(255,255,255,.1),
    inset 0 1px 0 rgba(255,255,255,.15);
}
#now-art::before {
  content: ''; position: absolute; inset: -20%; pointer-events: none;
  background: radial-gradient(closest-side, hsl(var(--h, 160) 75% 55% / .18), transparent 72%);
  animation: halo 5.2s ease-in-out infinite;
}
@keyframes halo { 0%,100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.07); } }
#now-art .sheen {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,.03) 28%, transparent 45%);
}
#now-art .spec {
  position: absolute; inset: 16% 14%;
  display: flex; align-items: center; justify-content: center; gap: 5.5%;
}
#now-art .spec i {
  flex: 1; height: 100%; border-radius: 999px;
  background: linear-gradient(to top, hsl(var(--h, 160) 80% 38%) 0%, #10b981 100%);
  box-shadow: 0 0 8px hsl(var(--h, 160) 85% 55% / .3);
  transform: scaleY(.14);
  will-change: transform;
}

#now-status {
  color: var(--acc); font-size: 11px; font-weight: 800; text-align: center;
  letter-spacing: 2px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
#now-status::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--acc); opacity: 0; transition: opacity .3s;
}
#now-view.playing #now-status::before { opacity: 1; animation: halo 1.6s ease-in-out infinite; }
#now-name { font-size: 22px; font-weight: 800; text-align: center; margin-top: 8px; letter-spacing: -.01em; color: var(--tx); }
#now-tags { color: var(--mut); font-size: 13px; text-align: center; margin-top: 6px; font-weight: 500; }

/* ── TOOLBAR & META LIVE ── */
.now-meta {
  margin: 10px auto 4px; padding: 6px 14px; border-radius: 20px;
  background: var(--acc-soft); border: 1px solid var(--acc-glow);
  display: flex; align-items: center; gap: 8px; max-width: 90%;
}
.now-meta-badge {
  display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: 1.2px;
  color: var(--acc-contrast); background: var(--acc); padding: 2px 6px; border-radius: 6px;
  text-transform: uppercase; margin-bottom: 4px;
}
.now-meta-title {
  font-size: 12px; font-weight: 700; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.now-toolbar {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 14px auto 6px;
}
.tool-btn {
  width: 44px; height: 44px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--tx-sub); position: relative; transition: all .15s ease;
}
.tool-btn:active { background: var(--panel2); transform: scale(.94); }
.tool-btn.active { color: var(--acc); border-color: var(--acc); background: var(--acc-soft); }
.tool-btn.recording { color: #ff4d4d; border-color: #ff4d4d; background: rgba(255, 77, 77, 0.15); animation: pulseRec 1s ease-in-out infinite; }
@keyframes pulseRec { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .75; transform: scale(.95); } }
.tool-btn svg { width: 20px; height: 20px; }
.tool-badge {
  position: absolute; bottom: 2px; font-size: 8.5px; font-weight: 800;
  letter-spacing: .2px; color: var(--acc); line-height: 1;
}

/* ── CITY FILTER CHIPS ── */
.city-chips {
  display: flex; gap: 6px; overflow-x: auto; padding: 0 0 10px; scrollbar-width: none;
}
.city-chips::-webkit-scrollbar { display: none; }
.city-chip {
  flex: 0 0 auto; padding: 4px 11px; border-radius: 12px;
  background: transparent; border: 1px dashed var(--line-strong);
  color: var(--tx-sub); font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: all .15s ease;
}
.city-chip:active { transform: scale(.95); }
.city-chip.on {
  background: var(--acc); border: 1px solid var(--acc);
  color: var(--acc-contrast); font-weight: 700;
}

/* ── VOLUME SLIDER ROW ── */
.now-vol-row {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: min(85%, 260px); margin: 6px auto 14px;
}
.vol-btn {
  background: transparent; border: none; padding: 4px;
  color: var(--tx-sub); cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.vol-btn:active { transform: scale(.9); }
.vol-btn svg { width: 19px; height: 19px; }
.vol-slider {
  flex: 1; -webkit-appearance: none; appearance: none; height: 5px;
  border-radius: 4px; background: var(--line-strong); outline: none; cursor: pointer;
}
.vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 14px; height: 14px;
  border-radius: 50%; background: var(--acc); cursor: pointer;
  box-shadow: 0 2px 6px var(--acc-glow); transition: transform .1s ease;
}
.vol-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.vol-slider::-moz-range-thumb {
  width: 14px; height: 14px; border: none; border-radius: 50%;
  background: var(--acc); cursor: pointer;
}
.vol-val {
  font-size: 11px; font-weight: 700; color: var(--mut); min-width: 32px; text-align: right;
}

/* ── TOAST NOTIFICATION ── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(40px);
  background: var(--panel); border: 1px solid var(--line-strong);
  color: var(--tx); padding: 10px 18px; border-radius: 24px;
  font-size: 12.5px; font-weight: 700; letter-spacing: -.01em;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
  pointer-events: none; opacity: 0; z-index: 100;
  transition: transform .22s cubic-bezier(0.16, 1, 0.3, 1), opacity .22s ease;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

.now-actions { display: flex; align-items: center; justify-content: center; gap: 26px; }

/* Blok kontrol: STICKY di bawah. #now-view adalah flex column yang bisa
   scroll, jadi tanpa sticky, kontrol ikut ter-scroll dan baris paling
   bawah bisa keluar area terlihat. Sticky pinning Independent dari
   tinggi konten — selalu nempel di bawah layar. */
/* Kontrol player: alur normal. Sempat sticky bottom:0 — hasilnya
   melayang di depan daftar lagu, dan strip bar musik yang gw tambahkan
   di dalamnya menduplikasi pill "lagu sekarang" yang sudah ada di atas. */
.now-controls { margin-top: 18px; }

/* ═══ PANAH GANTI RADIO (atas & bawah artwork) ═══
   Ditaruh di sisi atas/bawah artwork supaya menyatu dengan bar
   equalizer: warna accent, glow tipis, tanpa chip solid. */
.art-nav {
  display: flex; align-items: center; justify-content: center;
  align-self: center;
  width: 46px; height: 30px;
  color: var(--acc);
  transition: transform .15s ease, color .15s ease, filter .15s ease;
  filter: drop-shadow(0 0 6px var(--acc-glow));
}
.art-nav:active { transform: scale(.88); filter: drop-shadow(0 0 12px var(--acc-glow)); }
.art-nav svg { width: 26px; height: 26px; stroke-width: 2.6; }
.art-nav-up { margin: 0 auto 4px; }
.art-nav-down { margin: 4px auto 0; }
.na-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line-strong);
  display: flex; align-items: center; justify-content: center; color: var(--tx);
  transition: all .15s ease;
}
.na-btn:active { background: var(--panel2); }
.na-btn svg { width: 22px; height: 22px; }
#now-fav.faved { color: var(--acc); border-color: var(--acc); background: var(--acc-soft); }
#now-play {
  width: 70px; height: 70px; border-radius: 50%;
  background: var(--acc); color: #ffffff !important;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px var(--acc-glow);
}
#now-play svg { width: 32px; height: 32px; fill: #ffffff !important; color: #ffffff !important; }
#now-stop { color: var(--tx); }
#now-stop svg { width: 20px; height: 20px; }

/* ── DESKTOP RESPONSIVE (>= 768px) ── */
@media (min-width: 768px) {
  #app { max-width: 1080px; }
  header { order: -2; padding: 16px 24px; }
  nav.tabs { order: -1; justify-content: center; gap: 12px; padding: 12px 0; background: transparent; border-top: none; border-bottom: 1px solid var(--line); }
  .tabs-l { flex: 0 0 auto; }
  .tabs-ad { flex: 0 0 auto; min-width: 260px; margin: 0; }
  .tab { flex-direction: row; gap: 8px; font-size: 13px; padding: 9px 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); min-width: 0; min-height: 0; }
  .tab.on { background: var(--acc); border-color: var(--acc); color: var(--acc-contrast); box-shadow: 0 4px 14px var(--acc-glow); }
  main { padding: 16px 24px 60px; }
  #chips { flex-wrap: wrap; overflow-x: visible; gap: 10px; }
  .city-chips { flex-wrap: wrap; overflow-x: visible; gap: 8px; }
  .all-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 4px 20px; }
  .station { padding: 9px 12px; }
  #mini { width: calc(100% - 32px); max-width: 500px; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 40; }
  #mini.on { display: flex; animation: none; }
  #now-view {
    width: min(440px, calc(100vw - 32px)); height: fit-content; max-height: calc(100dvh - 40px);
    overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
    inset: 0; margin: auto; border-radius: 24px; border: 1px solid var(--line-strong);
    background: var(--panel); box-shadow: 0 28px 80px rgba(0,0,0,.65); padding: 24px 28px 28px;
  }
  #now-view.on { display: flex; }
  #now-view::before { content: ''; position: fixed; inset: 0; border-radius: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(8px); z-index: -1; }
  #now-art { margin: 10px auto 22px; width: min(30vh, 220px); }
  #now-name { font-size: 20px; }
}

/* ═══════════ v43: STATS CARD ═══════════ */
.stats-card {
  display: flex; gap: 8px; margin: 2px 0 14px;
}
.stats-card[hidden] { display: none; }
.sc-item {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
  text-align: center;
}
.sc-item b { display: block; font-size: 19px; font-weight: 800; color: var(--tx); letter-spacing: -.02em; line-height: 1.1; }
.sc-item b em { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--acc); margin-left: 1px; }
.sc-item span { display: block; font-size: 10.5px; color: var(--mut); font-weight: 600; margin-top: 3px; }

/* ═══════════ v43: LIST HEAD + SORT/FILTER ═══════════ */
.list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.list-tools { display: flex; gap: 6px; align-items: center; }
.sort-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 11.5px; font-weight: 700; color: var(--tx-sub);
  transition: all .15s ease; white-space: nowrap;
}
.sort-btn svg { width: 13px; height: 13px; flex: 0 0 13px; }
.sort-btn:active { transform: scale(.95); }
.sort-btn[aria-expanded="true"] { border-color: var(--acc); color: var(--acc); background: var(--acc-soft); }
.filter-n {
  font-style: normal; font-size: 9.5px; font-weight: 800;
  min-width: 15px; height: 15px; padding: 0 4px; border-radius: 8px;
  background: var(--acc); color: #fff; display: inline-flex; align-items: center; justify-content: center;
}
.filter-n[hidden] { display: none; }

/* aktif filter chips */
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px; }
.active-filters[hidden] { display: none; }
.af-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px 4px 10px; border-radius: 9px;
  background: var(--acc-soft); border: 1px solid rgba(16,185,129,.32);
  color: var(--acc); font-size: 11px; font-weight: 700;
}
.af-chip svg { width: 11px; height: 11px; stroke: currentColor; }

/* ═══════════ v43: SHEET (sort & filter) ═══════════ */
.sheet-veil { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
#sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0;
  max-height: 82dvh; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line-strong);
  box-shadow: var(--sheet-shadow);
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheetUp .26s cubic-bezier(0.16, 1, 0.3, 1);
}
#sheet[hidden] { display: none; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet-grip { width: 34px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 2px; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 18px 10px; flex: 0 0 auto; }
.sheet-head b { font-size: 15px; font-weight: 800; color: var(--tx); }
.sheet-head button { color: var(--mut); padding: 6px; border-radius: 50%; display: flex; }
.sheet-head button:active { background: var(--panel2); }
.sheet-head button svg { width: 20px; height: 20px; }
.sheet-body { overflow-y: auto; padding: 0 18px 18px; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 8px; padding: 10px 18px 16px; border-top: 1px solid var(--line); flex: 0 0 auto; }
.sheet-foot[hidden] { display: none; }
.sheet-foot button { flex: 1; padding: 11px; border-radius: 12px; font-size: 13px; font-weight: 700; }
#sheet-reset { background: var(--panel2); color: var(--tx-sub); border: 1px solid var(--line); }
#sheet-apply { background: var(--acc); color: #fff; }
.opt-row {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 12px 12px; border-radius: 12px; text-align: left;
  border: 1px solid transparent;
}
.opt-row:active { background: var(--panel2); }
.opt-row.on { background: var(--acc-soft); border-color: rgba(16,185,129,.3); }
.opt-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: var(--panel2); display: flex; align-items: center; justify-content: center; color: var(--mut); }
.opt-row.on .opt-ic { background: var(--acc); color: #fff; }
.opt-ic svg { width: 17px; height: 17px; }
.opt-tx { flex: 1; min-width: 0; }
.opt-tx b { display: block; font-size: 13.5px; font-weight: 700; color: var(--tx); }
.opt-tx span { display: block; font-size: 11px; color: var(--mut); margin-top: 1px; }
.opt-row.on .opt-tx b { color: var(--acc); }
.sheet-label {
  font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  color: var(--mut); padding: 14px 12px 6px;
}
.sheet-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 4px; }
.sheet-chips button {
  padding: 6px 11px; border-radius: 10px; font-size: 11.5px; font-weight: 600;
  background: var(--panel2); border: 1px solid var(--line); color: var(--tx-sub);
}
.sheet-chips button.on { background: var(--acc); border-color: var(--acc); color: #fff; font-weight: 700; }

/* ═══════════ v43: STATION PAGE ═══════════ */
.st-page {
  position: fixed; inset: 0; z-index: 45; background: var(--bg);
  display: flex; flex-direction: column;
}
.st-page[hidden] { display: none; }
.st-head {
  display: flex; align-items: center; gap: 8px; flex: 0 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px;
  border-bottom: 1px solid var(--line);
}
.st-head .hdr-btn { color: var(--tx-sub); }
.st-head-title {
  flex: 1; min-width: 0; text-align: center; font-size: 13px; font-weight: 700; color: var(--tx-sub);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st-body { flex: 1; overflow-y: auto; padding: 20px 20px calc(96px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }
.st-hero { text-align: center; }
.st-cover {
  width: 132px; height: 132px; margin: 0 auto 16px; border-radius: 26px; overflow: hidden;
  background: hsl(var(--h, 160) 45% 24%); position: relative;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 42px; font-weight: 800; color: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.4);
}
.st-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.st-cover.has-img { background: var(--panel2); }
.st-hero h2 { font-size: 21px; font-weight: 800; color: var(--tx); letter-spacing: -.02em; line-height: 1.25; }
.st-tags { font-size: 12.5px; color: var(--mut); font-weight: 500; margin-top: 6px; }
.st-badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 12px; }
.st-badges .q-badge { font-size: 11px; padding: 3px 9px; border-radius: 7px; }
.st-now {
  margin-top: 18px; padding: 13px 15px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 4px;
}
.st-now[hidden] { display: none; }
.st-now-lbl { font-size: 10px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--acc); }
.st-now b { font-size: 14px; font-weight: 700; color: var(--tx); line-height: 1.35; }
.st-actions { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.st-play {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px; border-radius: 15px; background: var(--acc); color: #fff;
  font-size: 14.5px; font-weight: 800; box-shadow: 0 6px 20px var(--acc-glow);
}
.st-play svg { width: 20px; height: 20px; }
.st-play.playing { background: var(--panel2); color: var(--tx); box-shadow: none; border: 1px solid var(--line-strong); }
.st-ico {
  width: 48px; height: 48px; flex: 0 0 48px; border-radius: 15px;
  background: var(--panel); border: 1px solid var(--line); color: var(--tx-sub);
  display: flex; align-items: center; justify-content: center;
}
.st-ico:active { background: var(--panel2); }
.st-ico svg { width: 21px; height: 21px; }
.st-ico.faved { color: var(--acc); border-color: var(--acc); background: var(--acc-soft); }
.st-site {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 12px; padding: 12px 15px; border-radius: 13px;
  background: var(--panel); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--tx-sub); text-decoration: none !important;
}
.st-site[hidden] { display: none; }
.st-site svg { width: 16px; height: 16px; color: var(--mut); }
.st-specs { margin-top: 16px; border-top: 1px solid var(--line); }
.st-specs div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.st-specs dt, .st-specs span:first-child { font-size: 12px; color: var(--mut); font-weight: 600; }
.st-specs span:last-child { font-size: 12px; color: var(--tx-sub); font-weight: 600; text-align: right; word-break: break-all; }
.st-share-note { margin-top: 16px; font-size: 11.5px; color: var(--mut); text-align: center; line-height: 1.5; }
.st-bar {
  position: absolute; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px;
  background: var(--panel-glass); backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,.4);
}
.st-bar[hidden] { display: none; }
.st-bar-vol {
  display: flex; align-items: center; gap: 7px;
  flex-shrink: 0; margin-left: auto;
}
.st-bar-volbtn {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  color: var(--tx2); cursor: pointer;
}
.st-bar-volbtn svg { width: 16px; height: 16px; }
.st-bar-volbtn.muted { color: #ef4444; }
.st-bar-range {
  -webkit-appearance: none; appearance: none;
  width: 84px; height: 4px; border-radius: 99px;
  background: var(--line); outline: none; cursor: pointer;
}
.st-bar-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--acc); border: 0; cursor: pointer;
}
.st-bar-range::-moz-range-thumb {
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--acc); border: 0; cursor: pointer;
}
.st-bar-volval {
  font-size: 11.5px; color: var(--tx2);
  min-width: 34px; text-align: right;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 480px) {
  .st-bar-range { width: 60px; }
  .st-bar-volval { display: none; }
}

.st-bar-btn { color: #fff; display: flex; }
.st-bar-btn svg { width: 22px; height: 22px; }

/* now-playing: judul lagu live — pill KECIL (v94), bukan kartu besar */
.now-song {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  margin-top: 14px; padding: 4px 10px; border-radius: 7px;
  background: transparent; border: 1px solid var(--line);
  font-size: 10.5px; font-weight: 600; color: var(--mut);
  max-width: 100%;
}
.now-song[hidden] { display: none; }
.now-song span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ns-dot { width: 4px; height: 4px; flex: 0 0 4px; border-radius: 50%; background: var(--acc); animation: halo 1.6s ease-in-out infinite; }

/* ═══════════ v43: REQUEST MODAL ═══════════ */
.req-veil { position: fixed; inset: 0; z-index: 62; background: rgba(0,0,0,.5); backdrop-filter: blur(3px); }
.req-modal {
  position: fixed; z-index: 63; left: 0; right: 0; bottom: 0;
  max-height: 90dvh; overflow-y: auto;
  background: var(--panel); border-radius: 20px 20px 0 0;
  border-top: 1px solid var(--line-strong); box-shadow: var(--sheet-shadow);
  padding-bottom: env(safe-area-inset-bottom);
  animation: sheetUp .26s cubic-bezier(0.16, 1, 0.3, 1);
}
.req-modal[hidden] { display: none; }
.req-lead { font-size: 12.5px; color: var(--mut); line-height: 1.5; padding: 0 18px 14px; }
#req-form { padding: 0 18px 20px; display: flex; flex-direction: column; gap: 12px; }
#req-form label { display: flex; flex-direction: column; gap: 5px; }
#req-form label > span { font-size: 11px; font-weight: 700; color: var(--mut); text-transform: uppercase; letter-spacing: .3px; }
#req-form input, #req-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 12px; font: inherit; font-size: 14px;
  background: var(--bg); border: 1px solid var(--line-strong); color: var(--tx);
  user-select: text; -webkit-user-select: text;
}
#req-form input:focus, #req-form textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-glow); outline: none; }
#req-form textarea { resize: vertical; min-height: 56px; }
.req-row { display: flex; gap: 10px; }
.req-row label { flex: 1; min-width: 0; }
.req-send {
  padding: 14px; border-radius: 14px; background: var(--acc); color: #fff;
  font-size: 14px; font-weight: 800; margin-top: 2px; box-shadow: 0 6px 18px var(--acc-glow);
}
.req-send:disabled { opacity: .5; }
.req-done { padding: 6px 24px 32px; text-align: center; }
.req-done[hidden] { display: none; }
.req-done svg { width: 46px; height: 46px; color: var(--acc); margin: 4px auto 12px; }
.req-done b { display: block; font-size: 17px; font-weight: 800; color: var(--tx); }
.req-done p { font-size: 13px; color: var(--mut); margin: 6px 0 18px; }
#req-ok { padding: 12px 34px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); color: var(--tx-sub); font-size: 13px; font-weight: 700; }

@media (min-width: 768px) {
  #sheet, .req-modal { left: 50%; transform: translateX(-50%); width: min(520px, calc(100vw - 32px)); bottom: 20px; border-radius: 20px; border: 1px solid var(--line-strong); }
  @keyframes sheetUp { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }
  .st-body { max-width: 560px; margin: 0 auto; width: 100%; }
  .st-head { max-width: 560px; margin: 0 auto; width: 100%; }
  .st-bar { max-width: 560px; margin: 0 auto; left: 0; right: 0; }
  .list-head { margin-bottom: 2px; }
  .sort-btn { padding: 6px 12px; font-size: 12px; }
}

/* ═══════════ v52: health note, riwayat lagu, quality, halaman kota ═══════════ */
.health-note {
  margin: 10px 0 2px; padding: 9px 13px; font-size: 12px; line-height: 1.5;
  color: var(--tx-sub); background: var(--acc-soft);
  border: 1px solid var(--acc-glow); border-radius: 12px;
}
.health-note[hidden] { display: none; }

/* badge stream suspect */
.q-badge.warn { background: rgba(245, 158, 11, .16); color: #b45309; }
html[data-theme="dark"] .q-badge.warn { color: #fcd34d; }
.station.suspect { opacity: .58; }
.station.suspect .s-info b { text-decoration: line-through solid rgba(148, 163, 184, .5); }

/* sub-kota bisa diklik -> halaman kota */
.sub-city {
  color: var(--acc); font-weight: 700; cursor: pointer;
  border-bottom: 1px dashed currentColor; text-decoration: none;
}
.sub-city:hover, .sub-city:focus-visible { border-bottom-style: solid; outline: none; }
.sub-tags { color: var(--mut); font-weight: 600; margin-left: 6px; }
.s-info > i { display: flex; flex-wrap: wrap; align-items: center; gap: 0 6px; }

/* toolbar quality (label + ikon) */
/* semua tool-btn seragam 44x44, ikon saja. Status = titik kecil, bukan teks. */
.tool-btn.active { color: var(--acc); background: var(--acc-soft); border-color: var(--acc-glow); }
/* titik indikator: nyaris tak terlihat kalau mati, hijau kalau aktif */
.tool-dot {
  position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--acc); opacity: 0; transition: opacity .15s ease;
}
.tool-btn.active .tool-dot, .tool-dot.on { opacity: 1; }
/* sleep timer butuh angka sisa waktu, jadi tetap pakai badge */
#sleep-badge { bottom: 3px; }

/* riwayat lagu */
.song-history {
  margin: 12px 0 2px; padding: 12px 13px 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  /* list panjang scroll sendiri, bukan mendorong seluruh player keluar layar */
  max-height: 42vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain; scrollbar-width: thin;
}
.song-history[hidden] { display: none; }
.hist-head {
  position: sticky; top: -12px; z-index: 2; background: var(--panel);
  display: flex; align-items: baseline; justify-content: space-between;
  font-size: 11px; font-weight: 800; letter-spacing: 1.1px; text-transform: uppercase;
  color: var(--mut); padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.hist-head i { font-style: normal; font-size: 10.5px; letter-spacing: .3px; text-transform: none; opacity: .8; }
.hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 2px; border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.hist-row:last-child { border-bottom: none; }
.hist-n {
  flex: 0 0 20px; height: 20px; display: grid; place-items: center;
  font-size: 10.5px; font-weight: 800; font-style: normal; color: var(--mut);
  background: var(--panel2); border-radius: 6px;
}
.hist-n svg { width: 8px; height: 8px; color: var(--acc); }
.hist-row b {
  flex: 1 1 auto; min-width: 0; font-weight: 600; color: var(--tx-sub);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hist-row.now b { color: var(--tx); font-weight: 700; }
.hist-time { flex: 0 0 auto; font-size: 10.5px; font-style: normal; color: var(--mut); font-weight: 600; }

/* halaman kota */
.city-list { margin-top: 16px; }
.sect-h3 {
  margin: 0 0 8px; font-size: 12px; font-weight: 800;
  letter-spacing: 1.1px; text-transform: uppercase; color: var(--mut);
}
.city-list .all-list, .city-list .station { display: block; }
.city-list .station { margin-bottom: 2px; }

/* ═══════════ v60: panel stream gagal + retry berjenjang ═══════════ */
.stream-fail {
  margin: 14px 0 4px;
  padding: 14px 15px;
  border: 1px solid color-mix(in srgb, #f87171 45%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, #f87171 10%, var(--panel, #16161b));
}
.stream-fail[hidden] { display: none !important; }
.stream-fail b {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--tx);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stream-fail p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--mut);
}
.sf-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sf-actions button {
  flex: 1 1 auto;
  min-width: 128px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel2, #1e1e26);
  color: var(--tx);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease;
}
.sf-actions button:active { transform: scale(.97); }
#sf-retry {
  background: var(--acc, #1db954);
  border-color: var(--acc, #1db954);
  color: #fff;
}
#sf-alt { color: var(--tx); }

/* badge ringkas di mini player */
.mini-fail {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  animation: sf-pulse 1.6s ease-in-out infinite;
}
.mini-fail[hidden] { display: none !important; }
@keyframes sf-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, #ef4444 55%, transparent); }
  50%      { box-shadow: 0 0 0 6px color-mix(in srgb, #ef4444 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) {
  .mini-fail { animation: none; }
}

/* ═══════════ v61: blok SEO hasil prerender ═══════════
   .seo-block disuntik di <main> oleh api/prerender.js supaya halaman /radio/<slug>/
   punya konten nyata untuk crawler (title, h1, JSON-LD, daftar link).
   Saat JS hidup, app.js menandai <html class="js"> lalu blok ini disembunyikan —
   user lihat UI normal, crawler/user tanpa JS tetap dapat konten. */
.seo-block { display: none; }
html:not(.js) .seo-block { display: block; margin: 8px 0 18px; }
html:not(.js) .seo-block h1 { font-size: 24px; line-height: 1.2; margin: 0 0 8px; color: var(--tx); }
html:not(.js) .seo-block h2 { font-size: 15px; margin: 18px 0 8px; color: var(--tx); }
html:not(.js) .seo-block p { font-size: 14px; line-height: 1.55; color: var(--mut); margin: 0 0 10px; }
html:not(.js) .seo-specs { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 13.5px; margin: 0 0 12px; }
html:not(.js) .seo-specs dt { color: var(--mut); }
html:not(.js) .seo-specs dd { margin: 0; color: var(--tx); }
html:not(.js) .seo-specs a { color: var(--acc); }
html:not(.js) .seo-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
html:not(.js) .seo-links li { font-size: 14px; }
html:not(.js) .seo-links a { color: var(--tx); text-decoration: none; display: inline-block; padding: 7px 0; border-bottom: 1px solid var(--line); }
html:not(.js) .seo-links small { color: var(--mut); }
.p-h1-logo { margin: 0; font-size: inherit; font-weight: inherit; }

/* ═══ alarm radio + auto-next ═══ */
.alarm-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.alarm-lbl { font-size: 12px; color: var(--tx2); margin-top: 4px; }
.alarm-input {
  width: 100%; padding: 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--tx); font-size: 30px; font-weight: 700;
  text-align: center; font-variant-numeric: tabular-nums;
}
.alarm-cur {
  padding: 12px; border-radius: 12px; text-align: center;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--tx); font-size: 14px; font-weight: 600;
}
.alarm-days { display: flex; gap: 6px; }
.alarm-days button {
  flex: 1; padding: 9px 0; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel);
  color: var(--tx2); font-size: 12px; font-weight: 700; cursor: pointer;
}
.alarm-days button.on { background: var(--acc); border-color: var(--acc); color: #04231a; }
.alarm-clear {
  padding: 11px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: transparent;
  color: #ef4444; font-size: 13px; font-weight: 600;
}
.alarm-note { margin: 2px 0 0; font-size: 11.5px; color: var(--tx2); line-height: 1.5; }

/* ═══════════ v99: SLOT IKLAN — area dalam kotak artwork ═══════════
   Slot mengisi ruang yang sama dengan artwork (user kotak area itu), diletakkan
   tepat di atas artwork. Tanpa sponsor = placeholder gradient + "Ruang Iklan". */
.ad-slot {
  position: relative;
  width: min(46vw, 200px);
  margin: 0 auto 12px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--panel2) 0%, var(--panel) 100%);
  border: 1px solid var(--line);
  overflow: hidden;
  opacity: 0; transition: opacity .3s ease;
}
.ad-slot.on { opacity: 1; }
.ad-link {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  text-decoration: none; color: inherit; min-height: 54px;
}
.ad-rule {
  flex: 0 0 3px; align-self: stretch;
  border-radius: 2px; background: var(--acc); opacity: .6;
}
.ad-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ad-body b {
  font-size: 11px; font-weight: 700; color: var(--tx);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-body span {
  font-size: 9.5px; font-weight: 500; color: var(--mut);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-body span:empty { display: none; }
.ad-tag {
  position: absolute; top: 5px; right: 6px;
  font-style: normal; font-size: 7.5px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--mut); background: var(--panel);
  border: 1px solid var(--line); border-radius: 3px;
  padding: 1px 3px; pointer-events: none;
}
.ad-dots {
  position: absolute; left: 10px; bottom: 5px;
  display: flex; gap: 3px; pointer-events: none;
}
.ad-dots i {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--line-strong); transition: background .25s, transform .25s;
}
.ad-dots i.on { background: var(--acc); transform: scale(1.3); }
