:root {
  --bg: #15191d;
  --bg-2: #1b2025;
  --surface: #242a30;
  --surface-2: #2c343b;
  --surface-3: #39434c;
  --line: rgba(255, 255, 255, .13);
  --line-2: rgba(255, 255, 255, .22);
  --text: #f6f4ef;
  --text-2: #d4d7d7;
  --text-3: #b4bfc2;
  --accent: #ecd09e;
  --accent-2: #d6b77d;
  --accent-soft: rgba(236, 208, 158, .17);
  --accent-ink: #1b150b;
  --danger: #ff8a80;
  --ok: #8fd4a6;
  --dyn: 227 194 143;           /* 지금 재생 중인 곡 표지에서 뽑은 색 (JS가 바꿈) */
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar: 268px;
  --player-h: 96px;
  --tab-h: 72px;
  --mini-h: 76px;
  --font-scale: 1.12;
  --chrome: rgba(27, 32, 37, .96);     /* 플레이어·하단 탭 */
  --chrome-m: rgba(36, 42, 48, .96);   /* 휴대폰 미니 플레이어 */
  --chrome-solid: #141417;            /* 가벼운 효과 모드 */
  --panel: rgba(28, 28, 32, .97);      /* 메뉴·알림 */
  --panel-solid: #1f1f24;
  --tint-top: rgb(var(--dyn) / .13);
  --tint-mid: rgba(21, 25, 29, .75);
  --queue-bg: rgba(22, 22, 26, .55);
  --hover: rgba(255, 255, 255, .05);
  --dyn-dark: 113 73 13;               /* 밝은 화면용 표지 색 (JS가 바꿈) */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 17px; line-height: 1.5; letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
[hidden] { display: none !important; }
button, input { font: inherit; color: inherit; letter-spacing: inherit; }
button, a, .song, .card { touch-action: manipulation; }
button { cursor: pointer; background: none; border: 0; padding: 0; -webkit-user-select: none; user-select: none; }
a { color: inherit; text-decoration: none; }
a[data-href] { cursor: pointer; }
img { display: block; }
svg { width: 24px; height: 24px; flex: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .1); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, .18); }
::-webkit-scrollbar-track { background: transparent; }

/* ── 시작 화면 ─────────────────────────────────────────────── */
.boot { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: var(--bg); transition: opacity .4s ease, visibility .4s; }
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-mark { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; color: var(--accent); background: linear-gradient(145deg, #2a2620, #141210); border: 1px solid rgba(227, 194, 143, .22); animation: breathe 1.6s ease-in-out infinite; }
.boot-mark svg { width: 38px; height: 38px; animation: spin 3s linear infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(227, 194, 143, 0); } 50% { transform: scale(1.05); box-shadow: 0 0 60px 0 rgba(227, 194, 143, .18); } }

/* ── 공통 컴포넌트 ─────────────────────────────────────────── */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border-radius: 999px; font-weight: 650; font-size: 16px;
  transition: transform .18s var(--ease), background .2s, color .2s, border-color .2s, box-shadow .2s; white-space: nowrap;
}
.btn svg { width: 20px; height: 20px; }
.btn:active { transform: scale(.96); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 20px -6px rgba(227, 194, 143, .45); }
.btn-primary:hover { background: #ecd0a4; box-shadow: 0 10px 28px -8px rgba(227, 194, 143, .6); }
.btn-secondary { background: var(--surface-2); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost { color: var(--text-2); border: 1px solid var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); }
.btn-danger { background: rgba(255, 138, 128, .14); color: var(--danger); }
.btn-block { width: 100%; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--text-2); transition: color .2s, background .2s, transform .18s var(--ease);
}
.icon-btn:hover { color: var(--text); background: rgba(255, 255, 255, .07); }
.icon-btn:active { transform: scale(.88); }
.icon-btn.sm { width: 34px; height: 34px; }
.icon-btn.sm svg { width: 20px; height: 20px; }
.icon-btn.lg { width: 50px; height: 50px; }
.icon-btn.lg svg { width: 26px; height: 26px; }
.icon-btn.xl { width: 62px; height: 62px; color: var(--text); }
.icon-btn.xl svg { width: 36px; height: 36px; }
.icon-btn.on { color: var(--accent); }
.icon-btn.on::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--accent); }
.like-btn.on::after, .save-btn::after { display: none; }
.like-btn.on { color: var(--accent); }
.like-btn.pop svg { animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }

.play-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--text); color: var(--bg); transition: transform .18s var(--ease), background .2s, box-shadow .3s;
}
.play-btn:hover { transform: scale(1.06); }
.play-btn:active { transform: scale(.92); }
.play-btn svg { width: 22px; height: 22px; }
.play-btn.big { width: 78px; height: 78px; box-shadow: 0 12px 40px -10px rgb(var(--dyn) / .55); }
.play-btn.big svg { width: 34px; height: 34px; }

.pill-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px; background: rgba(255, 255, 255, .07); color: var(--text-2); font-size: 15px; font-weight: 600; transition: background .2s, color .2s, transform .18s var(--ease); }
.pill-btn svg { width: 19px; height: 19px; }
.pill-btn:hover { background: rgba(255, 255, 255, .12); color: var(--text); }
.pill-btn:active { transform: scale(.95); }
.pill-btn.on { background: var(--accent-soft); color: var(--accent); }

.text-btn { color: var(--text-2); font-size: 14.5px; font-weight: 600; padding: 6px 2px; transition: color .2s; }
.text-btn:hover { color: var(--text); }

.field { display: grid; gap: 8px; }
.field > span { font-size: 15px; color: var(--text-2); font-weight: 500; }
.field input, .input {
  width: 100%; min-height: 52px; padding: 0 16px; border-radius: 13px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--text); font-size: 17px;
  transition: border-color .2s, background .2s, box-shadow .2s; outline: none; -webkit-appearance: none; appearance: none;
}
.field input:focus, .input:focus { border-color: var(--accent); background: var(--bg); box-shadow: 0 0 0 4px rgba(227, 194, 143, .12); }
.field input::placeholder, .input::placeholder { color: var(--text-3); }
.form { display: grid; gap: 18px; }

/* 체크박스 · 스위치 */
.check { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 16px; font-weight: 500; -webkit-user-select: none; user-select: none; }
.check input { position: absolute; opacity: 0; pointer-events: none; }
.check small { color: var(--text-3); font-size: 14px; margin-left: 4px; }
.check-box { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--text-3); display: grid; place-items: center; transition: background .2s, border-color .2s, transform .2s var(--spring); }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); transform: scale(1.05); }
.check input:checked + .check-box::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.5px 2.5px 0; transform: translateY(-1px) rotate(45deg); }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-align: left; width: 100%; }
.switch-text { display: grid; gap: 3px; }
.switch-text strong { font-size: 17px; }
.switch-text > span { font-size: 15px; color: var(--text-2); }
.switch { flex: none; position: relative; width: 50px; height: 30px; border-radius: 999px; background: var(--surface-3); transition: background .25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .3s var(--spring); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); }
.switch-row.on .switch { background: var(--accent); }
.switch-row.on .switch::after { transform: translateX(20px); }
.switch-row.compact { width: auto; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--text-2); }
.switch-row.compact .switch { width: 42px; height: 26px; }
.switch-row.compact .switch::after { width: 20px; height: 20px; }
.switch-row.compact.on .switch::after { transform: translateX(16px); }

/* 슬라이더 */
.range { --pct: 0%; -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; margin: 0; touch-action: none; }
.range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, var(--text) var(--pct), rgba(255, 255, 255, .16) var(--pct)); }
.range::-moz-range-track { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.range::-moz-range-progress { height: 4px; border-radius: 4px; background: var(--text); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--text); border: 0; opacity: 0; transition: opacity .15s, transform .15s; box-shadow: 0 2px 8px rgba(0, 0, 0, .4); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; opacity: 0; }
.range:hover::-webkit-slider-thumb, .range:active::-webkit-slider-thumb, .range:focus-visible::-webkit-slider-thumb { opacity: 1; }
.range:active::-webkit-slider-thumb { transform: scale(1.2); }
.range:hover::-moz-range-thumb, .range:active::-moz-range-thumb { opacity: 1; }
.range:hover::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--pct), rgba(255, 255, 255, .16) var(--pct)); }
.seek-wrap { position: relative; display: flex; align-items: center; }
.seek-tip { position: absolute; bottom: 24px; transform: translateX(-50%); padding: 3px 8px; border-radius: 6px; background: var(--surface-3); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); opacity: 0; pointer-events: none; transition: opacity .15s; white-space: nowrap; }
.seek-wrap:hover .seek-tip { opacity: 1; }

