:root {
  --bg: #0b0b0d; --s1: #151518; --s2: #1d1d21; --s3: #2a2a30;
  --fg: #f5f5f7; --fg2: rgba(235, 235, 245, .62); --fg3: rgba(235, 235, 245, .38);
  --line: rgba(255, 255, 255, .07); --acc: #e9b85c; --acc-ink: #1b1405;
  --r: 12px; --ease: cubic-bezier(.2, .8, .2, 1);
  --sb: env(safe-area-inset-bottom, 0px); --st: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); -webkit-font-smoothing: antialiased;
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", sans-serif; letter-spacing: -.01em; }
body { padding-bottom: calc(128px + var(--sb)); overscroll-behavior-y: none; }
body.lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { width: 22px; height: 22px; fill: currentColor; display: block; flex: none; }

/* ── 버튼 ── */
.ib { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; flex: none; transition: transform .15s var(--ease), background .2s; }
.ib:active { transform: scale(.9); }
.tx { color: var(--acc); font-size: 14px; font-weight: 600; padding: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; height: 36px; max-width: 46%; padding: 0 13px; border-radius: 18px; background: var(--s2); font-size: 14px; font-weight: 600; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip.ghost { background: rgba(255, 255, 255, .1); max-width: 70%; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--fg3); flex: none; transition: background .3s, box-shadow .3s; }
.on-air .dot { background: #4cd964; box-shadow: 0 0 0 3px rgba(76, 217, 100, .18); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; padding: 0 22px; border-radius: 21px; font-weight: 700; background: var(--s2); transition: transform .15s var(--ease); }
.btn:active { transform: scale(.96); }
.btn.pri { background: var(--acc); color: var(--acc-ink); }
.btn svg { width: 18px; height: 18px; }

/* ── 상단 ── */
header { position: sticky; top: 0; z-index: 5; padding: calc(8px + var(--st)) 16px 10px; background: rgba(11, 11, 13, .82); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.topbar { display: flex; gap: 8px; align-items: center; }
#back { margin-left: -8px; }
.search { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--s2); color: var(--fg3); }
.search svg { width: 17px; height: 17px; }
#q { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--fg); font: inherit; font-size: 16px; }
#q::placeholder { color: var(--fg3); }
#q::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }
.seg3 { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 10px; padding: 3px; border-radius: 10px; background: var(--s1); }
.seg3 a { position: relative; z-index: 1; text-align: center; padding: 6px 0; font-size: 13px; white-space: nowrap; font-weight: 600; color: var(--fg2); transition: color .2s; }
.seg3 a.on { color: var(--fg); }
.seg3 .pill { position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 5); border-radius: 8px; background: var(--s3); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); transition: transform .3s var(--ease), opacity .2s; }
header.sub .seg3 { display: none; }

