/* Public site — layout modelled on Apple Music (sidebar, album pages, full-screen player)
   and NetEase Cloud Music (bottom player bar, banner, play counts, queue drawer). */
:root { --sidebar-w: 240px; --player-h: 72px; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 30;
  width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: var(--sidebar);
  border-right: 1px solid var(--line);
}
body.has-player .sidebar { bottom: var(--player-h); }
.sidebar-top { position: relative; padding: 22px 16px 6px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 56px 0 6px; margin-bottom: 18px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(140deg, #ff6b7d, var(--accent) 55%, #d90f3a);
  box-shadow: 0 2px 6px rgba(250, 45, 72, .35);
}
.brand-mark svg { width: 18px; height: 18px; fill: #fff; }
.brand-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { position: relative; }
.search svg { position: absolute; left: 9px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); fill: var(--text-3); pointer-events: none; }
.search input {
  width: 100%; height: 32px; padding: 0 10px 0 32px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input::placeholder { color: var(--text-3); }

.side-nav { flex: 1; display: flex; flex-direction: column; overflow-y: auto; padding: 6px 10px 14px; scrollbar-width: thin; }
.side-bottom { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.side-title { padding: 18px 10px 6px; font-size: 11px; font-weight: 600; color: var(--text-3); letter-spacing: .02em; }
.side-group { display: flex; flex-direction: column; gap: 1px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 10px; border-radius: 7px;
  font-size: 14px; color: var(--text);
  transition: background .12s;
}
.side-link:hover { background: var(--hover); }
.side-link.is-active { background: color-mix(in srgb, var(--text) 10%, transparent); font-weight: 500; }
.side-link .icon { width: 20px; height: 20px; color: var(--accent); }
.side-link .thumb { flex: none; width: 24px; height: 24px; border-radius: 5px; overflow: hidden; }
.side-link .thumb .cover-fallback { font-size: 11px; }
.side-link .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link .count { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---------- Main column ---------- */
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
body.has-player .main { padding-bottom: var(--player-h); }
#view { flex: 1; width: 100%; max-width: 1320px; margin: 0 auto; padding: 0 40px 56px; }
.site-footer { width: 100%; max-width: 1320px; margin: 0 auto; padding: 22px 40px 28px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; line-height: 1.8; text-align: center; }
.site-footer p { white-space: pre-line; }
.site-footer a:hover { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }

.page-title { padding: 36px 0 18px; font-size: 32px; font-weight: 800; letter-spacing: -.025em; }
.section { margin-top: 40px; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 21px; font-weight: 700; }
.section-head h2 a { display: inline-flex; align-items: center; }
.section-head h2 a .icon { width: 24px; height: 24px; color: var(--text-3); transition: transform .15s; }
.section-head h2 a:hover .icon { transform: translateX(2px); color: var(--text); }
.section-head .more { margin-left: auto; color: var(--accent); font-size: 13px; font-weight: 500; }
.section-head .more:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Banner (NetEase-style carousel) ---------- */
.banner {
  position: relative; height: 280px; margin-top: 4px;
  border-radius: 16px; overflow: hidden; isolation: isolate;
  background: #1c1c1e; color: #fff;
}
.banner-slide {
  position: absolute; inset: 0;
  display: flex; align-items: center; gap: 40px; padding: 0 48px 12px;
  opacity: 0; pointer-events: none; transition: opacity .7s ease;
}
.banner-slide.is-active { opacity: 1; pointer-events: auto; }
.banner-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.banner-bg > * { width: 100%; height: 100%; object-fit: cover; filter: blur(42px) saturate(170%); transform: scale(1.5); }
.banner-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, .62) 0%, rgba(0, 0, 0, .3) 70%, rgba(0, 0, 0, .15)); }
.banner-info { flex: 1; min-width: 0; max-width: 560px; }
.banner-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; opacity: .7; }
.banner-info h2 { margin: 8px 0 10px; font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.banner-info p { opacity: .82; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.banner-actions { display: flex; gap: 10px; margin-top: 22px; }
.btn-glass { background: rgba(255, 255, 255, .18); border-color: transparent; color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.btn-glass:hover { background: rgba(255, 255, 255, .28); }
.banner-art { flex: none; width: 210px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, .45); }
.banner-dots { position: absolute; left: 48px; bottom: 20px; display: flex; gap: 6px; }
.banner-dots button { width: 6px; height: 6px; padding: 0; border: 0; border-radius: 3px; background: rgba(255, 255, 255, .4); cursor: pointer; transition: width .3s, background .3s; }
.banner-dots button.is-active { width: 20px; background: #fff; }

/* ---------- Cards (game shelf) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 26px 20px; }
.card { min-width: 0; }
.card-media { position: relative; }
.card-art { display: block; position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.card-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .12); transition: background .2s; }
.card:hover .card-art::after { background: rgba(0, 0, 0, .14); }
.card-plays {
  position: absolute; top: 8px; right: 8px; z-index: 1;
  display: inline-flex; align-items: center; gap: 1px; padding: 1px 8px 1px 4px;
  border-radius: 999px; background: rgba(0, 0, 0, .32); color: #fff; font-size: 12px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.card-plays .icon { width: 16px; height: 16px; }
.card-play {
  position: absolute; right: 10px; bottom: 10px; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .3);
  opacity: 0; transform: translateY(4px) scale(.92); transition: opacity .18s, transform .18s, background .15s;
}
.card-play:hover { background: var(--accent-hover); }
.card:hover .card-play, .card-play:focus-visible { opacity: 1; transform: none; }
.card-title { display: block; margin-top: 10px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-sub { color: var(--text-2); font-size: 13px; }

/* ---------- Category tiles (Apple "Browse") ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.cat-tile {
  position: relative; overflow: hidden; height: 112px; padding: 14px 16px;
  border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 55%, #000));
  transition: transform .2s, box-shadow .2s;
}
.cat-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 35%, transparent); }
.cat-tile h3 { font-size: 18px; font-weight: 700; }
.cat-tile .count { font-size: 13px; opacity: .85; }
.cat-tile .icon { position: absolute; right: -4px; bottom: -12px; width: 88px; height: 88px; opacity: .28; transform: rotate(-14deg); }

/* ---------- Song tiles (Apple "Top Songs" shelf) ---------- */
.song-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.song-tile {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  height: 66px; padding: 0 8px; border-radius: 8px; cursor: pointer;
  position: relative;
}
.song-tile::after { content: ""; position: absolute; left: 68px; right: 8px; bottom: 0; height: 1px; background: var(--line); }
.song-tile:hover { background: var(--hover); }
.st-art { position: relative; width: 48px; height: 48px; border-radius: 6px; overflow: hidden; }
.st-art .cover-fallback { font-size: 18px; }
.st-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .38); color: #fff; opacity: 0; transition: opacity .15s; }
.st-overlay > * { grid-area: 1 / 1; }
.song-tile:hover .st-overlay, .song-tile.is-current .st-overlay { opacity: 1; }
.st-main { min-width: 0; }
.st-title { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-sub { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-tile.is-current .st-title { color: var(--accent); }
.song-tile .st-dur { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Play-state glyphs shared by rows and tiles: idle → play on hover; playing → equalizer (pause on hover). */
.ps .p, .ps .pz, .ps .eq { display: none; }
.js-track:not(.is-playing):hover .ps .p, .js-track.is-current:not(.is-playing) .ps .p { display: block; }
.js-track.is-playing:not(:hover) .ps .eq { display: flex; }
.js-track.is-playing:hover .ps .pz { display: block; }
.js-track:hover .ps .n, .js-track.is-current .ps .n { display: none; }
.eq { align-items: flex-end; gap: 2px; height: 14px; }
.eq i { display: block; width: 3px; height: 100%; border-radius: 1px; background: currentColor; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.3s; animation-duration: .7s; }
.eq i:nth-child(3) { animation-delay: -.6s; animation-duration: 1.1s; }
@keyframes eq { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }

/* ---------- Track table (NetEase / Apple song list) ---------- */
.track-table { --cols: 40px minmax(0, 1.7fr) minmax(0, 1fr) 84px 56px 112px; }
.track-table.no-game { --cols: 40px minmax(0, 1fr) 84px 56px 112px; }
.tt-head, .tt-row { display: grid; grid-template-columns: var(--cols); align-items: center; gap: 14px; padding: 0 12px; }
.tt-head { height: 32px; color: var(--text-3); font-size: 12px; }
.tt-head .r, .tt-row .r { text-align: right; }
.tt-row { min-height: 54px; border-radius: 6px; cursor: pointer; }
.tt-body .tt-row:nth-child(odd) { background: var(--zebra); }
.tt-body .tt-row:hover { background: var(--hover); }
.tt-num { display: grid; place-items: center; height: 32px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tt-num > * { grid-area: 1 / 1; }
.tt-num .p, .tt-num .pz { color: var(--text); }
.tt-row.is-current .tt-num { color: var(--accent); }
.tt-row.is-current .tt-num .p { color: var(--accent); }
.is-rank .tt-row:nth-child(-n+3) .tt-num .n { color: var(--accent); font-weight: 700; font-size: 15px; }
.tt-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tt-thumb { flex: none; width: 38px; height: 38px; border-radius: 5px; overflow: hidden; }
.tt-thumb .cover-fallback { font-size: 15px; }
.tt-text { min-width: 0; }
.tt-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-row.is-current .tt-name { color: var(--accent); }
.tt-sub { display: flex; gap: 8px; color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; }
.tt-sub .m-only { display: none; }
.tt-game { min-width: 0; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tt-game a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.tt-dur { color: var(--text-2); font-variant-numeric: tabular-nums; text-align: right; }
.tt-act { display: flex; justify-content: flex-end; gap: 0; opacity: .0; transition: opacity .12s; }
.tt-row:hover .tt-act, .tt-row:focus-within .tt-act, .tt-row.is-current .tt-act { opacity: 1; }
.tt-act .icon-btn { width: 32px; height: 32px; }
.tt-act .icon { width: 18px; height: 18px; }
.load-more { display: flex; justify-content: center; margin-top: 24px; }

/* ---------- Album-style header (game & track pages) ---------- */
.album-head { position: relative; isolation: isolate; display: flex; align-items: flex-end; gap: 32px; padding: 44px 0 28px; }
.album-bg { position: absolute; z-index: -1; top: 0; bottom: -40px; left: -40px; right: -40px; overflow: hidden; pointer-events: none; }
.album-bg > * { width: 100%; height: 100%; object-fit: cover; filter: blur(60px) saturate(160%); transform: scale(1.4); opacity: .32; }
.album-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent, var(--bg) 96%); }
.album-art { flex: none; width: 240px; aspect-ratio: 1; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-art); }
.album-info { min-width: 0; flex: 1; }
.album-eyebrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; font-weight: 600; color: var(--text-2); }
.album-eyebrow a { color: var(--accent); }
.album-eyebrow a:hover { text-decoration: underline; text-underline-offset: 3px; }
.album-info h1 { margin: 6px 0 8px; font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -.025em; }
.album-sub { color: var(--accent); font-size: 17px; font-weight: 500; }
.album-sub a:hover { text-decoration: underline; text-underline-offset: 3px; }
.album-desc { margin-top: 8px; max-width: 680px; color: var(--text-2); white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.album-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; color: var(--text-3); font-size: 12px; }
.album-meta span { display: inline-flex; align-items: center; gap: 4px; }
.album-meta .icon { width: 14px; height: 14px; }
.album-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.album-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.notice { color: var(--text-3); font-size: 12px; }

.wave-panel { margin-top: 8px; padding: 18px 20px 10px; border-radius: var(--radius); background: var(--bg-2); }
.wave-panel canvas { display: block; width: 100%; height: 92px; cursor: pointer; }
.wave-times { display: flex; justify-content: space-between; margin-top: 6px; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.desc { max-width: 760px; color: var(--text-2); white-space: pre-line; }

/* Underlined tabs (NetEase) */
.tabs { display: flex; gap: 28px; margin-bottom: 10px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 10px 0; color: var(--text-2); font-size: 15px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a .count { margin-left: 3px; font-size: 12px; color: var(--text-3); }
.tabs a.is-active { color: var(--text); font-weight: 600; }
.tabs a.is-active::after { content: ""; position: absolute; left: 15%; right: 15%; bottom: -1px; height: 3px; border-radius: 2px; background: var(--accent); }

/* ---------- Browse / search page ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.toolbar .select { width: auto; min-width: 128px; height: 32px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.result-meta { display: flex; align-items: center; gap: 12px; padding: 12px 12px 4px; color: var(--text-3); font-size: 12px; }
.result-meta a { color: var(--accent); }
.is-dim { opacity: .5; pointer-events: none; transition: opacity .15s; }

/* ---------- Player bar (NetEase layout) ---------- */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 620px) minmax(0, 1fr); align-items: center; gap: 24px;
  height: var(--player-h); padding: 0 20px;
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid var(--line);
  animation: rise .3s ease-out;
}
@keyframes rise { from { transform: translateY(100%); } }
.pl-info { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pl-cover { position: relative; flex: none; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--surface-2); box-shadow: 0 0 0 .5px var(--line-2); }
.pl-cover .cover-fallback { font-size: 18px; }
.pl-cover .expand { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .42); color: #fff; opacity: 0; transition: opacity .15s; }
.pl-cover:hover .expand { opacity: 1; }
.pl-meta { min-width: 0; }
.pl-title { display: block; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.pl-sub { color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub a:hover { color: var(--text); }
.pl-center { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.pl-controls { display: flex; align-items: center; gap: 14px; }
.pl-controls .icon-btn { color: var(--text); }
.pl-controls .icon-btn.is-mode { color: var(--text-2); }
.pl-controls .icon-btn.is-mode.is-on { color: var(--accent); }
.pl-play { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--accent); color: #fff; cursor: pointer; transition: transform .1s, background .15s; }
.pl-play:hover { background: var(--accent-hover); }
.pl-play:active { transform: scale(.94); }
.pl-play .icon { width: 22px; height: 22px; }
.pl-progress { display: flex; align-items: center; gap: 10px; width: 100%; }
.pl-progress canvas { flex: 1; min-width: 0; height: 22px; cursor: pointer; touch-action: none; }
.pl-time { width: 38px; color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.pl-time.end { text-align: right; }
.pl-right { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.pl-volume { width: 90px; margin-left: 2px; accent-color: var(--accent); cursor: pointer; }
.pl-line { display: none; }

/* ---------- Queue drawer ---------- */
.queue {
  position: fixed; z-index: 110; right: 12px; bottom: calc(var(--player-h) + 10px);
  width: 380px; max-width: calc(100vw - 24px); max-height: min(560px, calc(100vh - var(--player-h) - 30px));
  display: flex; flex-direction: column;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--glass); box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  animation: pop .18s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.q-head { display: flex; align-items: baseline; gap: 8px; padding: 16px 16px 10px 18px; }
.q-head h3 { font-size: 17px; font-weight: 700; }
.q-head .count { color: var(--text-3); font-size: 12px; }
.q-head .btn { margin-left: auto; }
.q-list { overflow-y: auto; padding: 0 8px 10px; }
.q-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.q-item:hover { background: var(--hover); }
.q-thumb { width: 36px; height: 36px; border-radius: 5px; overflow: hidden; }
.q-thumb .cover-fallback { font-size: 14px; }
.q-title { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item.is-current .q-title { color: var(--accent); }
.q-dur { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- Now Playing (Apple Music full-screen player) ---------- */
.now {
  --accent: #fff;
  --wave: rgba(255, 255, 255, .26);
  --wave-hover: rgba(255, 255, 255, .5);
  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; overflow: hidden; isolation: isolate;
  background: #18181a; color: #fff;
  animation: rise .38s cubic-bezier(.2, .8, .2, 1);
}
.now-bg { position: absolute; inset: -10%; z-index: -1; }
.now-bg > * { width: 100%; height: 100%; object-fit: cover; filter: blur(80px) saturate(180%) brightness(.78); transform: scale(1.15); }
.now-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .32); }
.now-top { display: flex; justify-content: space-between; padding: 14px 18px; }
.now .icon-btn { color: rgba(255, 255, 255, .85); }
.now .icon-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.now .icon-btn.is-on { color: #fff; background: rgba(255, 255, 255, .16); }
.now-body {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 500px); justify-content: center; align-items: center; gap: 72px;
  padding: 0 48px 56px;
}
.now-art { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; box-shadow: 0 28px 70px rgba(0, 0, 0, .5); transition: transform .45s cubic-bezier(.2, .8, .2, 1); }
.now.is-paused .now-art { transform: scale(.9); }
.now-art .cover-fallback { font-size: 120px; }
.now-eyebrow { display: flex; gap: 8px; align-items: center; font-size: 13px; color: rgba(255, 255, 255, .65); }
.now-title { margin: 8px 0 4px; font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.now-sub { font-size: 18px; color: rgba(255, 255, 255, .7); }
.now-sub a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.now-wave { margin-top: 30px; }
.now-wave canvas { display: block; width: 100%; height: 72px; cursor: pointer; touch-action: none; }
.now-times { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; color: rgba(255, 255, 255, .6); font-variant-numeric: tabular-nums; }
.now-controls { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 18px; }
.now-controls .icon-btn { width: 48px; height: 48px; }
.now-controls .icon-btn .icon { width: 30px; height: 30px; }
.now-controls .icon-btn.small .icon { width: 22px; height: 22px; }
.now-play { display: grid; place-items: center; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #111; cursor: pointer; transition: transform .1s; }
.now-play:active { transform: scale(.94); }
.now-play .icon { width: 36px; height: 36px; }
.now-extra { display: flex; align-items: center; gap: 10px; margin-top: 26px; }
.now-extra .vol { flex: 1; accent-color: #fff; }
.now-extra .btn { margin-left: 12px; }

/* ---------- Language switcher ---------- */
.lang-switch { position: relative; }
.sidebar-top > .lang-switch { position: absolute; top: 23px; right: 14px; }
.lang-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 9px 0 7px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text-2);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: color .15s, background .15s;
}
.lang-btn:hover, .lang-btn[aria-expanded="true"] { color: var(--text); background: var(--hover); }
.lang-btn .icon { width: 16px; height: 16px; }
.lang-menu {
  position: absolute; z-index: 80; top: calc(100% + 6px); right: 0; width: 168px; padding: 6px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--glass); box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  animation: pop .15s ease-out;
}
.lang-menu button {
  display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; padding: 0 10px;
  border: 0; border-radius: 8px; background: transparent; color: var(--text); font-size: 14px; text-align: left; cursor: pointer;
}
.lang-menu button:hover { background: var(--hover); }
.lang-menu button.is-active { font-weight: 600; }
.lang-menu .icon { width: 18px; height: 18px; color: var(--accent); }

/* ---------- Artists ---------- */
.artist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 20px; }
.artist-card { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.artist-avatar { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--surface-2); box-shadow: 0 0 0 .5px var(--line); transition: transform .25s ease; }
.artist-card:hover .artist-avatar { transform: scale(1.03); }
.artist-name { width: 100%; margin-top: 10px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.artist-meta { color: var(--text-2); font-size: 12px; }
.album-art.round { border-radius: 50%; }
.album-sub .publisher { color: var(--text-2); font-size: 15px; font-weight: 400; }
.dot-sep { margin: 0 8px; color: var(--text-3); font-weight: 400; }
.card-sub a:hover, .tt-artist a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.tt-sub .tt-artist { color: var(--text-2); }

/* ---------- Download usage notice ---------- */
html:has(.download-notice[open]) { overflow: hidden; }
.download-notice {
  width: min(480px, calc(100% - 32px)); max-height: calc(100% - 32px);
  margin: auto; padding: 28px; overflow-y: auto;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow);
}
.download-notice::backdrop { background: var(--scrim); backdrop-filter: blur(4px); }
.download-notice-icon {
  display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 18px;
  border-radius: 14px; background: var(--accent-soft); color: var(--accent);
}
.download-notice-icon .icon { width: 24px; height: 24px; }
.download-notice h2 { font-size: 22px; line-height: 1.35; }
.download-notice-lead { margin-top: 10px; color: var(--text-2); }
.download-notice-rule {
  margin-top: 20px; padding: 16px; border: 1px solid var(--accent-line);
  border-radius: 12px; background: var(--accent-soft);
}
.download-notice-rule strong { display: block; margin-bottom: 6px; font-size: 17px; }
.download-notice-rule p { line-height: 1.75; }
.download-notice-more {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  color: var(--text-2); text-decoration: underline; text-underline-offset: 3px;
}
.download-notice-more:hover { color: var(--text); }
.download-notice-more .icon { width: 16px; height: 16px; }
.download-notice-remember {
  display: flex; align-items: center; gap: 9px; width: fit-content; min-height: 44px;
  margin-top: 18px; color: var(--text-2); cursor: pointer;
}
.download-notice-remember input {
  width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); cursor: pointer;
}
.download-notice-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.download-notice-actions .btn { height: auto; min-height: 42px; padding: 10px 16px; white-space: normal; text-align: center; }
.download-notice-actions button { flex: none; }
@media (max-width: 480px) {
  .download-notice { padding: 22px; }
  .download-notice-actions { flex-direction: column-reverse; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .song-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .track-table { --cols: 40px minmax(0, 1.6fr) minmax(0, 1fr) 56px 112px; }
  .track-table.no-game { --cols: 40px minmax(0, 1fr) 56px 112px; }
  .tt-head .h-cat, .tt-row .tt-cat { display: none; }
}

@media (max-width: 900px) {
  :root { --player-h: 64px; }
  .sidebar {
    position: sticky; bottom: auto; width: auto;
    border-right: 0; border-bottom: 1px solid var(--line);
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
  body.has-player .sidebar { bottom: auto; }
  .sidebar-top { display: flex; align-items: center; gap: 12px; padding: 10px 16px 8px; }
  .brand { margin: 0; padding: 0; }
  .sidebar-top > .lang-switch { position: relative; top: auto; right: auto; flex: none; }
  .artist-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 20px 14px; }
  .album-art.round { width: 160px; }
  .brand-name { max-width: 40vw; }
  .search { flex: 1; }
  .side-nav { flex: none; display: flex; flex-direction: row; gap: 6px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-title, .side-games { display: none; }
  .side-group { flex-direction: row; gap: 6px; }
  .side-bottom { margin-top: 0; padding-top: 0; border-top: 0; }
  .side-link { height: 30px; padding: 0 12px; border-radius: 999px; background: var(--surface-2); font-size: 13px; white-space: nowrap; }
  .side-link .icon, .side-link .count { display: none; }
  .side-link.is-active { background: var(--accent); color: #fff; }

  .main { margin-left: 0; }
  body.has-player .main { padding-bottom: calc(var(--player-h) + env(safe-area-inset-bottom)); }
  #view { padding: 0 16px 32px; }
  .site-footer { padding: 18px 16px 24px; }
  .page-title { padding-top: 20px; font-size: 28px; }
  .section { margin-top: 32px; }

  .banner { height: 220px; }
  .banner-slide { padding: 0 22px 18px; }
  .banner-art { display: none; }
  .banner-info h2 { font-size: 26px; }
  .banner-dots { left: 22px; bottom: 14px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 14px; }
  .card-play { opacity: 1; transform: none; width: 34px; height: 34px; }
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cat-tile { height: 88px; }
  .song-grid { grid-template-columns: minmax(0, 1fr); }

  .track-table, .track-table.no-game { --cols: 30px minmax(0, 1fr) 108px; }
  .tt-head { display: none; }
  .tt-row { gap: 10px; padding: 0 6px; }
  .tt-row .tt-game, .tt-row .tt-dur { display: none; }
  .tt-sub .m-only { display: inline; }
  .tt-act { opacity: 1; }
  .tt-act .icon-btn { width: 34px; height: 40px; }

  .album-head { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 24px; }
  .album-bg { left: -16px; right: -16px; }
  .album-art { width: 180px; }
  .wave-panel canvas { height: 72px; }

  .player {
    grid-template-columns: minmax(0, 1fr) auto; gap: 8px;
    padding: 0 10px 0 12px; height: calc(var(--player-h) + env(safe-area-inset-bottom));
    padding-bottom: env(safe-area-inset-bottom);
  }
  .pl-center { flex-direction: row; }
  .pl-progress, .pl-right, .pl-controls .is-mode, .pl-controls [data-ref="prev"] { display: none; }
  .pl-controls { gap: 4px; }
  .pl-line { display: block; position: absolute; left: 0; top: -1px; height: 2px; width: 0; background: var(--accent); }
  .queue { right: 8px; left: 8px; width: auto; }

  .now-top { padding: 10px 12px; }
  .now-body { grid-template-columns: minmax(0, 1fr); align-content: center; gap: 28px; padding: 0 26px 28px; overflow-y: auto; }
  .now-art { width: min(78vw, 46vh); justify-self: center; }
  .now-title { font-size: 24px; }
  .now-sub { font-size: 16px; }
  .now-wave { margin-top: 18px; }
  .now-wave canvas { height: 56px; }
  .now-controls { gap: 18px; }
  .now-extra .vol { display: none; }
}

/* Category-coloured sidebar icons; neutral badges on the full-screen player. */
.side-link[data-cat] .icon { color: var(--c); }
.card-plays { pointer-events: none; }
.now .cat-badge { color: #fff; background: rgba(255, 255, 255, .16); }

/* Credits and personal music */
.credit-panel { margin: 24px 0; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg-2); }
.credit-panel h2 { font-size: 17px; margin-bottom: 12px; }
.credit-text { display: block; width: 100%; min-height: 90px; padding: 12px; margin: 10px 0; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); resize: vertical; font: inherit; line-height: 1.6; }
.credit-panel > a { display: inline-flex; align-items: center; gap: 6px; margin-left: 16px; text-decoration: underline; }
.download-notice-credits { margin-top: 16px; }
.download-notice-credits .btn { height: auto; min-height: 36px; white-space: normal; }
.favorite-btn[aria-pressed="true"] { color: var(--accent); }
.tt-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.toolbar { flex-wrap: wrap; }
.toolbar .select { max-width: 100%; }
.server-content li { margin: 8px 0; }
.server-content a { text-decoration: underline; }
@media (max-width: 600px) {
  .toolbar .select { flex: 1 1 140px; min-width: 0; }
  .credit-panel { padding: 16px; }
  .credit-panel > a { margin: 12px 0 0; display: flex; }
  .album-actions { flex-wrap: wrap; }
  .tt-sub { font-size: 11px; }
}