/* 토스트 · 오프라인 배너 */
#toast {
  position: fixed; left: 50%; top: calc(14px + var(--safe-t)); z-index: 150;
  transform: translate(-50%, -24px) scale(.96); opacity: 0; pointer-events: none;
  max-width: min(520px, calc(100vw - 32px)); padding: 13px 20px; border-radius: 16px;
  background: rgba(43, 43, 49, .96); color: var(--text); font-size: 15.5px; font-weight: 550; text-align: center;
  box-shadow: 0 16px 50px rgba(0, 0, 0, .55); border: 1px solid var(--line-2);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: opacity .25s, transform .4s var(--spring);
}
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.net-banner {
  position: fixed; z-index: 90; left: 50%; top: calc(12px + var(--safe-t)); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; white-space: nowrap;
  background: var(--panel); border: 1px solid var(--line-2); color: var(--text-2); font-size: 14px; font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  animation: drop-in .5s var(--spring);
}
.net-banner svg { width: 18px; height: 18px; color: var(--accent); }
@keyframes drop-in { from { opacity: 0; transform: translate(-50%, -20px); } }

/* ── 로그인 ─────────────────────────────────────────────────── */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; overflow: hidden; }
.auth-orbs span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .5; animation: float 18s ease-in-out infinite; }
.auth-orbs span:nth-child(1) { width: 420px; height: 420px; background: #6b4f24; top: -120px; left: 50%; margin-left: -300px; }
.auth-orbs span:nth-child(2) { width: 320px; height: 320px; background: #3b2c4a; bottom: -80px; right: -60px; animation-delay: -6s; }
.auth-orbs span:nth-child(3) { width: 260px; height: 260px; background: #1e3a3a; bottom: 10%; left: -80px; animation-delay: -12s; opacity: .35; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, 30px) scale(1.08); } 66% { transform: translate(-30px, 20px) scale(.95); } }
.auth-card { position: relative; width: min(420px, 100%); display: grid; gap: 22px; padding: 34px 28px; border-radius: 28px; background: rgba(20, 20, 23, .72); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .5); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); animation: rise .7s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.98); } }
.auth-mark { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; justify-self: center; background: linear-gradient(145deg, #2a2620, #17150f); color: var(--accent); border: 1px solid rgba(227, 194, 143, .25); }
.auth-mark svg { width: 34px; height: 34px; animation: spin 8s linear infinite; }
.auth-title { margin: 0; text-align: center; font-size: 32px; font-weight: 750; letter-spacing: -.04em; }
.auth-sub { margin: -14px 0 4px; text-align: center; color: var(--text-2); font-size: 16px; }
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.seg-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--surface-3); transition: transform .35s var(--spring); }
.seg.reg .seg-pill { transform: translateX(100%); }
.seg button { position: relative; min-height: 44px; border-radius: 999px; font-weight: 650; color: var(--text-2); transition: color .25s; }
.seg button.on { color: var(--text); }

/* ── 앱 레이아웃 ─────────────────────────────────────────────── */
.app { min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 24px 14px 14px;
  display: flex; flex-direction: column; gap: 6px; background: var(--bg-2); border-right: 1px solid var(--line); z-index: 10;
}
.app.has-player .sidebar { bottom: var(--player-h); }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 12px 22px; font-weight: 750; font-size: 19px; letter-spacing: -.03em; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #f0d4a8, #c9a46a); color: var(--accent-ink); box-shadow: 0 6px 18px -6px rgba(227, 194, 143, .6); }
.brand-mark svg { width: 22px; height: 22px; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 0 14px; border-radius: 12px; color: var(--text-2); font-weight: 650; font-size: 16.5px; transition: background .2s, color .2s; }
.side-nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.side-nav a.on { color: var(--text); background: var(--surface-2); }
.side-nav a.on svg { color: var(--accent); }
.side-nav a.on::before { content: ""; position: absolute; left: -14px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); animation: grow .3s var(--ease); }
@keyframes grow { from { transform: scaleY(0); } }
.side-label { display: flex; align-items: center; justify-content: space-between; margin: 22px 4px 4px 14px; color: var(--text-3); font-size: 13.5px; font-weight: 650; letter-spacing: .02em; }
.side-playlists { flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 1px; margin: 0 -4px; padding: 0 4px; }
.side-playlists a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--text-2); font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background .2s, color .2s; }
.side-playlists a:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.side-playlists a.on { color: var(--accent); background: var(--accent-soft); }
.side-empty { padding: 8px 14px; color: var(--text-3); font-size: 14.5px; }
.side-offline { padding: 0 2px; }
.side-offline:empty { display: none; }
.offline-mini { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-size: 13.5px; color: var(--text-2); }
.offline-mini > div { display: flex; align-items: center; gap: 8px; }
.offline-mini svg { width: 17px; height: 17px; color: var(--accent); }
.side-user { display: flex; align-items: center; gap: 12px; padding: 12px 10px; margin-top: 8px; border-top: 1px solid var(--line); transition: background .2s; border-radius: 12px; }
.side-user:hover, .side-user.on { background: rgba(255, 255, 255, .04); }
.side-user-name { flex: 1; min-width: 0; display: grid; }
.side-user-name strong { font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-name small { color: var(--text-3); font-size: 13px; }
.side-user .chev { width: 18px; height: 18px; color: var(--text-3); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); font-weight: 750; font-size: 16px; border: 1px solid var(--line); }

.main { margin-left: var(--sidebar); min-height: 100vh; min-height: 100dvh; padding-bottom: 40px; }
.app.has-player .main { padding-bottom: calc(var(--player-h) + 40px); }
.view { max-width: 1120px; margin: 0 auto; padding: 40px 48px; }
.view.enter > * { animation: view-in .45s var(--ease) both; }
.view.enter > *:nth-child(2) { animation-delay: .04s; }
.view.enter > *:nth-child(3) { animation-delay: .08s; }
.view.enter > *:nth-child(n+4) { animation-delay: .12s; }
@keyframes view-in { from { opacity: 0; transform: translateY(12px); } }

/* 페이지 헤더 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 36px; font-weight: 780; letter-spacing: -.045em; line-height: 1.15; }
.page-head .sub { margin: 8px 0 0; color: var(--text-2); font-size: 16px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.back-link { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 14px -6px; color: var(--text-2); font-size: 15.5px; font-weight: 550; transition: color .2s, transform .2s var(--ease); }
.back-link svg { width: 20px; height: 20px; }
.back-link:hover { color: var(--text); transform: translateX(-2px); }

/* 홈 인사 · 최근 들은 곡 */
.greet { margin: 0 0 6px; font-size: 15px; font-weight: 650; color: var(--accent); letter-spacing: .01em; }
.shelf { margin: 0 -48px 30px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 48px; margin-bottom: 12px; }
.shelf-head h2 { margin: 0; font-size: 20px; font-weight: 750; letter-spacing: -.03em; }
.shelf-row { display: grid; grid-auto-flow: column; grid-auto-columns: 152px; gap: 16px; overflow-x: auto; padding: 4px 48px 12px; scroll-snap-type: x mandatory; scroll-padding: 48px; scrollbar-width: none; }
.shelf-row::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; display: grid; gap: 10px; text-align: left; border-radius: 14px; cursor: pointer; min-width: 0; }
.card-art { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); }
.card-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.card:hover .card-art img { transform: scale(1.06); }
.card-play { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 20px rgba(0, 0, 0, .4); opacity: 0; transform: translateY(8px); transition: opacity .25s, transform .3s var(--spring); }
.card-play svg { width: 20px; height: 20px; }
.card:hover .card-play, .card.playing .card-play { opacity: 1; transform: none; }
.card-title { font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-sub { margin-top: -8px; font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.playing .card-title { color: var(--accent); }
.card.unavailable { opacity: .38; }

.toolbar { display: flex; gap: 12px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.toolbar .input { flex: 1; min-width: 200px; min-height: 46px; border-radius: 999px; padding-left: 46px; }
.input-wrap { position: relative; flex: 1; min-width: 200px; display: flex; }
.input-wrap > svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; color: var(--text-3); pointer-events: none; transition: color .2s; }
.input-wrap:focus-within > svg { color: var(--accent); }
.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { white-space: nowrap; min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 15px; font-weight: 650; border: 1px solid var(--line); transition: background .2s, color .2s, border-color .2s, transform .15s var(--ease); }
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip:active { transform: scale(.95); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-hint { font-size: 12.5px; font-weight: 600; opacity: .7; margin-left: 2px; }

/* 곡 목록 */
.songs { list-style: none; margin: 0; padding: 0; }
.song {
  --i: 0;
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto auto auto; align-items: center; gap: 14px;
  padding: 8px 10px; margin: 0 -10px; border-radius: 13px; cursor: pointer; transition: background .2s, opacity .3s, transform .15s var(--ease);
  animation: row-in .4s var(--ease) both; animation-delay: calc(min(var(--i), 18) * 22ms);
}
.songs.static .song { animation: none; }
.song { content-visibility: auto; contain-intrinsic-size: auto 72px; }
.song:nth-child(-n+20) { content-visibility: visible; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } }
.song:hover { background: var(--hover); }
.song:active { transform: scale(.99); }
.song.playing { background: linear-gradient(90deg, rgb(var(--dyn) / .13), transparent 70%); }
.song.playing .song-title { color: var(--accent); }
.song.unavailable { opacity: .38; }
.song-art { position: relative; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .5); }
.song-art img { width: 100%; height: 100%; object-fit: cover; }
.song-art .eq, .song-art .art-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .48); opacity: 0; transition: opacity .2s; color: #fff; }
.song:hover .art-play { opacity: 1; }
.song.playing .eq { opacity: 1; }
.song.playing:hover .art-play { opacity: 0; }
.song-text { min-width: 0; display: grid; gap: 2px; }
.song-title { font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .2s; }
.song-sub { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 15px; color: var(--text-2); }
.song-sub > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.off-dot { flex: none; width: 16px !important; height: 16px !important; color: var(--accent); }
.tag { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; }
.song-dur { color: var(--text-3); font-size: 15px; font-variant-numeric: tabular-nums; min-width: 44px; text-align: right; }
.song .like-btn { opacity: 0; transition: opacity .2s, color .2s, transform .18s var(--ease); }
.song:hover .like-btn, .song .like-btn.on { opacity: 1; }
.save-btn { color: var(--text-3); }
.save-btn.done { color: var(--ok); }

