/* ============================================================
   Radios — black & white redesign (light + dark themes)
   Theme is selected by a class on <html>:  .dark (default) / .light
   Everything is driven by CSS custom properties so the same
   components render correctly in either theme.
   ============================================================ */
:root, html.dark{
  --bg:#0b0b0d; --bg2:#101013; --elev:#16161a; --card:#161619;
  --ink:#ffffff; --muted:#7d7d86;
  --line:rgba(255,255,255,.09); --line2:rgba(255,255,255,.15);
  --soft:rgba(255,255,255,.07);
  --wave:rgba(255,255,255,.16);
  --accent:#ffffff; --accent-ink:#0b0b0d;   /* primary pill: white bg / black glyph */
  --rose:#ff6b81;
  --shadow:0 18px 40px rgba(0,0,0,.5);
  /* soft "3D raised" (neumorphic) depth for buttons/chips — shadows only (no colour change).
     On the near-black bg a plain drop shadow is invisible, so we add an embossed BEVEL
     (lit top edge + shadowed bottom edge INSIDE the element) that reads as 3D even on black. */
  --neu:inset 1.2px 1.2px 1px rgba(255,255,255,.11), inset -1.6px -1.6px 3px rgba(0,0,0,.55),
        5px 5px 13px rgba(0,0,0,.6), -3px -3px 9px rgba(255,255,255,.05);
  --neu-in:inset 2px 2px 6px rgba(0,0,0,.7), inset -2px -2px 6px rgba(255,255,255,.06);
}
html.light{
  /* crisp off-white background with PURE-WHITE elevated surfaces for depth
     (the old flat all-grey palette looked muddy next to the dark theme) */
  --bg:#f4f5f7; --bg2:#eceef1; --elev:#ffffff; --card:#ffffff;
  --ink:#15151b; --muted:#70707b;
  --line:#e7e8ec; --line2:#d8dae0;
  --soft:#eaecf0;
  --wave:#cdced7;
  --accent:#15151b; --accent-ink:#ffffff;   /* primary pill: near-black bg / crisp white glyph */
  --rose:#df4d63;
  --shadow:0 14px 34px rgba(26,28,42,.13);
  /* soft "3D raised" (neumorphic) depth: dark drop bottom-right + white lift top-left */
  --neu:4px 4px 9px rgba(26,28,42,.13), -4px -4px 9px rgba(255,255,255,.9);
  --neu-in:inset 2px 2px 5px rgba(26,28,42,.15), inset -2px -2px 5px rgba(255,255,255,.85);
}
/* light theme: the dark artwork + near-black icons look harsh on grey-white,
   so soften them to a mild grey here (dark theme keeps the bold look) */
