:root {
  --bg: #020107;
  --fg: #f4f1ff;
  --muted: #a7a2c2;
  --hue: 265;
  --pulse: 0;
  --accent: hsl(var(--hue) 100% 72%);
  --accent-2: hsl(calc(var(--hue) + 60) 100% 68%);
  --glass: rgba(14, 10, 26, 0.55);
  --glass-hi: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.14);
  --spring: cubic-bezier(0.5, 1.6, 0.4, 1);
  --snap: cubic-bezier(0.77, 0, 0.18, 1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); overflow: hidden; }
body { font-family: "Noto Sans KR", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#viz { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }

/* ───────── 게이트: 입자가 그린 외곽선 안에서 '빛의 선'이 열리며 패널이 생겨남 ───────── */
.gate { clip-path: inset(50% 50% 50% 50%); }
.gate.on { animation: gateOpen 0.95s var(--snap) forwards; }
.gate.closing { animation: gateClose 0.42s cubic-bezier(0.6, 0, 0.9, 0.4) forwards; }
@keyframes gateOpen {
  0% { clip-path: inset(50% 50% 50% 50% round 18px); filter: brightness(5) saturate(0); }
  38% { clip-path: inset(calc(50% - 1px) -2px calc(50% - 1px) -2px round 18px); filter: brightness(5) saturate(0); }
  100% { clip-path: inset(-300vh -300vw -300vh -300vw round 18px); filter: brightness(1) saturate(1); }
}
@keyframes gateClose {
  0% { clip-path: inset(-300vh -300vw -300vh -300vw round 18px); filter: brightness(1); }
  55% { clip-path: inset(calc(50% - 1px) -2px calc(50% - 1px) -2px round 18px); filter: brightness(5) saturate(0); }
  100% { clip-path: inset(50% 50% 50% 50% round 18px); filter: brightness(5) saturate(0); }
}

/* ───────── 글리치: 조각난 신호가 맞춰지며 나타남 ───────── */
.glitch { opacity: 0; }
.glitch.on { animation: glitchIn 0.75s steps(1, end) forwards; }
.glitch.off { animation: glitchOut 0.4s steps(1, end) forwards; }
@keyframes glitchIn {
  0% { opacity: 1; clip-path: inset(42% 0 52% 0); transform: translateX(-10px) skewX(-20deg); text-shadow: 3px 0 #f0f, -3px 0 #0ff; }
  12% { clip-path: inset(8% 0 78% 0); transform: translateX(7px); }
  24% { clip-path: inset(72% 0 6% 0); transform: translateX(-4px) skewX(10deg); }
  36% { clip-path: inset(0 0 64% 0); transform: translateX(5px); }
  48% { clip-path: inset(28% 0 34% 0); transform: translateX(-2px); text-shadow: 2px 0 #f0f, -2px 0 #0ff; }
  62% { clip-path: inset(0 0 0 0); transform: translateX(2px); }
  76% { clip-path: inset(0 0 0 0); transform: none; text-shadow: 1px 0 #f0f, -1px 0 #0ff; }
  100% { opacity: 1; clip-path: none; transform: none; text-shadow: none; }
}
@keyframes glitchOut {
  0% { opacity: 1; clip-path: inset(0); }
  20% { clip-path: inset(20% 0 50% 0); transform: translateX(8px); text-shadow: 3px 0 #f0f, -3px 0 #0ff; }
  45% { clip-path: inset(70% 0 10% 0); transform: translateX(-12px) skewX(25deg); }
  70% { clip-path: inset(48% 0 50% 0); transform: translateX(20px) scaleX(1.6); }
  100% { opacity: 0; clip-path: inset(50% 0 50% 0); }
}

/* ───────── 페이즈별 상호작용 ───────── */
#landing, #stage { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
body[data-phase="landing"] #landing > * { pointer-events: auto; }
body[data-phase="play"] #stage .stage-ui.on { pointer-events: auto; }

/* ───────── 시작 화면 ───────── */
#landing { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px 16px; text-align: center; }
#logo-space { width: min(760px, 92vw); height: clamp(90px, 19vh, 190px); }
.tagline { color: var(--muted); margin: 0; max-width: 560px; min-height: 3.2em; line-height: 1.6; font-size: 15px; }

#url-form {
  position: relative; display: flex; gap: 6px; width: min(660px, 100%); padding: 6px;
  border-radius: 18px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), 0 0 0 1px transparent, 0 20px 60px -20px hsl(var(--hue) 100% 50% / 0.45);
  transition: box-shadow 0.4s;
}
#url-form:focus-within { box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 75% / 0.8), 0 0 40px -6px hsl(var(--hue) 100% 60% / 0.6), 0 20px 60px -20px hsl(var(--hue) 100% 50% / 0.6); }
#url-input { flex: 1; min-width: 0; padding: 14px 14px; border: 0; background: transparent; outline: none; font-size: 15px; }
#url-input::placeholder { color: rgba(255, 255, 255, 0.4); }
#url-form button {
  position: relative; overflow: hidden; padding: 0 26px; border: 0; border-radius: 13px; cursor: pointer; font-weight: 800;
  color: #0c0618; background: linear-gradient(120deg, var(--accent), var(--accent-2));
  transition: transform 0.35s var(--spring), filter 0.3s;
}

@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
#url-form button:hover { transform: scale(1.05); filter: brightness(1.12); }
#url-form button:active { transform: scale(0.96); }
#url-form.shake { animation: shake 0.5s; }
@keyframes shake { 20% { translate: -8px; } 40% { translate: 7px; } 60% { translate: -4px; } 80% { translate: 2px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chips span { font-size: 12px; color: var(--muted); padding: 5px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); letter-spacing: 0.04em; }
.file-pick { color: var(--muted); font-size: 13px; cursor: pointer; border-bottom: 1px dashed var(--line); padding-bottom: 2px; transition: color 0.3s; }
.file-pick:hover { color: var(--fg); }
.error { color: #ff8fa3; margin: 0; max-width: 640px; min-height: 1.4em; font-size: 14px; }

/* ───────── 로딩 상태 / 타이틀 카드 ───────── */
.status, .card-artist {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; pointer-events: none; white-space: nowrap; text-align: center;
}
.status { top: 66vh; font-family: var(--mono); font-size: 13px; letter-spacing: 0.32em; color: hsl(var(--hue) 100% 85%); text-shadow: 0 0 18px hsl(var(--hue) 100% 60%); }
.card-artist { top: 57vh; font-size: clamp(16px, 2.4vw, 26px); font-weight: 700; letter-spacing: 0.12em; color: hsl(var(--hue) 100% 88%); text-shadow: 0 0 24px hsl(var(--hue) 100% 55%); max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }

/* ───────── 재생 화면 ───────── */
.stage-ui { position: absolute; transition: opacity 0.6s ease; }
body.idle .stage-ui { opacity: 0; pointer-events: none !important; }
body.idle { cursor: none; }

.panel { background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px; }

#topbar {
  top: 14px; left: 16px; right: 16px; display: flex; align-items: center; gap: 10px; padding: 8px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px;
}
.track { flex: 1; display: flex; gap: 6px; align-items: center; min-width: 0; flex-wrap: wrap; }
.track input { background: transparent; border: 0; border-radius: 10px; padding: 6px 10px; min-width: 0; outline: none; transition: background 0.3s, box-shadow 0.3s; }
.track input:hover { background: var(--glass-hi); }
.track input:focus { background: var(--glass-hi); box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 75% / 0.7); }
#title-input { font-weight: 900; font-size: 17px; flex: 1 1 200px; }
#artist-input { color: var(--muted); flex: 1 1 140px; }
.icon {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 0; cursor: pointer; flex: none;
  background: var(--glass-hi); transition: transform 0.35s var(--spring), background 0.3s;
}
.icon:hover { background: hsl(var(--hue) 100% 70% / 0.22); transform: scale(1.08); }
.icon:active { transform: scale(0.92); }
.icon.tiny { width: 26px; height: 26px; border-radius: 8px; }
.chip-btn {
  border: 0; border-radius: 10px; padding: 7px 14px; font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  color: #0c0618; background: linear-gradient(120deg, var(--accent), var(--accent-2)); transition: transform 0.35s var(--spring), filter 0.3s;
}
.chip-btn:hover { transform: scale(1.05); filter: brightness(1.1); }
.chip-btn.ghost { background: var(--glass-hi); color: var(--fg); }

#player-dock {
  top: 78px; right: 16px; width: min(340px, calc(100vw - 32px)); padding: 8px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--line); border-radius: 16px;
}
.dock-head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 0 6px; }
.dock-title { font-size: 11px; font-family: var(--mono); letter-spacing: 0.2em; color: var(--muted); text-transform: uppercase; }
.dock-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.55s var(--snap), margin 0.55s var(--snap); margin-top: 8px; }
.dock-body > div { min-height: 0; overflow: hidden; border-radius: 10px; }
#player-dock.collapsed .dock-body { grid-template-rows: 0fr; margin-top: 0; }
#dock-toggle svg { transition: transform 0.5s var(--spring); }
#player-dock.collapsed #dock-toggle svg { transform: rotate(180deg); }
#player-host iframe, #player-host > div { display: block; width: 100%; border: 0; }
#player-host audio { width: 100%; display: block; }