.eq { gap: 3px; grid-auto-flow: column; align-content: center; justify-content: center; }
.eq i { display: block; width: 3px; height: 16px; border-radius: 2px; background: var(--accent); transform-origin: bottom; animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: -.35s; }
.eq i:nth-child(3) { animation-delay: -.7s; }
.paused .eq i { animation-play-state: paused; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }

.empty { padding: 64px 20px; text-align: center; color: var(--text-2); }
.empty-icon { width: 68px; height: 68px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); color: var(--accent); border: 1px solid var(--line); animation: breathe 3s ease-in-out infinite; }
.empty-icon svg { width: 30px; height: 30px; }
.empty h3 { margin: 0 0 8px; color: var(--text); font-size: 20px; font-weight: 750; }
.empty p { margin: 0 auto 22px; max-width: 380px; font-size: 16px; }

/* 검색 */
.search-bar { display: flex; gap: 10px; margin-bottom: 18px; }
.search-bar .input { min-height: 56px; border-radius: 999px; padding-left: 52px; font-size: 17.5px; }
.search-bar .input-wrap > svg { left: 19px; width: 22px; height: 22px; }
.search-bar .btn { min-height: 56px; padding: 0 26px; }
.search-spin { position: absolute; right: 18px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.search-bar .input::-webkit-search-cancel-button { margin-right: 26px; }
#search-suggest:empty { display: none; }
.suggest-row { display: flex; gap: 8px; overflow-x: auto; margin: -4px -2px 18px; padding: 2px; scrollbar-width: none; animation: view-in .25s var(--ease); }
.suggest-row::-webkit-scrollbar { display: none; }
.suggest-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; font-weight: 500; }
.suggest-chip svg { width: 15px; height: 15px; color: var(--text-3); }
.suggest-chip b { color: var(--text); font-weight: 750; }
.chip.suggest-chip:hover b { color: var(--accent); }
.hint-card.slim { display: flex; align-items: center; gap: 10px; padding: 14px 18px; margin-bottom: 16px; }
.hint-card.slim svg { width: 20px; height: 20px; color: var(--accent); }
#search-body { transition: opacity .2s; }
#search-body.refreshing { opacity: .45; pointer-events: none; }
.recent-searches { display: flex; gap: 8px; flex-wrap: wrap; margin: -4px 0 22px; }
.recent-searches .chip { min-height: 36px; padding: 0 14px; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px; }
.recent-searches .chip svg { width: 15px; height: 15px; color: var(--text-3); }
.section-title { margin: 26px 0 12px; font-size: 14px; font-weight: 750; color: var(--text-3); letter-spacing: .04em; }
.results .song { grid-template-columns: 104px minmax(0, 1fr) auto 40px; }
.results .search-more { width: 40px; height: 40px; }
.results .song-art { width: 104px; height: 58px; border-radius: 9px; }
.dl-state.muted { color: var(--text-3); font-weight: 550; font-size: 14px; }
.results .song:has(.dl-state.muted) { opacity: .55; }
.dl-btn { min-height: 42px; padding: 0 18px; font-size: 15px; }
.dl-state { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 15px; font-weight: 650; justify-content: flex-end; min-height: 42px; padding: 0 6px; }
.ring { --p: 0; position: relative; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255, 255, 255, .12) 0); }
.ring::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--bg); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .15); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.spinner.sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; padding: 8px 0; }
.sk { border-radius: 9px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.2s ease-in-out infinite; }
.sk.art { height: 58px; }
.sk.line { height: 14px; border-radius: 7px; }
.sk-lines { display: grid; gap: 10px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.hint-card { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: 16px; }
.hint-card strong { color: var(--text); }
.hint-card ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 6px; }
.jobs { display: grid; gap: 8px; margin-bottom: 8px; }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 18px; border-radius: 14px; background: var(--surface); animation: row-in .35s var(--ease); }
.job-title { font-weight: 650; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; overflow-wrap: anywhere; }
.job-sub { font-size: 14.5px; color: var(--text-2); }
.job-sub.err { color: var(--danger); }
.bar { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .1); margin-top: 8px; overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 4px; transition: width .4s var(--ease); }
.job .bar span { transition: none; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.section-row .section-title { margin-bottom: 12px; }

/* 재생목록 카드 */
.pl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 24px; }
.pl-card { display: grid; gap: 12px; padding: 12px; margin: -12px; border-radius: var(--radius); transition: background .25s; animation: row-in .45s var(--ease) both; animation-delay: calc(min(var(--i, 0), 12) * 35ms); }
.pl-card:hover { background: rgba(255, 255, 255, .04); }
.pl-card:hover .pl-cover { transform: translateY(-3px); box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .7); }
.pl-cover { aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; grid-template-columns: 1fr 1fr; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .6); transition: transform .35s var(--ease), box-shadow .35s; }
.pl-cover img { width: 100%; height: 100%; object-fit: cover; }
.pl-cover.one { grid-template-columns: 1fr; }
.pl-cover.none { display: grid; place-items: center; color: var(--text-3); background: linear-gradient(145deg, var(--surface-2), var(--surface)); }
.pl-cover.none svg { width: 40px; height: 40px; }
.pl-cover.liked { color: var(--accent); background: linear-gradient(145deg, #4a3a22, #1d1810); }
.pl-name { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-count { font-size: 15px; color: var(--text-2); margin-top: -8px; }
.pl-new { aspect-ratio: 1; border-radius: 14px; border: 1.5px dashed var(--line-2); display: grid; place-items: center; align-content: center; gap: 8px; color: var(--text-2); font-weight: 650; transition: border-color .25s, color .25s, background .25s; }
.pl-new:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.detail-hero { display: flex; gap: 28px; align-items: flex-end; margin-bottom: 30px; }
.detail-hero .pl-cover { width: 210px; flex: none; }
.detail-hero .kicker { font-size: 13.5px; font-weight: 750; color: var(--accent); letter-spacing: .08em; }
.detail-hero h1 { margin: 6px 0 8px; font-size: 42px; font-weight: 780; letter-spacing: -.045em; line-height: 1.12; word-break: keep-all; }
.detail-hero .sub { margin: 0 0 18px; color: var(--text-2); }

/* 내 정보 */
.me-card { display: flex; align-items: center; gap: 18px; padding: 24px; border-radius: var(--radius); background: linear-gradient(135deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); margin-bottom: 14px; }
.me-card .avatar { width: 62px; height: 62px; font-size: 25px; }
.me-card strong { display: block; font-size: 22px; letter-spacing: -.02em; }
.me-card small { color: var(--text-2); font-size: 15px; }
.me-section { margin: 30px 0 12px; font-size: 14px; font-weight: 750; color: var(--text-3); letter-spacing: .04em; }
.menu-list { border-radius: var(--radius); background: var(--surface); overflow: hidden; margin-bottom: 14px; border: 1px solid var(--line); }
.menu-list > * { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 0 22px; text-align: left; font-size: 17px; border-bottom: 1px solid var(--line); transition: background .2s; }
.menu-list > *:last-child { border-bottom: 0; }
.menu-list > button:hover, .menu-list > a:hover { background: rgba(255, 255, 255, .03); }
.menu-list svg { color: var(--text-2); }
.menu-list .danger, .menu-list .danger svg { color: var(--danger); }
.menu-list .info { color: var(--text-2); font-size: 15.5px; line-height: 1.6; padding: 16px 22px; display: block; }
.menu-list > .admin-account { display: flex; justify-content: space-between; gap: 16px; padding: 12px 22px; }
.admin-account > div { min-width: 0; }
.admin-account strong, .admin-account small { display: block; }
.admin-account small { color: var(--text-2); font-size: 14px; margin-top: 3px; }
.admin-account .btn { flex: none; font-size: 14px; padding: 9px 12px; }
.menu-list .password-change-notice { color: var(--text); background: var(--bg-2); }
.temporary-password, .family-code { display: block; width: calc(100% - 28px); margin: 12px 14px 18px; padding: 13px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 20px; font-weight: 700; letter-spacing: .05em; }
@media (max-width: 520px) { .menu-list > .admin-account { align-items: stretch; flex-direction: column; } .admin-account .btn { align-self: flex-start; } }
.menu-list > .switch-row { padding: 16px 22px; min-height: 0; }
.settings > .setting { display: grid; gap: 14px; padding: 20px 22px; min-height: 0; }
.setting-head { display: grid; gap: 2px; }
.setting-head strong { font-size: 17px; }
.setting-head span { font-size: 15px; color: var(--text-2); }
.setting-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.setting-range { width: 100%; accent-color: var(--accent); }
#crossfade-value { color: var(--accent); font-variant-numeric: tabular-nums; }
.setting-actions .btn { min-height: 40px; font-size: 15px; padding: 0 16px; }
.offline-hint { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--bg-2); color: var(--text-2); font-size: 14.5px; line-height: 1.55; }
.offline-hint svg { flex: none; width: 19px; height: 19px; margin-top: 1px; color: var(--text-3); }
.offline-hint b { color: var(--text); font-weight: 650; }
.offline-hint.ok { color: var(--ok); }
.offline-hint.ok svg { color: var(--ok); }
.storage-bar { height: 8px; border-radius: 8px; background: var(--surface-3); overflow: hidden; }
.storage-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); transition: width .6s var(--ease); }
.radio-list { display: grid; gap: 8px; }
.radio { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line-2); text-align: left; transition: border-color .2s, background .2s; }
.radio:hover { border-color: var(--text-3); }
.radio.on { border-color: var(--accent); background: var(--accent-soft); }
.radio-dot { flex: none; width: 20px; height: 20px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--text-3); display: grid; place-items: center; transition: border-color .2s; }
.radio.on .radio-dot { border-color: var(--accent); }
.radio.on .radio-dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pop .3s var(--spring); }
.radio-text { display: grid; gap: 2px; min-width: 0; }
.radio-text strong { font-size: 16.5px; font-weight: 650; }
.radio-text > span { font-size: 14.5px; color: var(--text-2); }
.folder-line { display: flex !important; align-items: center; gap: 8px; margin-top: 8px; color: var(--text) !important; font-weight: 650; flex-wrap: wrap; }
.folder-line svg { width: 18px; height: 18px; color: var(--accent); }
.folder-line .text-btn { color: var(--accent); padding: 0 0 0 4px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.stat { padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.stat b { display: block; font-size: 26px; font-weight: 780; letter-spacing: -.03em; }
.stat span { color: var(--text-2); font-size: 14.5px; }
.menu-list > .kbd-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; padding: 18px 22px; font-size: 15px; color: var(--text-2); }
kbd { font-family: var(--font); font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text); border-bottom: 2px solid rgba(0, 0, 0, .4); white-space: nowrap; }