/* small tiles: soft, airy light gradient (not a heavy mid-grey) with a hairline edge */
html.light .lart, html.light .cdot, html.light .now-art, html.light .libart, html.light .cart{
  background:linear-gradient(150deg,#f2f3f8,#e2e4ee) !important;
  box-shadow:inset 0 0 0 1px rgba(30,34,55,.05)}
html.light .lart svg, html.light .cdot svg, html.light .libart svg, html.light .cart svg{
  color:#6b6f80;filter:drop-shadow(0 1px 2px rgba(40,44,66,.12))}
/* the BIG player artwork: mirror the dark theme's vinyl-groove look in light tones —
   subtle concentric grooves + a defined edge so it reads premium, not a flat grey box */
html.light .now-art{
  background:repeating-radial-gradient(circle at 50% 50%,#e7e9f1 0 2px,#f7f8fc 2px 5px) !important;
  border:1px solid #dcdee9;box-shadow:0 14px 32px -18px rgba(40,44,66,.4)}
html.light .now-art svg{color:#565b6e;filter:drop-shadow(0 4px 12px rgba(40,44,66,.2))}
/* concentric rings are near-invisible white on light — redraw them dark-on-light */
html.light .now-art::before{
  background:radial-gradient(circle at 50% 50%,transparent 27%,rgba(30,34,55,.06) 27.5%,transparent 28.5%,transparent 40%,rgba(30,34,55,.06) 40.5%,transparent 41.5%)}
html.light .iconbtn svg, html.light .nc, html.light .now-close svg, html.light .ns-label svg{color:#54545f}
html.light .nc.big{color:#fff}   /* keep the play/pause icon crisp white on the dark round button */
/* softer cards in light theme: gentler shadow + lighter LIVE badge */
html.light .cart{box-shadow:0 6px 16px -10px rgba(40,40,55,.22)}
html.light .clive{background:rgba(0,0,0,.4)}
/* light-theme depth: lift the white surfaces off the off-white background with a
   hairline + soft shadow so it reads crisp and modern instead of flat grey */
html.light .sbox,html.light .modal-card{box-shadow:0 1px 2px rgba(26,28,42,.05),0 6px 18px -10px rgba(26,28,42,.12)}
html.light .card .cart{border:1px solid rgba(26,28,42,.05)}
html.light .lrow.on,html.light .lrow:active{box-shadow:inset 0 0 0 1px var(--line2)}
html.light .now-track{border-bottom-color:var(--line2)}
:root{ --tab-h:62px; --mini-h:60px;
  --sat:env(safe-area-inset-top,0px); --sab:env(safe-area-inset-bottom,0px); }

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
/* snappy cross-fade for View Transitions (tab switches); ignored where unsupported */
::view-transition-old(root),::view-transition-new(root){animation-duration:.2s}
/* overscroll-behavior:none stops the browser pull-to-refresh from reloading the
   page (which would kill playback) and prevents scroll chaining */
html,body{height:100%;overflow:hidden;overscroll-behavior:none}
body{
  font-family:"Schibsted Grotesk",system-ui,-apple-system,sans-serif;
  background:var(--bg);color:var(--ink);
  -webkit-font-smoothing:antialiased;position:fixed;inset:0;display:flex;flex-direction:column;
  transition:background .25s ease,color .25s ease;
}
/* the old green atmosphere layer is retired in the B/W design */
.atmos{display:none}

/* universal loading bar — shows whenever something is connecting/buffering */
.loadbar{position:fixed;top:0;left:0;right:0;height:3px;z-index:90;overflow:hidden;pointer-events:none;
  opacity:0;transition:opacity .2s ease}
.loadbar.on{opacity:1}
.loadbar::before{content:"";position:absolute;top:0;left:-40%;height:100%;width:40%;border-radius:3px;
  background:var(--accent);animation:loadslide 1.1s ease-in-out infinite}
@keyframes loadslide{0%{left:-40%}100%{left:100%}}

/* scrolling view */
#view{position:relative;z-index:1;flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;
  padding:calc(var(--sat) + 8px) 0 calc(var(--tab-h) + var(--mini-h) + var(--sab) + 40px);}
#view::-webkit-scrollbar{width:0}
.pad{padding:0 18px}

/* ---------- headers ---------- */
.vhead{padding:16px 18px 6px}
.vtop{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.vtools{display:flex;align-items:center;gap:10px;flex:none}
.clock{text-align:right;line-height:1.1}
.clock .ck-time{display:block;font-weight:700;font-size:14px;color:var(--ink)}
.clock .ck-date{display:block;font-size:11px;color:var(--muted);margin-top:1px}
.iconbtn{width:40px;height:40px;border-radius:50%;display:grid;place-items:center;flex:none;cursor:pointer;
  background:var(--soft);border:none;color:var(--ink);box-shadow:var(--neu);transition:background .15s,box-shadow .15s}
.iconbtn svg{width:19px;height:19px;color:var(--ink)}
.iconbtn:active{background:var(--line2);box-shadow:var(--neu-in)}
.greet{font-size:13px;color:var(--muted);font-weight:600;letter-spacing:.2px}
.vtitle{font-weight:800;font-size:32px;letter-spacing:-.03em;line-height:1.04;margin-top:3px}
.vtitle em{font-style:normal}
/* title row: "Radios" on the left, language picker aligned on the right */
.vtitle-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:3px}
.vtitle-row .vtitle{margin-top:0;min-width:0}
.vtitle-row .langsel{flex:none}
.vsub{color:var(--muted);font-size:14px;margin-top:7px;font-weight:500}
.vsub .ta{color:var(--ink);opacity:.85}

/* Play (left) + Install (right) share one row, vertically aligned */
.home-cta{display:flex;align-items:center;justify-content:flex-start;gap:9px;margin-top:18px}
.home-cta .home-play,.home-cta .install,.home-cta .home-shuffle{margin-top:0}
/* shuffle: a clearly-labelled pill so people get it (play a random station) */
.home-shuffle{display:inline-flex;align-items:center;gap:7px;background:var(--soft);color:var(--ink);
  border:none;border-radius:11px;padding:10px 16px;font-family:inherit;font-weight:700;font-size:13.5px;cursor:pointer;flex:none;
  box-shadow:var(--neu);transition:background .15s,box-shadow .15s}
.home-shuffle svg{width:16px;height:16px;flex:none}
.home-shuffle:active{background:var(--line2);box-shadow:var(--neu-in)}
/* re-roll button in the Discover section header */
.reroll{align-self:center;background:none;border:none;color:var(--muted);cursor:pointer;padding:5px;display:inline-grid;place-items:center}
.reroll svg{width:17px;height:17px}
.reroll:active{color:var(--ink)}
.home-play{display:inline-flex;align-items:center;gap:7px;margin-top:18px;background:var(--accent);color:var(--accent-ink);
  border:none;border-radius:11px;padding:10px 16px;font-family:inherit;font-weight:700;font-size:13.5px;cursor:pointer;
  box-shadow:var(--neu);transition:box-shadow .15s}
.home-play svg{width:17px;height:17px}
.home-play .btnspin{width:16px;height:16px}
.home-play:active{box-shadow:var(--neu-in)}
/* compact "Now playing" state: tiny equaliser instead of a second pause button */
.hp-eq{display:inline-flex;align-items:flex-end;gap:2px;height:13px}
.hp-eq i{width:2.5px;border-radius:2px;background:var(--accent-ink);height:4px;animation:eq .9s ease-in-out infinite}
.hp-eq i:nth-child(2){animation-delay:.25s}.hp-eq i:nth-child(3){animation-delay:.5s}

.install{display:inline-grid;place-items:center;margin-top:16px;background:transparent;color:var(--ink);
  border:1.5px solid var(--line2);border-radius:12px;width:44px;height:44px;flex:none;cursor:pointer}
.install svg{width:19px;height:19px}

/* lazy-load trigger for long browse/search lists (invisible, just a scroll anchor) */
.more-sentinel{height:1px;width:100%}
/* ---------- sections ---------- */
.section{margin-top:26px}
.sec-h{display:flex;align-items:baseline;justify-content:space-between;padding:0 18px 12px}
.sec-h h3{font-size:18px;font-weight:800;letter-spacing:-.02em}
.sec-h .cnt{font-size:12px;color:var(--muted);font-weight:600}

/* ---------- compact list rows ---------- */
.list{display:flex;flex-direction:column;padding:2px 10px 0;gap:2px}
.lrow{display:flex;align-items:center;gap:13px;padding:9px 8px;border-radius:13px;cursor:pointer;transition:background .12s;min-width:0}
.lrow:active{background:var(--soft)}
.lrow.on{background:var(--soft)}
.lart{width:50px;height:50px;border-radius:13px;flex:none;display:grid;place-items:center;position:relative;overflow:hidden;
  color:#fff;background:#1a1a1f}
.lart svg{width:25px;height:25px;position:relative;z-index:1;color:#fff;filter:drop-shadow(0 1px 4px rgba(0,0,0,.35))}
.lart img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2}
.linfo{flex:1;min-width:0}
.lnm{font-weight:700;font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lmt{font-size:12.5px;color:var(--muted);margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:500}
.lplay{flex:none;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.lplay svg{width:20px;height:20px}
.lrow.on .lplay{color:var(--ink)}
.leq{flex:none;display:flex;gap:2.5px;align-items:flex-end;height:15px;padding:0 9px}
.leq i{width:3px;background:var(--ink);border-radius:2px;height:5px;animation:eq .9s ease-in-out infinite}
.leq i:nth-child(2){animation-delay:.25s}.leq i:nth-child(3){animation-delay:.5s}
@keyframes eq{0%,100%{height:4px}50%{height:14px}}

/* audio-quality badges (monochrome) */
.qb{display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:.3px;padding:1px 6px;border-radius:6px;
  vertical-align:middle;margin-left:5px;line-height:1.55}
.qb.loss,.qb.hd{background:var(--soft);color:var(--ink)}
.qb.hi{background:var(--soft);color:var(--muted)}
.qb.std{background:transparent;color:var(--muted)}

/* ---------- search ---------- */
.searchbar{position:sticky;top:0;z-index:5;padding:8px 18px 12px;background:var(--bg)}
.sbox{display:flex;align-items:center;gap:10px;background:var(--soft);border:none;border-radius:14px;padding:14px 15px}
.sbox svg{width:18px;height:18px;color:var(--muted);flex:none}
.sbox input{flex:1;background:none;border:none;outline:none;color:var(--ink);font-size:16px;font-family:inherit;font-weight:500}
/* podcast topic chips (horizontal, scrollable) */
.podtopics{display:flex;gap:8px;overflow-x:auto;padding:0 18px 12px;scrollbar-width:none}
.podtopics::-webkit-scrollbar{height:0}
.ptopic{flex:none;background:var(--soft);border:none;border-radius:30px;padding:9px 15px;
  font-family:inherit;font-weight:700;font-size:13px;color:var(--ink);cursor:pointer;white-space:nowrap;
  box-shadow:var(--neu);transition:box-shadow .15s}
.ptopic.on{background:var(--accent);color:var(--accent-ink)}
.ptopic:active{box-shadow:var(--neu-in)}
.ptopic:active{background:var(--line2)}
.sbox input::placeholder{color:var(--muted)}

.chips{display:flex;gap:9px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:10px 18px 2px}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;font-family:inherit;font-size:13px;font-weight:600;color:var(--ink);background:var(--soft);
  border:none;border-radius:30px;padding:9px 15px;cursor:pointer;white-space:nowrap}
.chip.on{color:var(--accent-ink);background:var(--accent)}

/* ---------- category index ---------- */
.catgroup{padding:0 18px}
.cath{font-size:12px;text-transform:uppercase;letter-spacing:1.1px;color:var(--muted);font-weight:800;margin:24px 0 6px}
.catlist{display:flex;flex-direction:column}
.cat{display:flex;align-items:center;gap:14px;width:100%;background:none;border:none;border-bottom:1px solid var(--line);
  padding:15px 2px;cursor:pointer;color:var(--ink);font-family:inherit;text-align:left}
.cat:last-child{border-bottom:none}
.cat:active{background:var(--soft)}
.cdot{width:44px;height:44px;border-radius:13px;flex:none;display:grid;place-items:center;position:relative;overflow:hidden;
  color:#fff;background:#1a1a1f}
.cdot svg{width:21px;height:21px;position:relative;z-index:1;color:#fff}
.cname{flex:1;font-size:16px;font-weight:700;letter-spacing:-.01em}
.ccount{font-size:13px;color:var(--muted);font-weight:600}
.cat svg{width:19px;height:19px;color:var(--muted);flex:none}

/* master language selector (whole-app filter) — sits to the right of Play radio */
.cta-right{display:flex;align-items:center;gap:10px;margin-left:auto}
/* language selector: a styled button that opens a custom modal (no native picker) */
.langsel{appearance:none;-webkit-appearance:none;flex:none;display:inline-flex;align-items:center;gap:7px;
  background:var(--soft);color:var(--ink);border:none;border-radius:30px;
  padding:9px 13px;font-family:inherit;font-weight:700;font-size:13px;cursor:pointer;max-width:170px;white-space:nowrap}
.langsel:active{background:var(--line2)}
.langsel:focus{outline:none}
.langsel .ls-globe{width:15px;height:15px;flex:none;color:var(--ink)}
.langsel .ls-cur{overflow:hidden;text-overflow:ellipsis}
.langsel .ls-chev{width:12px;height:12px;flex:none;color:var(--muted);margin-left:1px}
/* custom language modal list */
.lang-list{max-height:58vh;overflow-y:auto;margin:6px 0 14px;display:flex;flex-direction:column;gap:3px}
.lang-list::-webkit-scrollbar{width:0}
.lang-opt{display:flex;align-items:center;gap:11px;width:100%;background:none;border:none;cursor:pointer;
  font-family:inherit;color:var(--ink);font-size:15px;font-weight:600;padding:13px 12px;border-radius:12px;text-align:left}
.lang-opt:active{background:var(--soft)}
.lang-opt.on{background:var(--soft)}
.lang-opt .lo-count{margin-left:auto;font-size:12.5px;font-weight:600;color:var(--muted)}
.lang-opt .lo-check{width:18px;height:18px;flex:none;color:var(--ink);opacity:0}
.lang-opt.on .lo-check{opacity:1}

/* list header / back */
.lhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px 2px}
.lhead>span{font-size:13px;color:var(--muted);flex:none;font-weight:600}
.backcat{display:inline-flex;align-items:center;gap:6px;background:none;border:none;color:var(--ink);
  font-family:inherit;font-weight:800;font-size:22px;letter-spacing:-.02em;cursor:pointer;padding:0;min-width:0}
.backcat svg{width:24px;height:24px;flex:none}

/* ---------- library extras ---------- */
.add-btn{display:inline-flex;align-items:center;gap:8px;background:var(--accent);color:var(--accent-ink);border:none;
  border-radius:14px;padding:12px 18px;font-family:inherit;font-weight:700;font-size:14px;cursor:pointer;margin-top:6px}
.add-btn svg{width:18px;height:18px}
.lrm{flex:none;width:30px;height:30px;border-radius:50%;border:none;background:var(--soft);
  color:var(--muted);cursor:pointer;font-size:13px;line-height:1}
.lrm:active{background:rgba(226,83,106,.18);color:var(--rose)}

.refresh-wrap{margin-top:32px;display:flex;flex-direction:column;align-items:center;gap:9px;padding-bottom:12px}
.refresh-btn{display:inline-flex;align-items:center;gap:8px;background:var(--soft);border:none;
  border-radius:30px;padding:11px 20px;color:var(--ink);font-family:inherit;font-weight:600;font-size:14px;cursor:pointer}
.refresh-btn svg{width:17px;height:17px;color:var(--ink)}
.refresh-btn:active{background:var(--line2)}
.ver{font-size:11.5px;color:var(--muted);letter-spacing:.3px;font-weight:500}
.hits{font-size:12px;color:var(--ink);font-weight:700;letter-spacing:.2px;margin-top:3px}
.hits:empty{display:none}
/* share-the-app buttons (Library, under Refresh) */
.share-wrap{margin-top:18px;display:flex;flex-direction:column;align-items:center;gap:12px}
.share-h{font-size:11px;font-weight:800;letter-spacing:1.3px;color:var(--muted);text-transform:uppercase}
.share-row{display:flex;gap:14px;flex-wrap:wrap;justify-content:center}
.sh-btn{display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;border-radius:50%;
  border:none;cursor:pointer;color:#fff;text-decoration:none;-webkit-appearance:none;appearance:none;transition:transform .12s ease}
.sh-btn svg{width:22px;height:22px}
.sh-btn:active{transform:scale(.92)}
.sh-btn.wa{background:#25D366}
.sh-btn.tg{background:#229ED9}
.sh-btn.fb{background:#1877F2}
.sh-btn.xt{background:#000;border:1.5px solid var(--line2)}
.sh-btn.cp,.sh-btn.na{background:var(--soft);color:var(--ink)}
.car-btn{display:flex;align-items:center;gap:13px;width:100%;text-align:left;background:var(--soft);
  border:none;border-radius:16px;padding:15px 16px;cursor:pointer;font-family:inherit;color:var(--ink);margin-top:8px}
.car-btn:active{background:var(--line2)}
.car-btn>svg:first-child{width:26px;height:26px;color:var(--ink);flex:none}
.car-btn span{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}
.car-btn span b{font-size:15px;font-weight:700}
.car-btn span small{font-size:11.5px;color:var(--muted);font-weight:500}
.car-chev{width:18px;height:18px;color:var(--muted);flex:none}

/* ---------- states ---------- */
.state{display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--muted);
  text-align:center;padding:80px 30px;font-size:15px;gap:6px;font-weight:500}
.state .big{font-weight:800;font-size:21px;color:var(--ink);letter-spacing:-.02em}
.spin{width:30px;height:30px;border-radius:50%;border:3px solid var(--line2);border-top-color:var(--ink);
  margin-bottom:14px;animation:rot .8s linear infinite}
@keyframes rot{to{transform:rotate(360deg)}}
/* spinner adapts to each button via currentColor (a transparent gap makes it
   read as a spinning ring on both light and dark buttons) */
.btnspin{width:20px;height:20px;border-radius:50%;border:3px solid currentColor;
  border-top-color:transparent;animation:rot .7s linear infinite}
.nc.big .btnspin{width:34px;height:34px;border-width:3.5px}
/* branded splash: logo in a pulsing ring + musical equalizer bars */
.state.boot{padding:70px 30px;gap:18px}
.boot-logo{position:relative;width:96px;height:96px;display:grid;place-items:center}
.boot-logo img{width:52px;height:52px;border-radius:16px;position:relative;z-index:1;
  animation:bootpulse 1.8s ease-in-out infinite}
.boot-ring{position:absolute;inset:0;border-radius:50%;
  background:conic-gradient(from 0deg,transparent 0 60%,var(--accent) 78%,transparent 92%);
  -webkit-mask:radial-gradient(farthest-side,transparent calc(100% - 5px),#000 calc(100% - 4px));
          mask:radial-gradient(farthest-side,transparent calc(100% - 5px),#000 calc(100% - 4px));
  animation:rot 1.15s linear infinite}
.boot-logo::before{content:"";position:absolute;inset:6px;border-radius:50%;
  border:2px solid var(--line2);opacity:.7}
.eqbars{display:flex;align-items:flex-end;gap:4px;height:22px}
.eqbars i{width:4px;height:100%;border-radius:3px;background:var(--accent);
  transform-origin:bottom;animation:eqbar 1s ease-in-out infinite}
.eqbars i:nth-child(1){animation-delay:-.9s}
.eqbars i:nth-child(2){animation-delay:-.5s}
.eqbars i:nth-child(3){animation-delay:-.75s}
.eqbars i:nth-child(4){animation-delay:-.3s}
.eqbars i:nth-child(5){animation-delay:-.6s}
.boot-tx{color:var(--muted);font-weight:600;letter-spacing:.3px}
@keyframes bootpulse{0%,100%{transform:scale(1)}50%{transform:scale(1.06)}}
@keyframes eqbar{0%,100%{transform:scaleY(.28)}50%{transform:scaleY(1)}}
@media (prefers-reduced-motion:reduce){
  .boot-ring,.eqbars i,.boot-logo img{animation-duration:2.4s}
}

/* ---------- mini player (solid ink pill) ---------- */
.mini{position:fixed;left:10px;right:10px;bottom:calc(var(--tab-h) + var(--sab) + 16px);z-index:30;
  height:var(--mini-h);display:none;align-items:center;gap:12px;padding:9px 12px;
  background:var(--accent);color:var(--accent-ink);border-radius:18px;box-shadow:var(--shadow);overflow:hidden}
.mini.show{display:flex;animation:rise .3s ease}
@keyframes rise{from{transform:translateY(20px);opacity:0}to{transform:none;opacity:1}}
.mini-art{width:42px;height:42px;border-radius:11px;flex:none;display:grid;place-items:center;overflow:hidden;
  position:relative;color:#fff;background:#1a1a1f}
.mini-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2}
.mini-art span{position:relative;z-index:1}
.mini-art svg{width:22px;height:22px;position:relative;z-index:1;color:#fff}
.mini-left{display:flex;align-items:center;gap:12px;flex:1;min-width:0;cursor:pointer}
.mini-info{flex:1;min-width:0}
.mini-nm{font-weight:700;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--accent-ink)}
.mini-mt{font-size:12px;color:var(--accent-ink);opacity:.62;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:1px;font-weight:500}
.mini-ctrls{display:flex;align-items:center;gap:6px;flex:none}
.mini-tbtns{display:flex;align-items:center;gap:6px}
.mini-btn{flex:none;width:40px;height:40px;border-radius:50%;border:none;background:var(--accent-ink);color:var(--accent);
  display:grid;place-items:center;cursor:pointer}
.mini-btn svg{width:20px;height:20px}
.mini-x{flex:none;background:none;border:none;color:var(--accent-ink);cursor:pointer;display:grid;place-items:center;
  width:34px;height:34px;border-radius:50%;opacity:.82;transition:opacity .12s}
.mini-x svg{width:20px;height:20px}
.mini-x:hover{opacity:1}
.mini-x.on{opacity:1}.mini-x.on svg{fill:currentColor}
.mini-vol{display:flex;align-items:center;gap:8px}
.mini-vol svg{width:17px;height:17px;color:var(--accent-ink);opacity:.7}
.mini-vol input{width:92px;-webkit-appearance:none;appearance:none;height:4px;border-radius:4px;
  background:rgba(255,255,255,.28);outline:none}
.mini-vol input::-webkit-slider-thumb{-webkit-appearance:none;width:13px;height:13px;border-radius:50%;background:var(--accent-ink);cursor:pointer}
.mini-vol input::-moz-range-thumb{width:13px;height:13px;border:none;border-radius:50%;background:var(--accent-ink)}
/* on phones the bar only shows artwork + title + play */
.mini-ctrls #miniPrev,.mini-ctrls #miniNext{display:none}
.mini-right{display:none}
.mini.err{box-shadow:0 0 0 1.5px var(--rose),var(--shadow)}
.mini.err .mini-mt{color:var(--rose);opacity:1}

/* ---------- toast ---------- */
.toast{position:fixed;left:50%;bottom:calc(var(--tab-h) + var(--mini-h) + var(--sab) + 22px);z-index:60;
  transform:translateX(-50%) translateY(16px);background:var(--elev);
  color:var(--ink);border:1px solid var(--line2);border-radius:14px;padding:12px 18px;font-size:13.5px;font-weight:600;
  max-width:86%;text-align:center;white-space:pre-line;line-height:1.5;box-shadow:var(--shadow);opacity:0;pointer-events:none;
  transition:opacity .25s ease,transform .25s ease}
/* a toast can show a quieter label line above the main text (e.g. "Shuffled") */
.toast b{display:block;font-size:11px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;color:var(--muted);margin-bottom:3px}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* shuffle "finding a station" overlay: dimmed backdrop, centred dots + message */
.shufpop{position:fixed;inset:0;z-index:62;display:flex;align-items:center;justify-content:center;
  background:rgba(8,8,11,.62);opacity:0;pointer-events:none;transition:opacity .25s ease}
.shufpop.show{opacity:1;pointer-events:auto}
.shuf-find{display:flex;flex-direction:column;align-items:center;gap:20px;
  transform:translateY(10px) scale(.94);transition:transform .34s cubic-bezier(.2,.9,.3,1.2)}
.shufpop.show .shuf-find{transform:translateY(0) scale(1)}
.shuf-dots{display:flex;gap:10px}
.shuf-dots i{width:12px;height:12px;border-radius:50%;background:#fff;animation:shufdot 1s ease-in-out infinite}
.shuf-dots i:nth-child(2){animation-delay:.16s}
.shuf-dots i:nth-child(3){animation-delay:.32s}
@keyframes shufdot{0%,100%{transform:translateY(0);opacity:.35}50%{transform:translateY(-10px);opacity:1}}
.shuf-msg{color:#fff;font-size:16.5px;font-weight:700;letter-spacing:.2px;text-align:center;max-width:78%}
.now-mt.err{color:var(--rose)}

/* ---------- tab bar ---------- */
/* elevated bottom bar: distinct surface + upward shadow so it lifts off the
   content instead of blending into the page, with a clear active indicator */
.tabs{position:fixed;left:0;right:0;bottom:0;z-index:31;height:calc(var(--tab-h) + var(--sab));
  display:flex;padding:0 8px var(--sab);background:var(--elev);
  border-top:1px solid var(--line);box-shadow:0 -8px 26px -10px rgba(0,0,0,.5)}
html.light .tabs{box-shadow:0 -6px 22px -12px rgba(26,28,42,.16)}
.tab{flex:1;position:relative;background:none;border:none;color:var(--muted);font-family:inherit;font-size:10px;font-weight:700;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;transition:color .15s}
.tab svg{width:23px;height:23px}
.tab.on{color:var(--ink)}
.tab.on::after{content:"";position:absolute;top:0;left:50%;transform:translateX(-50%);
  width:28px;height:3px;border-radius:0 0 3px 3px;background:var(--accent)}

/* ---------- now playing sheet ---------- */
.now{position:fixed;inset:0;z-index:50;transform:translateY(100%);transition:transform .38s cubic-bezier(.2,.8,.2,1);
  background:var(--bg);overflow:hidden;visibility:hidden}
.now.open{transform:none;visibility:visible}
.now-bg{display:none}
.now-inner{position:relative;z-index:2;height:100%;display:flex;flex-direction:column;align-items:center;
  overflow-y:auto;-webkit-overflow-scrolling:touch;
  padding:calc(var(--sat) + 16px) 28px calc(var(--sab) + 26px);background:var(--bg)}
.now-inner::-webkit-scrollbar{width:0}
.now-handle{width:40px;height:5px;border-radius:5px;background:var(--line2);margin-bottom:6px;cursor:grab}
.now-close{position:absolute;top:calc(var(--sat) + 14px);left:18px;background:var(--soft);border:none;
  width:38px;height:38px;border-radius:50%;color:var(--ink);display:grid;place-items:center;cursor:pointer}
.now-close svg{width:22px;height:22px}
.now-art{width:min(50vw,206px);aspect-ratio:1;border-radius:24px;margin:auto 0 16px;display:grid;place-items:center;
  overflow:hidden;position:relative;color:#fff;
  background:repeating-radial-gradient(circle at 50% 50%,#1b1b1f 0 2px,#26262c 2px 5px);box-shadow:var(--shadow)}
.now-art img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:2}
.now-art span{position:relative;z-index:1}
.now-art svg{width:30%;height:30%;position:relative;z-index:1;color:#fff;filter:drop-shadow(0 6px 18px rgba(0,0,0,.4))}
.now-art::before{content:"";position:absolute;inset:0;z-index:1;
  background:radial-gradient(circle at 50% 50%,transparent 27%,rgba(255,255,255,.05) 27.5%,transparent 28.5%,transparent 40%,rgba(255,255,255,.05) 40.5%,transparent 41.5%)}
.now-live{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:800;letter-spacing:1px;color:var(--ink)}
.now-live i{width:8px;height:8px;border-radius:50%;background:#3ddc84;
  box-shadow:0 0 7px rgba(61,220,132,.85);animation:livedot 1.3s ease-in-out infinite}
@keyframes livedot{0%,100%{background:#3ddc84;box-shadow:0 0 7px rgba(61,220,132,.85)}
  50%{background:#fff;box-shadow:0 0 8px rgba(255,255,255,.75)}}
@keyframes blink{0%,100%{opacity:1}50%{opacity:.25}}
.now-nm{font-weight:800;font-size:26px;letter-spacing:-.03em;text-align:center;margin-top:16px;line-height:1.18;max-width:92%}
.now-mt{color:var(--muted);font-size:14px;margin-top:8px;text-align:center;font-weight:500}
/* live "now playing" song line (from ICY metadata) — up to two lines for long names */
.now-track{color:var(--ink);font-size:13.5px;margin-top:10px;text-align:center;font-weight:600;max-width:92%;line-height:1.4;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;cursor:pointer}
#now.episode .now-track{display:none!important}

/* live spectrum — bars animate independently while playing (calm when paused) */
.now-eq{display:flex;align-items:center;justify-content:center;gap:3px;height:38px;margin:20px 0 6px}
.now-eq i{width:3.5px;border-radius:3px;background:var(--wave);height:7px;
  animation:spec 1s ease-in-out infinite;animation-play-state:paused}
.now.playing .now-eq i{background:var(--ink);animation-play-state:running}
@keyframes spec{0%,100%{height:7px;opacity:.55}50%{height:32px;opacity:1}}
.now-eq i:nth-child(2n){animation-duration:.78s;animation-delay:.12s}
.now-eq i:nth-child(3n){animation-duration:1.12s;animation-delay:.34s}
.now-eq i:nth-child(3n+1){animation-duration:.92s;animation-delay:.5s}
.now-eq i:nth-child(4n){animation-duration:.68s;animation-delay:.22s}
.now-eq i:nth-child(5n){animation-duration:1.28s;animation-delay:.06s}
.now-eq i:nth-child(7n){animation-duration:.84s;animation-delay:.44s}

/* podcast seek bar */
.now-seek{display:none;width:100%;max-width:360px;margin:20px 0 2px}
#now.episode .now-seek{display:block}
#now.episode .now-eq{display:none}
#now.episode .now-live{display:none}
.now-seek input{-webkit-appearance:none;appearance:none;width:100%;height:5px;border-radius:5px;background:var(--line2);outline:none}
.now-seek input::-webkit-slider-thumb{-webkit-appearance:none;width:15px;height:15px;border-radius:50%;background:var(--ink);cursor:pointer}
.now-seek input::-moz-range-thumb{width:15px;height:15px;border:none;border-radius:50%;background:var(--ink)}
.seek-times{display:flex;justify-content:space-between;margin-top:6px;font-size:11.5px;color:var(--muted);font-weight:600}

.now-controls{display:flex;align-items:center;gap:26px;margin-top:30px}
/* clean, minimal side controls: just the icon (no circle/border) — the play disc leads */
.nc{width:48px;height:48px;border-radius:50%;background:none;border:none;
  color:var(--ink);cursor:pointer;display:grid;place-items:center;transition:transform .14s ease,opacity .15s}
.nc svg{width:29px;height:29px}
.nc:active{transform:scale(.9);opacity:.6}
#nowNext,#nowPrev{color:var(--muted)}   /* secondary transport reads lighter than the play disc */
/* the play/pause button is the single solid accent disc that leads the row */
.nc.big{width:72px;height:72px;border-radius:50%;background:var(--accent);color:var(--accent-ink);
  border:none;box-shadow:var(--neu);transition:transform .14s ease,box-shadow .15s ease}
.nc.big svg{width:30px;height:30px}
.nc.big:active{transform:scale(.95);background:var(--accent);opacity:1;box-shadow:var(--neu-in)}
/* four side controls + the big disc must still fit narrow phones (≤380px) without overflow */
@media (max-width:380px){
  .now-controls{gap:16px}
  .nc{width:44px;height:44px}
  .nc svg{width:26px;height:26px}
  .nc.big{width:66px;height:66px}
  .nc.big svg{width:28px;height:28px}
}
.now-vol{display:flex;align-items:center;gap:12px;width:100%;max-width:340px;margin-top:28px}
.now-vol svg{width:19px;height:19px;color:var(--muted);flex:none}
.vol-btn{flex:none;background:none;border:none;padding:0;display:grid;place-items:center;cursor:pointer;color:var(--muted)}
.vol-btn:active{color:var(--ink)}
.now-vol input{flex:1;-webkit-appearance:none;appearance:none;height:5px;border-radius:5px;background:var(--line2);outline:none}
.now-vol input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:var(--ink);cursor:pointer}
.now-vol input::-moz-range-thumb{width:16px;height:16px;border:none;border-radius:50%;background:var(--ink)}
.now-actions{display:flex;flex-wrap:nowrap;justify-content:center;gap:10px;width:100%;max-width:360px;
  margin:22px auto 0;padding-top:20px;border-top:1px solid var(--line)}
/* compact single-line action row: soft, borderless icon chips (labels kept for a11y) */
.na{flex:none;display:inline-flex;align-items:center;justify-content:center;width:46px;height:46px;
  background:var(--soft);border:none;border-radius:50%;
  color:var(--ink);font-family:inherit;cursor:pointer;text-decoration:none;padding:0;box-shadow:var(--neu);
  transition:transform .14s ease,background .18s ease,box-shadow .15s ease}
.na:active{transform:scale(.9);box-shadow:var(--neu-in)}
.na span{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.na svg{width:19px;height:19px;flex:none}
.na.on{color:var(--rose)}
.na.off{opacity:.4}   /* greyed out when no song/lyrics is available */
.na.on svg{fill:var(--rose);stroke:var(--rose)}
/* dislike active = neutral ink (distinct from the rose favourite) */
#nowDislike.on{color:var(--ink);border-color:var(--ink)}
#nowDislike.on svg{stroke:var(--ink);fill:none}
/* disliked stations: dimmed + a small thumbs-down marker so they're easy to spot */
.lrow.dis{opacity:.5}
.lrow.dis.on{opacity:.7}
.dis-tag{display:inline-flex;vertical-align:-2px;margin-left:6px;color:var(--muted)}
.dis-tag svg{width:13px;height:13px}

/* sound enhancer / sleep / buffer panels */
/* collapsible "Audio & timer" — tucks the Sound Enhancer + Sleep Timer away so
   the player stays clean; expands on tap */
.now-extra{width:100%;max-width:360px;margin:18px auto auto;padding:6px 0;
  border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.extra-toggle{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;background:none;border:none;cursor:pointer;
  color:var(--ink);font-family:inherit;padding:11px 2px}
.extra-toggle>svg:first-child{width:17px;height:17px;color:var(--muted);flex:none}
.extra-label{font-size:13px;font-weight:800;letter-spacing:.3px}
.extra-status{font-size:12px;font-weight:600;color:var(--muted);white-space:nowrap}
.extra-status:not(:empty)::before{content:"·";margin-right:6px;color:var(--line2)}   /* separator only when there's a status */
.extra-chev{width:17px;height:17px;color:var(--muted);flex:none;transition:transform .22s ease}
.now-extra.open .extra-chev{transform:rotate(180deg)}
.extra-body{display:none}
.now-extra.open .extra-body{display:block;animation:nsmoreIn .2s ease}
.now-sound{width:100%;max-width:360px;margin-top:18px}
#nowSleep{margin-top:18px;padding:18px 0 4px;border-top:1px solid var(--line)}
.ns-label{display:flex;align-items:center;gap:7px;font-size:10.5px;font-weight:800;letter-spacing:1.3px;
  color:var(--muted);justify-content:center;margin-bottom:11px}
.ns-label svg{width:15px;height:15px;color:var(--ink)}
.ns-opt{margin-left:7px;font-size:9px;font-weight:700;letter-spacing:.6px;color:var(--muted);
  background:var(--soft);border-radius:20px;padding:2px 7px;text-transform:none}
.ns-chips{display:flex;gap:8px;justify-content:center;align-items:center;flex-wrap:wrap}
.nschip,.slchip{font-family:inherit;font-size:13px;font-weight:600;color:var(--muted);background:var(--soft);
  border:none;border-radius:30px;padding:9px 15px;cursor:pointer;white-space:nowrap;
  -webkit-appearance:none;appearance:none;line-height:1.1;box-shadow:var(--neu);transition:box-shadow .15s}
.nschip.on,.slchip.on{color:var(--accent-ink);background:var(--accent)}
.nschip:active,.slchip:active{box-shadow:var(--neu-in)}
.nsmore-btn{display:inline-flex;align-items:center;gap:5px;padding-right:11px}
.nsmore-btn svg{width:13px;height:13px;flex:none;transition:transform .22s ease}
.nsmore-btn.open{color:var(--ink);background:var(--line2)}
.nsmore-btn.open svg{transform:rotate(180deg)}
.nsmore-btn.has{color:var(--accent-ink);background:var(--accent)}
.ns-note{font-size:11.5px;color:var(--muted);text-align:center;margin-top:10px;font-weight:600;letter-spacing:.2px}
.ns-note:empty{display:none}
.ns-more{display:none;flex-wrap:wrap;gap:8px;justify-content:center;margin-top:9px;animation:nsmoreIn .2s ease}
.ns-more.open{display:flex}
@keyframes nsmoreIn{from{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:none}}
.now-sleep{margin-top:18px}
.sleep-left{margin-left:8px;color:var(--ink);font-weight:800;letter-spacing:.5px}

/* ---------- modals ---------- */
.modal{position:fixed;inset:0;z-index:70;display:none;align-items:flex-end;justify-content:center;
  background:rgba(0,0,0,.55);backdrop-filter:blur(3px)}
.modal.open{display:flex}
.modal-card{width:100%;max-width:460px;background:var(--bg);border:1px solid var(--line2);
  border-radius:22px 22px 0 0;padding:24px 20px calc(var(--sab) + 22px);animation:rise .25s ease}
@media(min-width:560px){.modal{align-items:center}.modal-card{border-radius:22px}}
.modal-h{font-size:21px;font-weight:800;letter-spacing:-.02em}
.modal-sub{color:var(--muted);font-size:13px;margin:7px 0 16px;line-height:1.45;font-weight:500}
.modal-in{width:100%;background:var(--soft);border:none;border-radius:12px;
  padding:14px;color:var(--ink);font-family:inherit;font-size:15px;margin-bottom:10px;outline:none}
.modal-in::placeholder{color:var(--muted)}
.modal-row{display:flex;gap:10px;margin-top:8px}
.modal-btn{flex:1;border:1.5px solid var(--line2);background:transparent;color:var(--ink);
  border-radius:30px;padding:13px;font-family:inherit;font-weight:700;font-size:14px;cursor:pointer}
.modal-btn.primary{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
/* lyrics text */
.lyrics-body{position:relative;font-family:inherit;font-size:14px;line-height:1.7;color:var(--ink);white-space:pre-wrap;
  word-break:break-word;max-height:52vh;overflow-y:auto;margin:4px 0 14px;-webkit-overflow-scrolling:touch}
.lyrics-body::-webkit-scrollbar{width:0}
/* synced (scrolling) lyrics: every line stays READABLE (the sync is approximate on
   live radio, so people scroll and read manually); the active line is emphasized
   rather than everything else being dimmed to illegibility */
.lyrics-body.synced{white-space:normal;text-align:center;font-size:16px;line-height:1.65}
.lrc-line{padding:7px 4px;color:var(--ink);opacity:.82;font-weight:500;transition:opacity .25s ease,color .25s ease,transform .25s ease}
.lrc-line.active{opacity:1;font-weight:800;transform:scale(1.04)}
/* editable "search lyrics" box — refine the song text for any station's metadata style */
.lyrics-search{display:flex;gap:8px;align-items:center;margin:2px 0 12px}
.lyrics-search input{flex:1;min-width:0;font-family:inherit;font-size:14px;color:var(--ink);background:var(--soft);
  border:none;border-radius:12px;padding:10px 13px;outline:none;-webkit-appearance:none;appearance:none}
.lyrics-search input::placeholder{color:var(--muted)}
.lyrics-go{flex:none;width:42px;height:42px;border-radius:12px;background:var(--accent);color:var(--accent-ink);
  border:none;display:grid;place-items:center;cursor:pointer}
.lyrics-go svg{width:19px;height:19px}
.lyrics-go:active{opacity:.85}
.lyrics-sync{display:flex;flex-direction:column;align-items:center;gap:8px;margin:0 0 12px}
.lsync-hint{font-size:11.5px;font-weight:600;color:var(--muted);opacity:.85}
.lsync-row{display:flex;align-items:center;justify-content:center;gap:14px}
.lsync-btn{font-family:inherit;font-size:13px;font-weight:700;color:var(--ink);background:var(--soft);
  border:none;border-radius:30px;padding:7px 14px;cursor:pointer}
.lsync-btn:active{background:var(--line2)}
.lsync-lbl{font-size:12px;font-weight:600;color:var(--muted);min-width:70px;text-align:center}
.lrc-line{cursor:pointer}

/* legal / info pages */
.info-body{font-size:13.5px;line-height:1.6;color:var(--ink);max-height:60vh;overflow-y:auto;margin:6px 0 14px;
  -webkit-overflow-scrolling:touch}
.info-body::-webkit-scrollbar{width:0}
.info-body p{margin:0 0 11px;color:var(--muted)}
.info-body p b{color:var(--ink);font-weight:700}
.legal{padding:26px 22px calc(var(--sab) + 8px);text-align:center}
.legal-note{font-size:12px;line-height:1.55;color:var(--muted);max-width:560px;margin:0 auto 14px}
.legal-links{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;align-items:center}
.legal-links button{background:none;border:none;color:var(--ink);font-family:inherit;font-size:12.5px;font-weight:600;
  cursor:pointer;padding:2px;text-decoration:underline;text-underline-offset:2px}
.legal-links i{color:var(--muted);font-style:normal}
.legal-copy{font-size:11px;color:var(--muted);margin-top:14px;letter-spacing:.2px}

/* one-time storage consent banner */
.consent{position:fixed;left:10px;right:10px;bottom:calc(var(--tab-h) + var(--mini-h) + var(--sab) + 22px);z-index:65;
  display:none;align-items:center;gap:12px;padding:12px 14px;background:var(--card);border:1px solid var(--line2);
  border-radius:16px;box-shadow:var(--shadow);max-width:560px;margin:0 auto}
.consent.show{display:flex;animation:rise .3s ease}
.consent-tx{flex:1;font-size:12.5px;line-height:1.45;color:var(--muted)}
.consent-link{background:none;border:none;color:var(--ink);font-family:inherit;font-size:12.5px;font-weight:700;
  cursor:pointer;text-decoration:underline;text-underline-offset:2px;padding:0}
.consent-ok{flex:none;background:var(--accent);color:var(--accent-ink);border:none;border-radius:30px;
  padding:9px 16px;font-family:inherit;font-weight:700;font-size:13px;cursor:pointer}
@media(min-width:1024px){ .consent{left:auto;right:24px;bottom:104px;margin:0;max-width:420px} }

/* install promo banner — drops in from the top, like most sites, so it never
   collides with the mini-player + tab bar at the bottom */
.install-banner{position:fixed;left:10px;right:10px;top:calc(var(--sat) + 10px);z-index:66;
  display:none;align-items:center;gap:12px;padding:12px 14px;background:var(--card);border:1px solid var(--line2);
  border-radius:16px;box-shadow:var(--shadow);max-width:560px;margin:0 auto}
.install-banner.show{display:flex;animation:drop .3s ease}
@keyframes drop{from{transform:translateY(-20px);opacity:0}to{transform:none;opacity:1}}
.install-ico{flex:none;width:40px;height:40px;border-radius:11px;display:block}
.install-tx{flex:1;min-width:0}
.install-title{font-size:14px;font-weight:800;color:var(--ink);line-height:1.2}
.install-note{font-size:12.5px;line-height:1.4;color:var(--muted);margin-top:2px}
.install-btns{flex:none;display:flex;align-items:center;gap:8px}
.install-no{background:none;border:none;color:var(--muted);font-family:inherit;font-size:13px;font-weight:700;
  cursor:pointer;padding:9px 6px}
.install-ok{background:var(--accent);color:var(--accent-ink);border:none;border-radius:30px;
  padding:9px 18px;font-family:inherit;font-weight:700;font-size:13px;cursor:pointer}
@media(min-width:1024px){ .install-banner{left:auto;right:24px;top:24px;margin:0;max-width:420px} }

/* desktop-only chrome — hidden on phone & tablet */
.dtopbar,.side-brand,.side-langs,.side-lib,.cardsec,.mini-prog{display:none}
/* the logo mark is black line-art — flip it to white in dark theme */
html.dark .brand-mark,html.dark .vtitle-mark{filter:invert(1)}
/* logo mark beside the "Radios" wordmark in the home header */
.vtitle{display:flex;align-items:center;gap:9px}
.vtitle-mark{height:30px;width:auto;flex:none}

/* =========================================================
   Auto-detected layout tiers (by viewport width):
     • Phone   ( < 700px ) — base styles above
     • Tablet  ( 700–1023 ) — wider column, card grid,
                 2-col lists, full player controls, bottom tabs
     • Desktop ( ≥ 1024 )  — left sidebar, top bar, docked
                 player bar, multi-column grids
   ========================================================= */

/* ---------- TABLET and up (shared with desktop) ---------- */
@media(min-width:700px){
  #view{max-width:820px;margin:0 auto;width:100%}
  .mini{max-width:760px;margin:0 auto}
  .tabs{padding-left:max(8px,calc((100% - 760px)/2));padding-right:max(8px,calc((100% - 760px)/2))}

  /* two-column lists + hover */
  .list{display:grid;grid-template-columns:repeat(2,1fr);gap:2px 18px;padding:4px 18px 0}
  .lrow:hover,.cat:hover,.iconbtn:hover{background:var(--soft)}

  /* "Popular now" card grid */
  .cardsec{display:block}
  .cardgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:0 18px}
  .card{cursor:pointer;min-width:0}   /* keep all grid columns equal even with long names */
  .cart{position:relative;aspect-ratio:1;border-radius:16px;overflow:hidden;display:grid;place-items:center;margin-bottom:11px;color:#fff}
  .cart svg{width:19%;height:19%;color:#fff;opacity:.85;position:relative;z-index:1}
  .cart::after{content:"";position:absolute;inset:0;background:linear-gradient(135deg,rgba(255,255,255,.12),transparent 55%)}
  .clive{position:absolute;top:11px;left:11px;display:flex;align-items:center;gap:6px;background:rgba(0,0,0,.45);
    -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);color:#fff;padding:5px 9px;border-radius:30px;
    font-size:9.5px;font-weight:800;letter-spacing:.06em;z-index:2}
  .clive i{width:5px;height:5px;border-radius:50%;background:#fff;animation:blink 1.6s infinite}
  .cplay{position:absolute;right:11px;bottom:11px;width:42px;height:42px;border-radius:50%;background:#fff;
    display:grid;place-items:center;opacity:0;transform:translateY(8px);transition:.2s;z-index:2}
  .cplay svg{width:17px;height:17px;color:#111}
  .card:hover .cplay,.card.on .cplay{opacity:1;transform:none}
  .cnm{font-size:15px;font-weight:700;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
  .cmt{font-size:13px;color:var(--muted)}

  /* player bar gains the full transport (prev/next + volume) */
  .mini.show{display:grid;grid-template-columns:minmax(150px,1fr) auto minmax(150px,1fr);gap:14px;align-items:center}
  .mini-ctrls{justify-self:center;gap:10px}
  .mini-ctrls #miniPrev,.mini-ctrls #miniNext{display:grid}
  .mini-right{display:flex;align-items:center;gap:10px;justify-self:end}
}

/* ---------- DESKTOP only: sidebar + top bar + docked bar ---------- */
@media(min-width:1024px){
  /* left sidebar nav (repurposed bottom tabs) */
  .tabs{
    top:0;bottom:0;left:0;right:auto;width:248px;height:100vh;
    flex-direction:column;justify-content:flex-start;align-items:stretch;gap:4px;
    padding:22px 14px 16px;border-top:none;border-right:1px solid var(--line);
    background:var(--bg2);transform:none;border-radius:0;box-shadow:none}
  .tab{flex:none;flex-direction:row;justify-content:flex-start;gap:14px;padding:12px 16px;border-radius:12px}
  .tab svg{width:22px;height:22px}
  .tab span{font-size:15px;font-weight:600}
  .tab.on{background:var(--soft);color:var(--ink)}
  .tab.on::after{display:none}   /* the bottom-bar indicator doesn't apply to the vertical sidebar */
  .tab:hover{color:var(--ink);background:var(--soft)}

  /* content centred to the right of the sidebar, below the top bar */
  #view{margin:0 0 0 248px;max-width:none;width:auto;
    padding:calc(var(--sat) + 82px) max(44px,calc((100vw - 248px - 900px)/2)) 116px}
  .vtitle{font-size:38px}
  .home-cta{justify-content:flex-start}

  /* docked desktop player bar (surface, full transport) */
  .mini{left:248px;right:0;bottom:0;margin:0;max-width:none;height:84px;
    border-radius:0;border-top:1px solid var(--line);box-shadow:none;padding:0 24px;
    background:var(--bg2);color:var(--ink)}
  .mini.show{grid-template-columns:minmax(220px,1fr) auto minmax(220px,1fr);gap:16px}
  .mini-art{width:52px;height:52px}
  .mini-nm{color:var(--ink);font-size:15px}
  .mini-mt{color:var(--muted);opacity:1}
  .mini-btn{width:42px;height:42px;background:var(--accent);color:var(--accent-ink)}
  .mini-btn svg{width:20px;height:20px}
  .mini-x{color:var(--ink);opacity:.62}
  .mini-x:hover{opacity:1;background:var(--soft)}
  .mini-x.on{color:var(--rose);opacity:1}
  /* centre column = transport row over a progress/LIVE row */
  .mini-ctrls{flex-direction:column;gap:6px}
  .mini-tbtns{display:flex;align-items:center;gap:16px}
  .mini-prog{display:flex;align-items:center;gap:9px;width:min(440px,32vw)}
  .mp-cur,.mp-dur{font-size:11px;color:var(--muted);font-weight:600;font-variant-numeric:tabular-nums;min-width:30px}
  .mp-cur{text-align:right}.mp-dur{text-align:left}
  .mp-bar{flex:1;height:4px;border-radius:4px;background:var(--line2);position:relative;cursor:pointer}
  .mp-fill{position:absolute;inset:0;width:0;background:var(--ink);border-radius:4px}
  .mini-prog.live .mp-bar{cursor:default}
  .mini-prog.live .mp-fill{background:var(--line2)}
  .mini-prog.live .mp-cur{color:var(--ink);display:inline-flex;align-items:center;gap:5px;min-width:0}
  .mini-prog.live .mp-cur::before{content:"";width:6px;height:6px;border-radius:50%;background:#e0444d;animation:blink 1.6s infinite}
  .mini-vol svg{color:var(--ink);opacity:.6}
  .mini-vol input{background:var(--line2)}
  .mini-vol input::-webkit-slider-thumb{background:var(--ink)}
  .mini-vol input::-moz-range-thumb{background:var(--ink)}

  .cardgrid{grid-template-columns:repeat(4,1fr);gap:18px}
  .now{left:248px}
  .toast{left:calc(248px + (100vw - 248px)/2);bottom:108px}

  /* sidebar brand + languages */
  .side-brand{display:flex;align-items:center;gap:10px;padding:2px 8px 20px}
  .brand-mark{height:30px;width:auto;flex:none}
  .brand-name{font-size:20px;font-weight:800;letter-spacing:-.02em;color:var(--ink)}
  .vtitle-mark{display:none}   /* sidebar already shows the logo on desktop */
  .side-langs{display:flex;flex-direction:column;flex:none;min-height:0}
  .slabel{font-size:11px;font-weight:800;letter-spacing:.08em;color:var(--muted);padding:16px 12px 8px}
  .langs{display:flex;flex-direction:column;gap:1px}
  .lang{display:flex;align-items:center;gap:11px;padding:8px 12px;border-radius:10px;color:var(--muted);
    font-family:inherit;font-size:13.5px;font-weight:500;cursor:pointer;border:none;background:none;text-align:left}
  .lang i{width:7px;height:7px;border-radius:50%;background:currentColor;opacity:.5;flex:none}
  .lang:hover,.lang.on{color:var(--ink);background:var(--soft)}

  /* sidebar LIBRARY (favourites + recents, scrollable) */
  .side-lib{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
  .libitems{display:flex;flex-direction:column;gap:1px;overflow-y:auto;flex:1;
    scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
  .libitems::-webkit-scrollbar{width:8px}
  .libitems::-webkit-scrollbar-thumb{background:var(--line2);border-radius:8px;border:2px solid var(--bg2)}
  .libitem{display:flex;align-items:center;gap:10px;padding:6px 10px;border-radius:10px;cursor:pointer;
    border:none;background:none;text-align:left;width:100%}
  .libitem:hover,.libitem.on{background:var(--soft)}
  .libart{width:34px;height:34px;border-radius:8px;flex:none;display:grid;place-items:center;color:#fff;
    overflow:hidden;position:relative}
  .libart svg{width:16px;height:16px;color:#fff}
  .libtx{min-width:0;flex:1}
  .libtx b{font-size:13px;font-weight:600;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
  .libtx span{font-size:11px;color:var(--muted);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .libitem.on .libtx b{color:var(--ink)}
  .libempty{font-size:12px;color:var(--muted);padding:8px 12px;line-height:1.45}

  /* top bar */
  .dtopbar{display:flex;align-items:center;gap:16px;position:fixed;top:0;left:248px;right:0;height:66px;z-index:20;
    padding:0 28px;background:var(--bg);border-bottom:1px solid var(--line)}
  .dfind{display:flex;align-items:center;gap:11px;background:var(--soft);border-radius:13px;padding:11px 15px;width:min(420px,40vw)}
  .dfind svg{width:18px;height:18px;color:var(--muted);flex:none}
  .dfind input{background:none;border:0;outline:0;color:var(--ink);font-family:inherit;font-size:14px;width:100%}
  .dfind input::placeholder{color:var(--muted)}
  .dsp{flex:1}
  .icbtn{width:40px;height:40px;border-radius:50%;background:var(--soft);display:grid;place-items:center;cursor:pointer;color:var(--ink);border:none}
  .icbtn:hover{background:var(--line2)}
  .icbtn svg{width:18px;height:18px}
  .avatar{width:40px;height:40px;border-radius:50%;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-weight:800;font-size:14px;cursor:pointer}

  /* ---------- desktop polish (Apple Music / Spotify feel) ---------- */
  /* declutter the in-content header — the top bar already owns theme/search */
  .vhead{padding:6px 18px 6px}
  .vhead .clock,#themeTop{display:none}
  .greet{font-size:14px}
  .vtitle{font-size:34px;margin-top:2px}
  .vsub{margin-top:5px}

  /* roomier sections + bolder headings */
  .section{margin-top:36px}
  .sec-h{padding:0 18px 14px}
  .sec-h h3{font-size:22px}
  .sec-h .cnt{font-size:13px}

  /* cards: gentle hover lift + art shadow, like a music app */
  .cart{box-shadow:0 8px 22px -12px rgba(0,0,0,.5);transition:transform .18s ease,box-shadow .18s ease}
  .card{transition:transform .18s ease}
  .card:hover{transform:translateY(-4px)}
  .card:hover .cart{box-shadow:0 16px 30px -14px rgba(0,0,0,.6)}
  .cnm{font-size:15.5px}

  /* list rows: reveal the play affordance on hover (Spotify-style) */
  .lrow{padding:9px 12px;border-radius:10px}
  .lrow .lplay{opacity:0;transition:opacity .15s ease}
  .lrow:hover .lplay,.lrow.on .lplay,.lrow.on .leq{opacity:1}

  /* thin, subtle scrollbars */
  #view{scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
  #view::-webkit-scrollbar{width:10px}
  #view::-webkit-scrollbar-thumb{background:var(--line2);border-radius:10px;border:3px solid var(--bg)}
  #view::-webkit-scrollbar-thumb:hover{background:var(--muted)}
  #view::-webkit-scrollbar-track{background:transparent}

  /* player bar: tighter, more refined */
  .mini{padding:0 22px}
  .mini-art{border-radius:10px}
  .mini-nm{font-weight:700}
  .mini-x{width:36px;height:36px}
  .mini-vol input{width:104px}
}
@media(min-width:1500px){
  .list{grid-template-columns:repeat(3,1fr)}
  .cardgrid{grid-template-columns:repeat(5,1fr)}
}