/* 자막 */
#subtitles {
  position: absolute; left: 50%; bottom: 17vh; transform: translateX(-50%); z-index: 1;
  width: min(1100px, calc(100vw - 32px)); text-align: center; pointer-events: none;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 0 2px rgba(0, 0, 0, 0.9);
  opacity: 0; transition: opacity 0.8s;
}
body[data-phase="play"] #subtitles { opacity: 1; }
#subtitles p { margin: 0; overflow-wrap: anywhere; }
.line-side { color: rgba(255, 255, 255, 0.38); font-size: clamp(13px, 1.7vw, 19px); min-height: 1.5em; }
.line-cur {
  --p: 0%;
  font-weight: 900; font-size: clamp(26px, 4.6vw, 60px); line-height: 1.25; margin: 10px 0 6px !important; min-height: 1.25em;
  background: linear-gradient(90deg, #fff var(--p), rgba(255, 255, 255, 0.5) var(--p));
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  transform: scale(calc(1 + var(--pulse) * 0.045));
  filter: drop-shadow(0 0 calc(var(--pulse) * 18px) hsl(var(--hue) 100% 70% / 0.9)) drop-shadow(0 3px 10px rgba(0, 0, 0, 0.8));
}
.line-tr { color: hsl(var(--hue) 100% 88%); font-weight: 700; font-size: clamp(16px, 2.4vw, 28px); min-height: 1.4em; margin-bottom: 8px !important; }
/* 3D 가사 모드: 원문 줄은 입자가 그리므로 DOM에선 번역+다음 줄만 */
body.l3d #subtitles { bottom: auto; top: 77vh; }
body.l3d .line-cur, body.l3d #line-prev { display: none; }

.notice {
  position: absolute; top: 80px; left: 50%; translate: -50% 0; max-width: min(560px, calc(100vw - 32px)); z-index: 4;
  padding: 9px 16px; border-radius: 12px; font-size: 13px; text-align: center; color: var(--fg);
  background: var(--glass); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line), 0 0 30px -8px hsl(var(--hue) 100% 60% / 0.6);
  pointer-events: none;
}