/* ── 플레이어 바 ─────────────────────────────────────────────── */
.player {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; height: var(--player-h);
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: 16px;
  padding: 0 24px; background: rgba(16, 16, 19, .88); border-top: 1px solid var(--line);
  backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  animation: player-in .5s var(--ease);
}
@keyframes player-in { from { transform: translateY(110%); } }
.player-glow { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(600px 160px at 12% 100%, rgb(var(--dyn) / .17), transparent 70%); }
.player-progress-mini { display: none; }
.player-track { position: relative; display: flex; align-items: center; gap: 14px; min-width: 0; text-align: left; border-radius: 12px; }
.player-cover { position: relative; flex: none; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; background: var(--surface-2); box-shadow: 0 6px 18px -4px rgba(0, 0, 0, .6); }
.player-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.player-track:hover .player-cover img { transform: scale(1.06); }
.player-cover.swap img { animation: cover-swap .5s var(--ease); }
@keyframes cover-swap { from { opacity: 0; transform: scale(.85); } }
.player-meta { min-width: 0; display: grid; }
.player-meta strong { font-size: 16.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-meta span { font-size: 14.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-actions { position: relative; display: flex; align-items: center; }
.player-center { position: relative; display: grid; gap: 2px; justify-items: center; }
.player-controls { display: flex; align-items: center; gap: 10px; }
.player-seek { display: grid; grid-template-columns: 46px 1fr 46px; gap: 10px; align-items: center; width: 100%; max-width: 640px; }
.time { font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: center; }
.player-right { position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.range.vol { width: 110px; }
.sleep-btn.on { color: var(--accent); }

/* ── 지금 재생 중 ────────────────────────────────────────────── */
.now { position: fixed; inset: 0; z-index: 40; background: var(--bg); overflow: hidden; animation: now-in .45s var(--ease); }
.now.closing { animation: now-out .28s ease-in forwards; }
@keyframes now-in { from { transform: translateY(100%); } }
@keyframes now-out { to { transform: translateY(100%); } }
.now-bg { position: absolute; inset: -100px; background-size: cover; background-position: center; filter: blur(70px) saturate(1.5); opacity: .45; transform: scale(1.15) translateZ(0); }
.now-tint { position: absolute; inset: 0; background: linear-gradient(to bottom, rgb(var(--dyn) / .2), rgba(11, 11, 13, .55) 45%, rgba(11, 11, 13, .92)); }
.now-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: var(--safe-t) 0 var(--safe-b); }
.now-grabber { display: none; }
.now-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
.now-label { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 650; color: var(--text-2); letter-spacing: .02em; }
.sleep-left { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-variant-numeric: tabular-nums; }
.now-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 410px); gap: 56px; padding: 12px 64px 40px; max-width: 1220px; width: 100%; margin: 0 auto; }
.now-main { display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 520px; width: 100%; justify-self: center; min-height: 0; }
.now-art { position: relative; width: 100%; aspect-ratio: 1; max-height: 52vh; max-width: 52vh; align-self: center; border-radius: 20px; overflow: hidden; background: var(--surface-2); box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06); transition: transform .6s var(--spring), box-shadow .6s; touch-action: pan-y; }
.now-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#n-cover-prev { opacity: 0; pointer-events: none; }
.now-art.swap #n-cover { animation: art-in .55s var(--ease); }
.now-art.swap #n-cover-prev { animation: art-out .55s var(--ease); }
@keyframes art-in { from { opacity: 0; transform: scale(1.06); } }
@keyframes art-out { from { opacity: 1; } to { opacity: 0; transform: scale(.94); } }
.now.is-paused .now-art { transform: scale(.92); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .7), 0 0 0 1px rgba(255, 255, 255, .05); }
.now-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.now-titles { min-width: 0; }
.now-meta h2 { margin: 0; font-size: 27px; font-weight: 780; letter-spacing: -.035em; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: keep-all; }
.now-meta p { margin: 4px 0 0; font-size: 18px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now-actions { display: flex; align-items: center; }
.now-seek .range { height: 28px; }
.now-seek .range::-webkit-slider-runnable-track { height: 5px; }
.now-seek .range::-webkit-slider-thumb { opacity: 1; width: 16px; height: 16px; margin-top: -5.5px; }
.now-seek .range::-moz-range-thumb { opacity: 1; }
.now-times { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; margin-top: 2px; }
.now-controls { display: flex; align-items: center; justify-content: space-between; }
.now-volume { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; margin-top: -4px; }
.now-volume .icon-btn { color: var(--text-2); }
.now-volume .vol-max { display: grid; place-items: center; width: 34px; color: var(--text-3); }
.now-volume .vol-max svg { width: 20px; height: 20px; }
.now-volume .range, .now-volume .range.vol { width: 100%; height: 26px; }
.now-volume .range::-webkit-slider-thumb { opacity: 1; }
.now-volume .range::-moz-range-thumb { opacity: 1; }
.now-foot { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.now-queue-toggle { display: none; }
.now-queue { min-height: 0; display: flex; flex-direction: column; background: var(--queue-bg); border: 1px solid var(--line); border-radius: 20px; padding: 18px 8px 8px; backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 12px 10px; }
.queue-head h3 { margin: 0; font-size: 18px; font-weight: 750; }
.queue-tools { display: flex; align-items: center; gap: 14px; }
.queue-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; position: relative; }
.queue-list li { position: relative; display: grid; grid-template-columns: 24px 44px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 4px; border-radius: 12px; cursor: pointer; transition: background .2s, opacity .2s; }
.queue-list li:hover { background: var(--hover); }
.queue-list li.current { background: rgb(var(--dyn) / .15); }
.queue-list li.current .q-title { color: var(--accent); }
.queue-list li.played { opacity: .45; }
.queue-list li.drag { z-index: 2; background: var(--surface-3); box-shadow: 0 12px 30px rgba(0, 0, 0, .5); opacity: 1; transition: none; }
.queue-list li.shift { transition: transform .2s var(--ease); }
.queue-list li.removing { animation: q-out .25s ease-in forwards; }
@keyframes q-out { to { opacity: 0; transform: translateX(30px); } }
.queue-list img { width: 44px; height: 44px; border-radius: 7px; object-fit: cover; background: var(--surface-2); }
.q-grip { display: grid; place-items: center; color: var(--text-3); cursor: grab; touch-action: none; height: 44px; }
.q-grip svg { width: 18px; height: 18px; }
.q-grip.blank { cursor: default; }
.q-title { font-size: 15.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-sub { font-size: 14px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-remove { opacity: 0; }
.queue-list li:hover .q-remove { opacity: 1; }
.queue-list li.queue-note { display: flex; gap: 10px; align-items: center; justify-content: center; cursor: default; color: var(--text-3); font-size: 14px; padding: 14px 8px; }
.queue-list li.queue-note:hover { background: none; }
.queue-list li.queue-section { display: block; padding: 14px 12px 6px; cursor: default; color: var(--text-3); font-size: 13px; font-weight: 700; letter-spacing: .04em; }
.queue-list li.queue-section:hover { background: none; }
.badge { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; vertical-align: 1px; }
.queue-back { display: none !important; }

/* ── 시트 / 대화상자 ─────────────────────────────────────────── */
.overlay { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .55); display: grid; place-items: center; padding: 20px; animation: fade .25s ease; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.overlay.closing { animation: fade-out .2s ease forwards; }
@keyframes fade { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }
.sheet { width: min(440px, 100%); max-height: min(660px, 90dvh); overflow-y: auto; border-radius: 22px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 40px 100px rgba(0, 0, 0, .65); padding: 8px; animation: pop-in .35s var(--spring); }
.overlay.closing .sheet { animation: pop-out .2s ease-in forwards; }
@keyframes pop-in { from { opacity: 0; transform: scale(.94) translateY(10px); } }
@keyframes pop-out { to { opacity: 0; transform: scale(.96) translateY(6px); } }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 14px 14px 16px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.sheet-head img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; box-shadow: 0 6px 16px -6px rgba(0, 0, 0, .6); }
.sheet-head > div { min-width: 0; }
.sheet-head strong { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-head span { color: var(--text-2); font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sheet-title { padding: 16px 16px 6px; margin: 0; font-size: 20px; font-weight: 750; }
.sheet-text { padding: 0 16px 8px; margin: 0; color: var(--text-2); font-size: 16px; }
.sheet-item { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 54px; padding: 0 14px; border-radius: 13px; text-align: left; font-size: 17px; font-weight: 550; transition: background .15s; animation: row-in .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 25ms); }
.sheet-item:hover { background: rgba(255, 255, 255, .06); }
.sheet-item svg { color: var(--text-2); }
.sheet-item.danger, .sheet-item.danger svg { color: var(--danger); }
.sheet-item.on, .sheet-item.on svg { color: var(--accent); }
.sheet-item .check { margin-left: auto; color: var(--accent); }
.sheet-item .hint { margin-left: auto; color: var(--text-3); font-size: 14.5px; font-weight: 500; }
.sheet:has(.eq-panel) { width: min(760px, calc(100vw - 32px)); }
.eq-panel { padding: 18px 24px 20px; }
.eq-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.eq-header h2 { margin: 0; font-size: 22px; }
.eq-header p, .eq-note { margin: 2px 0 0; font-size: 14px; color: var(--text-2); }
.eq-header .switch-row { flex: none; min-width: 58px; padding: 0; }
.eq-presets { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 18px; }
.eq-presets .chip { min-height: 34px; padding: 0 13px; font-size: 13px; }
.eq-scroll { overflow-x: auto; overscroll-behavior-x: contain; padding-bottom: 8px; }
.eq-chart { position: relative; width: 635px; height: 250px; }
.eq-guides { position: absolute; top: 31px; left: 0; height: 155px; display: flex; flex-direction: column; justify-content: space-between; color: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.eq-curve { position: absolute; left: 35px; top: 25px; width: 600px; height: 180px; overflow: visible; pointer-events: none; }
.eq-curve path { fill: none; stroke: #ed466a; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; }
.eq-bands { position: absolute; left: 35px; top: 0; width: 600px; display: grid; grid-template-columns: repeat(10, 60px); }
.eq-band { min-width: 0; height: 245px; display: flex; flex-direction: column; align-items: center; color: var(--text-2); font-size: 12px; text-align: center; }
.eq-value { height: 25px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.eq-track { position: relative; width: 100%; height: 180px; }
.eq-track::before { content: ''; position: absolute; top: 4px; bottom: 4px; left: 50%; border-left: 1px dashed rgba(255,255,255,.22); }
.eq-track::after { content: ''; position: absolute; left: 16px; right: 16px; top: 50%; border-top: 1px solid rgba(255,255,255,.18); pointer-events: none; }
.eq-range { -webkit-appearance: none; appearance: none; position: absolute; left: 50%; top: 50%; width: 154px; height: 26px; margin: 0; transform: translate(-50%, -50%) rotate(-90deg); background: transparent; cursor: pointer; touch-action: none; }
.eq-range::-webkit-slider-runnable-track { height: 2px; background: transparent; }
.eq-range::-moz-range-track { height: 2px; background: transparent; }
.eq-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -8px; border: 4px solid #ed466a; border-radius: 50%; background: #1b1a1e; box-shadow: 0 0 0 3px rgba(237,70,106,.15); }
.eq-range::-moz-range-thumb { width: 10px; height: 10px; border: 4px solid #ed466a; border-radius: 50%; background: #1b1a1e; box-shadow: 0 0 0 3px rgba(237,70,106,.15); }
.eq-range:focus-visible { outline: none; }
.eq-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 5px rgba(237,70,106,.35); }
.eq-frequency { padding-top: 7px; font-weight: 650; }
.eq-note { margin-top: 6px; }
.sheet-form { display: grid; gap: 16px; padding: 10px 16px 16px; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 6px 16px 14px; }
.sheet-actions .btn { min-width: 96px; }

/* ── 모바일 ─────────────────────────────────────────────────── */
@media (max-width: 959px) {
  .sidebar, .desk-only { display: none !important; }
  .main { margin-left: 0; padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }
  .app.has-player .main { padding-bottom: calc(var(--tab-h) + var(--mini-h) + var(--safe-b) + 30px); }
  .view { padding: calc(22px + var(--safe-t)) 16px 20px; }
  .page-head { margin-bottom: 20px; align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-head h1 { font-size: 31px; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .shelf { margin: 0 -16px 26px; }
  .shelf-head { padding: 0 16px; }
  .shelf-row { grid-auto-columns: 132px; gap: 12px; padding: 4px 16px 10px; scroll-padding: 16px; }
  .card-play { opacity: 1; transform: none; width: 36px; height: 36px; right: 8px; bottom: 8px; }
  .card-play svg { width: 17px; height: 17px; }

  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tab-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(11, 11, 13, .92); border-top: 1px solid var(--line);
    backdrop-filter: blur(28px) saturate(1.5); -webkit-backdrop-filter: blur(28px) saturate(1.5);
  }
  .tab-pill { position: absolute; top: 7px; left: 0; width: 20%; height: 32px; display: flex; justify-content: center; pointer-events: none; transition: transform .45s var(--spring), opacity .2s; }
  .tab-pill::before { content: ""; width: 58px; height: 32px; border-radius: 999px; background: var(--accent-soft); }
  .tabbar a { position: relative; display: grid; place-items: center; align-content: center; gap: 3px; color: var(--text-3); font-size: 12.5px; font-weight: 650; transition: color .25s; }
  .tabbar a svg { width: 25px; height: 25px; transition: transform .3s var(--spring); }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on svg { color: var(--accent); }
  .tabbar a:active svg { transform: scale(.85); }

  .player {
    left: 8px; right: 8px; bottom: calc(var(--tab-h) + var(--safe-b) + 6px); height: var(--mini-h);
    grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding: 0 4px 0 8px; border-radius: 16px;
    background: rgba(32, 31, 35, .9); border: 1px solid var(--line-2); box-shadow: 0 12px 36px rgba(0, 0, 0, .55); overflow: hidden;
    touch-action: pan-y; transition: transform .35s var(--ease), opacity .35s;
  }
  .player.swiping { transition: none; }
  .player-glow { background: linear-gradient(90deg, rgb(var(--dyn) / .3), transparent 75%); }
  .player-progress-mini { display: block; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px; background: rgba(255, 255, 255, .12); border-radius: 2px; overflow: hidden; }
  .player-progress-mini span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 2px; }
  .player-cover { width: 48px; height: 48px; border-radius: 9px; }
  .player-meta strong { font-size: 16px; }
  .player-meta span { font-size: 14px; }
  .player-center { display: block; }
  .player-controls { gap: 0; }
  .player .play-btn { width: 46px; height: 46px; background: transparent; color: var(--text); }
  .player .play-btn svg { width: 28px; height: 28px; }
  .player .icon-btn { color: var(--text); width: 46px; height: 46px; }
  .player .icon-btn svg { width: 26px; height: 26px; }

  .song { grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 6px; padding: 7px 4px 7px 8px; margin: 0 -8px; }
  .song .song-text { margin-left: 8px; }
  .song-art { width: 52px; height: 52px; }
  .song .like-btn, .song-dur { display: none; }
  .results .song { grid-template-columns: 86px minmax(0, 1fr) auto 36px; }
  .results .search-more { width: 36px; height: 36px; }
  .results .song-art { width: 86px; height: 48px; }
  .dl-state .label, .job .label { display: none; }
  .dl-btn { padding: 0 14px; }
  .job { padding: 12px 10px 12px 16px; gap: 8px; }
  .job .dl-btn { width: 42px; padding: 0; }
  .search-bar .btn { padding: 0 20px; }
  .skeleton { grid-template-columns: 86px 1fr; }
  .sk.art { height: 48px; }

  .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .pl-card { margin: -8px; padding: 8px; }
  .detail-hero { flex-direction: column; align-items: flex-start; gap: 18px; }
  .detail-hero .pl-cover { width: 180px; align-self: center; }
  .detail-hero h1 { font-size: 31px; }
  .detail-hero > div { width: 100%; }

  .overlay { place-items: end center; padding: 0; }
  .sheet { width: 100%; max-height: 86dvh; border-radius: 24px 24px 0 0; padding-bottom: calc(12px + var(--safe-b)); animation: sheet-up .38s var(--ease); border-bottom: 0; }
  .sheet:has(.eq-panel) { width: 100%; }
  .eq-panel { padding: 10px 16px 12px; }
  .overlay.closing .sheet { animation: sheet-down .22s ease-in forwards; }
  .sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 6px; }
  @keyframes sheet-up { from { transform: translateY(100%); } }
  @keyframes sheet-down { to { transform: translateY(100%); } }

  .now-grabber { display: block; width: 40px; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .25); margin: 8px auto 0; flex: none; }
  .now-head { padding: 4px 12px 8px; }
  .now-body { grid-template-columns: 1fr; padding: 0 24px 22px; gap: 0; }
  .now-main { justify-content: space-evenly; gap: 14px; }
  .now-art { max-height: none; max-width: min(100%, 44vh); justify-self: center; }
  .now-queue { display: none; }
  .now.show-queue .now-main { display: none; }
  .now.show-queue .now-queue { display: flex; background: transparent; border: 0; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; animation: view-in .35s var(--ease); }
  .now-queue-toggle { display: inline-flex; }
  .now.show-queue .queue-back { display: inline-flex !important; align-self: center; margin-top: 12px; }
  .q-remove { opacity: 1; }
  .queue-list li { grid-template-columns: 26px 44px minmax(0, 1fr) auto; }
  .queue-list li .time { display: none; }
  .stat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat { padding: 14px; }
  .stat b { font-size: 22px; }
  .kbd-section { display: none; }
}
@media (min-width: 960px) { .tabbar { display: none; } }
@media (min-width: 960px) and (max-width: 1180px) { .now-body { padding: 12px 32px 32px; gap: 32px; } }
@media (max-height: 720px) and (max-width: 959px) { .now-main { gap: 8px; } .now-meta h2 { font-size: 22px; } .play-btn.big { width: 66px; height: 66px; } .now-art { max-width: min(100%, 38vh); } }
@media (hover: none) { .song .like-btn { opacity: 1; } .card-play { opacity: 1; transform: none; } }
html.lite *, html.lite *::before, html.lite *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html.lite .now-bg, html.lite .auth-orbs { display: none; }
html.lite .now-tint { background: linear-gradient(to bottom, var(--tint-top), var(--chrome-solid) 50%, var(--bg)); }
html.lite .player, html.lite .tabbar { background: var(--chrome-solid); }
html.lite .sheet, html.lite #toast, html.lite .net-banner, html.lite .auth-card { background: var(--panel-solid); }
html.lite .now-queue { background: rgba(255, 255, 255, .04); }
html.lite .overlay { background: rgba(0, 0, 0, .7); }
html.lite .song, html.lite .pl-card, html.lite .sheet-item, html.lite .job { animation: none; }
html.lite .view.enter > * { animation-duration: .2s; animation-delay: 0s !important; }
html.lite .boot-mark, html.lite .empty-icon { animation: none; }
html.lite .card-art, html.lite .pl-cover, html.lite .now-art, html.lite .song-art { box-shadow: none; }

/* 읽기 쉬운 기본 화면과 계정별 화면 설정 */
html[data-font-size="standard"] { --font-scale: 1; }
html[data-font-size="comfortable"] { --font-scale: 1.12; }
html[data-font-size="large"] { --font-scale: 1.25; }
html[data-font-family="system"] { --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
body { font-size: calc(17px * var(--font-scale)); line-height: 1.55; -webkit-font-smoothing: auto; }
.song-title, .menu-list > *, .sheet-item, .switch-text strong, .setting-head strong { font-size: calc(17px * var(--font-scale)); }
.song-sub, .song-dur, .setting-head span, .switch-text > span, .me-card small, .hint-card, .sheet-head span { font-size: calc(15px * var(--font-scale)); }
.card-title, .pl-name, .player-meta strong, .q-title { font-size: calc(16px * var(--font-scale)); }
.card-sub, .pl-count, .player-meta span, .q-sub, .time, .now-times { font-size: calc(14px * var(--font-scale)); }
.side-nav a, .btn, .chip, .pill-btn, .radio-text strong { font-size: calc(16px * var(--font-scale)); }
.side-playlists a, .side-user-name strong, .side-user-name small, .section-title, .me-section, .queue-list li.queue-section, .badge, .tag { font-size: calc(14px * var(--font-scale)); }
.now-meta h2 { font-size: calc(27px * var(--font-scale)); }
.now-meta p { font-size: calc(18px * var(--font-scale)); }
.now-label, .now-times, .offline-hint, .job-sub, .dl-state, .hint-card.slim { font-size: calc(14px * var(--font-scale)); }
.btn { min-height: 50px; }
.icon-btn { width: 44px; height: 44px; }
.icon-btn.sm { width: 44px; height: 44px; }
.dl-btn { min-height: 44px; }
.chip { min-height: 44px; }
.pill-btn { min-height: 44px; }
.side-nav a { min-height: 54px; }
.menu-list > * { min-height: 64px; }
.song { min-height: 80px; padding-top: 10px; padding-bottom: 10px; }
.song-art { width: 60px; height: 60px; }
.results .song-art { width: 104px; height: 60px; }
.results .song { grid-template-columns: 104px minmax(0, 1fr) auto 44px; }
.results .search-more { width: 44px; height: 44px; }
.queue-list li { min-height: 60px; }
.range::-webkit-slider-runnable-track { height: 6px; }
.range::-moz-range-track, .range::-moz-range-progress { height: 6px; }
.range::-webkit-slider-thumb { width: 20px; height: 20px; margin-top: -7px; opacity: 1; }
.range::-moz-range-thumb { width: 20px; height: 20px; opacity: 1; }
.now-seek .range::-webkit-slider-thumb { width: 22px; height: 22px; margin-top: -8px; }
:focus-visible { outline-width: 3px; outline-offset: 3px; }
.appearance-settings .setting, .appearance-settings .setting-head, .appearance-settings .chip-group { min-width: 0; }
.appearance-settings .chip-group { gap: 8px; width: 100%; }
.appearance-settings .chip { flex: 1 1 130px; min-width: 0; white-space: normal; text-align: center; padding: 8px 12px; }
.appearance-note { margin: 0; padding: 14px 22px 18px; color: var(--text-2); font-size: calc(14px * var(--font-scale)); line-height: 1.55; }
.appearance-settings .setting + .setting, .appearance-settings .switch-row, .appearance-settings .appearance-note { border-top: 1px solid var(--line); }
.appearance-settings .switch-row { padding-top: 18px; padding-bottom: 18px; }
.player { background: var(--chrome); }
.now-tint { background: linear-gradient(to bottom, var(--tint-top), var(--tint-mid) 45%, var(--bg)); }

/* ── 화면 테마 ── */
html[data-theme="black"] {
  --bg: #000; --bg-2: #0b0b0c; --surface: #141416; --surface-2: #1d1e21; --surface-3: #2a2c30;
  --chrome: rgba(8, 8, 9, .96); --chrome-m: rgba(20, 20, 22, .96); --chrome-solid: #0b0b0c;
  --panel: rgba(18, 18, 20, .98); --panel-solid: #141416; --tint-mid: rgba(0, 0, 0, .8); --queue-bg: rgba(14, 14, 16, .6);
}
html[data-theme="warm"] {
  --bg: #f3f0e8; --bg-2: #ece8de; --surface: #fffdf7; --surface-2: #e9e2d4; --surface-3: #dcd2bf;
  --line: rgba(31, 43, 51, .18); --line-2: rgba(31, 43, 51, .3);
  --text: #17232b; --text-2: #35444b; --text-3: #4c5b62;
  --accent: #71490d; --accent-2: #906523; --accent-soft: rgba(113, 73, 13, .12); --accent-ink: #fff;
  --danger: #a32625; --ok: #146235;
  --chrome: rgba(255, 253, 247, .96); --chrome-m: rgba(255, 253, 247, .96); --chrome-solid: #fffdf7;
  --panel: #fffdf7; --panel-solid: #fffdf7; --tint-top: rgba(243, 240, 232, .82); --tint-mid: rgba(243, 240, 232, .97);
  --queue-bg: rgba(255, 253, 247, .87); --hover: rgba(38, 51, 58, .07);
}
html[data-theme="light"] {
  --bg: #f6f7f9; --bg-2: #eceff3; --surface: #fff; --surface-2: #e7eaee; --surface-3: #d4d9df;
  --line: rgba(17, 24, 39, .14); --line-2: rgba(17, 24, 39, .26);
  --text: #111827; --text-2: #374151; --text-3: #4b5563;
  --accent: #1f5fa8; --accent-2: #2f6fb8; --accent-soft: rgba(31, 95, 168, .11); --accent-ink: #fff;
  --danger: #b42318; --ok: #146235;
  --chrome: rgba(255, 255, 255, .96); --chrome-m: rgba(255, 255, 255, .96); --chrome-solid: #fff;
  --panel: #fff; --panel-solid: #fff; --tint-top: rgba(246, 247, 249, .82); --tint-mid: rgba(246, 247, 249, .97);
  --queue-bg: rgba(255, 255, 255, .88); --hover: rgba(17, 24, 39, .06);
}
html.light-ui .auth-card, html.light-ui .net-banner, html.light-ui.lite .auth-card, html.light-ui.lite .net-banner { background: var(--surface); }
html.light-ui .now-bg { opacity: .12; }
html.light-ui .now-tint, html.light-ui.lite .now-tint { background: linear-gradient(to bottom, var(--tint-top), var(--tint-mid) 48%, var(--bg)); }
html.light-ui .side-nav a:hover, html.light-ui .side-user:hover, html.light-ui .pl-card:hover { background: var(--hover); }
html.light-ui .brand-mark { color: #241b10; }
html.light-ui .btn-primary:hover { background: var(--accent-2); }
html.light-ui .pill-btn { background: var(--surface-2); }
html.light-ui .icon-btn:hover { background: rgba(31, 43, 51, .09); }
html.light-ui .range::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--accent) var(--pct), var(--surface-3) var(--pct)); }
html.light-ui .range::-moz-range-track { background: var(--surface-3); }
html.light-ui .range::-moz-range-progress { background: var(--accent); }
html.light-ui .range::-webkit-slider-thumb, html.light-ui .range::-moz-range-thumb { background: var(--accent); }
html.light-ui .bar, html.light-ui .player-progress-mini { background: rgba(31, 43, 51, .12); }
html.light-ui ::-webkit-scrollbar-thumb { background: rgba(31, 43, 51, .2); background-clip: padding-box; }

html.high-contrast {
  --bg: #070a0c; --bg-2: #0d1216; --surface: #171d22; --surface-2: #202a31; --surface-3: #2d3942;
  --line: rgba(255, 255, 255, .38); --line-2: rgba(255, 255, 255, .58);
  --text: #fff; --text-2: #f3f7f8; --text-3: #d9e3e8;
  --accent: #ffe29f; --accent-2: #ffd172; --accent-soft: rgba(255, 226, 159, .22); --accent-ink: #15110a;
}
html.high-contrast.light-ui {
  --bg: #fff; --bg-2: #f2f2ec; --surface: #fff; --surface-2: #e7e8e2; --surface-3: #d7dbd5;
  --line: rgba(17, 27, 34, .5); --line-2: rgba(17, 27, 34, .7);
  --text: #101820; --text-2: #1b2b35; --text-3: #304550;
  --accent: #593500; --accent-2: #754a08; --accent-soft: rgba(89, 53, 0, .17); --accent-ink: #fff;
}
html.high-contrast .song, html.high-contrast .queue-list li { border-bottom: 1px solid var(--line); }
html.high-contrast .song.playing, html.high-contrast .queue-list li.current { background: var(--accent-soft); }
html.high-contrast .song.unavailable, html.high-contrast .queue-list li.played,
html.high-contrast .results .song:has(.dl-state.muted) { opacity: .72; }
html.high-contrast .song.playing .song-title, html.high-contrast .queue-list li.current .q-title { color: var(--text); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
html.high-contrast .chip, html.high-contrast .btn-ghost, html.high-contrast .menu-list { border-color: var(--line-2); }
html.high-contrast .side-nav a.on, html.high-contrast .tabbar a.on { text-decoration: underline; text-underline-offset: 4px; }
html.high-contrast .range::-webkit-slider-thumb, html.high-contrast .range::-moz-range-thumb { outline: 2px solid var(--text); }

@media (max-width: 959px) {
  .page-head h1 { font-size: calc(31px * var(--font-scale)); }
  .tabbar a { font-size: calc(13px * var(--font-scale)); color: var(--text-2); }
  .tabbar { background: var(--chrome); }
  .tabbar a svg { width: 27px; height: 27px; }
  .player { background: var(--chrome-m); }
  .player-cover { width: 54px; height: 54px; }
  .player-meta strong { font-size: calc(16px * var(--font-scale)); }
  .player-meta span { font-size: calc(14px * var(--font-scale)); }
  .song { min-height: 78px; grid-template-columns: 56px minmax(0, 1fr) auto auto; }
  .song-art { width: 56px; height: 56px; }
  .results .song { grid-template-columns: 86px minmax(0, 1fr) auto 44px; }
  .results .song-art { width: 86px; height: 54px; }
  .results .search-more { width: 44px; height: 44px; }
  .card-play { width: 44px; height: 44px; }
}
@media (max-height: 720px) and (max-width: 959px) { .now-meta h2 { font-size: calc(22px * var(--font-scale)); } }
@supports not (inset: 0) {
  .boot, .now, .overlay, .now-tint, .player-glow, .song-art .eq, .song-art .art-play, .now-art img { top: 0; right: 0; bottom: 0; left: 0; }
  .now-bg { top: -100px; right: -100px; bottom: -100px; left: -100px; }
  .sidebar { top: 0; bottom: 0; left: 0; }
}
@supports not (aspect-ratio: 1) {
  .card-art { height: 152px; }
  .pl-cover, .pl-new { height: 190px; }
  .now-art { height: min(80vw, 44vh); width: min(80vw, 44vh); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ── 다운로드 진행률 배지 ── */
.nav-badge { margin-left: auto; min-width: 46px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13.5px; font-weight: 750; text-align: center; font-variant-numeric: tabular-nums; animation: badge-in .3s var(--ease); }
.tab-badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 22px; padding: 1px 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #17120a); font-size: 10.5px; font-style: normal; font-weight: 800; line-height: 1.5; text-align: center; font-variant-numeric: tabular-nums; animation: badge-in .3s var(--ease); }
.nav-badge.err { background: rgba(255, 138, 128, .14); color: var(--danger); min-width: 26px; }
.tab-badge.err { background: var(--danger); color: #fff; }
.nav-badge[hidden], .tab-badge[hidden] { display: none; }
@keyframes badge-in { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* ── 검색 결과의 ‘＋’(보관함에 담기) ── */
[data-dl] { display: inline-flex; align-items: center; gap: 6px; justify-content: flex-end; }
.add-btn { width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); flex: none; }
.add-btn:hover { color: var(--accent); border-color: var(--accent); }
.add-btn svg { width: 20px; height: 20px; }

/* ── 보관함 맨 위 검색창 ── */
.lib-search { margin-bottom: 12px; }
.lib-results:empty { display: none; }
.lib-results { margin-bottom: 22px; }
.lib-results .more-link { display: inline-flex; margin-top: 10px; }
#lib-head { margin-top: 6px; }

/* ── 다운로드 화면 ── */
.dl-section { margin-bottom: 28px; }
.dl-section .count { margin-left: 6px; color: var(--accent); font-weight: 700; font-size: .9em; }
.dl-pct { min-width: 48px; text-align: right; font-weight: 750; color: var(--accent); font-variant-numeric: tabular-nums; }
.job.is-err { border: 1px solid rgba(255, 138, 128, .25); }
.hint-card .link { color: var(--accent); font-weight: 700; text-decoration: underline; cursor: pointer; }
/* 휴대폰: 검색 결과의 ‘재생’은 아이콘만(제목이 잘 보이게) */
@media (max-width: 600px) {
  .results [data-dl] .dl-btn { width: 42px; padding: 0; font-size: 0; gap: 0; justify-content: center; }
  .results [data-dl] .dl-btn svg { margin: 0; }
  .results [data-dl] { gap: 4px; }
  .add-btn { width: 38px; height: 38px; }
}
/* 아이폰: 웹 음량 조절이 막혀 있어(항상 최대) 막대 대신 안내 */
html.ios .range.vol, html.ios .vol-max { display: none; }
html.ios .now-volume::after { content: "음량은 휴대폰 옆 버튼으로 조절해요"; color: var(--text-3); font-size: 14px; }

/* ── 강조 색상 (기본 ‘금색’은 테마 기본값 그대로) ── */
html:root[data-accent="rose"] { --accent: #f4a7b9; --accent-2: #e58ba1; --accent-soft: rgba(244, 167, 185, .17); --accent-ink: #2a0f16; }
html:root[data-accent="sky"] { --accent: #93c5fd; --accent-2: #75b0f5; --accent-soft: rgba(147, 197, 253, .17); --accent-ink: #0b1a2e; }
html:root[data-accent="mint"] { --accent: #8fdcb8; --accent-2: #6fcaa0; --accent-soft: rgba(143, 220, 184, .17); --accent-ink: #0b2219; }
html:root[data-accent="violet"] { --accent: #c4b5fd; --accent-2: #ab98f7; --accent-soft: rgba(196, 181, 253, .18); --accent-ink: #1a1233; }
html:root[data-accent="coral"] { --accent: #fdab8c; --accent-2: #f39270; --accent-soft: rgba(253, 171, 140, .17); --accent-ink: #2c140b; }
html:root[data-accent="cover"] { --accent: rgb(var(--dyn)); --accent-2: rgb(var(--dyn) / .85); --accent-soft: rgb(var(--dyn) / .17); --accent-ink: #111; }
html:root.light-ui[data-accent="rose"] { --accent: #a3294f; --accent-2: #b8456a; --accent-soft: rgba(163, 41, 79, .11); --accent-ink: #fff; }
html:root.light-ui[data-accent="sky"] { --accent: #1f5fa8; --accent-2: #2f6fb8; --accent-soft: rgba(31, 95, 168, .11); --accent-ink: #fff; }
html:root.light-ui[data-accent="mint"] { --accent: #17694a; --accent-2: #20805b; --accent-soft: rgba(23, 105, 74, .11); --accent-ink: #fff; }
html:root.light-ui[data-accent="violet"] { --accent: #5b3fb0; --accent-2: #6d52c2; --accent-soft: rgba(91, 63, 176, .11); --accent-ink: #fff; }
html:root.light-ui[data-accent="coral"] { --accent: #a8401f; --accent-2: #bd5332; --accent-soft: rgba(168, 64, 31, .11); --accent-ink: #fff; }
html:root.light-ui[data-accent="cover"] { --accent: rgb(var(--dyn-dark)); --accent-2: rgb(var(--dyn-dark) / .85); --accent-soft: rgb(var(--dyn-dark) / .12); --accent-ink: #fff; }
html:root[data-accent] .greet, html:root[data-accent] .side-nav a.on svg { color: var(--accent); }

/* ── 글자 크기 6단계 ── */
html[data-font-size="xsmall"] { --font-scale: .86; }
html[data-font-size="small"] { --font-scale: .93; }
html[data-font-size="xlarge"] { --font-scale: 1.4; }
html[data-font-size="xsmall"] .page-head h1, html[data-font-size="small"] .page-head h1 { font-size: calc(36px * var(--font-scale)); }

/* ── 글자 굵기 ── */
html[data-font-weight="bold"] body { font-weight: 560; }
html[data-font-weight="bold"] .song-title, html[data-font-weight="bold"] .card-title, html[data-font-weight="bold"] .q-title, html[data-font-weight="bold"] .player-meta strong { font-weight: 760; }
html[data-font-weight="bold"] .song-sub, html[data-font-weight="bold"] .card-sub, html[data-font-weight="bold"] .q-sub, html[data-font-weight="bold"] .setting-head span, html[data-font-weight="bold"] .switch-text > span { font-weight: 560; }
html[data-font-weight="light"] body { font-weight: 400; }
html[data-font-weight="light"] .song-title, html[data-font-weight="light"] .card-title, html[data-font-weight="light"] .q-title { font-weight: 560; }

/* ── 목록 간격 ── */
html[data-density="compact"] .song { padding-top: 4px; padding-bottom: 4px; gap: 12px; grid-template-columns: 46px minmax(0, 1fr) auto auto auto auto; contain-intrinsic-size: auto 58px; }
html[data-density="compact"] .song-art { width: 46px; height: 46px; border-radius: 8px; }
html[data-density="relaxed"] .song { padding-top: 12px; padding-bottom: 12px; }
@media (max-width: 959px) {
  html[data-density="compact"] .song { min-height: 62px; grid-template-columns: 46px minmax(0, 1fr) auto auto; }
  html[data-density="relaxed"] .song { min-height: 88px; }
}

/* ── 설정 화면: 색 견본 ── */
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 2px; border: 1px solid var(--line-2); vertical-align: -2px; }
.chip .swatch { flex: none; }
