/* Twiddle Radio - vivid pink/violet gradients, glass panels, bold sans. Dark is the primary look. */

:root {
  --bg: #0b0716;
  --bg-2: #140c26;
  --panel: rgba(34, 22, 64, .5);
  --panel-solid: #1a1230;
  --line: rgba(200, 170, 255, .12);
  --line-strong: rgba(200, 170, 255, .24);
  --ink: #f6f3ff;
  --ink-2: #c0b6da;
  --ink-3: #8a7fa9;
  --amber: #ff4fa3; /* the accent - name kept from the first (amber) design */
  --amber-2: #8b5cf6;
  --amber-glow: rgba(255, 79, 163, .32);
  --needle: #ffd23f;
  --land: #2b2149;
  --land-edge: #43346f;
  --grid: rgba(200, 170, 255, .06);
  --knob-1: #2a1d4c;
  --knob-2: #120a24;
  --chip: rgba(255, 255, 255, .05);
  --shadow: 0 30px 80px -30px rgba(10, 0, 30, .9);
  --on-accent: #fff;
  --grad: linear-gradient(120deg, #ff8a3d, #ff4fa3 45%, #8b5cf6);
  --ui: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: var(--ui);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f3ff;
  --bg-2: #ede7ff;
  --panel: rgba(255, 255, 255, .66);
  --panel-solid: #ffffff;
  --line: rgba(60, 30, 120, .1);
  --line-strong: rgba(60, 30, 120, .2);
  --ink: #1a1033;
  --ink-2: #4f4569;
  --ink-3: #8b83a4;
  --amber: #e0337f;
  --amber-2: #7c3aed;
  --amber-glow: rgba(224, 51, 127, .22);
  --needle: #7c3aed;
  --land: #e2d9f7;
  --land-edge: #cdbff0;
  --grid: rgba(60, 30, 120, .06);
  --knob-1: #ffffff;
  --knob-2: #f1ecff;
  --chip: rgba(60, 30, 120, .04);
  --shadow: 0 30px 70px -35px rgba(90, 40, 160, .35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(700px 420px at 85% -5%, rgba(255, 79, 163, .30), transparent 65%),
    radial-gradient(800px 500px at 0% 20%, rgba(139, 92, 246, .28), transparent 65%),
    radial-gradient(700px 500px at 60% 110%, rgba(255, 138, 61, .14), transparent 65%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
  font: 16px/1.5 var(--ui);
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
:root[data-theme="light"] body {
  background:
    radial-gradient(700px 420px at 85% -5%, rgba(255, 79, 163, .20), transparent 65%),
    radial-gradient(800px 500px at 0% 20%, rgba(139, 92, 246, .18), transparent 65%),
    radial-gradient(700px 500px at 60% 110%, rgba(255, 138, 61, .14), transparent 65%),
    var(--bg);
  background-attachment: fixed;
}

a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { color: var(--amber); text-decoration-color: currentColor; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: #000; padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--ink-3); }
[hidden] { display: none !important; }

/* ------------------------------------------------------------ top bar */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1180px; margin: 0 auto; padding: 22px 20px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; text-decoration: none; font-family: var(--display); font-size: 1.28rem; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; color: var(--amber); }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a, .nav-btn {
  padding: 8px 12px; border-radius: 999px; text-decoration: none; font-size: .92rem; color: var(--ink-2);
  background: none; border: 1px solid transparent;
}
.top-nav a:hover, .nav-btn:hover { color: var(--ink); background: var(--chip); border-color: var(--line); }
.nav-btn.icon { width: 38px; height: 38px; padding: 0; display: grid; place-items: center; }
.nav-btn.icon svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------ deck */
.deck { max-width: 1180px; margin: 0 auto; padding: 28px 20px 36px; }
.deck-head { text-align: center; margin: 0 auto 44px; max-width: 1100px; }
.deck-title {
  font-family: var(--display); font-weight: 800; margin: 0;
  font-size: clamp(2.9rem, 7.1vw, 4.9rem); line-height: 1.06; letter-spacing: -.035em; text-wrap: balance;
}
.deck-title em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.deck-title.small { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: var(--ink-2); font-weight: 600; letter-spacing: -.01em; }

/* the dial: longitude scale, the needle points at where on Earth you are */
.dial { margin: 0 auto 40px; max-width: 980px; }
.dial-glass {
  position: relative; height: 52px; border-radius: 999px; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.dial-scale {
  position: absolute; inset: 10px 26px 24px;
  background:
    repeating-linear-gradient(90deg, var(--ink-3) 0 2px, transparent 2px calc(100% / 6)),
    repeating-linear-gradient(90deg, color-mix(in srgb, var(--ink-3) 45%, transparent) 0 1px, transparent 1px calc(100% / 36));
  mask: linear-gradient(180deg, #000 0 60%, transparent 100%);
  opacity: .7;
}
.dial-labels {
  position: absolute; left: 26px; right: 26px; bottom: 6px; display: flex; justify-content: space-between;
  font: 600 .66rem/1 var(--mono); letter-spacing: .06em; color: var(--ink-3);
}
.dial-labels span { width: 0; display: flex; justify-content: center; white-space: nowrap; }
.needle {
  position: absolute; top: 7px; bottom: 7px; width: 6px; left: 50%; margin-left: -3px; border-radius: 3px;
  background: var(--grad); box-shadow: 0 0 14px var(--amber-glow);
  transition: left 1.1s cubic-bezier(.25, 1.35, .45, 1);
}
.is-tuning .needle { transition-duration: .5s; }

.deck-body {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 22px; align-items: start;
}

.tuner, .context {
  background: var(--panel); border: 1px solid var(--line); border-radius: 30px;
  box-shadow: var(--shadow); backdrop-filter: blur(24px) saturate(140%); -webkit-backdrop-filter: blur(24px) saturate(140%);
}
.tuner { padding: 22px 22px 18px; text-align: center; }

.now { min-height: 112px; }
.now-status {
  margin: 0 0 6px; font: 700 .72rem/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber);
}
.now-status::before {
  content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 8px; vertical-align: 1px;
  background: var(--ink-3);
}
.is-playing .now-status::before { background: #ff4d4d; box-shadow: 0 0 8px #ff4d4d; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.now-name {
  margin: 0; font-family: var(--display); font-weight: 800; letter-spacing: -.025em; font-size: clamp(1.45rem, 3.4vw, 2.1rem); line-height: 1.15;
  display: flex; align-items: center; justify-content: center; gap: 12px; overflow-wrap: anywhere;
}
.now-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: #fff; flex: none; }
.now-place { margin: 6px 0 0; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.flag { width: 20px; height: 15px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line); vertical-align: -2px; flex: none; }
.flag.big { width: 56px; height: 42px; border-radius: 5px; }

/* the big knob */
.knob-row { display: grid; place-items: center; margin: 18px 0 14px; }
.knob {
  --turn: 0deg;
  position: relative; width: 208px; height: 208px; border-radius: 50%; border: 0; padding: 0;
  background: none; display: grid; place-items: center; -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease;
}
.knob::before { /* glow halo */
  content: ""; position: absolute; inset: -26px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 79, 163, .35), rgba(139, 92, 246, .2) 45%, transparent 70%);
  filter: blur(6px); animation: breathe 3.2s ease-in-out infinite;
}
@keyframes breathe { 50% { opacity: .45; transform: scale(.96); } }
.knob-grip { /* gradient ring, JS turns it on every spin */
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, #ff8a3d, #ff4fa3, #8b5cf6, #3b82f6, #22d3ee, #ff8a3d);
  box-shadow: 0 20px 50px -14px rgba(139, 92, 246, .7);
  transform: rotate(var(--turn)); transition: transform .9s cubic-bezier(.2, 1.3, .4, 1);
}
.knob-grip::after { /* pointer mark */
  content: ""; position: absolute; top: 10px; left: 50%; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 10px #fff;
}
.knob-face {
  position: relative; width: 168px; height: 168px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-solid);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, .25), 0 0 0 1px var(--line);
}
.knob-label {
  max-width: 120px; font: 800 1.05rem/1.15 var(--display); letter-spacing: -.01em;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.knob:hover .knob-grip { box-shadow: 0 22px 60px -10px rgba(255, 79, 163, .7); }
.knob:active { transform: scale(.965); }
.is-tuning .knob-label { animation: flicker .25s steps(2) infinite; }
@keyframes flicker { 50% { opacity: .55; } }

/* transport */
.transport { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.tbtn {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink);
  transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.tbtn svg { width: 22px; height: 22px; fill: currentColor; }
.tbtn:hover:not(:disabled) { border-color: var(--amber); color: var(--amber); }
.tbtn:active:not(:disabled) { transform: scale(.94); }
.tbtn:disabled { opacity: .4; cursor: default; }
.tbtn.sm { width: 40px; height: 40px; }
.tbtn.sm svg { width: 18px; height: 18px; }
#playBtn { width: 56px; height: 56px; background: var(--grad); color: var(--on-accent); border-color: transparent; }
#playBtn:hover:not(:disabled) { color: var(--on-accent); filter: brightness(1.08); }
#playBtn svg { width: 26px; height: 26px; }
.i-pause { display: none; }
.is-active .i-play { display: none; }
.is-active .i-pause { display: inline; }
#favBtn[aria-pressed="true"] { color: #ff5d73; border-color: #ff5d73; }

.viz { display: flex; align-items: flex-end; gap: 3px; height: 34px; width: 96px; padding: 0 2px; }
.viz i { flex: 1; height: 12%; border-radius: 99px; background: linear-gradient(0deg, #8b5cf6, #ff4fa3, #ff8a3d); opacity: .45; transform-origin: bottom; }
.is-playing .viz i { animation: bar 1.1s ease-in-out infinite alternate; opacity: .95; }
.viz i:nth-child(2n) { animation-duration: .8s !important; }
.viz i:nth-child(3n) { animation-duration: 1.35s !important; }
.viz i:nth-child(4n+1) { animation-delay: -.4s; }
.viz i:nth-child(5n+2) { animation-delay: -.9s; }
.viz i:nth-child(7n) { animation-duration: .65s !important; }
@keyframes bar { 0% { height: 14%; } 40% { height: 72%; } 70% { height: 38%; } 100% { height: 92%; } }

.vol { display: flex; align-items: center; }
.vol input { width: 88px; accent-color: var(--amber); }

.hint { margin: 12px 0 0; font-size: .78rem; color: var(--ink-3); }
kbd {
  font: 600 .7rem/1 var(--mono); padding: 3px 6px; border-radius: 5px; border: 1px solid var(--line-strong);
  border-bottom-width: 2px; margin: 0 3px 0 8px; color: var(--ink-2);
}

/* filters */
.tune { margin-top: 16px; text-align: left; border-top: 1px dashed var(--line-strong); padding-top: 10px; }
.tune summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 6px 2px; font-weight: 600;
}
.tune summary::-webkit-details-marker { display: none; }
.tune summary::after { content: "+"; font: 600 1.1rem/1 var(--mono); color: var(--amber); }
.tune[open] summary::after { content: "-"; }
.tune-sum { margin-left: auto; font-weight: 400; font-size: .85rem; color: var(--ink-3); text-align: right; }
.tune-body { display: grid; gap: 14px; padding: 10px 0 4px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.label { font: 700 .68rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
select {
  width: 100%; font: inherit; font-size: .93rem; color: var(--ink); padding: 9px 10px; border-radius: 10px;
  background: var(--panel-solid); border: 1px solid var(--line-strong);
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 6px 11px; border-radius: 999px; font-size: .84rem; background: var(--chip);
  border: 1px solid transparent; color: var(--ink-2);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--grad); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.toggles { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .9rem; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--amber); margin: 0; }
.linkbtn { background: none; border: 0; padding: 4px 0; color: var(--ink-3); text-decoration: underline; text-underline-offset: 3px; font-size: .85rem; justify-self: start; }
.linkbtn:hover { color: var(--amber); }

/* context panel */
.context { padding: 18px; display: grid; gap: 14px; }
.map-wrap { position: relative; }
.map { width: 100%; height: auto; display: block; border-radius: 20px; background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid transparent; }
.map .land { fill: var(--land); stroke: var(--land-edge); stroke-width: .3; }
.map .grid path { stroke: var(--grid); stroke-width: .4; fill: none; }
.map .route { fill: none; stroke: #ff4fa3; stroke-width: .7; stroke-dasharray: 1; stroke-dashoffset: 1; opacity: .8; }
.map .route.draw { animation: draw 1.2s ease-out forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.map .dot { transition: transform 1.1s cubic-bezier(.3, 1.2, .5, 1); }
.map .dot .core { fill: var(--needle); }
.map .dot .pulse { fill: none; stroke: var(--needle); stroke-width: .8; transform-box: fill-box; transform-origin: center; animation: ping 2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(.3); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }
.map-note { margin: 6px 2px 0; font: .72rem/1.3 var(--mono); color: var(--ink-3); }

.clock { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.clock-time { font: 800 2.8rem/1 var(--display); letter-spacing: -.03em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.clock-meta { color: var(--ink-2); font-size: .9rem; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; }
.facts div { min-width: 0; }
.facts dt { font: 700 .66rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.facts dd { margin: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 7px; }
.facts.wide { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin: 18px 0; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .78rem; padding: 3px 9px; border-radius: 999px; border: 1px solid transparent; color: var(--ink-2); text-decoration: none; background: var(--chip); }
a.tag:hover { border-color: var(--amber); }
.links { display: flex; gap: 16px; flex-wrap: wrap; margin: 0; font-size: .92rem; }
.side-h { margin: 4px 0 0; font: 700 .7rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.nearby { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.nearby li { display: flex; align-items: center; gap: 10px; padding: 6px 4px; border-radius: 10px; min-width: 0; }
.nearby li:hover { background: var(--chip); }
.nearby .nb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.nearby .nb-meta { font: .72rem var(--mono); color: var(--ink-3); white-space: nowrap; }
.nearby .muted { font-size: .9rem; }

/* ------------------------------------------------------------ content bands */
.band { padding: 28px 20px 40px; }
.band-in { max-width: 1180px; margin: 0 auto; }
.band h1 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: clamp(1.7rem, 4vw, 2.5rem); line-height: 1.15; margin: 0 0 8px; overflow-wrap: anywhere; }
.band h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.03em; font-size: 1.4rem; margin: 30px 0 12px; }
.band h3 { font: 700 .72rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 12px; }
.lead { color: var(--ink-2); font-size: 1.05rem; max-width: 70ch; margin: 0 0 16px; }
.page-head { display: flex; gap: 18px; align-items: flex-start; }
.page-head > div { min-width: 0; }
.st-logo { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: #fff; flex: none; }
.crumbs { display: flex; gap: 8px; font-size: .85rem; color: var(--ink-3); margin-bottom: 14px; }
.crumbs a { color: var(--ink-2); }
.cta {
  display: inline-flex; align-items: center; gap: 10px; padding: 11px 20px 11px 14px; border-radius: 999px; border: 0;
  background: var(--grad); color: var(--on-accent); font-weight: 700; box-shadow: 0 10px 30px -10px var(--amber-glow);
}
.cta svg { width: 20px; height: 20px; fill: currentColor; }
.cta:hover { filter: brightness(1.08); }

.explore .band-in { display: grid; grid-template-columns: 1.1fr 1.4fr 1fr; gap: 32px; border-top: 1px solid var(--line); padding-top: 28px; }
.explore h2 { margin-top: 0; }
.explore-intro p { color: var(--ink-2); }
.pill-cloud { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 999px; font-size: .86rem;
  border: 1px solid transparent; background: var(--chip); text-decoration: none;
}
.pill span { font: .7rem var(--mono); color: var(--ink-3); }
.pill:hover { border-color: var(--amber); }
.pill.more { color: var(--amber); }

.st-list { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px 18px; }
.st { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; border: 1px solid transparent; min-width: 0; }
.st:hover { background: var(--chip); border-color: var(--line); }
.st-play {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--chip); border: 1px solid var(--line-strong); color: var(--amber);
}
.st-play svg { width: 16px; height: 16px; fill: currentColor; }
.st-play:hover, .st.is-current .st-play { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.st-text { display: grid; min-width: 0; }
.st-name { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-meta { font-size: .8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-link { color: var(--amber); }

.genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 18px; }
.genre-card {
  display: grid; gap: 4px; padding: 18px; border-radius: 22px; text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.genre-card strong { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: 1.25rem; }
.genre-card span { font: .75rem var(--mono); color: var(--ink-3); }
.genre-card:hover { border-color: var(--amber); }

/* ------------------------------------------------------------ footer */
.foot { border-top: 1px solid var(--line); padding: 26px 20px 90px; color: var(--ink-3); font-size: .86rem; }
.foot-in { max-width: 1180px; margin: 0 auto; display: grid; gap: 10px; }
.foot-brand { font-family: var(--display); font-weight: 700; font-size: 1.05rem; color: var(--ink-2); margin: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot-links a { color: var(--ink-2); text-decoration: none; }
.foot-links a:hover { color: var(--amber); }
.foot-note { margin: 0; max-width: 80ch; }

/* ------------------------------------------------------------ library dialog */
.library {
  width: min(560px, calc(100vw - 24px)); max-height: min(78vh, 720px); padding: 0; border-radius: 26px;
  background: var(--panel-solid); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
}
.library::backdrop { background: rgba(3, 5, 12, .6); backdrop-filter: blur(3px); }
.lib-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel-solid); }
.lib-tabs { display: flex; gap: 4px; }
.lib-tabs button { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: none; color: var(--ink-2); }
.lib-tabs button[aria-selected="true"] { background: var(--grad); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.lib-list { list-style: none; margin: 0; padding: 8px; display: grid; gap: 2px; }
.lib-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; min-width: 0; }
.lib-list li:hover { background: var(--chip); }
.lib-list .lib-text { flex: 1; min-width: 0; display: grid; }
.lib-list .lib-text a { font-weight: 600; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-list .lib-text span { font-size: .78rem; color: var(--ink-3); }
.lib-rm { background: none; border: 0; color: var(--ink-3); font-size: 1.2rem; width: 32px; height: 32px; border-radius: 8px; }
.lib-rm:hover { color: #ff5d73; background: var(--chip); }
.lib-empty { padding: 18px 20px; color: var(--ink-3); margin: 0; }
#libClear { margin: 0 20px 16px; }

/* ------------------------------------------------------------ minibar + toast */
.minibar {
  position: fixed; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  width: min(560px, calc(100vw - 24px)); display: flex; align-items: center; gap: 10px; padding: 8px 10px; z-index: 30;
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 999px; box-shadow: var(--shadow);
}
.minibar #miniPlay { background: var(--grad); color: var(--on-accent); border-color: transparent; }
.mini-text { flex: 1; min-width: 0; display: grid; text-align: left; background: none; border: 0; padding: 0; }
.mini-text strong, .mini-text span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-text span { font-size: .78rem; color: var(--ink-3); }

.toast {
  position: fixed; left: 50%; top: 16px; transform: translate(-50%, calc(-100% - 24px)); z-index: 60;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; font-size: .9rem;
  background: var(--grad); color: #fff; box-shadow: var(--shadow); transition: transform .3s ease; pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 960px) {
  .explore .band-in { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 860px) {
  .deck-body { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .top { padding: 12px 16px; }
  .brand span { font-size: 1.05rem; }
  .top-nav { gap: 0; }
  .top-nav a { padding: 8px 8px; }
  .deck { padding: 16px 16px 24px; }
  .deck-head { margin-bottom: 28px; }
  .dial { margin-bottom: 28px; }
  .band { padding: 22px 16px 32px; }
  .dial-glass { height: 54px; }
  .dial-labels span:nth-child(2n) { visibility: hidden; }
  .tuner { padding: 18px 14px 14px; }
  .context { padding: 14px; }
  .knob { width: 172px; height: 172px; }
  .knob-face { width: 140px; height: 140px; }
  .knob-label { font-size: .95rem; max-width: 104px; }
  .field-row { grid-template-columns: 1fr; }
  .vol { display: none; }
  .clock-time { font-size: 2.2rem; }
  .st-list { grid-template-columns: 1fr; }
  .page-head { flex-direction: column; gap: 12px; }
  .hint { display: none; }
}
@media (max-width: 440px) {
  .top { padding: 12px 12px; }
  .top-nav a[href="/genres"] { display: none; } /* also in the footer and on the home page */
  .top-nav a, .top-nav .nav-btn:not(.icon) { padding: 8px 6px; }
}
@media (max-width: 380px) {
  .facts { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* static "level meter" instead of the moving bars */
  .is-playing .viz i { height: 45%; }
  .is-playing .viz i:nth-child(3n) { height: 75%; }
  .is-playing .viz i:nth-child(4n+1) { height: 25%; }
}