/* 컨트롤 바 */
#controls {
  left: 50%; bottom: 14px; translate: -50% 0; width: max-content; max-width: calc(100vw - 32px);
  display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: center; padding: 8px 12px;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); box-shadow: inset 0 0 0 1px var(--line); border-radius: 18px;
}
.group { display: flex; align-items: center; gap: 6px; }
.label { font-size: 10px; color: var(--muted); font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.seg-wrap { position: relative; display: flex; padding: 3px; border-radius: 11px; background: rgba(0, 0, 0, 0.25); }
.seg-wrap .ind {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 8px;
  background: linear-gradient(120deg, hsl(var(--hue) 100% 70% / 0.35), hsl(calc(var(--hue) + 60) 100% 65% / 0.3));
  box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.6), 0 0 18px -2px hsl(var(--hue) 100% 60% / 0.7);
  transition: transform 0.55s var(--spring), width 0.55s var(--spring);
}
.seg {
  position: relative; padding: 6px 12px; border: 0; border-radius: 8px; background: transparent; cursor: pointer; font-size: 13px;
  color: var(--muted); transition: color 0.3s, transform 0.35s var(--spring), background 0.3s;
}
.seg:hover { color: var(--fg); }
.seg.active { color: var(--fg); }
.seg.solo { background: rgba(0, 0, 0, 0.25); }
.seg.solo:hover { background: var(--glass-hi); }
.seg.solo:active { transform: scale(0.92); }
.seg.solo.active { box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.6); background: hsl(var(--hue) 100% 70% / 0.2); }
select { background: rgba(0, 0, 0, 0.25); border: 0; border-radius: 9px; padding: 6px 8px; font-size: 13px; cursor: pointer; outline: none; }
select:focus { box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 75% / 0.7); }
select option { background: #160f26; }
.mono { font-family: var(--mono); font-size: 12px; min-width: 56px; text-align: center; }

/* 다이얼로그: 누른 버튼에서 원형으로 열림 */
dialog {
  background: rgba(16, 11, 30, 0.92); color: var(--fg); border: 0; border-radius: 20px; width: min(640px, calc(100vw - 32px)); padding: 22px;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 80px -20px hsl(var(--hue) 100% 40% / 0.6); backdrop-filter: blur(20px);
}
dialog[open] { animation: iris 0.6s var(--snap); }
@keyframes iris { from { clip-path: circle(0 at var(--ox, 50%) var(--oy, 100%)); } to { clip-path: circle(150% at var(--ox, 50%) var(--oy, 100%)); } }
dialog::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(6px); }
dialog h3 { margin: 0 0 6px; }
.hint { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
textarea { width: 100%; background: rgba(0, 0, 0, 0.35); border: 0; box-shadow: inset 0 0 0 1px var(--line); border-radius: 12px; padding: 12px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.6; outline: none; }
textarea:focus { box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 75% / 0.7); }
.row { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

@media (max-width: 720px) {
  .label { display: none; }
  #controls { bottom: 10px; gap: 6px 8px; padding: 6px; }
  #player-dock { top: auto; bottom: 150px; }
  body.l3d #subtitles { top: 72vh; }
  #title-input { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .gate.on { animation-duration: 0.01s; }
  .glitch.on, .glitch.off { animation-duration: 0.01s; }
}

/* ───────── 공간감: 마우스에 따라 층마다 다르게 움직임 (--px, --py: -1..1) ───────── */
:root { --px: 0; --py: 0; }
#landing { transform: translate3d(calc(var(--px) * -14px), calc(var(--py) * -10px), 0); }
.stage-ui, .account { transform: translate3d(calc(var(--px) * -6px), calc(var(--py) * -4px), 0); }
#subtitles { margin-left: calc(var(--px) * -10px); margin-top: calc(var(--py) * -8px); }

/* ───────── 계정 버튼 ───────── */
.account { position: fixed; top: 14px; right: 16px; z-index: 6; pointer-events: none; }
body[data-phase="landing"] .account-btn.on, body[data-phase="play"] .account-btn.on { pointer-events: auto; }
body[data-phase="play"] .account { top: 22px; right: 22px; }
body[data-phase="play"] #topbar { padding-right: 52px; }
.account-btn {
  display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--glass); backdrop-filter: blur(18px); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700;
  transition: box-shadow 0.3s, transform 0.35s var(--spring);
}
.account-btn:hover { transform: scale(1.04); box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 75% / 0.7), 0 0 24px -6px hsl(var(--hue) 100% 60% / 0.7); }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: #0c0618;
  background: conic-gradient(from calc(var(--hue) * 1deg), var(--accent), var(--accent-2), var(--accent)); }
body[data-phase="play"] .account-btn { padding: 4px; }
body[data-phase="play"] #account-label { display: none; }
.login-hint { margin: 0; font-size: 12.5px; color: hsl(var(--hue) 100% 85%); }