main { padding: 6px 16px 20px; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.empty { color: var(--fg3); text-align: center; padding: 64px 0; }
.subseg { display: flex; gap: 16px; margin: 4px 0 14px; }
.subseg button { font-size: 13px; font-weight: 600; color: var(--fg3); padding: 2px 0; }
.subseg button.on { color: var(--fg); }
h3.sec { margin: 22px 0 10px; font-size: 13px; font-weight: 700; color: var(--fg2); letter-spacing: .02em; }
h3.sec:first-child { margin-top: 6px; }

/* ── 커버 ── */
.cv { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: linear-gradient(145deg, #2b2b31, #18181c); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .08); }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s; }
.cv img.ok { opacity: 1; }
.cv > svg { position: absolute; inset: 32%; width: 36%; height: 36%; color: rgba(255, 255, 255, .16); }
.cv.sm { width: 42px; height: 42px; border-radius: 7px; flex: none; }
.cv.xl { width: min(84vw, 380px); border-radius: 14px; margin: 6px auto 0; box-shadow: 0 24px 60px rgba(0, 0, 0, .55); transition: transform .45s var(--ease); }
#np.paused .cv.xl { transform: scale(.86); }

/* ── 앨범 그리드 ── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 20px 14px; }
.card { display: block; min-width: 0; transition: transform .15s var(--ease); }
.card:active { transform: scale(.97); }
.card .cv { box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(255, 255, 255, .08); }
.card .t, .card .s { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .t { margin-top: 8px; font-size: 14px; font-weight: 600; }
.card .s { font-size: 13px; color: var(--fg2); }

/* ── 앨범 상세 ── */
.hero { position: relative; margin: -6px -16px 6px; padding: 14px 16px 18px; text-align: center; overflow: hidden; }
.hero-bg { position: absolute; inset: -40px; background: center/cover no-repeat; filter: blur(40px) saturate(1.4); opacity: .45; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 30%, var(--bg) 92%); }
.hero > :not(.hero-bg) { position: relative; }
.hero .cv { width: min(62vw, 280px); margin: 0 auto; border-radius: 12px; box-shadow: 0 20px 50px rgba(0, 0, 0, .5); }
.hero h2 { margin: 16px 0 2px; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.hero .by { color: var(--acc); font-weight: 600; font-size: 16px; }
.hero .meta { margin-top: 4px; color: var(--fg3); font-size: 12.5px; display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge { font-size: 10.5px; font-weight: 800; letter-spacing: .05em; padding: 2px 6px; border-radius: 4px; color: var(--acc); background: color-mix(in srgb, var(--acc) 16%, transparent); }
.hero .btns { display: flex; justify-content: center; gap: 10px; margin-top: 16px; }

/* ── 목록 ── */
.list { list-style: none; margin: 0; padding: 0; }
.tr { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 0; border-bottom: .5px solid var(--line); cursor: pointer; }
.tr:active { background: rgba(255, 255, 255, .03); }
.tr .no { width: 22px; text-align: center; color: var(--fg3); font-size: 14px; font-variant-numeric: tabular-nums; flex: none; }
.tr .cv.sm { width: 40px; height: 40px; }
.tr .tt { flex: 1; min-width: 0; }
.tr .tt b, .tr .tt small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr .tt b { font-weight: 500; }
.tr .tt small { color: var(--fg2); font-size: 12.5px; margin-top: 1px; }
.tr .du { color: var(--fg3); font-size: 13px; font-variant-numeric: tabular-nums; flex: none; }
.tr .add { width: 34px; height: 34px; color: var(--fg3); margin-right: -6px; }
.tr .add svg { width: 20px; height: 20px; }
.tr.on .tt b { color: var(--acc); font-weight: 600; }
.disc { padding: 18px 0 4px; color: var(--fg3); font-size: 12px; font-weight: 700; letter-spacing: .06em; }

/* 재생 중 표시(이퀄라이저) */
.eq { display: none; width: 22px; height: 14px; gap: 2px; align-items: flex-end; justify-content: center; flex: none; }
.eq i { width: 3px; height: 60%; border-radius: 1.5px; background: var(--acc); animation: eq .9s ease-in-out infinite; }
.eq i:nth-child(2) { height: 100%; animation-delay: -.3s; } .eq i:nth-child(3) { height: 40%; animation-delay: -.6s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.on > .eq { display: flex; }
.on > .no { display: none; }
body:not(.playing) .eq i { animation-play-state: paused; height: 30%; }

/* ── 아티스트 ── */
.ar { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: .5px solid var(--line); }
.ar .av { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 17px; color: var(--fg); flex: none; }
.ar .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ar small { color: var(--fg3); font-size: 13px; }
.ar-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 18px; }
.ar-head .av { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 26px; font-weight: 700; flex: none; }
.ar-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }

/* ── 라디오 ── */

/* ── 미니 플레이어 ── */
#mini { position: fixed; left: 8px; right: 8px; bottom: calc(8px + var(--sb)); z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; padding: 8px 6px 10px 10px; border-radius: 18px; overflow: hidden;
  background: rgba(36, 36, 41, .78); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px); box-shadow: 0 10px 34px rgba(0, 0, 0, .5), inset 0 0 0 .5px rgba(255, 255, 255, .1); transition: transform .35s var(--ease); }
#mini.idle { transform: translateY(calc(100% + 16px + var(--sb))); }
#miniOpen { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; cursor: pointer; height: 46px; }
.mt { min-width: 0; display: flex; flex-direction: column; }
.mt b, .mt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt b { font-size: 14.5px; font-weight: 600; }
.mt span { color: var(--fg2); font-size: 12.5px; }
#mini .ib svg { width: 26px; height: 26px; }
.mprog { position: absolute; left: 14px; right: 14px; bottom: 0; height: 2px; border-radius: 1px; background: rgba(255, 255, 255, .08); }
.mprog i { display: block; height: 100%; width: 0; border-radius: 1px; background: var(--acc); transition: width 1s linear; }

/* ── 재생 화면 ── */
.full { position: fixed; inset: 0; z-index: 20; overflow-y: auto; background: var(--bg); animation: up .38s var(--ease); }
@keyframes up { from { transform: translateY(100%); } }
.np-bg { position: fixed; inset: -60px; background: center/cover no-repeat var(--bg); filter: blur(60px) saturate(1.5) brightness(.55); transform: scale(1.1); transition: background-image .6s; }
.np-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0, 0, 0, .15), rgba(0, 0, 0, .55) 70%, rgba(0, 0, 0, .8)); }
.np-in { position: relative; max-width: 480px; margin: 0 auto; padding: var(--st) 24px calc(28px + var(--sb)); }
.np-top { display: flex; justify-content: space-between; align-items: center; height: 56px; margin: 0 -8px 6px; }
.np-meta { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 28px; }
.np-t { min-width: 0; }
.np-t b, .np-t span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-t b { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.np-t span { color: var(--fg2); font-size: 16px; margin-top: 2px; }
#npQ { font-style: normal; flex: none; margin-bottom: 4px; }
#npQ:empty { display: none; }
.seek { margin-top: 22px; }
.times { display: flex; justify-content: space-between; margin-top: 6px; color: var(--fg3); font-size: 12px; font-variant-numeric: tabular-nums; }
.live { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; margin-top: 22px; color: var(--fg2); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #ff453a; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.ctrls { display: flex; justify-content: center; align-items: center; gap: 34px; margin: 18px 0 24px; }
.ib.lg { width: 56px; height: 56px; }
.ib.lg svg { width: 34px; height: 34px; }
.ib.play { width: 76px; height: 76px; background: var(--fg); color: #000; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.ib.play svg { width: 36px; height: 36px; }
.vol { display: flex; align-items: center; gap: 12px; color: var(--fg2); }
.vol span { width: 26px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.qhead { display: flex; justify-content: space-between; align-items: center; margin: 34px 0 2px; }
.qhead b { font-size: 17px; }
#queue .tr { border-color: rgba(255, 255, 255, .08); }

/* 슬라이더 */
.rng { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; background: none; margin: 0; --p: 0%; }
.rng::-webkit-slider-runnable-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fg) var(--p), rgba(255, 255, 255, .18) var(--p)); }
.rng::-moz-range-track { height: 4px; border-radius: 2px; background: linear-gradient(to right, var(--fg) var(--p), rgba(255, 255, 255, .18) var(--p)); }
.rng::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; margin-top: -5px; border-radius: 50%; background: var(--fg); box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: transform .15s; }
.rng::-moz-range-thumb { width: 14px; height: 14px; border: 0; border-radius: 50%; background: var(--fg); }
.rng:active::-webkit-slider-thumb { transform: scale(1.35); }

/* ── 기기 시트 ── */
#scrim { position: fixed; inset: 0; z-index: 30; background: rgba(0, 0, 0, .5); animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; } }
.bsheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; max-height: 82vh; overflow-y: auto; padding: 8px 16px calc(20px + var(--sb)); border-radius: 18px 18px 0 0; background: var(--s1); box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: up .35s var(--ease); }
.grip { width: 36px; height: 5px; border-radius: 3px; background: var(--s3); margin: 0 auto 6px; }
.bs-head { display: flex; justify-content: space-between; align-items: center; height: 44px; }
.bs-head b { font-size: 18px; }
#devList { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.drow { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 14px; background: var(--s2); text-align: left; transition: background .2s, transform .15s var(--ease); }
.drow:active { transform: scale(.98); }
.drow .di { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); color: var(--fg2); flex: none; }
.drow .dn { flex: 1; min-width: 0; }
.drow .dn b, .drow .dn small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drow .dn small { color: var(--fg3); font-size: 12.5px; }
.drow .ck { color: var(--acc); opacity: 0; }
.drow.on { background: color-mix(in srgb, var(--acc) 14%, var(--s2)); }
.drow.on .di { background: var(--acc); color: var(--acc-ink); }
.drow.on .ck { opacity: 1; }
.libline { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 12px; border-top: .5px solid var(--line); color: var(--fg3); font-size: 13px; }

