@property --c {
  syntax: '<color>';
  inherits: true;
  initial-value: #333333;
}

:root {
  --bg: #121212;
  --surface: #181818;
  --surface-2: #1f1f1f;
  --surface-3: #2a2a2a;
  --text: #fff;
  --muted: #b3b3b3;
  --green: #1ed760;
  --green-hover: #3be477;
  --radius: 8px;
  --top-h: 64px;
  --player-h: 72px;
  --lib-w: 300px;
  --npv-w: 320px;
  --font: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Hiragino Sans', 'Noto Sans', sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  display: grid;
  grid-template-areas: "top top" "lib main" "player player";
  grid-template-columns: var(--lib-w) minmax(0, 1fr);
  grid-template-rows: var(--top-h) minmax(0, 1fr) var(--player-h);
  column-gap: 8px;
  padding: 0 8px;
  background: #000;
  color: var(--text);
  font: 400 14px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
}
body.npv-open {
  grid-template-areas: "top top top" "lib main npv" "player player player";
  grid-template-columns: var(--lib-w) minmax(0, 1fr) var(--npv-w);
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
[hidden] { display: none !important; }

.ic { width: 24px; height: 24px; flex: none; fill: currentColor; }
.i-on { display: none; }
.is-active > .i-on { display: block; }
.is-active > .i-off { display: none; }

* { scrollbar-width: thin; scrollbar-color: #ffffff4d transparent; }

/* ---------- top bar ---------- */
.topbar { grid-area: top; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 8px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; letter-spacing: -0.03em; flex: 1; }
.logo-mark { width: 32px; height: 32px; color: var(--green); }
.topbar-center { flex: 0 1 560px; display: flex; gap: 8px; align-items: center; min-width: 0; }
.topbar-right { flex: 1; display: flex; justify-content: flex-end; }

.circle-btn { width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); transition: transform 0.1s, color 0.1s, background 0.1s; }
.circle-btn:hover { color: #fff; transform: scale(1.04); background: var(--surface-3); }
.circle-btn.is-active { color: #fff; }
.circle-btn.sm { width: 32px; height: 32px; background: #000000b3; }
.circle-btn.sm .ic { width: 16px; height: 16px; }

.search-pill { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 14px; border-radius: 500px; background: var(--surface-2); color: var(--muted); cursor: text; transition: background 0.15s, box-shadow 0.15s; }
.search-pill:hover { background: var(--surface-3); box-shadow: inset 0 0 0 1px #ffffff1f; }
.search-pill:focus-within { background: var(--surface-3); box-shadow: inset 0 0 0 2px #fff; color: #fff; }
.search-pill input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font-size: 16px; color: #fff; }
.search-pill input::placeholder { color: var(--muted); }
kbd { font: 600 11px var(--font); padding: 1px 7px; border-radius: 4px; border: 1px solid #ffffff33; color: var(--muted); }

.pill-btn { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 16px; border-radius: 500px; background: #fff; color: #000; font-weight: 700; font-size: 14px; white-space: nowrap; transition: transform 0.1s; }
.pill-btn:hover { transform: scale(1.04); }
.pill-btn .ic { width: 16px; height: 16px; }
.pill-btn.lg { height: 48px; padding: 0 32px; font-size: 16px; }

.chip { height: 32px; padding: 0 12px; border-radius: 500px; background: #ffffff12; font-size: 14px; white-space: nowrap; transition: background 0.15s; }
.chip:hover { background: #ffffff24; }
.chip[aria-pressed="true"] { background: #fff; color: #000; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; color: var(--muted); transition: color 0.1s, transform 0.1s; }
.icon-btn:hover { color: #fff; transform: scale(1.06); }
.icon-btn .ic { width: 16px; height: 16px; }
.icon-btn.lg { width: 48px; height: 48px; }
.icon-btn.lg .ic { width: 32px; height: 32px; }
.icon-btn[aria-pressed="true"] { color: var(--green); }
.icon-btn[aria-pressed="true"]:not(.like-btn)::after { content: ''; position: absolute; bottom: -1px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; }
.icon-btn.lg[aria-pressed="true"]::after { bottom: 4px; }
a.icon-btn:not([href]) { display: none; }

.like-btn .i-heart-fill { display: none; }
.like-btn.is-liked { color: var(--green); }
.like-btn.is-liked .i-heart { display: none; }
.like-btn.is-liked .i-heart-fill { display: block; }

/* ---------- panels ---------- */
.library, .main, .npv { background: var(--bg); border-radius: var(--radius); overflow: hidden; min-height: 0; }

/* ---------- library ---------- */
.library { grid-area: lib; display: flex; flex-direction: column; }
.lib-head { padding: 16px 16px 8px; }
.lib-title { display: inline-flex; gap: 12px; align-items: center; font-weight: 700; font-size: 16px; color: var(--muted); transition: color 0.1s; }
.lib-title:hover { color: #fff; }
.lib-pills { display: flex; gap: 8px; padding: 8px 16px; }
.lib-list { flex: 1; overflow-y: auto; padding: 0 8px 8px; }
.lib-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 6px; cursor: pointer; }
.lib-item:hover { background: #ffffff12; }
.lib-item.is-active { background: #ffffff1f; }
.lib-art { width: 48px; flex: none; }
.lib-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lib-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-item.is-current .lib-name { color: var(--green); }
.lib-sub { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.lib-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-sub .ic { width: 13px; height: 13px; color: var(--green); }
.lib-now { width: 16px; height: 16px; color: var(--green); display: none; }
.lib-item.is-playing .lib-now { display: block; }
.lib-empty { margin: 8px; padding: 18px 20px; border-radius: 8px; background: var(--surface-2); }
.lib-empty h3 { font-size: 16px; font-weight: 700; }
.lib-empty p { margin: 8px 0 20px; color: #fff; font-size: 14px; }

/* ---------- main ---------- */
.main { grid-area: main; position: relative; overflow-y: auto; container-type: inline-size; transition: --c 0.6s ease; }
.main-head { position: sticky; top: 0; z-index: 5; height: 64px; margin-bottom: -64px; display: flex; align-items: center; gap: 16px; padding: 0 24px; transition: background 0.3s; }
.main-head.is-solid { background: color-mix(in srgb, var(--c) 45%, #121212); }
.nav-arrows { display: flex; gap: 8px; }
.main-head-title { display: flex; align-items: center; gap: 12px; min-width: 0; opacity: 0; pointer-events: none; transition: opacity 0.2s; font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.main-head-title span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main-head.show-title .main-head-title { opacity: 1; pointer-events: auto; }
.main-head-title .play-btn { position: static; opacity: 1; transform: none; }
.view { position: relative; min-height: calc(100% - 140px); }
.site-footer { margin: 0 24px; padding: 32px 0 40px; border-top: 1px solid #ffffff1a; color: var(--muted); font-size: 13px; }
.site-footer a { text-decoration: underline; }

.tint { position: absolute; inset: 0 0 auto; height: 332px; background: linear-gradient(color-mix(in srgb, var(--c) 65%, #121212), #121212); pointer-events: none; }
.view-pad { position: relative; padding: 72px 24px 24px; }
.greeting { position: relative; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 16px; }
.chips { position: relative; display: flex; gap: 8px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.section-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }

/* ---------- art ---------- */
.art, .cover { position: relative; width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 4px; container-type: inline-size; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 40%, #000)); }
.art-text { font-weight: 800; font-size: 34cqi; letter-spacing: -0.04em; color: #ffffffd9; user-select: none; }
.art img { position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity 0.2s; }
.art.has-logo { background: #fff; }
.art.has-logo img { width: 100%; height: 100%; object-fit: contain; opacity: 1; }
.art.has-icon img { width: 50%; height: 50%; object-fit: contain; padding: 6%; border-radius: 18%; background: #fff; opacity: 1; box-shadow: 0 4px 16px #0000004d; }
.art.has-logo .art-text, .art.has-icon .art-text { display: none; }
.cover-emoji { font-size: 46cqi; line-height: 1; filter: drop-shadow(0 8px 16px #0000004d); }
.cover-icon { width: 42cqi !important; height: 42cqi !important; color: #fff; filter: drop-shadow(0 8px 16px #0000004d); }
.cover.liked { background: linear-gradient(135deg, #3b1fd1, #7f7fe0 55%, #b8e6d4); }
.cover.daily { background: linear-gradient(135deg, #ff3d81, #ff9f1c); }

/* ---------- play button ---------- */
.play-btn { position: absolute; right: 8px; bottom: 8px; z-index: 1; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #000; box-shadow: 0 8px 8px #0000004d; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s, background 0.1s, scale 0.1s; }
.play-btn .ic { width: 22px; height: 22px; }
.play-btn:hover { background: var(--green-hover); scale: 1.05; }
.play-btn .i-pause, .play-btn.is-active .i-play { display: none; }
.play-btn.is-active .i-pause { display: block; }
.card:hover .play-btn, .qtile:hover .play-btn, .top-card:hover .play-btn, .play-btn:focus-visible, .play-btn.is-active { opacity: 1; transform: none; }
.play-btn.lg { position: static; width: 56px; height: 56px; opacity: 1; transform: none; }
.play-btn.lg .ic { width: 26px; height: 26px; }

/* ---------- home ---------- */
.qgrid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 32px; }
.qtile { position: relative; display: flex; align-items: center; gap: 12px; height: 56px; padding-right: 8px; border-radius: 4px; overflow: hidden; background: #ffffff14; cursor: pointer; transition: background 0.3s; }
.qtile:hover { background: #ffffff33; }
.qtile > .art, .qtile > .cover { width: 56px; border-radius: 0; flex: none; box-shadow: 0 8px 24px #00000080; }
.qtile-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qtile.is-current .qtile-name { color: var(--green); }
.qtile .play-btn { position: static; width: 32px; height: 32px; flex: none; transform: none; }
.qtile .play-btn .ic { width: 16px; height: 16px; }

.shelf { position: relative; margin-bottom: 24px; }
.shelf-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 4px; }
.shelf-head h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; }
.shelf-head h2 a:hover, .shelf-all:hover { text-decoration: underline; }
.shelf-all { flex: none; color: var(--muted); font-size: 14px; font-weight: 700; }
.shelf-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); grid-auto-rows: 0; grid-template-rows: auto; overflow: hidden; margin: 0 -12px; }

.card { position: relative; min-width: 0; padding: 12px; border-radius: 6px; cursor: pointer; transition: background 0.3s; }
.card:hover { background: #ffffff12; }
.card-art { position: relative; margin-bottom: 8px; }
.card-art > .art, .card-art > .cover { border-radius: 6px; box-shadow: 0 8px 24px #00000080; }
.card-art > .art.is-round { border-radius: 50%; }
.card-title { display: block; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.is-current .card-title { color: var(--green); }
.card-sub { margin-top: 4px; color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- page header (playlist / station) ---------- */
.page-head { position: relative; display: flex; align-items: flex-end; gap: 24px; min-height: 340px; padding: 88px 24px 24px; background: linear-gradient(color-mix(in srgb, var(--c) 85%, #000), color-mix(in srgb, var(--c) 50%, #000)); }
.page-cover { width: clamp(128px, 22cqi, 232px); flex: none; }
.page-cover > * { border-radius: 6px; box-shadow: 0 4px 60px #00000080; }
.page-info { min-width: 0; }
.page-label { font-size: 14px; font-weight: 600; }
.page-title { margin: 6px 0 12px; font-size: clamp(32px, 7.5cqi, 96px); font-weight: 900; line-height: 1; letter-spacing: -0.04em; overflow-wrap: anywhere; }
.page-title.is-long { font-size: clamp(28px, 5cqi, 64px); }
.page-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 14px; color: #ffffffd9; }
.page-meta strong { color: #fff; }
.page-meta a:hover { text-decoration: underline; }
.page-desc { margin: 0 0 8px; color: #ffffffb3; font-size: 14px; }
.page-body { position: relative; padding: 0 24px 24px; }
.page-body::before { content: ''; position: absolute; inset: 0 0 auto; height: 232px; background: linear-gradient(color-mix(in srgb, var(--c) 32%, #121212), #121212); }
.page-body > * { position: relative; }
.action-bar { display: flex; align-items: center; gap: 20px; padding: 24px 0; }

/* ---------- track list ---------- */
.tl-head, .row { display: grid; grid-template-columns: 16px minmax(120px, 6fr) minmax(100px, 3fr) minmax(80px, 2fr) minmax(150px, 1.4fr); gap: 16px; align-items: center; padding: 0 16px; }
.tl-head { height: 36px; margin-bottom: 16px; border-bottom: 1px solid #ffffff1a; color: var(--muted); font-size: 14px; }
.tl-head .tl-q, .row-end { justify-self: end; }
.row { height: 56px; border-radius: 4px; color: var(--muted); cursor: pointer; }
.row:hover { background: #ffffff1a; }
.row:hover .row-country, .row:hover .row-lang { color: #fff; }
.row-num { position: relative; display: grid; place-items: center; width: 16px; height: 16px; font-size: 16px; font-variant-numeric: tabular-nums; }
.row-play { display: none; color: #fff; }
.row-play .ic { width: 16px; height: 16px; }
.row-play .i-pause, .row-play.is-active .i-play { display: none; }
.row-play.is-active .i-pause { display: block; }
.row:hover .row-play { display: grid; }
.row:hover .n, .row.is-playing .n { display: none; }
.row .eq { display: none; }
.row.is-playing .eq { display: flex; }
.row.is-playing:hover .eq { display: none; }
.row.is-current .n { color: var(--green); }
.row-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.row-main > .art { width: 40px; flex: none; }
.row-text { min-width: 0; }
.row-name { display: block; color: #fff; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-name:hover, .row-country:hover { text-decoration: underline; }
.row.is-current .row-name { color: var(--green); }
.row-sub, .row-country, .row-lang { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; align-items: center; gap: 8px; }
.row-q { font-size: 14px; min-width: 64px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.row .like-btn, .row-more { opacity: 0; }
.row:hover .like-btn, .row .like-btn.is-liked, .row:hover .row-more, .row-more:focus-visible { opacity: 1; }
.row.compact { grid-template-columns: minmax(0, 1fr) auto; padding: 0 8px; }
.row.compact .row-num, .row.compact .row-country, .row.compact .row-lang, .row.compact .row-q { display: none; }
.tl-sentinel { height: 1px; }

@container (max-width: 760px) {
  .tl-head, .row { grid-template-columns: 16px minmax(0, 1fr) minmax(90px, 160px) auto; }
  .tl-lang, .row-lang { display: none; }
}
@container (max-width: 560px) {
  .tl-head { display: none; }
  .row { grid-template-columns: minmax(0, 1fr) auto; padding: 0 8px; }
  .row-num, .row-country, .row-q { display: none; }
  .row .like-btn, .row-more { opacity: 1; }
}

.eq { display: inline-flex; align-items: flex-end; gap: 2px; width: 14px; height: 14px; }
.eq i { flex: 1; background: var(--green); animation: eq 0.9s infinite ease-in-out; }
.eq i:nth-child(2) { animation-delay: -0.3s; }
.eq i:nth-child(3) { animation-delay: -0.6s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }

/* ---------- search ---------- */
.m-search { display: none; position: relative; margin-bottom: 24px; }
.browse-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px; }
.browse-tile { position: relative; aspect-ratio: 16 / 10; padding: 16px; border-radius: 8px; overflow: hidden; background: var(--c); container-type: inline-size; cursor: pointer; }
.browse-tile .t { position: relative; z-index: 1; display: block; max-width: 72%; font-size: clamp(16px, 12cqi, 24px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.browse-tile .bt-art { position: absolute; right: -6%; bottom: -8%; width: 44%; aspect-ratio: 1; display: grid; place-items: center; border-radius: 4px; transform: rotate(25deg); background: color-mix(in srgb, var(--c) 60%, #000); box-shadow: 0 2px 8px #0006; font-size: 24cqi; }
.search-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 24px; margin-bottom: 32px; }
.top-card { position: relative; display: flex; flex-direction: column; gap: 20px; padding: 20px; border-radius: 8px; background: var(--surface); cursor: pointer; transition: background 0.3s; }
.top-card:hover { background: var(--surface-3); }
.top-card > .art { width: 92px; box-shadow: 0 8px 24px #00000080; }
.top-card-name { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-card-sub { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.top-card .play-btn { right: 20px; bottom: 20px; }
.tag-pill { padding: 4px 12px; border-radius: 500px; background: #000000a0; color: #fff; font-weight: 700; font-size: 14px; }
@container (max-width: 760px) { .search-top { grid-template-columns: 1fr; } }

.empty { padding: 64px 16px; text-align: center; }
.empty h2 { font-size: 24px; font-weight: 700; }
.empty p { margin: 12px 0 28px; color: var(--muted); font-size: 16px; }

/* ---------- station page ---------- */
.about { margin-bottom: 32px; max-width: 760px; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag-chip { padding: 5px 12px; border-radius: 500px; background: #ffffff1a; font-size: 13px; text-transform: capitalize; }
a.tag-chip { background: #ffffff2e; font-weight: 600; }
a.tag-chip:hover { background: #ffffff47; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 24px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.facts a { text-decoration: underline; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 8px; max-width: 900px; }
.step { padding: 20px; border-radius: 8px; background: #ffffff0f; }
.step b { display: block; color: var(--green); font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); }

/* ---------- now playing view ---------- */
.npv { grid-area: npv; display: none; overflow-y: auto; }
body.npv-open .npv { display: block; }
.npv-inner { padding: 0 16px 16px; }
.npv-dhead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 64px; background: var(--bg); font-weight: 700; font-size: 16px; }
.npv-dhead a { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.npv-dhead a:hover { text-decoration: underline; }
.npv-mhead, .npv-controls, .npv .live { display: none; }
.npv-art > .art { border-radius: 8px; box-shadow: 0 8px 24px #00000080; }
.npv-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 16px 0; }
.npv-title > div { min-width: 0; }
.npv-name { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.npv-country { color: var(--muted); font-size: 16px; }
.npv-name:hover, .npv-country:hover { text-decoration: underline; color: #fff; }
.npv-card { margin-top: 16px; padding: 16px; border-radius: 8px; background: var(--surface-2); }
.npv-card h3 { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; font-size: 16px; font-weight: 700; }
.npv-card h3 a { color: var(--muted); font-size: 14px; }
.npv-card h3 a:hover { color: #fff; text-decoration: underline; }
.npv-card .chips-wrap { margin-bottom: 12px; }
.npv-note { margin: 0; color: var(--muted); }
.q-item { display: flex; align-items: center; gap: 12px; margin: 0 -8px; padding: 8px; border-radius: 6px; cursor: pointer; }
.q-item:hover { background: #ffffff12; }
.q-item > .art { width: 48px; flex: none; }
.q-item div { min-width: 0; }
.q-item strong, .q-item span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item strong { font-weight: 500; font-size: 16px; }
.q-item span { color: var(--muted); }

/* ---------- player ---------- */
.player { grid-area: player; display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(180px, 1fr); align-items: center; gap: 16px; padding: 0 8px; }
.pl-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.pl-art { width: 56px; flex: none; }
.pl-meta { min-width: 0; display: flex; flex-direction: column; }
.pl-name { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-name:hover, .pl-sub:hover { text-decoration: underline; color: #fff; }
body.st-error .pl-sub { color: #f3727f; }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 6px; max-width: 722px; width: 100%; justify-self: center; }
.pl-controls { display: flex; align-items: center; gap: 16px; }
.pl-play { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; transition: transform 0.1s; }
.pl-play:hover { transform: scale(1.06); }
.pl-play .ic { width: 16px; height: 16px; }
.pl-play .i-pause, .pl-play .spinner { display: none; }
body.st-playing .pl-play .i-play { display: none; }
body.st-playing .pl-play .i-pause { display: block; }
body.st-loading .pl-play .ic { display: none; }
body.st-loading .pl-play .spinner { display: block; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

.live { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.live-time { min-width: 40px; text-align: right; }
.live-bar { position: relative; flex: 1; height: 4px; border-radius: 2px; overflow: hidden; background: #4d4d4d; }
.live-bar span { position: absolute; inset: 0; background: #b3b3b3; }
body.st-playing .live-bar span { background: #fff; }
body.st-playing .live-bar span::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--green), transparent); width: 30%; animation: sweep 2.4s linear infinite; }
@keyframes sweep { from { translate: -100% 0; } to { translate: 340% 0; } }
.live-badge { display: inline-flex; align-items: center; gap: 6px; min-width: 40px; font-weight: 700; font-size: 11px; letter-spacing: 0.08em; }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
body.st-playing .live-badge { color: #fff; }
body.st-playing .live-badge i { background: var(--green); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: 0.35; } }

.pl-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.range { --p: 80%; appearance: none; -webkit-appearance: none; width: 96px; height: 4px; border-radius: 2px; cursor: pointer; background: linear-gradient(to right, #fff var(--p), #4d4d4d var(--p)); }
.range:hover { background: linear-gradient(to right, var(--green) var(--p), #4d4d4d var(--p)); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: #fff; opacity: 0; box-shadow: 0 2px 4px #0006; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb, .range:focus-visible::-moz-range-thumb { opacity: 1; }

.tabbar { display: none; }

/* ---------- menu + toast ---------- */
.menu { position: fixed; z-index: 60; min-width: 230px; max-width: 320px; padding: 4px; border-radius: 4px; background: #282828; box-shadow: 0 16px 24px #0000004d, 0 6px 8px #00000033; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 12px 12px 10px; border-radius: 2px; font-size: 14px; text-align: left; color: #ffffffe6; }
.menu-item:hover { background: #ffffff1a; color: #fff; }
.menu-item .ic { width: 16px; height: 16px; color: var(--muted); }
.menu hr { margin: 4px 0; border: 0; border-top: 1px solid #ffffff1a; }
.menu-head { display: none; }

.toast { position: fixed; left: 50%; bottom: calc(var(--player-h) + 24px); z-index: 70; max-width: 90vw; padding: 12px 16px; border-radius: 8px; background: #3d91f4; color: #fff; font-size: 14px; font-weight: 600; box-shadow: 0 8px 24px #00000080; opacity: 0; pointer-events: none; transform: translate(-50%, 16px); transition: opacity 0.25s, transform 0.25s; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@container (max-width: 900px) {
  .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  :root { --lib-w: 72px; --npv-w: 280px; }
  .lib-title span, .library .lib-pills, .library .lib-text, .library .lib-now, .library .lib-empty { display: none !important; }
  .lib-head { padding: 16px 0 8px; text-align: center; }
  .library .lib-item { justify-content: center; }
  .logo span { display: none; }
}

@media (max-width: 768px) {
  body, body.npv-open {
    grid-template-areas: "main";
    grid-template-columns: 100%;
    grid-template-rows: 100%;
    padding: 0;
    background: var(--bg);
  }
  .topbar, .library { display: none; }
  .main { border-radius: 0; }
  .view { padding-bottom: 136px; min-height: 100%; }
  .site-footer { display: none; }
  .main-head { padding: 0 16px; }
  .main-head .fwd { display: none; }
  body[data-route="home"] .main-head, body[data-route="search"] .main-head, body[data-route="library"] .main-head { display: none; }
  .main-head-title { font-size: 18px; }
  .main-head-title .play-btn { width: 40px; height: 40px; }

  .view-pad { padding: 24px 16px 16px; }
  .greeting { font-size: 24px; }
  .qgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 28px; }
  .qtile { height: 48px; }
  .qtile > .art, .qtile > .cover { width: 48px; }
  .qtile-name { font-size: 13px; }
  .qtile .play-btn { display: none; }

  .shelf-head h2 { font-size: 20px; }
  .shelf-row { display: flex; gap: 14px; margin: 0 -16px; padding: 4px 16px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .shelf-row .card { flex: 0 0 136px; padding: 0; scroll-snap-align: start; }
  .card:hover { background: none; }
  .card .play-btn { display: none; }
  .card-title { font-size: 14px; }
  .card-sub { font-size: 13px; }

  .page-head { flex-direction: column; align-items: stretch; gap: 16px; min-height: 0; padding: 64px 16px 8px; }
  .page-cover { width: min(62vw, 240px); align-self: center; }
  .page-title, .page-title.is-long { font-size: 28px; margin: 4px 0 8px; }
  .page-body { padding: 0 16px 16px; }
  .action-bar { padding: 16px 0; gap: 16px; }
  .action-bar .play-btn.lg { margin-left: auto; order: 9; }
  .tl-head { display: none; }

  .m-search { display: flex; }
  .search-pill.m-search, .search-pill.m-search:focus-within { background: #fff; color: #121212; box-shadow: none; }
  .m-search input { color: #121212; }
  .m-search input::placeholder { color: #535353; }
  .m-search kbd { display: none; }
  .browse-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .top-card-name { font-size: 24px; }

  /* mini player */
  .player {
    position: fixed; left: 8px; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 20;
    display: flex; gap: 8px; height: 56px; padding: 0 4px 0 8px; border-radius: 6px;
    background: color-mix(in srgb, var(--c) 55%, #121212); transition: background 0.4s;
  }
  .pl-left { flex: 1; gap: 10px; }
  .pl-art { width: 40px; }
  .pl-sub { font-size: 13px; }
  .pl-center { width: auto; flex-direction: row; }
  .pl-controls > :not(.pl-play) { display: none; }
  .pl-play { width: 44px; height: 44px; background: none; color: #fff; }
  .pl-play .ic { width: 24px; height: 24px; }
  .player .live { position: absolute; left: 8px; right: 8px; bottom: 0; }
  .player .live > :not(.live-bar) { display: none; }
  .player .live-bar { height: 2px; }
  .pl-right { display: none; }

  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 19;
    height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: linear-gradient(to top, #000 55%, #000000d9);
  }
  .tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); font-size: 11px; }
  .tab.is-active { color: #fff; }

  /* full-screen now playing */
  .npv {
    position: fixed; inset: 0; z-index: 40; display: block; width: auto; border-radius: 0;
    background: linear-gradient(color-mix(in srgb, var(--c) 75%, #000) 0, #121212 75%);
    transform: translateY(100%); visibility: hidden;
    transition: transform 0.35s cubic-bezier(0.3, 0, 0, 1), visibility 0s 0.35s;
  }
  body.npv-open .npv { transform: none; visibility: visible; transition: transform 0.35s cubic-bezier(0.3, 0, 0, 1); }
  .npv-inner { padding: env(safe-area-inset-top) 20px 32px; }
  .npv-dhead { display: none; }
  .npv-mhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 64px; text-align: center; }
  .npv-mhead div { min-width: 0; }
  .npv-mhead small { display: block; font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: #ffffffb3; }
  .npv-mhead strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .npv-mhead .icon-btn .ic { width: 24px; height: 24px; }
  .npv-art { padding: 16px 0 8px; }
  .npv-title { margin: 20px 0 12px; }
  .npv-name { font-size: 22px; }
  .npv-title .like-btn .ic { width: 24px; height: 24px; }
  .npv .live { display: flex; }
  .npv .live-time { text-align: left; }
  .npv-controls { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 8px; }
  .npv-controls .icon-btn { width: 48px; height: 48px; color: #fff; }
  .npv-controls .icon-btn .ic { width: 28px; height: 28px; }
  .npv-controls .js-shuffle:not([aria-pressed="true"]), .npv-controls a.icon-btn { color: #ffffffb3; }
  .npv-controls .js-shuffle .ic, .npv-controls a.icon-btn .ic { width: 22px; height: 22px; }
  .npv-controls .pl-play { width: 64px; height: 64px; background: #fff; color: #000; }
  .npv-controls .pl-play .ic { width: 28px; height: 28px; }
  .npv-card { background: #00000040; }

  .menu { left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; padding: 8px 8px calc(16px + env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; }
  .menu-head { display: block; padding: 12px 10px 8px; font-weight: 700; font-size: 16px; }
  .toast { bottom: 140px; }
}

@media (hover: none) {
  .row .like-btn, .row-more { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