/* ───────── 로그인 · 연동 패널 ───────── */
.auth {
  position: fixed; left: 50%; top: 50%; translate: -50% -50%; z-index: 8; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow: auto;
  padding: 26px 24px 22px; border-radius: 22px; background: rgba(14, 10, 28, 0.78); backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 90px -20px hsl(var(--hue) 100% 40% / 0.7); pointer-events: none;
}
.auth.on { pointer-events: auto; }
.auth.shake { animation: gateOpen 0.01s forwards, shake 0.5s; }
.auth-close { position: absolute; top: 14px; right: 14px; }
.auth-title { margin: 0 0 16px; font-size: 20px; font-weight: 900; letter-spacing: -0.02em; }
.auth-tabs { margin-bottom: 14px; width: 100%; }
.auth-tabs .seg { flex: 1; padding: 8px; font-size: 14px; }
#auth-form { display: flex; flex-direction: column; gap: 10px; }
#auth-form input {
  width: 100%; padding: 13px 14px; border: 0; border-radius: 12px; background: rgba(0, 0, 0, 0.3); outline: none; font-size: 14px;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow 0.3s;
}
#auth-form input:focus { box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 75% / 0.8), 0 0 24px -8px hsl(var(--hue) 100% 60% / 0.8); }
.collapse { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--snap), margin 0.5s var(--snap); margin-bottom: -10px; }
.collapse > div { min-height: 0; overflow: hidden; }
.collapse.open { grid-template-rows: 1fr; margin-bottom: 0; }
.chip-btn.wide { width: 100%; padding: 12px; font-size: 14px; }
.auth-hello { margin: 0 0 4px; font-size: 16px; }
.auth-sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.links { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.links li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--line); }
.links .svc { font-weight: 800; font-size: 14px; flex: none; width: 92px; }
.links .st { flex: 1; font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links .st.ok { color: hsl(150 80% 70%); }
.links .chip-btn { padding: 6px 12px; font-size: 12px; }
.link-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.resume-card, .yt-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 14px; cursor: pointer; text-align: left;
  background: linear-gradient(120deg, hsl(var(--hue) 100% 60% / 0.18), hsl(calc(var(--hue) + 60) 100% 60% / 0.12));
  box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.35); transition: transform 0.35s var(--spring), box-shadow 0.3s;
}
.resume-card:hover, .yt-item:hover { transform: scale(1.02); box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.8), 0 0 24px -6px hsl(var(--hue) 100% 60% / 0.8); }
.resume-card img, .yt-item img { width: 46px; height: 46px; border-radius: 10px; object-fit: cover; flex: none; }
.resume-card b, .yt-item b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-card small, .yt-item small { color: var(--muted); font-size: 11.5px; }
.resume-card > span, .yt-item > span { min-width: 0; flex: 1; }
.yt-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.yt-item { background: rgba(0, 0, 0, 0.25); box-shadow: inset 0 0 0 1px var(--line); }
.yt-tabs { display: flex; gap: 6px; margin-bottom: 4px; }
#landing .resume-landing { width: min(660px, 100%); }

/* ───────── 구간 태그 / 가사 잠금 ───────── */
.section-tag {
  position: absolute; top: 88px; left: 50%; translate: -50% 0; margin: 0; z-index: 3; pointer-events: none;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.4em; padding: 6px 14px 6px 18px; border-radius: 999px;
  color: hsl(var(--hue) 100% 88%); background: rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.4), 0 0 30px -6px hsl(var(--hue) 100% 60% / 0.8);
}
.lyric-lock {
  position: absolute; left: 50%; top: 74vh; translate: -50% 0; z-index: 3; border: 0; cursor: pointer; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: var(--fg); background: var(--glass); backdrop-filter: blur(16px);
  box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.45), 0 0 30px -8px hsl(var(--hue) 100% 60% / 0.8);
  transition: transform 0.35s var(--spring);
}
.lyric-lock:hover { transform: scale(1.05); }
body:not([data-phase="play"]) .lyric-lock { pointer-events: none; }
.lyric-lock.on { pointer-events: auto; }

/* 번역 대체 모드: 번역 줄을 원문 크기로 */
body.tr-replace .line-tr { font-size: clamp(22px, 3.6vw, 44px); color: #fff; font-weight: 900; }

/* 무빙 가사: DOM 번역 줄이 가사 위치를 따라감 */
body.l-dynamic #subtitles { transition: top 0.6s var(--snap), left 0.6s var(--snap), opacity 0.8s; }

.sdk-card { display: flex; align-items: center; gap: 10px; padding: 10px; background: #0b0a12; font-size: 12px; color: var(--muted); }
.sdk-card img { width: 44px; height: 44px; border-radius: 8px; }

@media (max-width: 720px) {
  body[data-phase="play"] .account { top: auto; bottom: 92px; right: 16px; }
}

/* 번역 줄도 노래 속도에 맞춰 채워짐 */
.line-tr {
  --tp: 0%;
  background: linear-gradient(90deg, hsl(var(--hue) 100% 92%) var(--tp), hsl(var(--hue) 60% 80% / 0.55) var(--tp));
  -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.9));
}

.scene-name { min-width: 104px; text-align: center; font-size: 12.5px; font-weight: 700; white-space: nowrap; }


/* ───────── Liquid Glass (React Bits Glass Surface 계열) ─────────
   투명한 유리 + 가장자리 굴절(Chromium: SVG 변위 필터) + 위쪽 하이라이트 + 얇은 테두리 빛 */
.lg {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02) 40%, rgba(10,8,20,0.22)) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.7) brightness(1.06) !important;
  backdrop-filter: blur(16px) saturate(1.7) brightness(1.06) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.38),
    inset 0 -1px 0 rgba(255,255,255,0.08),
    inset 0 0 0 1px rgba(255,255,255,0.12),
    inset 0 0 24px rgba(255,255,255,0.05),
    0 24px 60px -24px rgba(0,0,0,0.7) !important;
}
.lg-refract {
  backdrop-filter: var(--lg-filter) blur(3px) saturate(1.8) brightness(1.08) !important;
}
#url-form.lg:focus-within {
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.45),
    inset 0 0 0 1px hsl(var(--hue) 100% 85% / 0.55),
    inset 0 0 30px hsl(var(--hue) 100% 70% / 0.12),
    0 0 50px -10px hsl(var(--hue) 100% 60% / 0.55) !important;
}

