/* TNP Music app shell — theme A (graphite + lime). Size rules: see UI_TREND_REVIEW_KO.md §6.2.
   Mobile first: bottom tabs + mini player; ≥600px tablet spacing; ≥1024px sidebar + player bar. */
:root {
  color-scheme: dark;
  --shell: #000;
  --bg: #0E0E10;
  --surface: #1A1A1E;
  --surface2: #26262B;
  --raised: #232329;
  --line: #2E2E34;
  --text: #F5F5F6;
  --sub: #A1A1AA;
  --dim: #8B8B94;
  --accent: #C8F550;
  --on-accent: #0E0E10;
  --up: #FF5C5C;
  --down: #4DA3FF;
  --star: #E8B93A;
  --sheet-bg: #121214;
  --tint: hsl(220 18% 30%);
  --tint-mini: hsl(220 18% 22%);

  --gutter: 16px;
  --hit: 44px;
  --row: 64px;
  --thumb: 48px;
  --tab-h: 56px;
  --mini-h: 64px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --side-w: clamp(220px, 18vw, 300px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.tnp-app {
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
:where(.tnp-app) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; text-align: inherit; }
:where(.tnp-app) button:disabled { cursor: default; opacity: .4; }
:where(.tnp-app) a { color: inherit; }
:where(.tnp-app) img { display: block; }
:where(.tnp-app) :where(h1, h2, h3, p) { margin: 0; }
.tnp-app [hidden] { display: none !important; }
.tnp-app :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.i { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
svg.i.fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon-btn { width: var(--hit); height: var(--hit); display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; flex-shrink: 0; position: relative; color: inherit; cursor: pointer; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface2); color: var(--text); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; position: relative; text-decoration: none; }
.chip::before { content: ""; position: absolute; inset: -4px 0; }
.chip.on, .chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.text-btn { min-height: var(--hit); padding: 0 4px; color: var(--sub); font-size: 13px; font-weight: 600; }
.pbtn { width: 48px; height: 48px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pbtn svg.i { width: 22px; height: 22px; }
.pbtn.sm { width: var(--hit); height: var(--hit); }
.pbtn.sm svg.i { width: 18px; height: 18px; }
.pill-btn { height: var(--hit); padding: 0 20px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 15px; font-weight: 700; }
.ghost { height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid #ffffff40; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; flex-shrink: 0; }
.seg { display: inline-flex; gap: 4px; padding: 3px; background: var(--surface); border-radius: 999px; }
.seg button { height: 32px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--sub); position: relative; }
.seg button::before { content: ""; position: absolute; inset: -6px 0; }
.seg button[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.badge { display: inline-block; flex-shrink: 0; font-size: 11px; font-weight: 600; line-height: 16px; color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.stars { color: var(--star); letter-spacing: 1px; font-size: 11px; }

/* ---------- shell (mobile) ---------- */
.app-main { position: fixed; inset: 0; }
.tab-panel { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: var(--safe-t) 0 calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 40px); }
.tab-panel:not(.active) { display: none; }
.page { max-width: 720px; margin: 0 auto; }

.side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; padding-bottom: var(--safe-b); background: linear-gradient(to top, var(--bg) 72%, color-mix(in srgb, var(--bg) 80%, transparent)); }
.side-brand, .side-lists { display: none; }
.tabs { display: flex; height: var(--tab-h); max-width: 720px; margin: 0 auto; }
.tab-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--dim); }
.tab-btn.active { color: var(--text); }
.tab-btn.active svg.i { stroke-width: 2.3; }
.tab-btn.active[data-tab="home"] svg.i { fill: currentColor; }

.dock { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b)); z-index: 41; padding: 0 8px 4px; pointer-events: none; }
.mini-bar { pointer-events: auto; position: relative; max-width: 704px; margin: 0 auto; height: var(--mini-h); border-radius: 8px; background: var(--tint-mini); display: flex; align-items: center; overflow: hidden; color: #fff; box-shadow: 0 6px 24px #0007; transition: background-color .4s ease; }
.mini-prog-rail { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: #ffffff30; }
.mini-prog-fill { height: 100%; width: 0; background: #fff; }
.mini-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; height: 100%; padding-left: 10px; cursor: pointer; }
.mini-art { width: 44px; height: 44px; border-radius: 4px; object-fit: cover; background: #ffffff14; }
.mini-meta { min-width: 0; }
.mini-t { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-a { font-size: 12px; opacity: .75; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-center, .mini-ctrls { display: flex; align-items: center; }
.mini-ctrls { padding-right: 4px; }
.mb { width: var(--hit); height: var(--hit); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; position: relative; }
.mb svg.i { width: 24px; height: 24px; }
.mb.like-btn[aria-pressed="true"] { color: var(--accent); }
.mb.like-btn[aria-pressed="true"] svg { fill: currentColor; }
.desk-only, .mini-seek, .mini-right { display: none !important; }
body.player-open .dock, body.player-open .side { visibility: hidden; }

/* ---------- page header, chips, sections ---------- */
.page-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 60px; padding: 8px var(--gutter) 4px; }
.page-top.sub { position: sticky; top: calc(var(--safe-t) * -1); z-index: 5; justify-content: flex-start; gap: 4px; padding-left: 6px; background: var(--bg); }
.page-top.sub h1 { font-size: 20px; }
.page-title { display: flex; align-items: center; min-width: 0; }
.page-top h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brandmark { width: 32px; height: 32px; border-radius: 6px; margin-right: 10px; flex-shrink: 0; object-fit: contain; }
.top-acts { display: flex; align-items: center; margin-right: -10px; flex-shrink: 0; }
.install-btn { height: 36px; padding: 0 12px; margin-right: 4px; border-radius: 999px; background: var(--surface2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; position: relative; }
.install-btn::before { content: ""; position: absolute; inset: -4px 0; }
.install-btn svg.i { width: 18px; height: 18px; }
.chips { display: flex; gap: 8px; padding: 8px var(--gutter) 4px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar, .car::-webkit-scrollbar { display: none; }
.sec { padding: 28px var(--gutter) 0; }
.sh { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.sh h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.sh-meta { font-size: 12px; color: var(--dim); margin-top: 4px; }
.sh-link { min-height: var(--hit); margin-top: -10px; padding-left: 8px; font-size: 13px; font-weight: 500; color: var(--sub); white-space: nowrap; flex-shrink: 0; }
.list-count { font-size: 12px; color: var(--dim); padding: 8px var(--gutter) 4px; }
.playlist-empty { padding: 32px var(--gutter); color: var(--sub); font-size: 14px; line-height: 1.6; text-align: center; }

/* ---------- HOME ---------- */
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px var(--gutter) 0; }
.qt { display: flex; align-items: center; gap: 10px; height: 56px; padding-right: 8px; border-radius: 6px; overflow: hidden; background: var(--surface); font-size: 13px; font-weight: 600; line-height: 1.25; text-align: left; min-width: 0; }
.qt img { width: 56px; height: 56px; object-fit: cover; flex-shrink: 0; background: var(--surface2); }
.qt span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.qt.playing span { color: var(--accent); }
.quick .qt:nth-child(n+7) { display: none; }

.ranking-periods { margin: 4px 0 6px; }
.tnp-app .ranking-list { list-style: none; margin: 0; padding: 0; display: block; }
.tnp-app .ranking-list li.rank-row { display: flex; align-items: center; gap: 12px; height: var(--row); padding: 0; border: 0; cursor: pointer; }
#musicRanking:not(.show-all) .rank-row:nth-child(n+6) { display: none; }
.rank { width: 26px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.rank b { font-size: 17px; font-weight: 700; line-height: 1.2; }
.rank i { font-style: normal; font-size: 11px; font-weight: 600; line-height: 13px; min-height: 13px; }
.rank .up { color: var(--up); } .rank .down { color: var(--down); } .rank .same { color: var(--dim); } .rank .new { color: var(--accent); }
.rank-thumb { width: var(--thumb); height: var(--thumb); border-radius: 4px; overflow: hidden; flex-shrink: 0; }
.tnp-app .ranking-list .rank-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.tnp-app .ranking-list .t-name a { font-size: inherit; font-weight: inherit; text-decoration: none; color: inherit; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row .t-name { display: flex; align-items: center; }
.rank-row.playing .t-name a { color: var(--accent); }
.tnp-app .ranking-list .rank-empty { display: block; padding: 16px 0 8px; border: 0; color: var(--sub); font-size: 14px; text-align: left; }

.hero-card { position: relative; display: flex; gap: 14px; align-items: flex-end; padding: 16px; border-radius: 8px; background: var(--hero-tint, var(--surface)); color: #fff; transition: background-color .4s ease; }
.hero-card img { width: clamp(96px, 32vw, 144px); aspect-ratio: 1; border-radius: 4px; object-fit: cover; box-shadow: 0 8px 24px #0006; background: #ffffff14; }
.hero-text { flex: 1; min-width: 0; padding-right: 4px; }
.home-card-label { font-size: 12px; font-weight: 600; color: #ffffffc0; }
.hero-card .home-song { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; overflow-wrap: anywhere; }
.hero-card .home-artist { font-size: 13px; color: #ffffffb0; margin-top: 2px; }
.hero-card .home-desc { font-size: 13px; line-height: 1.5; color: #ffffffc8; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero-card .home-desc:empty { display: none; }
.hero-card .pbtn { position: absolute; right: 16px; top: 16px; }
.hero-card:has(.pbtn) .hero-text { padding-top: 8px; }
.pick-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 8px 8px 8px 8px; border-radius: 8px; background: var(--surface); }
.pick-row img { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.pick-text { flex: 1; min-width: 0; }
.pick-text .home-card-label { color: var(--sub); }
.pick-text .home-song { font-size: 16px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-text .home-artist { font-size: 13px; color: var(--sub); margin-top: 2px; }

.car { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; scroll-padding: 0 var(--gutter); }
.card { width: 148px; flex-shrink: 0; text-align: left; scroll-snap-align: start; }
.card .c { width: 100%; aspect-ratio: 1; border-radius: 6px; object-fit: cover; background: var(--surface); }
.card b { display: block; font-size: 14px; font-weight: 600; margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card small { display: block; font-size: 12px; color: var(--sub); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mosaic { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: 100%; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: var(--surface); }
.mosaic img { width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--surface2); }
.mosaic.single { display: block; }
.mosaic.single img { height: 100%; }
.mosaic-label { position: absolute; left: 10px; bottom: 8px; font-size: 18px; font-weight: 800; color: #fff; text-shadow: 0 1px 8px #000b; }

.cmt { display: flex; gap: 10px; width: 100%; padding: 10px 0; text-align: left; }
.av { width: 32px; height: 32px; border-radius: 50%; background: var(--surface2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--sub); flex-shrink: 0; }
.cb { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cn { font-size: 13px; color: var(--sub); }
.cn b { color: var(--text); font-weight: 600; margin-right: 6px; }
.cbody { font-size: 14px; line-height: 1.5; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.cmt .song { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--sub); }
.cmt .song img { width: 18px; height: 18px; border-radius: 2px; object-fit: cover; }
.studio-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 0; text-align: left; }
.studio-row img { width: 48px; height: 48px; border-radius: 50%; object-fit: contain; background: var(--surface); }
.studio-row > span:not(.ghost) { flex: 1; min-width: 0; }
.studio-row b { display: block; font-size: 16px; font-weight: 600; }
.studio-row small { display: block; font-size: 13px; color: var(--sub); margin-top: 2px; }

/* ---------- song rows (search, library) ---------- */
.track-btn { display: flex; align-items: center; gap: 12px; min-height: var(--row); padding: 0 var(--gutter); cursor: pointer; }
.t-thumb { width: var(--thumb); height: var(--thumb); border-radius: 4px; object-fit: cover; flex-shrink: 0; background: var(--surface); }
.t-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.t-name { display: block; font-size: 16px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-by { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--sub); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-btn.active .t-name { color: var(--accent); }
.t-by svg.i { width: 14px; height: 14px; color: var(--accent); }
.track-more { color: var(--sub); margin-right: -12px; }
.track-more svg.i { width: 20px; height: 20px; }
.t-del { color: var(--sub); }
.eq-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.eq-bars i { width: 3px; height: 100%; background: var(--accent); border-radius: 1px; animation: eqbar .9s ease-in-out infinite alternate; }
.eq-bars i:nth-child(2) { animation-delay: -.3s; } .eq-bars i:nth-child(3) { animation-delay: -.6s; }
@keyframes eqbar { from { transform: scaleY(.25); } to { transform: scaleY(1); } }
.eq-bars i { transform-origin: bottom; }

.track-action-menu { position: fixed; z-index: 90; min-width: 208px; max-width: calc(100vw - 20px); padding: 6px; border-radius: 10px; background: var(--raised); box-shadow: 0 12px 40px #000c; display: flex; flex-direction: column; }
.track-action-menu[hidden] { display: none; }
.track-action-item { min-height: var(--hit); padding: 0 14px; border-radius: 6px; font-size: 15px; font-weight: 500; color: var(--text); text-align: left; }

/* ---------- search ---------- */
.search-box { display: flex; align-items: center; gap: 10px; height: 48px; margin: 4px var(--gutter); padding: 0 14px; border-radius: 8px; background: var(--text); color: var(--bg); }
.search-box svg.i { width: 22px; height: 22px; }
.search-box input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; color: var(--bg); font: inherit; font-size: 16px; font-weight: 500; outline: none; }
.search-box input::placeholder { color: #5b5b63; }
.search-box:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- library ---------- */
.coll-list { display: flex; flex-direction: column; padding: 4px 0; }
.lrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px var(--gutter); text-align: left; }
.lrow[aria-disabled="true"] { opacity: .45; }
.coll-thumb { width: 64px; height: 64px; border-radius: 4px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--surface2); color: var(--sub); object-fit: cover; }
.coll-thumb.mosaic { display: grid; grid-template-columns: 1fr 1fr; aspect-ratio: auto; }
.coll-thumb.mosaic img { width: 32px; height: 32px; object-fit: cover; }
.tint-accent { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); color: var(--accent); }
.tint-down { background: color-mix(in srgb, var(--down) 22%, var(--surface)); color: var(--down); }
.lrow .t-by svg.pin { width: 14px; height: 14px; color: var(--accent); }
.list-head { display: flex; align-items: center; gap: 12px; padding: 8px var(--gutter) 4px 6px; }
.list-head h2 { font-size: 22px; font-weight: 700; overflow-wrap: anywhere; }
.row-acts { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px var(--gutter); }
.row-acts.end { justify-content: flex-end; padding-inline: 0; }

/* ---------- sub pages ---------- */
.menu-list { display: flex; flex-direction: column; }
.menu-row { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; font-size: 16px; font-weight: 500; color: var(--text); text-decoration: none; text-align: left; }
.menu-row > span:first-of-type { flex: 1; min-width: 0; }
.menu-row > svg.i { color: var(--sub); }
.menu-value { margin-left: auto; font-size: 13px; color: var(--sub); }
.studio-head { display: flex; align-items: center; gap: 16px; padding: 8px var(--gutter); }
.studio-head img { width: 101px; height: 101px; border-radius: 12px; object-fit: contain; background: var(--surface); flex-shrink: 0; }
.studio-head h2 { font-size: 22px; font-weight: 700; }
.studio-head p { font-size: 14px; color: var(--sub); margin-top: 4px; line-height: 1.5; }
.studio-head .row-acts { padding: 12px 0 0; }
.info-faq details { border-top: 1px solid var(--line); }
.info-faq summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; }
.info-faq summary::-webkit-details-marker { display: none; }
.info-faq summary::after { content: "+"; color: var(--sub); font-size: 20px; font-weight: 400; }
.info-faq details[open] summary::after { content: "−"; }
.info-faq p { font-size: 14px; line-height: 1.7; color: var(--sub); padding-bottom: 12px; }
.lk-card { display: flex; flex-direction: column; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.lk-num { font-size: 11px; font-weight: 600; color: var(--dim); }
.lk-title { font-size: 15px; font-weight: 600; }
.lk-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.lk-btn { height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface2); color: var(--text); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; text-decoration: none; position: relative; }
.lk-btn::before { content: ""; position: absolute; inset: -4px 0; }

.talk-feed .sh { padding: 24px var(--gutter) 0; }
.talk-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 var(--gutter); }
.talk-filters select, .talk-filters input, .community-select { height: var(--hit); min-width: 0; padding: 0 12px; border: 0; border-radius: 8px; background: var(--surface2); color: var(--text); font: inherit; font-size: 15px; }
.talk-filters input { flex: 1 1 160px; }
.talk-filters .chip { height: var(--hit); }
.community-select { display: block; width: calc(100% - var(--gutter) * 2); margin: 16px var(--gutter) 0; }
.talk-rows { list-style: none; margin: 0; padding: 0 var(--gutter); }
.talk-post { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.talk-post > img { width: 48px; height: 48px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.talk-main { flex: 1; min-width: 0; }
.talk-author { font-size: 13px; color: var(--sub); }
.talk-author strong { color: var(--text); font-weight: 600; margin-right: 4px; }
.talk-author small { color: var(--dim); font-size: 12px; }
.talk-body { font-size: 14px; line-height: 1.55; margin: 4px 0 !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.song-link { min-height: 32px; font-size: 12px; color: var(--sub); text-decoration: underline; text-underline-offset: 3px; text-align: left; }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px; font-size: 13px; color: var(--sub); }

/* The song community panel (hearts, reviews) appears on the review page and inside the player sheet. */
#songCommunity { padding: 8px var(--gutter) 0; }
#songCommunity h2 { font-size: 18px; }
#songCommunity .muted { color: var(--sub); font-size: 13px; line-height: 1.6; }
.sc-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.sc-cover { width: 64px; height: 64px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.community-title { font-size: 18px; font-weight: 700; }
.community-counts { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; font-size: 13px; color: var(--sub); }
.community-counts b { color: var(--text); font-weight: 600; }
#songCommunity .service-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#songCommunity .community-buttons { margin: 8px 0; }
#songCommunity button, #songCommunity .service-button { height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface2); color: var(--text); font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; position: relative; }
#songCommunity button::before, #songCommunity .service-button::before { content: ""; position: absolute; inset: -2px 0; }
#songCommunity button[aria-pressed="true"], #songCommunity button.primary { background: var(--accent); color: var(--on-accent); }
#songCommunity details { margin: 4px 0; }
#songCommunity summary { min-height: var(--hit); display: flex; align-items: center; font-size: 14px; color: var(--sub); cursor: pointer; }
#songCommunity details p { font-size: 14px; line-height: 1.65; color: var(--sub); white-space: pre-wrap; overflow-wrap: anywhere; margin-bottom: 8px; }
.community-status { font-size: 13px; min-height: 1.4em; color: var(--sub); }
.community-status.service-error, .service-error { color: #ff9b9b; }
.comment-heading { font-size: 16px; font-weight: 700; margin: 16px 0 8px; }
.service-form { display: grid; gap: 12px; }
.service-form label { display: grid; gap: 6px; font-size: 13px; color: var(--sub); min-width: 0; }
.service-form input, .service-form select, .service-form textarea { width: 100%; min-width: 0; padding: 11px 12px; border: 0; border-radius: 8px; background: var(--surface2); color: var(--text); font: inherit; font-size: 16px; }
.service-form textarea { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.comment-list { margin-top: 12px; }
.comment-item { padding: 14px 0; border-top: 1px solid var(--line); }
.comment-item strong { font-size: 14px; font-weight: 600; }
.comment-item p { font-size: 14px; line-height: 1.55; margin: 6px 0 !important; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-item small { font-size: 12px; color: var(--dim); }
.fine-print { font-size: 12px !important; color: var(--dim) !important; margin: 12px 0 8px !important; }

/* ---------- player sheet ---------- */
.player-sheet { position: fixed; inset: 0; z-index: 60; color: #fff; background: linear-gradient(180deg, var(--tint) 0%, color-mix(in srgb, var(--tint) 45%, var(--sheet-bg)) 50vh, var(--sheet-bg) 100vh); animation: sheet-up .28s cubic-bezier(.2, .8, .2, 1); transition: background-color .4s ease; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: var(--safe-t) 0 calc(24px + var(--safe-b)); }
.sheet-top { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; padding: 4px 14px 0; }
.sheet-ctx { text-align: center; min-width: 0; }
.sheet-ctx small { display: block; font-size: 11px; font-weight: 500; color: #ffffffb3; }
.sheet-ctx b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60vw; }
.player-layout { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.art-col { display: flex; flex-direction: column; }
/* Cover shrinks on short screens so every control stays above the fold (checked 320×568 → 1920×1080). */
.art-frame { width: min(100%, calc(100vh - 372px - var(--safe-t) - var(--safe-b)), 512px); width: min(100%, calc(100dvh - 372px - var(--safe-t) - var(--safe-b)), 512px); aspect-ratio: 1; margin: clamp(12px, 3vh, 28px) auto 0; border-radius: 8px; overflow: hidden; background: #ffffff10; box-shadow: 0 16px 48px #0008; }
.art-img { width: 100%; height: 100%; object-fit: cover; }
.song-meta { display: flex; align-items: center; padding-top: clamp(14px, 3.4vh, 30px); margin-right: -10px; }
.song-text { flex: 1; min-width: 0; }
.song-t { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.song-a { font-size: 15px; color: #ffffffb3; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.like-btn[aria-pressed="true"] { color: var(--accent); }
.like-btn[aria-pressed="true"] svg.i, .save-btn[aria-pressed="true"] svg.i { fill: currentColor; }
.prog-wrap { padding-top: 8px; }
.range-container { position: relative; height: 28px; display: flex; align-items: center; }
.range-container::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: #ffffff33; }
.progress-fill { position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; width: 0; border-radius: 2px; background: #fff; pointer-events: none; }
.range { -webkit-appearance: none; appearance: none; position: relative; z-index: 1; width: 100%; height: 28px; margin: 0; background: transparent; cursor: pointer; touch-action: none; }
.range::-webkit-slider-runnable-track { height: 28px; background: transparent; }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: 8px; border-radius: 50%; background: #fff; opacity: 0; transition: opacity .15s; }
.range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; opacity: 0; }
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:hover::-moz-range-thumb, .range:active::-moz-range-thumb { opacity: 1; }
.time-row { display: flex; justify-content: space-between; margin-top: -4px; font-size: 12px; color: #ffffffa8; font-variant-numeric: tabular-nums; }
.transport { display: flex; align-items: center; justify-content: space-between; margin: 4px -8px 0; }
.ib { width: 52px; height: 52px; display: inline-flex; align-items: center; justify-content: center; color: #fff; position: relative; flex-shrink: 0; }
.ib.sm svg.i { width: 22px; height: 22px; color: #ffffffcc; }
.ib.md svg.i { width: 30px; height: 30px; }
.ib.lit svg.i, .ib[aria-pressed="true"] svg.i { color: var(--accent); }
.ib.lit::after, .ib[aria-pressed="true"]::after { content: ""; position: absolute; bottom: 8px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.repeat-one { display: none; position: absolute; top: 8px; right: 8px; font-size: 11px; font-weight: 800; line-height: 1; color: var(--accent); }
#repeatBtn[data-repeat-mode="one"] .repeat-one { display: block; }
.play-btn { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #0E0E10; }
.play-btn svg.i { width: 26px; height: 26px; }
.player-song-actions { display: flex; align-items: center; margin: 8px -10px 0; color: #ffffffcc; }
.player-song-actions svg.i { width: 22px; height: 22px; }
.flex-gap { flex: 1; }
.count-badge { position: absolute; top: 4px; right: 0; min-width: 16px; padding: 0 4px; border-radius: 8px; background: #fff; color: #000; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; }
.vol-grp { display: none; }
.lyrics-col { margin-top: 24px; padding: 16px; border-radius: 12px; background: color-mix(in srgb, var(--tint) 70%, #000); }
.lyrics-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.lyrics-toggle-btn { height: 32px; padding: 0 12px; border-radius: 999px; background: #0004; color: #ffffffd0; font-size: 12px; font-weight: 600; position: relative; }
.lyrics-toggle-btn::before { content: ""; position: absolute; inset: -6px 0; }
.lyrics-viewport { position: relative; height: 96px; overflow: hidden; -webkit-mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); mask-image: linear-gradient(transparent, #000 22%, #000 78%, transparent); }
#lyricsInner { position: absolute; left: 0; right: 0; top: 0; transition: top .35s ease; }
.lyric-line { font-size: 20px; font-weight: 700; line-height: 1.45; letter-spacing: -.01em; color: #ffffff5c; padding: 2px 0; cursor: pointer; overflow-wrap: anywhere; }
.lyric-line.active { color: #fff; }
body.lyrics-unsynced .lyrics-viewport { height: auto; max-height: 240px; overflow-y: auto; -webkit-mask-image: none; mask-image: none; }
body.lyrics-unsynced #lyricsInner { position: static; }
body.lyrics-unsynced .lyric-line { color: #ffffffd0; font-size: 17px; }
body.lyrics-expanded .lyrics-col { position: fixed; inset: 0; z-index: 70; margin: 0; border-radius: 0; display: flex; flex-direction: column; padding: calc(16px + var(--safe-t)) 24px calc(16px + var(--safe-b)); }
body.lyrics-expanded .lyrics-viewport { flex: 1; height: auto; max-height: none; }
body.lyrics-expanded .lyric-line { font-size: 24px; padding: 4px 0; }
.sheet-sections { max-width: 560px; margin: 0 auto; padding: 0 24px; }
.sheet-sec, #sheetCommunitySlot #songCommunity { margin-top: 12px; padding: 16px; border-radius: 12px; background: #ffffff12; }
.sheet-sec h2 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.sheet-sec p { font-size: 14px; line-height: 1.7; color: #ffffffd8; white-space: pre-wrap; overflow-wrap: anywhere; }
.sheet-sec p + p { margin-top: 10px; }
#songCreditsBody { margin: 0; }
#songCreditsBody div { display: flex; justify-content: space-between; gap: 16px; padding: 6px 0; font-size: 14px; }
#songCreditsBody dt { color: #ffffffa8; flex-shrink: 0; }
#songCreditsBody dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
#songCreditsBody .wide dd { text-align: left; }
#sheetCommunitySlot .sc-head { display: none; }
#sheetCommunitySlot #songCommunity button:not([aria-pressed="true"]):not(.primary), #sheetCommunitySlot .service-form input, #sheetCommunitySlot .service-form select, #sheetCommunitySlot .service-form textarea { background: #ffffff1c; }

/* ---------- dialogs ---------- */
.tnp-app dialog { color: var(--text); }
.sheet-dialog, .info-lyrics-dialog { width: 100%; max-width: 100%; max-height: 86vh; max-height: 86dvh; margin: auto 0 0; padding: 4px 16px calc(16px + var(--safe-b)); border: 0; border-radius: 16px 16px 0 0; background: #1E1E23; color: var(--text); overflow-y: auto; }
.sheet-dialog::backdrop, .info-lyrics-dialog::backdrop { background: #000000a8; }
.sheet-dialog[open], .info-lyrics-dialog[open] { animation: sheet-up .24s cubic-bezier(.2, .8, .2, 1); }
.dialog-head, .queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; margin-right: -10px; }
.dialog-head h2, .queue-heading h2 { font-size: 18px; font-weight: 700; }
.dialog-head .q-now { flex: 1; min-width: 0; }
.q-label { font-size: 12px; font-weight: 600; color: var(--dim); margin: 8px 0 4px; }
.q-now { display: flex; align-items: center; gap: 12px; padding: 6px 0; }
.q-head { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.q-head .q-label { margin: 0; }
.queue-rows { list-style: none; margin: 0; padding: 0; }
.queue-rows li { display: flex; align-items: center; }
.q-play { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; min-height: 60px; text-align: left; }
.queue-rows .icon-btn { color: var(--sub); }
.queue-rows .icon-btn svg.i { width: 20px; height: 20px; }
.q-note { font-size: 13px; color: var(--sub); line-height: 1.5; padding: 8px 0; }
.sheet-dialog .menu-row { min-height: 52px; font-size: 15px; }
.sheet-dialog .menu-row svg.i { width: 22px; height: 22px; color: var(--sub); }
.menu-setting { border-top: 1px solid var(--line); padding: 4px 0 8px; }
.menu-setting p { display: flex; align-items: center; gap: 14px; min-height: 44px; font-size: 15px; font-weight: 500; }
.menu-setting p svg.i { width: 22px; height: 22px; color: var(--sub); }
.menu-setting .seg { display: flex; width: 100%; }
.menu-setting .seg button { flex: 1; }
.sheet-dialog textarea { width: 100%; padding: 12px; border: 0; border-radius: 8px; background: var(--surface2); color: var(--text); font: inherit; font-size: 16px; line-height: 1.6; resize: vertical; margin: 8px 0 12px; }
.eq-head { margin: 4px 0 12px; }
.eq-power { height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface2); font-size: 14px; font-weight: 600; }
.eq-power.lit, .eq-power[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.eq-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.eq-preset.active { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.eq-bands { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 20px 0 8px; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--sub); }
.eq-band output { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.eq-slider { writing-mode: vertical-lr; direction: rtl; width: 32px; height: 150px; accent-color: var(--accent); cursor: pointer; }
.info-lyrics-dialog .lk-btn { height: 36px; }
#infoLyricsArtist { font-size: 13px; color: var(--sub); }
#infoLyricsBody { font-size: 15px; line-height: 1.8; white-space: pre-wrap; padding: 12px 0; }

.player-status { position: fixed; left: 50%; bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 16px); z-index: 95; max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: 8px; background: #2B2B31; color: var(--text); font-size: 14px; line-height: 1.4; box-shadow: 0 8px 24px #0009; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.player-status.show { opacity: 1; transform: translate(-50%, 0); }
.player-status.is-error { background: #4A2025; }
body.player-open .player-status { bottom: calc(24px + var(--safe-b)); }

@media (hover: hover) and (pointer: fine) {
  .track-btn:hover, .lrow:hover, .menu-row:hover, .cmt:hover { background: #ffffff0a; }
  .qt:hover { background: var(--surface2); }
  .icon-btn:hover, .mb:hover { background: #ffffff14; }
  .chip:not(.on):hover, .lk-btn:hover { background: #33333a; }
  .track-action-item:hover { background: #ffffff12; }
  .card:hover .c, .card:hover .mosaic { filter: brightness(1.08); }
}

/* short phones: keep chart rows above the fold */
@media (max-width: 599px) and (max-height: 700px) {
  .quick .qt:nth-child(n+5) { display: none; }
  .sec { padding-top: 22px; }
}

/* ---------- tablet ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .quick { grid-template-columns: repeat(3, 1fr); }
  .quick .qt:nth-child(n+7) { display: flex; }
  .card { width: 176px; }
  .hero-card img { width: 176px; }
  .hero-card .home-song { font-size: 24px; }
  .sheet-dialog, .info-lyrics-dialog { width: min(520px, 92vw); margin: auto; border-radius: 14px; padding-bottom: 16px; }
  /* Windows between 600 and 1023px have no player bar, so the sheet carries the volume. */
  .vol-grp { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: #ffffffb3; }
  .vol-grp svg.i { width: 20px; height: 20px; }
  .vol-grp .range-container { flex: 1; }
}

/* ---------- landscape phones: cover beside the controls ---------- */
@media (max-width: 1023px) and (orientation: landscape) and (max-height: 560px) {
  .player-layout { max-width: 920px; }
  .art-col { display: grid; grid-template-columns: min(40vw, calc(100vh - 96px)) minmax(0, 1fr); column-gap: 28px; align-items: center; }
  .art-frame { grid-column: 1; grid-row: 1 / span 4; width: 100%; margin: 8px 0 0; }
  .art-col > :not(.art-frame) { grid-column: 2; }
  .song-meta { padding-top: 0; }
  .quick .qt:nth-child(n+5) { display: flex; }
  :root { --tab-h: 48px; --mini-h: 56px; }
  .tab-btn { flex-direction: row; gap: 8px; font-size: 12px; }
  .mini-art { width: 40px; height: 40px; }
  .page-top { min-height: 52px; }
}

/* ---------- desktop ---------- */
@media (min-width: 1024px) {
  :root { --gutter: 32px; }
  body.tnp-app { background: var(--shell); }
  .side { top: 8px; left: 8px; bottom: 96px; right: auto; width: var(--side-w); padding: 18px 12px; border-radius: 8px; background: var(--bg); display: flex; flex-direction: column; overflow-y: auto; }
  .side-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
  .side-brand img { width: 37px; height: 37px; border-radius: 6px; object-fit: contain; }
  .tabs { flex-direction: column; height: auto; margin: 0; gap: 2px; }
  .tab-btn { flex: none; flex-direction: row; justify-content: flex-start; gap: 14px; height: 44px; padding: 0 10px; border-radius: 6px; font-size: 15px; font-weight: 600; color: var(--sub); }
  .tab-btn.active { background: var(--surface); color: var(--text); }
  .side-lists { display: block; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
  .side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 4px 10px; font-size: 13px; font-weight: 600; color: var(--sub); }
  .side-head svg.i { width: 20px; height: 20px; }
  .side-lists .lrow { padding: 6px 10px; border-radius: 6px; }
  .side-lists .coll-thumb { width: 44px; height: 44px; }
  .side-lists .coll-thumb.mosaic img { width: 22px; height: 22px; }
  .side-lists .t-name { font-size: 14px; }
  .side-lists .t-by { font-size: 12px; }
  .app-main { top: 8px; right: 8px; bottom: 96px; left: calc(var(--side-w) + 16px); border-radius: 8px; overflow: hidden; background: var(--bg); }
  .app-main::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 300px; background: linear-gradient(180deg, color-mix(in srgb, var(--tint) 55%, var(--bg)), var(--bg)); pointer-events: none; }
  .tab-panel { padding: 8px 0 40px; }
  .page { max-width: 1640px; }
  .page-top { padding-top: 16px; }
  .page-top h1 { font-size: 28px; }
  .page-top.sub { top: -8px; background: color-mix(in srgb, var(--bg) 92%, transparent); }
  .app-main:has(.sub-page.active)::before { display: none; }
  #tab-home .page { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 32px; }
  #tab-home .page > * { grid-column: 1 / -1; }
  #tab-home .page > #musicRanking { grid-column: 1; }
  #tab-home .page > #musicRanking + .sec { grid-column: 2; padding-left: 0; }
  #tab-home .page > #musicRanking { padding-right: 0; }
  .quick { grid-template-columns: repeat(4, 1fr); gap: 10px; padding-top: 16px; }
  .quick .qt { height: 64px; background: color-mix(in srgb, var(--text) 8%, transparent); }
  .quick .qt img { width: 64px; height: 64px; }
  .quick .qt:nth-child(n+7) { display: flex; }
  .quick .qt:nth-child(n+9) { display: none; }
  .tnp-app .ranking-list li.rank-row { height: 60px; }
  .hero-card img { width: clamp(140px, 11vw, 200px); }
  .hero-card .home-song { font-size: clamp(22px, 1.8vw, 30px); font-weight: 800; }
  .track-list, .coll-list, .talk-rows, #songCommunity { max-width: 960px; }
  .track-more { margin-right: -8px; }

  .dock { left: 0; right: 0; bottom: 0; height: 88px; padding: 0 16px; background: var(--shell); pointer-events: auto; }
  .mini-bar { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 1.4fr) minmax(0, 1fr); gap: 16px; height: 88px; max-width: none; border-radius: 0; background: none; box-shadow: none; overflow: visible; }
  .mini-prog-rail { display: none; }
  .mini-left { padding-left: 0; }
  .mini-art { width: 56px; height: 56px; }
  .mini-center { flex-direction: column; justify-content: center; gap: 4px; }
  .mini-ctrls { gap: 12px; padding: 0; }
  .desk-only { display: inline-flex !important; }
  .mini-seek { display: flex !important; }
  .mini-right { display: flex !important; }
  .mobile-only { display: none !important; }
  .mb { width: 40px; height: 40px; border-radius: 50%; color: var(--sub); }
  .mb svg.i { width: 20px; height: 20px; }
  .mb[aria-pressed="true"] { color: var(--accent); }
  #miniPlay { width: 40px; height: 40px; background: var(--text); color: var(--bg); }
  #miniPlay svg.i { width: 18px; height: 18px; }
  #miniNext, #miniPrev { color: var(--text); }
  .mini-seek { align-items: center; gap: 10px; width: 100%; font-size: 12px; color: var(--sub); font-variant-numeric: tabular-nums; }
  .mini-seek .range, .mini-right .range { height: 16px; }
  .mini-seek .range::-webkit-slider-runnable-track, .mini-right .range::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--text) var(--fill, 0%), #ffffff38 var(--fill, 0%)); }
  .mini-seek .range::-webkit-slider-thumb, .mini-right .range::-webkit-slider-thumb { margin-top: -4px; }
  .mini-seek .range::-moz-range-track, .mini-right .range::-moz-range-track { height: 4px; border-radius: 2px; background: #ffffff38; }
  .mini-seek .range::-moz-range-progress, .mini-right .range::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--text); }
  .mini-right { justify-content: flex-end; align-items: center; gap: 6px; color: var(--sub); }
  .mini-right .vol-icon { width: 20px; height: 20px; margin-left: 6px; }
  #miniVolume { width: 96px; flex: none; }
  body.player-open .dock { visibility: visible; }
  .player-status { bottom: 104px; }
  body.player-open .player-status { bottom: 104px; }

  .player-sheet { bottom: 88px; animation-name: sheet-fade; }
  @keyframes sheet-fade { from { opacity: 0; } to { opacity: 1; } }
  .sheet-scroll { padding-bottom: 32px; }
  .player-layout { max-width: 1200px; display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); gap: 56px; padding: 0 40px; align-items: start; }
  .art-frame { width: min(100%, calc(100vh - 418px)); min-width: 220px; margin-top: 16px; }
  .page-top .brandmark { display: none; }
  .vol-grp { display: none; }
  .lyrics-col { position: sticky; top: 16px; margin-top: 16px; height: calc(100vh - 88px - 96px); display: flex; flex-direction: column; background: #ffffff0f; padding: 24px; }
  .lyrics-toggle-btn { display: none; }
  .lyrics-viewport { flex: 1; height: auto; }
  .lyric-line { font-size: 24px; padding: 4px 0; }
  .sheet-sections { max-width: 1200px; padding: 0 40px; display: grid; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .sheet-sections > * { grid-column: 1; }
  #sheetCommunitySlot { grid-column: 2; grid-row: 1 / span 3; }
  .sheet-dialog, .info-lyrics-dialog { margin: auto; }
}
@media (min-width: 1600px) {
  .quick { grid-template-columns: repeat(6, 1fr); }
  .quick .qt:nth-child(n+9) { display: flex; }
  .quick .qt:nth-child(n+13) { display: none; }
}

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

/* ---------- album / artist pages (tab-browse) ----------
   Phone: centred header (cover 240px max / 64vw, avatar 128px), name 24px.
   ≥600px: header in a row (cover 220px, avatar 160px), name 32px. Rows reuse --row 64px. */
.bz-head { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 8px var(--gutter) 4px; text-align: center; }
.bz-cover { flex-shrink: 0; width: min(64vw, 240px); aspect-ratio: 1; border-radius: 8px; object-fit: cover; background: var(--surface); box-shadow: 0 12px 32px #00000080; }
.bz-avatar { flex-shrink: 0; width: 128px; height: 128px; border-radius: 50%; object-fit: cover; background: var(--surface); }
.bz-info { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-width: 0; }
.bz-name { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; overflow-wrap: anywhere; }
.bz-by { font-size: 15px; font-weight: 500; }
.bz-meta { font-size: 13px; color: var(--sub); }
.bz-acts { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.bz-acts .chip { position: relative; gap: 6px; }
.bz-acts .chip svg.i { width: 16px; height: 16px; }
.bz-link, .info-link { position: relative; font: inherit; color: inherit; text-decoration: underline; text-decoration-color: #ffffff59; text-underline-offset: 3px; }
/* Text links: 32px visible target (padding, offset by margins) + ::before to 44px. */
.bz-link, .info-link { display: inline-block; padding: 6px 0; margin: -6px 0; }
.bz-link::before, .info-link::before { content: ""; position: absolute; inset: -6px -2px; }
.bz-tabs { display: flex; width: calc(100% - 2 * var(--gutter)); max-width: 420px; margin: 20px auto 4px; }
.bz-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; }
.bz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px 16px; padding: 12px var(--gutter) 24px; }
.bz-grid .card { width: auto; }
.bz-tracks { margin-top: 12px; }
.bz-no { width: 24px; flex-shrink: 0; text-align: center; font-size: 15px; font-variant-numeric: tabular-nums; color: var(--dim); }
.track-btn.active .bz-no { color: var(--accent); }
.bz-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px 16px; padding: 12px var(--gutter) 24px; }
.bz-video { display: block; min-width: 0; color: inherit; text-decoration: none; }
.bz-vthumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: var(--surface); }
.bz-vthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bz-vthumb svg.i { position: absolute; right: 10px; bottom: 10px; width: 36px; height: 36px; padding: 10px; border-radius: 50%; background: #000000a6; color: #fff; }
.bz-video b { display: block; margin-top: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bz-video small { display: block; margin-top: 2px; font-size: 12px; color: var(--sub); }
/* 곡 정보 rows with a link get a full 44px touch height. */
#songCreditsBody div.link-row { min-height: var(--hit); align-items: center; padding: 0; }
/* Artist under the title (21px text) and album at the top (18px text): padding makes a 33px/32px
   visible target (negative margins keep the layout) and ::before extends it to 45px/44px. */
.song-a[role="button"], .sheet-ctx b[role="button"] { position: relative; cursor: pointer; }
.song-a[role="button"] { padding: 6px 0; margin: -2px 0 -6px; }
.sheet-ctx b[role="button"] { padding: 7px 0; margin: -7px 0; }
.song-a[role="button"]::before, .sheet-ctx b[role="button"]::before { content: ""; position: absolute; inset: -6px -4px; }
@media (hover: hover) and (pointer: fine) {
  .bz-link:hover, .info-link:hover { text-decoration-color: currentColor; }
  .song-a[role="button"]:hover, .sheet-ctx b[role="button"]:hover { text-decoration: underline; text-underline-offset: 3px; }
  .bz-video:hover .bz-vthumb img { filter: brightness(1.08); }
}
@media (min-width: 600px) {
  .bz-head { flex-direction: row; align-items: flex-end; gap: 28px; padding-top: 16px; text-align: left; }
  .bz-cover { width: 220px; }
  .bz-avatar { width: 160px; height: 160px; }
  .bz-info { align-items: flex-start; }
  .bz-name { font-size: 32px; }
  .bz-tabs { margin-inline: var(--gutter); }
}

/* Shelf arrows: mouse/trackpad only (touch swipes). 36px circles with a 44px hit area. */
.sh.has-nav { justify-content: flex-start; }
.sh.has-nav > :first-child { margin-right: auto; }
.car-nav { display: flex; gap: 8px; margin-top: -6px; }
.car-nav[hidden] { display: none; }
.car-nav .icon-btn::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface2); z-index: -1; }
.car-nav .icon-btn { z-index: 0; }
.car-nav .icon-btn svg.i { width: 18px; height: 18px; }
.car-nav .icon-btn:disabled { opacity: .35; cursor: default; }
@media (hover: hover) and (pointer: fine) { .car-nav .icon-btn:not(:disabled):hover::after { background: #33333a; } }

/* EQ shortcut on the player sheet: a labelled 36px pill (44px hit area) next to 감상평.
   Off: translucent "EQ"; on: accent colour with the preset name (e.g. "록"). */
.eq-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 36px; max-width: 150px; margin-left: 6px; padding: 0 14px 0 10px; border-radius: 999px; background: #ffffff1f; color: #fff; font-size: 13px; font-weight: 700; white-space: nowrap; }
.eq-chip::before { content: ""; position: absolute; inset: -4px 0; }
.player-song-actions .eq-chip svg.i { width: 18px; height: 18px; flex-shrink: 0; }
.eq-chip span { overflow: hidden; text-overflow: ellipsis; }
.eq-chip.on { background: var(--accent); color: var(--on-accent); }
#miniEq.on { color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .eq-chip:not(.on):hover { background: #ffffff2e; } }

/* No song selected yet (plain main address): no mini player on phones; the desktop bar shows a hint. */
body.no-track .mini-bar { display: none; }
@media (min-width: 1024px) {
  body.no-track .mini-bar { display: grid; }
  body.no-track .mini-center, body.no-track .mini-right { visibility: hidden; }
  body.no-track .mini-left { pointer-events: none; }
  body.no-track .mini-t { color: var(--sub); font-weight: 500; }
}

/* Home video shelf (songs with a music video) and the player's YouTube link. */
.card.vcard { width: 240px; color: inherit; text-decoration: none; }
.vcard .bz-vthumb img { background: var(--surface2); }
.player-song-actions .yt-btn { color: #FF0033; }
.player-song-actions .yt-btn svg.i { width: 26px; height: 26px; }
@media (min-width: 600px) { .card.vcard { width: 280px; } }
@media (min-width: 1024px) { .card.vcard { width: 300px; } }

/* ---------- Content creators: My page, group shelves, remake line ----------
   Sizes: inputs and buttons 48px high (16px text, no iOS zoom), cards 12px radius with 16px padding,
   avatar 56px, stats 4 columns ≥360px (2 below), song rows 64px with a 48px cover. */
.song-o { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 13px; color: #ffffffb3; min-width: 0; }
.song-o[hidden] { display: none; }
.song-o > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.remake-tag { flex-shrink: 0; height: 20px; padding: 0 7px; border-radius: 4px; background: #ffffff1f; color: var(--text); font-size: 11px; font-weight: 700; line-height: 20px; }
.my-page .sec { margin-top: 24px; }
.my-hero { padding: 20px; border-radius: 12px; background: linear-gradient(135deg, #1f2a12, var(--surface) 70%); }
.my-hero h2 { margin: 0 0 6px; font-size: 20px; }
.my-hero p { margin: 0; color: var(--sub); font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.my-profile { display: flex; align-items: center; gap: 14px; }
.my-profile > div { min-width: 0; }
.my-avatar { flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; font-size: 22px; font-weight: 800; }
.my-card { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--surface); }
.my-card > summary { min-height: var(--hit); display: flex; align-items: center; font-weight: 700; cursor: pointer; }
.my-card h3 { margin: 0 0 12px; font-size: 17px; }
.my-form { display: grid; gap: 12px; }
.my-form label { display: grid; gap: 6px; font-size: 14px; color: var(--sub); }
.my-form label small { color: var(--dim); }
.my-form input { height: 48px; min-width: 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface2); color: var(--text); font: inherit; font-size: 16px; }
.my-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.my-note { margin: 0; font-size: 13px; color: var(--dim); }
.my-msg { margin: 0; min-height: 20px; font-size: 14px; color: var(--accent); }
.my-msg.err { color: #ff8a8a; }
.my-msg:empty { min-height: 0; }
.my-primary, .my-secondary { height: 48px; padding: 0 20px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; text-decoration: none; }
.my-primary { background: var(--accent); color: var(--on-accent); }
.my-secondary { border: 1px solid #ffffff40; color: var(--text); }
.my-primary:disabled { opacity: .5; }
.my-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.my-acts > a { flex: 1 1 150px; }
.my-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0; }
.my-stats > div { padding: 14px 12px; border-radius: 10px; background: var(--surface); }
.my-stats dt { font-size: 12px; color: var(--dim); }
.my-stats dd { margin: 4px 0 0; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
@media (min-width: 360px) { .my-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.my-songs { display: flex; flex-direction: column; }
.my-song { display: flex; align-items: center; gap: 12px; min-height: var(--row); color: var(--text); text-decoration: none; min-width: 0; }
.my-song img { width: var(--thumb); height: var(--thumb); border-radius: 6px; object-fit: cover; flex-shrink: 0; background: var(--surface2); }
.my-song > span { flex: 1; min-width: 0; display: grid; }
.my-song b, .my-song small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-song b { font-size: 15px; font-weight: 600; } .my-song small { font-size: 13px; color: var(--sub); }
.my-badge { flex-shrink: 0; font-style: normal; font-size: 12px; height: 24px; line-height: 24px; padding: 0 8px; border-radius: 999px; background: var(--surface2); color: var(--sub); }
.my-badge.pending { background: #3a2f12; color: #ffd27a; }
.my-badge.rejected { background: #3a1616; color: #ff9c9c; }
.my-logout { margin: 24px 0 8px; height: var(--hit); padding: 0 4px; color: var(--sub); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .my-song:hover { background: #ffffff0a; } .my-secondary:hover { background: #ffffff14; } }
a.sh-link { display: inline-flex; align-items: center; text-decoration: none; }

/* 트랙 · 다운로드 sub-page: search box 48px, 10 cards per page, pager buttons 44×44px (current page filled). */
.menu-meta { font-size: 13px; color: var(--dim); font-variant-numeric: tabular-nums; }
.downloads-page .links-list { padding: 0 var(--gutter); }
.downloads-page .playlist-empty { padding: 24px 0; }
.lk-pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 16px var(--gutter) 32px; }
.lk-pager[hidden] { display: none; }
.lk-pager button { min-width: var(--hit); height: var(--hit); padding: 0 8px; border-radius: 8px; background: var(--surface2); color: var(--text); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; justify-content: center; }
.lk-pager button[aria-current="page"] { background: var(--accent); color: var(--on-accent); }
.lk-pager button:disabled { opacity: .35; }
.lk-pager svg.i { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .lk-pager button:not(:disabled):not([aria-current]):hover { background: var(--raised); } }
.search-box input:focus-visible { outline: none; }

/* ---------- External songs (YouTube · Spotify · SoundCloud) ----------
   The channel's embed player takes the cover frame: YouTube 16:9 across the column (at most 640px),
   Spotify and SoundCloud the square frame. '…에서 열기' link below it, 44px high, 13px text.
   EQ and lyrics need the audio file, so they are hidden while such a song is loaded. */
.art-frame.ext { position: relative; background: #000; }
.art-frame.ext .art-img, .art-frame.ext .visualizer { display: none; }
.art-frame.ext-youtube { aspect-ratio: 16 / 9; width: min(100%, 640px); }
.ext-stage { position: absolute; inset: 0; }
.ext-stage > div, .ext-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.ext-open { display: flex; align-items: center; justify-content: center; gap: 4px; min-height: var(--hit); margin: 4px auto -8px; width: fit-content; padding: 0 8px; font-size: 13px; font-weight: 600; color: var(--sub); text-decoration: none; }
.ext-open[hidden] { display: none; }
.ext-open svg.i { width: 16px; height: 16px; }
body.ext-playing #playerEq, body.ext-playing .lyrics-col { display: none; }
.ch-badge { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; margin-right: 6px; border-radius: 4px; font-size: 10px; font-weight: 800; letter-spacing: .02em; vertical-align: 1px; color: #fff; background: #3a3a40; }
.ch-badge.youtube { background: #CC0026; } .ch-badge.spotify { background: #1DB954; color: #06200f; } .ch-badge.soundcloud { background: #FF5500; }
@media (hover: hover) and (pointer: fine) { .ext-open:hover { color: var(--text); } }
/* Spotify's embed shows its full layout (large artwork) only from 352px high; below that it switches to
   a compact card, so its frame is 352px high rather than square. */
.art-frame.ext-spotify { aspect-ratio: auto; height: 352px; background: transparent; box-shadow: none; }
.art-frame.ext-spotify .ext-stage iframe { border-radius: 12px; }
/* PC: without lyrics the player is one centred column; the video grows to 640px wide as long as the
   controls stay on screen (same 418px allowance as the square cover). */
@media (min-width: 1024px) {
  body.ext-playing .player-layout { grid-template-columns: minmax(0, 640px); justify-content: center; }
  .art-frame.ext-youtube { width: min(100%, 640px, calc((100vh - 418px) * 16 / 9)); min-width: 0; }
  .art-frame.ext-spotify, .art-frame.ext-soundcloud { width: min(100%, 440px); }
}

/* 검색 opened from a mood card: back button before the title (44×44px, icon aligned to the gutter). */
.search-back { margin-left: -10px; margin-right: 2px; }
.search-back[hidden] { display: none; }

/* 다른 서비스 차트: link cards 148×88px (4px brand bar, 16px name, 12px caption, 44px+ target) in the
   usual horizontal shelf; Spotify Top 50 embed below at 352px high (Spotify's full layout). */
.chart-link { position: relative; flex: 0 0 148px; height: 88px; padding: 16px 14px 12px; border-radius: 10px; background: var(--surface); color: var(--text); text-decoration: none; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; overflow: hidden; scroll-snap-align: start; }
.chart-link .chart-bar { position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--brand, var(--accent)); }
.chart-link b { font-size: 16px; font-weight: 800; }
.chart-link small { font-size: 12px; color: var(--sub); }
.chart-link svg.i { position: absolute; top: 14px; right: 10px; width: 18px; height: 18px; color: var(--dim); }
.chart-link.melon { --brand: #00CD3C; } .chart-link.genie { --brand: #2BA6E1; } .chart-link.flo { --brand: #3F3FFF; } .chart-link.vibe { --brand: #FC3C44; } .chart-link.bugs { --brand: #FF4B2B; }
.spotify-chart { margin-top: 16px; max-width: 720px; }
.spotify-chart iframe { display: block; width: 100%; height: 352px; border: 0; border-radius: 12px; background: var(--surface); }
@media (hover: hover) and (pointer: fine) { .chart-link:hover { background: var(--surface2); } .chart-link:hover svg.i { color: var(--text); } }

/* Site information: bottom of 스튜디오 · 설정 (13px, links 44px high) and one line in the PC sidebar.
   Sign-up consent checkbox 22px with a 44px row. */
.site-info { margin: 32px var(--gutter) 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.7; color: var(--dim); }
.site-info p { margin: 2px 0; word-break: keep-all; overflow-wrap: anywhere; }
.site-info a { color: var(--sub); }
.site-links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-bottom: 6px; }
.site-links a { display: inline-flex; align-items: center; min-height: var(--hit); color: var(--text); font-size: 14px; text-decoration: none; }
.site-links a b { font-weight: 700; }
.side-legal { display: none; }
@media (min-width: 1024px) {
  .side-legal { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: auto; padding: 14px 10px 0; font-size: 12px; }
  .side-legal a { display: inline-flex; align-items: center; min-height: 32px; color: var(--dim); text-decoration: none; }
  .side-legal a:hover { color: var(--text); }
}
.agree { display: flex !important; align-items: flex-start; gap: 10px; min-height: var(--hit); padding: 4px 0; font-size: 13px !important; line-height: 1.6; color: var(--sub); cursor: pointer; }
.agree input { flex-shrink: 0; width: 22px; height: 22px !important; margin: 1px 0 0; padding: 0 !important; accent-color: var(--accent); }
.agree a { color: var(--text); }

/* ---------- Member sign-in and synced library (My) ----------
   Google button 48px high, full card width up to 360px (white, Google's 'G' at 20px, 15px label);
   notices 14px on a tinted card; sync card counts 15px / state 13px. */
.my-login { display: grid; gap: 12px; }
.google-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; max-width: 360px; height: 48px; padding: 0 20px; border-radius: 999px; background: #fff; color: #1f1f1f; font-size: 15px; font-weight: 700; text-decoration: none; border: 0; }
.google-btn .g-mark { width: 20px; height: 20px; flex-shrink: 0; }
.google-btn[disabled] { opacity: .55; cursor: not-allowed; }
.my-alert { margin: 16px 0 0; padding: 12px 14px; border-radius: 10px; background: #3a1616; color: #ffb3b3; font-size: 14px; line-height: 1.6; }
.my-card .my-alert { margin: 0; }
.my-sync h3 { margin: 0 0 4px; }
.my-sync .sync-counts { margin: 0; font-size: 15px; color: var(--text); }
.my-sync .sync-state { margin: 2px 0 12px; min-height: 20px; font-size: 13px; color: var(--accent); }
.my-sync .sync-state.err { color: #ff9c9c; }
.my-sync .my-secondary { height: 44px; }
.my-foot { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 8px; }
.my-foot .my-logout { margin: 16px 0 8px; }
@media (hover: hover) and (pointer: fine) { .google-btn:not([disabled]):hover { background: #f1f3f4; } }
/* My page: cards and links keep the 16px side gutter (sections carry their own). */
.my-page #myBody > :not(.sec) { margin-left: var(--gutter); margin-right: var(--gutter); }
.my-page #myBody { padding-bottom: 24px; }

/* Settings rows with a second line (13px) and a state value. */
.menu-row .menu-sub { display: block; font-size: 13px; font-weight: 400; color: var(--dim); }
#analyticsToggle[aria-checked="true"] .menu-meta { color: var(--accent); }

#awakeToggle[aria-checked="true"] .menu-meta { color: var(--accent); }
#awakeToggle:disabled { opacity: .6; }
/* 곡 사이 간격 in 스튜디오 · 설정: label row, then a full-width segmented control (buttons 40px). */
.setting-seg { padding: 8px 0 14px; }
.setting-seg p { margin: 0 0 10px; font-size: 16px; font-weight: 500; }
.setting-seg .seg { display: flex; width: 100%; }
.setting-seg .seg button { flex: 1; height: 40px; }
.setting-seg .menu-sub { display: block; margin-top: 2px; font-size: 13px; font-weight: 400; color: var(--dim); }
.setting-seg .seg { max-width: 420px; }

/* Songs whose creator turned downloads off: a plain label instead of the 음원 button. */
.lk-btn.lk-off { background: transparent; border: 1px dashed var(--line); color: var(--dim); font-weight: 500; }