#toast { position: fixed; left: 50%; bottom: calc(120px + var(--sb)); transform: translateX(-50%); z-index: 40; padding: 9px 16px; border-radius: 20px; font-size: 14px; font-weight: 600; max-width: 88vw;
  background: rgba(245, 245, 247, .94); color: #000; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); animation: fadein .2s; }

@media (min-width: 760px) {
  main, .topbar, .seg3 { max-width: 1040px; margin-left: auto; margin-right: auto; }
  .seg3 { max-width: 560px; margin-left: 0; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  #mini { left: 50%; right: auto; width: min(560px, 92vw); transform: translateX(-50%); }
  #mini.idle { transform: translate(-50%, 140%); }
  .bsheet { left: 50%; right: auto; width: 440px; transform: translateX(-50%); bottom: 24px; border-radius: 18px; animation: fadein .25s; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── 폴더 ── */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 2px 0 12px; font-size: 13px; color: var(--fg3); }
.crumbs a { color: var(--fg2); font-weight: 600; padding: 2px 0; }
.crumbs a:last-child { color: var(--fg); }
.crumbs i { font-style: normal; color: var(--fg3); }
.fhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.fhead h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fhead .btns { display: flex; gap: 8px; flex: none; }
.btn.sm { height: 34px; padding: 0 14px; font-size: 14px; }
.btn.sm svg { width: 16px; height: 16px; }
.frow { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 6px 0; border-bottom: .5px solid var(--line); }
.frow:active { background: rgba(255, 255, 255, .03); }
.frow .fi { position: relative; width: 48px; height: 48px; border-radius: 9px; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--s2); color: var(--fg3); }
.frow .fi img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.frow .fi svg { width: 24px; height: 24px; }
.frow .fn { flex: 1; min-width: 0; }
.frow .fn b, .frow .fn small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.frow .fn b { font-weight: 600; }
.frow .fn small { color: var(--fg3); font-size: 12.5px; margin-top: 1px; }
.frow .chev { color: var(--fg3); }
.frow .chev svg { width: 18px; height: 18px; }
.frow.new .fi { background: color-mix(in srgb, var(--acc) 16%, var(--s2)); color: var(--acc); }
.frow.new b { color: var(--acc); }

/* ── 재생목록 모자이크 ── */
.mosaic { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.mosaic img { position: static !important; width: 100%; height: 100%; object-fit: cover; opacity: 1 !important; }
.mosaic.one { display: block; }
.hero .mosaic-wrap { width: min(62vw, 280px); aspect-ratio: 1; margin: 0 auto; border-radius: 12px; overflow: hidden; background: var(--s2); box-shadow: 0 20px 50px rgba(0, 0, 0, .5); display: grid; place-items: center; color: var(--fg3); }
.hero .mosaic-wrap .mosaic { width: 100%; height: 100%; }
.hero .mosaic-wrap > svg { width: 30%; height: 30%; }
.hero .edit-acts { display: flex; justify-content: center; gap: 18px; margin-top: 14px; }
.tx.danger { color: #ff6961; }
.tr .rm, .tr .up { width: 34px; height: 34px; color: var(--fg3); }
.tr .rm { color: #ff6961; }
.tr .rm svg, .tr .up svg { width: 20px; height: 20px; }
.editing .tr .add, .editing .tr .du { display: none; }
.tr .rm, .tr .up { display: none; }
.editing .tr .rm, .editing .tr .up { display: grid; }

/* ── 담기 시트 ── */
.picks { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pk { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--s2); text-align: left; }
.pk:active { transform: scale(.98); }
.pk .pi { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; background: var(--s3); color: var(--fg2); flex: none; overflow: hidden; }
.pk .pi img { width: 100%; height: 100%; object-fit: cover; }
.pk .pi .mosaic { width: 100%; height: 100%; }
.pk b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.pk small { color: var(--fg3); }
.pk.acc .pi { background: var(--acc); color: var(--acc-ink); }
.nameform { display: flex; gap: 8px; margin: 6px 0 4px; }
.nameform input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border-radius: 12px; border: 0; outline: 0; background: var(--s2); color: var(--fg); font: inherit; font-size: 16px; }
.qhead span { display: flex; gap: 16px; }

/* ── 미니 플레이어 볼륨 ── */
.mvol { flex-basis: 100%; display: flex; align-items: center; gap: 10px; padding: 2px 8px 0 2px; color: var(--fg2); }
.mvol svg { width: 18px; height: 18px; }
.mvol .rng { height: 26px; }
.mvol span { width: 24px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; }
#mini .mprog { bottom: 0; }

/* ── 라디오 타일(채널 커버) ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.tile { position: relative; display: block; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--s2);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .35), inset 0 0 0 .5px rgba(255, 255, 255, .08); transition: transform .15s var(--ease), box-shadow .25s; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile:active { transform: scale(.97); }
.tile .eq { position: absolute; right: 12px; bottom: 12px; width: 30px; height: 22px; padding: 4px; box-sizing: content-box; border-radius: 8px; background: rgba(0, 0, 0, .45); }
.tile .eq i { background: #fff; }
.tile.on { box-shadow: 0 0 0 3px var(--acc), 0 12px 30px rgba(0, 0, 0, .45); }
.tile.on .eq { display: flex; }

/* ═══ 컴팩트 배치(폴드 접은 화면·아이폰: 높이 확보) ═══ */
header { padding: calc(6px + var(--st)) 12px 8px; }
.seg3 { margin-top: 8px; }
.seg3 a { padding: 5px 0; }
main { padding: 4px 12px 16px; }
.grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 14px 10px; }
.card .t { font-size: 13px; margin-top: 6px; }
.card .s { font-size: 12px; }
.card .cv { border-radius: 8px; }
.tiles { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
.tile { border-radius: 12px; }
.tile .eq { right: 8px; bottom: 8px; width: 22px; height: 16px; padding: 3px; }
h3.sec { margin: 16px 0 8px; }

/* 앨범·재생목록 상단: 커버 왼쪽, 정보 오른쪽 */
.hero { display: grid; grid-template-columns: 124px 1fr; column-gap: 14px; row-gap: 2px; align-content: center; text-align: left; margin: -4px -12px 4px; padding: 10px 12px 14px; }
.hero > .cv, .hero > .mosaic-wrap { grid-column: 1; grid-row: 1 / span 6; width: 124px !important; margin: 0 !important; align-self: center; border-radius: 10px; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.hero > :not(.hero-bg):not(.cv):not(.mosaic-wrap) { grid-column: 2; }
.hero h2 { margin: 0; font-size: 18px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hero .by { font-size: 14px; }
.hero .meta { justify-content: flex-start; margin-top: 2px; }
.hero .btns { justify-content: flex-start; margin-top: 10px; gap: 8px; }
.hero .btn { height: 34px; padding: 0 14px; font-size: 14px; }
.hero .edit-acts { justify-content: flex-start; margin-top: 8px; }
.hero-bg { filter: blur(50px) saturate(1.5); opacity: .5; }

/* ═══ 재생 화면: 고급스럽게, 정보 한눈에 ═══ */
.full { overflow-x: hidden; }
.np-bg { filter: blur(70px) saturate(1.6) brightness(.5); }
.np-in { padding: var(--st) 20px calc(20px + var(--sb)); }
.np-top { height: 48px; margin: 0 -6px 2px; }
.cv.xl { width: min(70vw, 38vh, 340px); border-radius: 12px; margin-top: 4px;
  box-shadow: 0 30px 60px -12px rgba(0, 0, 0, .7), 0 0 0 .5px rgba(255, 255, 255, .12); }
#np.paused .cv.xl { transform: scale(.9); }
.np-meta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; margin-top: 18px; min-width: 0; }
.np-meta b, .np-meta > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#npTitle { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
#npArtist { font-size: 15px; font-weight: 600; color: var(--acc); }
#npAlbum { font-size: 13px; color: var(--fg2); }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; min-height: 22px; }
.chips span { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 700; letter-spacing: .03em;
  background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .85); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chips .chip-q { background: color-mix(in srgb, var(--acc) 22%, transparent); color: var(--acc); }
.chips .chip-o { background: rgba(76, 217, 100, .16); color: #6fe08a; }
.chips .chip-c { background: rgba(255, 159, 10, .16); color: #ffb340; }
.chips .chip-live i { width: 6px; height: 6px; border-radius: 50%; background: #ff453a; animation: pulse 1.6s infinite; }
.chips .chip-d { font-weight: 600; color: var(--fg2); }
.seek { margin-top: 14px; }
.rng::-webkit-slider-runnable-track { height: 3px; }
.rng::-webkit-slider-thumb { margin-top: -5.5px; }
.live { height: 30px; margin-top: 12px; }
.ctrls { gap: 30px; margin: 8px 0 14px; }
.ib.play { width: 66px; height: 66px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4), 0 0 0 6px rgba(255, 255, 255, .06); }
.ib.play svg { width: 32px; height: 32px; }
.ib.lg { width: 52px; height: 52px; }
.ib.lg svg { width: 30px; height: 30px; }
.np-next { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 16px; padding: 8px 10px; border-radius: 12px; text-align: left;
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .08); }
.np-next small { font-size: 11px; font-weight: 700; color: var(--fg3); letter-spacing: .04em; flex: none; }
.np-next .cv.sm { width: 32px; height: 32px; border-radius: 6px; }
.np-next b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; }
.qhead { margin: 22px 0 2px; }
#queue .tr { min-height: 48px; }
#queue .tr .cv.sm { width: 36px; height: 36px; }

/* 미니 플레이어 */
#mini { padding: 7px 6px 8px 8px; }
#miniOpen { height: 44px; }
#mini .cv.sm { width: 40px; height: 40px; }

/* ═══ 폴드 펼친 화면·태블릿: 왼쪽 목록 + 오른쪽 재생 화면 ═══ */
@media (min-width: 700px) {
  :root { --npw: clamp(330px, 40vw, 420px); }
  body.wide { padding-bottom: 24px; padding-right: var(--npw); }
  body.wide #mini { display: none; }
  body.wide #np { left: auto; right: 0; width: var(--npw); z-index: 6; animation: none; border-left: .5px solid var(--line); }
  body.wide #np [data-close] { visibility: hidden; }
  body.wide .np-bg { position: absolute; inset: -80px; transform: none; }
  body.wide .np-in { max-width: none; padding: calc(4px + var(--st)) 18px 20px; }
  body.wide .cv.xl { width: min(100%, 36vh, 300px); }
  body.wide main, body.wide .topbar, body.wide .seg3 { max-width: none; margin-left: 0; margin-right: 0; }
  body.wide .seg3 { max-width: 520px; }
  body.wide .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  body.wide .tiles { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
  body.wide .hero { grid-template-columns: 160px 1fr; }
  body.wide .hero > .cv, body.wide .hero > .mosaic-wrap { width: 160px !important; }
  body.wide #toast { left: calc((100% - var(--npw)) / 2); bottom: 24px; }
  body.wide .bsheet { left: calc((100% - var(--npw)) / 2); }
}

/* 라디오: 한 격자 */
.radio-grid { margin-top: 4px; }

/* 테마 선택 */
.themeline { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; color: var(--fg3); font-size: 13px; }
.tseg { display: flex; padding: 3px; border-radius: 10px; background: var(--s2); }
.tseg button { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--fg2); }
.tseg button.on { background: var(--s3); color: var(--fg); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.ar .av, .ar-head .av { color: #fff; }

/* ═══ 밝은 테마 ═══ */
:root[data-theme="light"] {
  --bg: #f4f4f6; --s1: #ffffff; --s2: #e9e9ee; --s3: #ffffff;
  --fg: #141417; --fg2: rgba(20, 20, 26, .64); --fg3: rgba(20, 20, 26, .42);
  --line: rgba(0, 0, 0, .08); --acc: #b97813; --acc-ink: #ffffff;
  color-scheme: light;
}
[data-theme="light"] header { background: rgba(244, 244, 246, .85); }
[data-theme="light"] #q::-webkit-search-cancel-button { filter: none; }
[data-theme="light"] .seg3 { background: #e4e4e9; }
[data-theme="light"] .seg3 .pill { background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .12); }
[data-theme="light"] .cv { background: linear-gradient(145deg, #e6e6eb, #d6d6dd); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .06); }
[data-theme="light"] .cv > svg { color: rgba(0, 0, 0, .2); }
[data-theme="light"] .card .cv { box-shadow: 0 6px 16px rgba(0, 0, 0, .12); }
[data-theme="light"] .tile { box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
[data-theme="light"] #mini { background: rgba(255, 255, 255, .86); box-shadow: 0 10px 30px rgba(0, 0, 0, .16), inset 0 0 0 .5px rgba(0, 0, 0, .06); }
[data-theme="light"] .mprog { background: rgba(0, 0, 0, .08); }
[data-theme="light"] .rng::-webkit-slider-runnable-track { background: linear-gradient(to right, var(--fg) var(--p), rgba(0, 0, 0, .14) var(--p)); }
[data-theme="light"] .rng::-moz-range-track { background: linear-gradient(to right, var(--fg) var(--p), rgba(0, 0, 0, .14) var(--p)); }
[data-theme="light"] .np-bg { filter: blur(70px) saturate(1.4) brightness(1.25); opacity: .55; }
[data-theme="light"] .np-bg::after { background: linear-gradient(to bottom, rgba(244, 244, 246, .3), rgba(244, 244, 246, .75) 70%, rgba(244, 244, 246, .92)); }
[data-theme="light"] .cv.xl { box-shadow: 0 26px 50px -14px rgba(0, 0, 0, .35), 0 0 0 .5px rgba(0, 0, 0, .06); }
[data-theme="light"] .ib.play { color: #fff; box-shadow: 0 10px 26px rgba(0, 0, 0, .25), 0 0 0 6px rgba(0, 0, 0, .05); }
[data-theme="light"] .chips span { background: rgba(0, 0, 0, .06); color: var(--fg2); }
[data-theme="light"] .chips .chip-q { background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--acc); }
[data-theme="light"] .chips .chip-o { background: rgba(30, 160, 70, .12); color: #1b8a3e; }
[data-theme="light"] .chips .chip-c { background: rgba(220, 120, 0, .12); color: #b86100; }
[data-theme="light"] .np-next { background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .08); }
[data-theme="light"] #queue .tr { border-color: rgba(0, 0, 0, .07); }
[data-theme="light"] .bsheet { box-shadow: 0 -10px 40px rgba(0, 0, 0, .15); }
[data-theme="light"] #scrim { background: rgba(0, 0, 0, .3); }
[data-theme="light"] .hero-bg { opacity: .35; }
[data-theme="light"] #toast { background: rgba(20, 20, 23, .92); color: #fff; }
[data-theme="light"] .tseg button.on { box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
[data-theme="light"] .drow.on .di { color: #fff; }

/* ── 재생목록 드래그 ── */
.tr .drag { display: none; width: 36px; height: 40px; place-items: center; color: var(--fg3); touch-action: none; cursor: grab; margin-right: -6px; }
.tr .drag svg { width: 20px; height: 20px; }
.editing .tr .drag { display: grid; }
.editing .tr .up { display: none; }
.drag-on .tr { transition: transform .15s var(--ease); }
.drag-on .tr.dragging { transition: none; position: relative; z-index: 3; background: var(--s1); border-radius: 10px; box-shadow: 0 10px 26px rgba(0, 0, 0, .35); }
.drag-on { user-select: none; -webkit-user-select: none; }

/* ── 재생 화면 탭·가사 ── */
.qhead .tseg button { padding: 5px 14px; }
.qhead .tseg { background: rgba(255, 255, 255, .08); }
.qhead .tseg button.on { background: rgba(255, 255, 255, .16); }
[data-theme="light"] .qhead .tseg { background: rgba(0, 0, 0, .06); }
[data-theme="light"] .qhead .tseg button.on { background: #fff; }
.lyrics { position: relative; max-height: 46vh; overflow-y: auto; margin-top: 8px; padding: 4px 2px 40px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 8%, #000 88%, transparent); }
.lyrics .plain { white-space: pre-wrap; font-size: 15px; line-height: 1.75; color: var(--fg); padding: 12px 2px; }
.lyrics .sync { padding: 30% 0; }
.lyrics .sync p { margin: 0; padding: 7px 2px; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--fg3); cursor: pointer; transition: color .3s, transform .3s var(--ease); transform-origin: left center; }
.lyrics .sync p.cur { color: var(--fg); transform: scale(1.04); }
.lyrics .empty { padding: 40px 0; }
body.wide .lyrics { max-height: calc(100vh - 560px); min-height: 200px; }

/* ── 별표 ── */
.tr .star { width: 34px; height: 34px; color: var(--fg3); margin-right: -4px; }
.tr .star svg, .np-trow .star svg { width: 21px; height: 21px; fill: none; }
.star.on { color: var(--acc) !important; }
.star.on svg { fill: currentColor; }
.editing .tr .star { display: none; }
.np-trow { display: flex; align-items: center; justify-content: center; gap: 4px; max-width: 100%; }
.np-trow #npTitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-trow .ib { width: 36px; height: 36px; flex: none; }
.np-trow .star { color: var(--fg2); }
.pk .ck { margin-left: auto; color: var(--acc); opacity: 0; transition: opacity .2s; }
.pk .ck svg { width: 20px; height: 20px; }
.pk.in .ck { opacity: 1; }
.pk.in { background: color-mix(in srgb, var(--acc) 12%, var(--s2)); }
.pk small { margin-left: 6px; }

/* ── 재생 중 애니메이션 ── */
.artwrap { position: relative; flex: none; }
.meq { position: absolute; right: 3px; bottom: 3px; display: none !important; width: 14px; height: 11px; padding: 2px; box-sizing: content-box; border-radius: 4px; background: rgba(0, 0, 0, .5); }
.meq i { width: 2.5px; background: #fff; }
body.playing #mini:not(.idle) .meq { display: flex !important; }
.chips .chip-eq { padding: 0 8px; }
.chips .chip-eq .eq { display: flex; width: 16px; height: 11px; }
.chips .chip-eq.still .eq i { animation-play-state: paused; }
@keyframes npglow {
  0%, 100% { box-shadow: 0 30px 60px -12px rgba(0, 0, 0, .7), 0 0 0 .5px rgba(255, 255, 255, .12), 0 0 0 0 color-mix(in srgb, var(--acc) 0%, transparent); }
  50% { box-shadow: 0 30px 60px -12px rgba(0, 0, 0, .7), 0 0 0 .5px rgba(255, 255, 255, .12), 0 0 46px 6px color-mix(in srgb, var(--acc) 38%, transparent); }
}
#np:not(.paused) .cv.xl { animation: npglow 3.2s ease-in-out infinite; }

/* ── 라디오 재생 중: 대기열·가사 대신 채널 줄 ── */
.chstrip { display: none; gap: 10px; overflow-x: auto; margin: 18px -20px 0; padding: 4px 20px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.chstrip::-webkit-scrollbar { display: none; }
.chstrip .tile { flex: none; width: 92px; height: 92px; border-radius: 12px; scroll-snap-align: center; }
.chstrip .tile .eq { right: 6px; bottom: 6px; width: 18px; height: 13px; padding: 3px; }
#np.radio-mode .chstrip { display: flex; }
#np.radio-mode .qhead, #np.radio-mode #queue, #np.radio-mode #lyrics, #np.radio-mode .np-next { display: none !important; }
body.wide #np .chstrip { margin: 18px -18px 0; padding: 4px 18px 10px; }

/* ── 수면 타이머 ── */
.sleepbtn { width: auto; min-width: 40px; padding: 0 8px; border-radius: 20px; gap: 4px; display: inline-flex; color: var(--fg2); }
.sleepbtn svg { width: 20px; height: 20px; }
.sleepbtn small { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sleepbtn small:empty { display: none; }
.sleepbtn.on { color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
.pk .mins { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.pk.off b { color: #ff6961; }

/* ── 팟캐스트 ── */
.pods .card .s { font-size: 11.5px; }
.addpod .cv { display: grid; place-items: center; color: var(--fg3); background: var(--s2); box-shadow: inset 0 0 0 1.5px var(--line) !important; }
.addpod .cv svg { position: static; width: 34%; height: 34%; }
.frow.pod .fi img { opacity: 1; }
.frow.pod .btn { flex: none; }
.tr.ep { padding: 8px 0; }
.tr.ep .tt b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.tr.ep > .eq { width: 16px; }

/* ── 전체 곡 ── */
.frow.allsongs .fi { background: color-mix(in srgb, var(--acc) 14%, var(--s2)); color: var(--acc); }
.frow.allsongs b { color: var(--acc); }
.songs-sub { color: var(--fg3); font-size: 13px; margin: -2px 0 8px; }
.jump { position: sticky; top: calc(52px + var(--st)); z-index: 3; display: flex; gap: 4px; overflow-x: auto; padding: 6px 0 8px; margin: 0 -12px; padding-left: 12px; padding-right: 12px; background: var(--bg); scrollbar-width: none; }
.jump::-webkit-scrollbar { display: none; }
.jump button { flex: none; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 15px; background: var(--s2); font-size: 13px; font-weight: 700; color: var(--fg2); }
.jump button:active { background: var(--acc); color: var(--acc-ink); }

/* ── 멜론 차트 ── */
.frow.chart .fi { background: color-mix(in srgb, #22c55e 16%, var(--s2)); color: #2fbf63; }
.frow.chart b { color: #2fbf63; }
.chartlist .rk { width: 26px; flex: none; text-align: center; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--fg2); }
.chartlist .rk.top { color: var(--acc); }
.chartlist .tr.on .rk { display: none; }
.chartlist .tr.miss { opacity: .4; cursor: default; }
.chartlist .tr.miss .du { font-size: 12px; }
.btn[disabled] { opacity: .4; }

/* ── 볼륨 −/+ ── */
.mvol { gap: 6px; }
.vstep { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--fg2); background: rgba(255, 255, 255, .06); }
.vstep svg { width: 16px; height: 16px; }
.vstep:active { background: var(--acc); color: var(--acc-ink); }
[data-theme="light"] .vstep { background: rgba(0, 0, 0, .05); }

/* ── 휴대폰 저장 ── */
.npsave { color: var(--fg2); }
.npsave svg { width: 21px; height: 21px; }
.npsave.on { color: #4cd964; }
.tr.saved .tt b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #4cd964; vertical-align: middle; }
.tr .rm.show { display: grid; }
.saved-acts { display: flex; justify-content: space-between; margin-top: 18px; }

/* ── 기기: 이 휴대폰·로그아웃 ── */
.logout { display: block; margin: 10px auto 0; color: var(--fg3); font-weight: 500; }

/* ── 로그인 ── */
.login { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.lbox { width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; }
.lbox img { width: 72px; height: 72px; border-radius: 18px; margin: 0 auto 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.lbox input { height: 48px; padding: 0 14px; border-radius: 12px; border: 0; outline: 0; background: var(--s2); color: var(--fg); font: inherit; font-size: 16px; }
.lbox .btn { height: 48px; border-radius: 12px; margin-top: 4px; }
#lgErr { min-height: 20px; margin: 4px 0 0; text-align: center; color: #ff6961; font-size: 14px; }

/* ── 하단 막대 둘째 줄: 재생 위치(기본) / LIVE / 볼륨(스피커 아이콘) ── */
#mini .mvol { flex-basis: auto; }
.mrow { flex-basis: 100%; display: flex; align-items: center; gap: 6px; padding: 2px 2px 0 2px; min-height: 32px; color: var(--fg2); }
.mseek { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; font-size: 11px; font-variant-numeric: tabular-nums; color: var(--fg3); }
.mseek span { width: 34px; flex: none; }
.mseek span:last-child { text-align: right; }
.mseek .rng { height: 24px; }
.mlive { flex: 1; display: none; align-items: center; gap: 7px; padding-left: 4px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: var(--fg2); }
.mlive i { width: 7px; height: 7px; border-radius: 50%; background: #ff453a; animation: pulse 1.6s infinite; }
#mini .mvol { display: none; flex: 1; min-width: 0; padding: 0; }
.vbtn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; color: var(--fg2); }
.vbtn svg { width: 20px; height: 20px; }
#mini.vol-on .vbtn { color: var(--acc); background: color-mix(in srgb, var(--acc) 14%, transparent); }
#mini.is-live .mseek { display: none; }
#mini.is-live .mlive { display: flex; }
#mini.vol-on .mseek, #mini.vol-on .mlive { display: none; }
#mini.vol-on .mvol { display: flex; }
#mini.novol .vbtn { display: none; }
#mini .mprog { display: none; }
#np.novol .vol { display: none; }

/* ═══════════ 재생 화면 v2: 앨범아트 꽉 차게 + 가사 오버레이 ═══════════ */
#np { --dim: .35; }
#np .np-in { position: relative; max-width: 560px; margin: 0 auto; padding: 2px 20px calc(24px + var(--sb)); }
.np-stage { position: relative; height: min(112vw, 60vh); min-height: 320px; overflow: hidden; color: #fff; cursor: pointer; }
.np-art { position: absolute; inset: -2px; background: center/cover no-repeat; background-color: #1c1c21; transition: background-image .5s; }
.np-art.noart { background-image: radial-gradient(circle at 30% 25%, #3a3a44, #141417 70%) !important; }
#np:not(.paused) .np-art { animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }
.np-dim { position: absolute; inset: 0; background: #000; opacity: var(--dim); transition: opacity .35s; pointer-events: none; }
.np-stage:not(.has-lyr) .np-dim, .np-stage.lyr-off .np-dim { opacity: calc(var(--dim) * .35); }
.np-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .5) 0, transparent 20%, transparent 50%, color-mix(in srgb, var(--bg) 70%, transparent) 78%, var(--bg) 100%); }

.np-stage .np-top { position: absolute; top: var(--st); left: 0; right: 0; z-index: 4; height: 54px; margin: 0; padding: 0 6px; display: flex; align-items: center; justify-content: space-between; color: #fff; }
.np-top .chip.ghost { background: rgba(0, 0, 0, .28); color: #fff; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.np-tr { display: flex; align-items: center; justify-content: flex-end; min-width: 92px; }
.np-tr .ib { width: 38px; height: 38px; color: rgba(255, 255, 255, .9); }
.np-tr .ib svg { width: 21px; height: 21px; }
#npDimBtn[data-lv="0"] svg path { opacity: .25; }
#np.novol #npVolBtn { display: none; }
.np-stage .sleepbtn { color: rgba(255, 255, 255, .9); }
.np-stage .sleepbtn.on { color: #fff; background: rgba(0, 0, 0, .35); }
.np-volpop { position: absolute; top: calc(var(--st) + 56px); left: 14px; right: 14px; z-index: 5; display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border-radius: 16px; background: rgba(20, 20, 24, .62); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); color: #fff; cursor: default; }
.np-volpop .vstep { background: rgba(255, 255, 255, .12); color: #fff; }
.np-volpop span { width: 26px; text-align: right; font-size: 13px; font-variant-numeric: tabular-nums; }
.np-volpop .rng::-webkit-slider-runnable-track { background: linear-gradient(to right, #fff var(--p), rgba(255, 255, 255, .25) var(--p)); }
.np-volpop .rng::-webkit-slider-thumb { background: #fff; }

/* 가사 */
.np-lyr { position: absolute; left: 0; right: 0; top: calc(var(--st) + 58px); bottom: 122px; z-index: 2; overflow-y: auto; padding: 0 26px; text-align: center; scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 84%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 14%, #000 84%, transparent); transition: opacity .3s; }
.np-lyr::-webkit-scrollbar { display: none; }
.np-stage.lyr-off .np-lyr { opacity: 0; pointer-events: none; }
.np-lyr .sync { padding: 30% 0; }
.np-lyr .sync p { margin: 0; padding: 7px 0; font-size: 19px; font-weight: 700; line-height: 1.45; color: rgba(255, 255, 255, .4); text-shadow: 0 1px 10px rgba(0, 0, 0, .45); cursor: pointer;
  transition: color .35s, transform .35s var(--ease); transform-origin: center; }
.np-lyr .sync p.cur { color: #fff; transform: scale(1.07); }
.np-lyr .plain { padding: 18px 0 60px; white-space: pre-wrap; font-size: 16px; font-weight: 600; line-height: 1.85; color: rgba(255, 255, 255, .9); text-shadow: 0 1px 10px rgba(0, 0, 0, .5); }
.np-lyr .nolyr { margin: 26% 0 0; font-size: 14px; color: rgba(255, 255, 255, .5); }

/* 곡 정보(아트 아래쪽) */
.np-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: flex-end; gap: 8px; padding: 0 16px 10px 20px; cursor: default; }
.np-tl { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.np-tl b, .np-tl > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#np #npTitle { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; color: var(--fg); }
#np #npArtist { margin-top: 3px; font-size: 16px; font-weight: 600; color: var(--fg2); }
#np #npAlbum { font-size: 13px; color: var(--fg3); }
#np .np-tl .chips { justify-content: flex-start; margin-top: 8px; }
.np-info .npsave { width: 40px; height: 40px; color: var(--fg2); }

/* 재생 위치·조작 */
#np .seek { margin-top: 6px; }
#np .live { margin-top: 10px; }
#np .ctrls { justify-content: space-between; gap: 0; margin: 10px 0 6px; }
.ib.md { width: 48px; height: 48px; color: var(--fg2); }
.ib.md svg { width: 24px; height: 24px; }
#npStar.dis { opacity: .25; pointer-events: none; }
#npStar svg { fill: none; }
#npStar.on { color: var(--acc); }
#npStar.on svg { fill: currentColor; }

/* 대기열 머리 */
#np .qhead { margin: 22px 0 4px; }
#np .qhead b { font-size: 17px; }
#qActs { display: flex; gap: 2px; }
#qActs .ib { width: 40px; height: 40px; color: var(--fg2); }
#qActs .ib svg { width: 22px; height: 22px; }
#np .chstrip { margin-top: 14px; }

/* 펼친 폴드·태블릿: 오른쪽 패널 */
body.wide .np-stage { height: min(var(--npw), 52vh); min-height: 300px; }
body.wide #np #npTitle { font-size: 22px; }

/* ═══ 앱 전체 배경 배색: 재생 중인 앨범아트 색으로 은은한 그라데이션 ═══ */
@property --amb-h { syntax: '<number>'; inherits: true; initial-value: 40; }
:root { --amb-h: 40; --amb-s: 45%; transition: --amb-h 1.2s ease; }
:root {
  --amb1: hsl(var(--amb-h) var(--amb-s) 20% / .55);
  --amb2: hsl(calc(var(--amb-h) + 38) calc(var(--amb-s) * .8) 16% / .5);
  --amb3: hsl(calc(var(--amb-h) - 30) calc(var(--amb-s) * .7) 12% / .6);
}
:root[data-theme="light"] {
  --amb1: hsl(var(--amb-h) var(--amb-s) 86% / .75);
  --amb2: hsl(calc(var(--amb-h) + 38) calc(var(--amb-s) * .8) 90% / .7);
  --amb3: hsl(calc(var(--amb-h) - 30) calc(var(--amb-s) * .7) 92% / .7);
}
body { background: transparent; } /* html 이 배경, body::before 배색이 보이도록 */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 0% 0%, var(--amb1), transparent 62%),
    radial-gradient(90% 60% at 100% 12%, var(--amb2), transparent 60%),
    radial-gradient(120% 70% at 50% 110%, var(--amb3), transparent 65%),
    var(--bg); }
/* 위·아래 막대도 배경색이 비치게 */
header { background: color-mix(in srgb, var(--bg) 62%, transparent); }
.seg3 { background: color-mix(in srgb, var(--s1) 70%, transparent); }
.jump { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
#mini { background: color-mix(in srgb, hsl(var(--amb-h) 20% 16%) 72%, transparent); }
[data-theme="light"] #mini { background: color-mix(in srgb, #fff 80%, transparent); }
.bsheet { background: color-mix(in srgb, var(--s1) 92%, hsl(var(--amb-h) 40% 30%)); }
/* 재생 화면 아래쪽(재생 위치·조작·대기열)에도 같은 배색 */
#np { background: var(--bg); }
#np::before { content: ""; position: fixed; inset: 0; pointer-events: none;
  background:
    radial-gradient(110% 60% at 50% 55%, var(--amb1), transparent 70%),
    radial-gradient(100% 50% at 100% 100%, var(--amb2), transparent 65%),
    radial-gradient(100% 50% at 0% 100%, var(--amb3), transparent 65%); }
body.wide #np::before { position: absolute; }
#np .np-in { position: relative; z-index: 1; }
.np-stage { z-index: 1; }
/* 아트 아래쪽 그라데이션이 배색과 자연스럽게 이어지도록 */
.np-shade { background: linear-gradient(to bottom, rgba(0, 0, 0, .5) 0, transparent 20%, transparent 50%,
  color-mix(in srgb, var(--bg) 60%, transparent) 80%, color-mix(in srgb, var(--bg) 88%, var(--amb1)) 100%); }
.np-bg { opacity: .55; }

/* ═══════════ 재생 화면 v3: 아트 · 조작 · 대기열 시트 ═══════════ */
#np { display: flex; flex-direction: column; overflow: hidden; --stageH: min(100vw, 47vh); }
#np.lyroff { --stageH: min(80vw, 36vh); }
#np .np-stage { flex: none; height: var(--stageH); min-height: 250px; transition: height .38s var(--ease); }
#np .np-ctl { flex: none; width: 100%; padding: 0 20px; }
#np .seek { margin-top: 2px; }
#np .ctrls { margin: 6px 0 4px; }
#np .ib.play { width: 78px; height: 78px; }
#np .ib.play svg { width: 38px; height: 38px; }
#np .ib.lg { width: 60px; height: 60px; }
#np .ib.lg svg { width: 36px; height: 36px; }
#np .ib.md { width: 50px; height: 50px; }
#np .ib.md svg { width: 26px; height: 26px; }
#npLyrBtn { opacity: .55; }
#npLyrBtn.on { opacity: 1; }

.np-sheet { position: relative; z-index: 2; flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 8px; border-radius: 22px 22px 0 0;
  background: color-mix(in srgb, var(--s1) 58%, transparent); backdrop-filter: blur(26px) saturate(140%); -webkit-backdrop-filter: blur(26px) saturate(140%);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .22), inset 0 .5px 0 rgba(255, 255, 255, .09); }
[data-theme="light"] .np-sheet { background: color-mix(in srgb, #fff 70%, transparent); box-shadow: 0 -8px 26px rgba(0, 0, 0, .08); }
.np-sheet.float { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; z-index: 8; }
#np.sheet-open .np-sheet { box-shadow: 0 -14px 40px rgba(0, 0, 0, .4); }
.sheet-head { flex: none; padding: 6px 14px 0 18px; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.sheet-head .grip { display: block; width: 40px; height: 5px; margin: 2px auto 2px; border-radius: 3px; background: var(--fg3); opacity: .7; }
#np .sheet-head .qhead { margin: 2px 0 0; min-height: 40px; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px calc(14px + var(--sb)); overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
#np .sheet-body #queue .tr { min-height: 54px; }
#np .sheet-body .chstrip { margin: 6px -16px 0; padding: 4px 16px 10px; }
#np.radio-mode .sheet-head .qhead { display: none !important; }
#np.radio-mode .sheet-head { padding-bottom: 4px; }

/* 펼친 폴드·태블릿 오른쪽 패널 */
body.wide #np { --stageH: min(var(--npw), 46vh); }
body.wide #np.lyroff { --stageH: min(calc(var(--npw) * .8), 34vh); }
body.wide .np-stage { height: var(--stageH); }

/* 대기열 시트: 지금 곡을 맨 위로 맞추기 위한 기준 */
.sheet-body { position: relative; }
/* 가사: 곡이 시작될 때는 첫 줄부터 맨 위에(진행되면 지금 줄이 가운데로 올라옴) */
.np-lyr .sync { padding: 10px 0 55%; }