/* Star Border: 입력창 외곽을 도는 빛 한 점 */
@property --sb { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
#url-form::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.2px; pointer-events: none;
  background: conic-gradient(from var(--sb), transparent 0 76%, hsl(var(--hue) 100% 80% / 0.9) 87%, #fff 90%, transparent 95%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: starBorder 5.5s linear infinite;
}
@keyframes starBorder { to { --sb: 360deg; } }

/* Glare Hover: 표면을 가로지르는 광택 */
.glare { position: relative; overflow: hidden; }
.glare::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(-45deg, transparent 0 42%, rgba(255,255,255,0.38) 50%, transparent 58% 100%);
  background-size: 260% 260%; background-position: 100% 100%;
  transition: background-position 0.75s cubic-bezier(.2,.8,.2,1);
}
.glare:hover::after { background-position: 0% 0%; }

/* Magnet: translate 속성으로 끌림 (transform의 scale과 독립) */
.icon, .chip-btn, #url-form button, .account-btn, .seg.solo { transition: translate 0.45s cubic-bezier(.3,1.6,.4,1), transform 0.35s var(--spring), background 0.3s, box-shadow 0.3s, filter 0.3s; }

/* Click Spark 레이어 */
.spark-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

/* 유리 위 글자는 밝은 배경에서도 읽히게 */
.lg { text-shadow: 0 1px 8px rgba(0,0,0,0.45); }
/* Glare가 position:relative를 주므로 절대 위치 버튼은 되돌림 */
.auth-close.glare { position: absolute; }

/* ───────── 음량 조절 바: 얇은 유리 트랙 + 앨범 색 채움, 잡으면 굵어지고 값이 떠오름 ───────── */
.volume { gap: 6px; }
.vol-icon .x { display: none; }
.volume.muted .vol-icon .x { display: inline; }
.volume.muted .vol-icon .w1, .volume.muted .vol-icon .w2 { display: none; }
.volume.low .vol-icon .w2 { display: none; }
.volume.disabled { opacity: 0.4; }
.vol-track { position: relative; width: 108px; height: 24px; display: flex; align-items: center; }
.vrange {
  --v: 80%;
  -webkit-appearance: none; appearance: none; width: 100%; height: 4px; margin: 0; border-radius: 999px; cursor: pointer; outline: none;
  background:
    linear-gradient(90deg, hsl(var(--hue) 100% 78%), hsl(calc(var(--hue) + 60) 100% 72%)) 0 / var(--v) 100% no-repeat,
    rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 0 calc(var(--pulse) * 14px) hsl(var(--hue) 100% 65% / 0.6);
  transition: height 0.3s var(--spring);
}
.vol-track:hover .vrange, .vrange:active, .vrange:focus-visible { height: 7px; }
.vrange::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; border: 0;
  background: radial-gradient(circle at 35% 30%, #fff, hsl(var(--hue) 100% 88%) 60%, hsl(var(--hue) 80% 70%));
  box-shadow: 0 0 0 4px hsl(var(--hue) 100% 80% / 0.18), 0 2px 10px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s var(--spring);
}
.vrange::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; border: 0; background: #fff; }
.vol-track:hover .vrange::-webkit-slider-thumb, .vrange:active::-webkit-slider-thumb { transform: scale(1.25); }
.vrange:disabled { cursor: not-allowed; }
.vol-tip {
  position: absolute; left: var(--v, 80%); bottom: 22px; translate: -50% 6px; padding: 3px 7px; border-radius: 8px;
  font-family: var(--mono); font-size: 11px; pointer-events: none; opacity: 0; scale: 0.8;
  background: rgba(14, 10, 28, 0.8); box-shadow: inset 0 0 0 1px var(--line);
  transition: opacity 0.25s, translate 0.35s var(--spring), scale 0.35s var(--spring);
}
.vol-track:hover .vol-tip, .vol-track.dragging .vol-tip { opacity: 1; translate: -50% 0; scale: 1; }
@media (max-width: 720px) { .vol-track { width: 72px; } }
.vol-icon { width: 30px !important; height: 30px !important; flex: none; color: var(--fg); margin-right: 2px; }
.vol-icon svg { width: 17px; height: 17px; }

/* ───────── 위쪽: 지금 곡 + 노래 찾기 ───────── */
.now { display: flex; flex-direction: column; min-width: 0; flex: 1 1 180px; padding-left: 6px; line-height: 1.25; }
.now b { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search { position: relative; display: flex; align-items: center; gap: 8px; flex: 0 1 380px; min-width: 160px; padding: 0 12px; height: 38px; border-radius: 12px;
  background: rgba(0,0,0,0.25); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); transition: box-shadow .3s, flex-basis .5s var(--snap); }
.search:focus-within { flex-basis: 480px; box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.6), 0 0 26px -8px hsl(var(--hue) 100% 60% / 0.8); color: var(--fg); }
#search-input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13.5px; color: var(--fg); }
.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(420px, 60vh); overflow: auto; padding: 6px; border-radius: 16px; z-index: 20;
  display: none; flex-direction: column; gap: 2px; }
.search-results.open { display: flex; animation: dropIn .35s var(--snap); }
@keyframes dropIn { from { clip-path: inset(0 0 100% 0 round 16px); } to { clip-path: inset(0 0 0 0 round 16px); } }
.sr-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; cursor: pointer; color: var(--fg); }
.sr-item:hover, .sr-item.sel { background: rgba(255,255,255,0.08); }
.sr-item img { width: 64px; height: 36px; border-radius: 6px; object-fit: cover; flex: none; }
.sr-item .meta { flex: 1; min-width: 0; }
.sr-item b { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-item small { color: var(--muted); font-size: 11.5px; }
.sr-add { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 0; cursor: pointer; color: var(--fg); background: rgba(255,255,255,0.08); font-size: 16px; }
.sr-add:hover { background: hsl(var(--hue) 100% 70% / 0.3); }
.sr-msg { padding: 10px; font-size: 12.5px; color: var(--muted); }

/* ───────── 재생목록 ───────── */
.queue { margin-top: 10px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,0.08); }
.queue-head { display: flex; align-items: center; gap: 8px; padding: 0 2px 6px 6px; }
.queue-count { font-family: var(--mono); font-size: 11px; color: var(--muted); flex: 1; }
.queue-list { list-style: none; margin: 0; padding: 0; max-height: 210px; overflow: auto; display: flex; flex-direction: column; gap: 2px; }
.queue-list li { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 10px; cursor: pointer; transition: background .25s; }
.queue-list li:hover { background: rgba(255,255,255,0.07); }
.queue-list li.playing { background: hsl(var(--hue) 100% 70% / 0.16); box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.4); }
.queue-list li.drag-over { box-shadow: inset 0 2px 0 hsl(var(--hue) 100% 80%); }
.queue-list li.dragging { opacity: .4; }
.queue-list img { width: 44px; height: 26px; border-radius: 5px; object-fit: cover; flex: none; }
.queue-list .q-title { flex: 1; min-width: 0; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.queue-list .q-del { opacity: 0; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; }
.queue-list li:hover .q-del, .queue-list li:focus-within .q-del { opacity: 1; }
.queue-empty { margin: 4px 6px 2px; font-size: 11.5px; color: var(--muted); }
.queue-list:not(:empty) + .queue-empty { display: none; }

/* ───────── 재생 버튼 · AFK ───────── */
.transport { gap: 4px; }
.play-btn { width: 40px !important; height: 40px !important; border-radius: 50% !important;
  background: linear-gradient(135deg, hsl(var(--hue) 100% 78%), hsl(calc(var(--hue) + 60) 100% 70%)) !important; color: #0c0618; }
.play-btn .i-pause { display: none; }
.play-btn.playing .i-pause { display: block; }
.play-btn.playing .i-play { display: none; }
#afk-btn.active { color: #0c0618; background: linear-gradient(120deg, var(--accent), var(--accent-2)); box-shadow: 0 0 20px -4px hsl(var(--hue) 100% 60% / 0.8); }

/* 가사 대화상자 안의 다시 찾기 */
.refind { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.refind input { flex: 1 1 140px; min-width: 0; padding: 9px 10px; border: 0; border-radius: 10px; background: rgba(0,0,0,0.35); box-shadow: inset 0 0 0 1px var(--line); outline: none; font-size: 13px; }

/* 탭바 드래그 */
.seg-wrap { touch-action: none; }
.seg-wrap.seg-dragging .ind { transition: none; cursor: grabbing; }
.seg-wrap.seg-dragging { cursor: grabbing; }
.seg.seg-hover { color: var(--fg); }
.seg:focus-visible, .icon:focus-visible, .chip-btn:focus-visible { outline: 2px solid hsl(var(--hue) 100% 80%); outline-offset: 2px; }
#player-dock { max-height: calc(100vh - 170px); overflow: auto; }

#topbar { z-index: 6; }
#player-dock { z-index: 5; }

/* 위쪽 바 안의 드롭다운은 뒤 배경을 직접 굴절할 수 없어 짙은 유리로 */
.search-results.lg { background: linear-gradient(180deg, rgba(40,30,70,0.9), rgba(12,9,24,0.94)) !important; }

/* ───────── 정밀 싱크 안내 카드 ───────── */
.sync-card { position: absolute; left: 50%; bottom: 128px; translate: -50% 0; z-index: 7; display: flex; align-items: center; gap: 12px;
  width: min(560px, calc(100vw - 32px)); padding: 12px 12px 12px 16px; border-radius: 18px; pointer-events: none; }
.sync-card.on { pointer-events: auto; }
.sync-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sync-text b { font-size: 13.5px; }
.sync-text span { font-size: 12px; color: var(--muted); line-height: 1.45; }
@media (max-width: 720px) { .sync-card { bottom: 160px; } }

/* ───────── 관리자 ───────── */
.admin-box { margin: 4px 0 14px; padding: 12px; border-radius: 14px; background: rgba(0,0,0,0.28); box-shadow: inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.3); }
.admin-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.admin-head b { font-size: 13px; letter-spacing: .04em; }
.admin-status { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.admin-status.ok { color: hsl(150 80% 70%); }
.admin-status.bad { color: #ff8fa3; }
.admin-label { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; }
.admin-row { display: flex; gap: 6px; }
.admin-row input { flex: 1; min-width: 0; padding: 9px 10px; border: 0; border-radius: 10px; background: rgba(0,0,0,0.35); box-shadow: inset 0 0 0 1px var(--line); outline: none; font-family: var(--mono); font-size: 12px; }
.admin-row .chip-btn { padding: 7px 12px; }
.admin-msg { margin: 8px 0 0; min-height: 1.2em; font-size: 12px; color: var(--muted); }

/* ───────── 관리자 탭 · 사용자 · 사용량 · 기록 · 안내 ───────── */
.auth.wide-panel { width: min(620px, calc(100vw - 32px)); }
.admin-tabs { width: 100%; margin-bottom: 10px; }
.admin-tabs .seg { flex: 1; padding: 6px 4px; font-size: 12px; }
.users-list { display: flex; flex-direction: column; gap: 6px; max-height: 300px; overflow: auto; }
.user-row { display: flex; align-items: center; gap: 6px; padding: 8px; border-radius: 10px; background: rgba(255,255,255,0.04); }
.u-meta { flex: 1; min-width: 0; }
.u-meta b { display: block; font-size: 13px; }
.u-meta small { color: var(--muted); font-size: 11px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-row .chip-btn { padding: 5px 9px; font-size: 11.5px; }
.chip-btn.danger { color: #ff9aa9; }
.usage-month { margin-bottom: 10px; }
.usage-month b { font-size: 12.5px; }
.usage-month table { width: 100%; border-collapse: collapse; margin-top: 4px; font-size: 12px; }
.usage-month td { padding: 4px 2px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.usage-month td:last-child { text-align: right; font-family: var(--mono); }
.events-list { list-style: none; margin: 0; padding: 0; max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.events-list li { display: flex; flex-direction: column; padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,0.04); font-size: 12.5px; }
.events-list small { color: var(--muted); font-size: 11px; word-break: break-all; }
.ev-analysis-on { color: hsl(150 80% 70%); } .ev-analysis-off { color: #ffb38a; }
.guide { font-size: 12.5px; line-height: 1.6; }
.guide details { margin-bottom: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.04); }
.guide summary { cursor: pointer; font-weight: 700; }
.guide ol { margin: 6px 0 4px; padding-left: 18px; }
.guide p { margin: 6px 0; color: var(--muted); }
.guide code { font-family: var(--mono); font-size: 11.5px; padding: 1px 5px; border-radius: 5px; background: rgba(0,0,0,0.35); word-break: break-all; }
.pw-box { margin-bottom: 12px; }
.pw-box summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.pw-form { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.pw-form input { padding: 10px 12px; border: 0; border-radius: 10px; background: rgba(0,0,0,0.3); box-shadow: inset 0 0 0 1px var(--line); outline: none; font-size: 13px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline; padding: 4px; }
.mobile-note { max-width: 420px; padding: 16px 18px; border-radius: 18px; display: flex; flex-direction: column; gap: 6px; text-align: center; }
.mobile-note b { font-size: 15px; }
.mobile-note span { font-size: 13px; color: var(--muted); line-height: 1.55; }

/* 마우스가 멈춰 다른 UI가 숨을 때 계정 아이콘도 같이 */
.account { transition: opacity 0.6s ease; }
body.idle .account { opacity: 0; pointer-events: none; }
body.idle .account-btn { pointer-events: none !important; }

/* 효과 밝기 */
.glow { gap: 6px; color: var(--muted); }
.glow-icon { opacity: 0.8; }
.glow-track { width: 84px; }
@media (max-width: 720px) { .glow-track { width: 60px; } }

/* 자막(번역 줄) 더 잘 보이게: 더 밝은 글자 + 겹친 그림자 테두리 (글자 안 채움 방식이라 filter로) */
.line-tr {
  font-weight: 800; letter-spacing: 0.01em;
  background: linear-gradient(90deg, #fff var(--tp), hsl(var(--hue) 50% 86% / 0.62) var(--tp));
  -webkit-background-clip: text; background-clip: text;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 1)) drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.95)) drop-shadow(0 2px 12px rgba(0, 0, 0, 0.9));
}
.line-side { color: rgba(255, 255, 255, 0.55); }

/* ───────── 아래 바: 간소화 + 눈이 편하게 (차분한 어두운 유리, 은은한 강조) ───────── */
#controls { gap: 6px 14px; padding: 6px 10px; }
/* 하단 바·설정 창: 다른 패널과 같은 liquid glass (굴절 유리) — 글자가 잘 읽히게 아래쪽만 살짝 더 어둡게 */
#controls.lg, #settings-pop.lg {
  background: linear-gradient(180deg, rgba(255,255,255,0.09), rgba(255,255,255,0.02) 45%, rgba(10,8,20,0.32)) !important;
}
#controls, .settings-pop { --muted: rgba(235, 230, 250, 0.58); color: rgba(240, 236, 252, 0.88); }
#controls .seg-wrap .ind, .settings-pop .seg-wrap .ind {
  background: rgba(255, 255, 255, 0.12); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}
#controls .seg.solo.active, .settings-pop .seg.solo.active { background: rgba(255, 255, 255, 0.13); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
#controls .seg.solo { background: transparent; }
#controls .seg.solo:hover { background: rgba(255, 255, 255, 0.08); }
#controls select { background: transparent; color: inherit; padding: 5px 4px; }
#controls select:hover { background: rgba(255, 255, 255, 0.07); }
.ctl-icon { opacity: 0.7; }
.settings-btn { opacity: 0.8; }
.settings-btn[aria-expanded="true"] { opacity: 1; background: rgba(255, 255, 255, 0.12); }

/* 설정 패널: 아래 바 위에 뜸 */
.settings-pop {
  position: absolute; left: 50%; bottom: 74px; z-index: 3; width: min(460px, calc(100vw - 32px));
  display: grid; gap: 4px; padding: 12px 14px; border-radius: 18px;
  background: rgba(16, 12, 28, 0.6);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 60px -20px rgba(0, 0, 0, 0.85);
  opacity: 0; pointer-events: none; translate: -50% 10px; scale: 0.98; transform-origin: 50% 100%;
  transition: opacity 0.28s ease, translate 0.35s var(--spring), scale 0.35s var(--spring);
}
.settings-pop.open { opacity: 1; translate: -50% 0; scale: 1; }
body[data-phase="play"] .settings-pop.open { pointer-events: auto; }
body.idle .settings-pop { opacity: 0; pointer-events: none !important; }
.srow { display: flex; align-items: center; gap: 8px; min-height: 36px; flex-wrap: wrap; }
.srow + .srow { border-top: 1px solid rgba(255, 255, 255, 0.05); }
.slabel { width: 74px; flex: none; font-size: 12px; color: var(--muted); }
.srow .glow-track { width: 150px; }
.srow-btns { justify-content: flex-end; padding-top: 6px; }
.srow-btns .seg.solo { background: rgba(255, 255, 255, 0.05); }
@media (max-width: 720px) { .settings-pop { bottom: 64px; } .slabel { width: 64px; } }

/* 가사 크기: 텍스트 자막도 같은 배율 */
#subtitles { --ls: 1; }
.line-cur { font-size: calc(clamp(26px, 4.6vw, 60px) * var(--ls)); }
.line-tr { font-size: calc(clamp(16px, 2.4vw, 28px) * var(--ls)); }
body.tr-replace .line-tr { font-size: calc(clamp(22px, 3.6vw, 44px) * var(--ls)); }

/* 가사 끄기 */
body.lyrics-off #subtitles, body.lyrics-off .lyric-lock { opacity: 0 !important; pointer-events: none; }

/* 준비 중인 연동: 흐리게 */
li.soon { opacity: 0.55; }
li.soon .st { font-size: 12px; }
/* 설정 창은 글이 많아서 유리를 조금 더 어둡게 (뒤 가사가 덜 비침) */
#settings-pop.lg { background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(14,10,26,0.42) 40%, rgba(10,8,20,0.55)) !important; }
/* 플레이어 창: 유튜브·스포티파이 플레이어(다른 사이트 창)가 굴절 필터에 휘말려 흐려지는 크롬 문제 → 굴절만 빼고 유리 느낌(흐림·광택)은 유지 */
#player-dock.lg-refract {
  -webkit-backdrop-filter: blur(16px) saturate(1.7) brightness(1.06) !important;
  backdrop-filter: blur(16px) saturate(1.7) brightness(1.06) !important;
}

/* ───────── 버튼 liquid glass: 위쪽 반사광 + 빛 테두리 + 뒤 배경 흐림·채도 ───────── */
.icon, .seg.solo, .chip-btn.ghost, .resume-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.17), rgba(255, 255, 255, 0.04) 52%, rgba(255, 255, 255, 0.07)) !important;
  -webkit-backdrop-filter: blur(8px) saturate(1.7) brightness(1.08);
  backdrop-filter: blur(8px) saturate(1.7) brightness(1.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.42),
    inset 0 -1px 0 rgba(255, 255, 255, 0.07),
    inset 0 0 0 1px rgba(255, 255, 255, 0.13),
    0 4px 14px -6px rgba(0, 0, 0, 0.55);
}
.icon:hover, .seg.solo:hover, .chip-btn.ghost:hover, .resume-card:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.07) 52%, hsl(var(--hue) 100% 70% / 0.12)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    inset 0 0 0 1px hsl(var(--hue) 100% 80% / 0.45),
    0 0 18px -4px hsl(var(--hue) 100% 65% / 0.55),
    0 4px 14px -6px rgba(0, 0, 0, 0.55);
}
.seg.solo.active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.09) 52%, hsl(var(--hue) 100% 70% / 0.16)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 0 0 1px hsl(var(--hue) 100% 82% / 0.5) !important;
}
/* 선택 표시(세그먼트 안 움직이는 칸)도 같은 유리 */
.seg-wrap .ind, #controls .seg-wrap .ind, .settings-pop .seg-wrap .ind {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.07) 55%, hsl(var(--hue) 100% 70% / 0.12)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.16), 0 3px 10px -5px rgba(0, 0, 0, 0.5) !important;
}
/* 색 있는 버튼(재생 · 연결 · 링크 재생): 색은 그대로, 위에 유리 광택만 */
.chip-btn:not(.ghost), #url-form button, .play-btn {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.6),
    inset 0 -2px 6px rgba(0, 0, 0, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.25),
    0 6px 18px -8px hsl(var(--hue) 100% 55% / 0.7);
}
.chip-btn:not(.ghost) { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%), linear-gradient(120deg, var(--accent), var(--accent-2)); }
#url-form button { background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0) 55%), linear-gradient(120deg, var(--accent), var(--accent-2)); }
.play-btn { background: linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 55%), linear-gradient(135deg, hsl(var(--hue) 100% 78%), hsl(calc(var(--hue) + 60) 100% 70%)) !important; }

#login-hint { display: none !important; }
/* 관리자: 예산 · 오류 */
.budget-box { display: grid; gap: 8px; padding: 10px 12px; margin-bottom: 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08); }
.budget-box.warn { box-shadow: inset 0 0 0 1px rgba(255, 200, 90, 0.6); background: rgba(255, 190, 60, 0.08); }
.budget-box.over { box-shadow: inset 0 0 0 1px rgba(255, 110, 130, 0.7); background: rgba(255, 90, 110, 0.1); }
.budget-bar { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.budget-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.budget-box.warn .budget-bar i { background: #ffc35a; }
.budget-box.over .budget-bar i { background: #ff6e82; }
.budget-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.budget-row input[type="number"] { width: 90px; padding: 6px 8px; border-radius: 8px; border: 0; background: rgba(0, 0, 0, 0.3); color: inherit; }
.err-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.errors-list li { display: grid; gap: 2px; }
.errors-list .e-msg { font-size: 12.5px; word-break: break-word; }
.errors-list .e-where { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 110, 130, 0.18); color: #ffb3c0; margin-right: 6px; }
.errors-list .e-where.browser { background: rgba(120, 170, 255, 0.18); color: #b9d0ff; }
