/* 마루부리 — 감상 노트 카드 전용 서체 */
@font-face { font-family: "MaruBuri"; font-weight: 400; font-display: swap; src: url("fonts/MaruBuri-Regular.otf") format("opentype"); }
@font-face { font-family: "MaruBuri"; font-weight: 600; font-display: swap; src: url("fonts/MaruBuri-SemiBold.otf") format("opentype"); }
@font-face { font-family: "MaruBuri"; font-weight: 700; font-display: swap; src: url("fonts/MaruBuri-Bold.otf") format("opentype"); }

* { box-sizing: border-box; margin: 0; padding: 0; }
button, input, textarea, select { font-family: inherit; }
/* hidden 속성은 항상 이겨야 함 — display:flex 등을 지정하는 클래스(.paste-btn 등)와
   특정도가 같아서 CSS 순서에 따라 hidden이 무시되는 문제를 근본적으로 막는다. */
[hidden] { display: none !important; }

:root {
  --bg: #0f0c08;
  --ink: #ece5d8;
  --ink-bright: #f3ecde;
  --ink-2: #c8bda6;
  --muted: #a99d84;
  --dim: #8a7d63;
  --dimmest: #6b614b;
  --past: #7e735a;
  --accent: #c9a86a;
  --accent-bright: #dcc08a;
  --brass-07: rgba(196, 160, 104, 0.07);
  --brass-10: rgba(196, 160, 104, 0.10);
  --brass-18: rgba(196, 160, 104, 0.18);
  --brass-24: rgba(196, 160, 104, 0.24);
  --brass-30: rgba(196, 160, 104, 0.30);
  --line: rgba(201, 189, 163, 0.14);
  --line-2: rgba(201, 189, 163, 0.10);
  --panel: rgba(38, 30, 18, 0.55);
  --panel-solid: #201910;
  --like: #d75f4e;
  --play-shadow: 0 10px 26px rgba(201, 168, 106, 0.4), inset 0 2px 3px rgba(255,255,255,.35), inset 0 -3px 6px rgba(0,0,0,.18);
  --font: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", -apple-system, sans-serif;
}

body {
  font-family: var(--font);
  /* 위쪽에 은은한 황동빛 앰비언트 — 디자인 시안의 radial glow */
  background: radial-gradient(90% 46% at 50% 16%, rgba(196,160,104,.09), transparent 65%) fixed, var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

.app {
  position: relative;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: calc(12px + env(safe-area-inset-top)) 24px calc(10px + env(safe-area-inset-bottom));
  gap: 0;
  overflow: hidden;
}
/* warm vignette + faint top glow */
.vignette {
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(115% 55% at 50% -10%, rgba(196,160,104,.11), transparent 58%),
    radial-gradient(140% 75% at 50% 118%, rgba(0,0,0,.55), transparent 52%);
}
.app > *:not(.vignette):not(.home-actions):not(.drawer) { position: relative; z-index: 1; }
.hidden { display: none !important; }

/* visibility by mode */
body:not(.playing) .playing-only { display: none !important; }
body.playing .onboard { display: none !important; }

/* brand kicker */
.kicker {
  text-align: center;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4em;
  color: var(--dim);
  padding: 6px 0 2px;
  flex: 0 0 auto;
}

/* ============ ONBOARDING (home) ============ */
.onboard {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.emblem {
  width: 86px; height: 86px; margin: 34px auto 0;
  border-radius: 50%;
  border: 1px solid var(--brass-30);
  background: radial-gradient(120% 120% at 30% 22%, rgba(196,160,104,.14), rgba(196,160,104,.04));
  display: flex; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 12px 34px rgba(0,0,0,.5);
  animation: halo 5.5s ease-in-out infinite;
}
.emblem i { width: 4px; border-radius: 2px; background: var(--accent-bright); display: block; transform-origin: center; animation: eqBar 2.4s ease-in-out infinite; }
.emblem i:nth-child(1){ height: 17px; }
.emblem i:nth-child(2){ height: 32px; animation-delay: .35s; }
.emblem i:nth-child(3){ height: 24px; animation-delay: .7s; }
.emblem i:nth-child(4){ height: 36px; animation-delay: 1.05s; }
.emblem i:nth-child(5){ height: 20px; animation-delay: 1.4s; }
.onboard .kicker { margin-top: 22px; }
.headline {
  font-size: 17.5px; font-weight: 700; line-height: 1.6; text-align: center;
  margin-top: 14px; color: var(--ink-bright); letter-spacing: -.01em; text-wrap: balance; word-break: keep-all;
}
.subhead {
  font-size: 12px; color: var(--muted); line-height: 1.8; text-align: center;
  margin: 9px auto 0; max-width: 280px; word-break: keep-all; text-wrap: pretty;
}

/* link input */
.yt-form {
  display: flex; align-items: center; gap: 10px; margin-top: 26px;
  background: rgba(38,30,18,.6); border: 1px solid var(--brass-24);
  border-radius: 999px; padding: 4px 4px 4px 18px;
  box-shadow: 0 10px 26px rgba(0,0,0,.35);
}
.yt-form .link-ic { font-size: 16px; color: var(--dim); flex: 0 0 auto; }
.yt-form input {
  flex: 1; min-width: 0; background: none; border: none; color: var(--ink);
  font-size: 14.5px; padding: 8px 0;
}
.yt-form input::placeholder { color: var(--dimmest); }
.yt-form input:focus { outline: none; }
.btn-play-sq {
  width: 40px; height: 40px; border-radius: 50%; flex: 0 0 auto; border: none;
  background: var(--accent-bright); color: #1a140b; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
  box-shadow: 0 8px 18px rgba(196,160,104,.35), inset 0 2px 3px rgba(255,255,255,.45), inset 0 -3px 6px rgba(0,0,0,.18);
}
.btn-play-sq svg { width: 17px; height: 17px; fill: currentColor; }
.paste-btn {
  display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%;
  margin-top: 11px; background: none; border: 1px dashed var(--brass-30);
  border-radius: 14px; padding: 11px; color: var(--accent-bright);
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.paste-btn svg { width: 15px; height: 15px; }
.paste-btn:active { background: var(--brass-07); }

/* ============ NOW PLAYING HEADER ============ */
.np-header { display: flex; gap: 15px; align-items: flex-start; margin-top: 18px; flex: 0 0 auto; }
.np-cover {
  width: 60px; height: 60px; border-radius: 14px; flex: 0 0 auto; overflow: hidden;
  background: linear-gradient(150deg, #2b2214, #20190f);
  border: 1px solid var(--brass-24); box-shadow: 0 10px 24px rgba(0,0,0,.5);
}
.np-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.np-meta { min-width: 0; padding-top: 1px; flex: 1; }
.np-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .2em; color: var(--accent-bright); text-transform: uppercase; }
.np-title {
  margin-top: 6px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 90%, transparent);
}
.np-title-track { display: inline-flex; white-space: nowrap; }
.np-title-track.scroll { animation: marquee 15s linear infinite; will-change: transform; }
.np-title-span { font-size: 18px; line-height: 1.34; font-weight: 700; color: var(--ink-bright); letter-spacing: -.02em; }
.np-title-track.scroll .np-title-span { padding-right: 48px; }
.np-channel { font-size: 12.5px; color: var(--muted); margin-top: 6px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ CHAPTER SEEKBAR ============ */
.seek { margin-top: 22px; flex: 0 0 auto; }
.seek-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.seek-chapter { font-size: 12.5px; font-weight: 700; color: var(--accent-bright); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seek-time { font-size: 12.5px; color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.seek-track { position: relative; height: 3px; border-radius: 3px; background: rgba(201,189,163,.18); margin-top: 11px; cursor: pointer; }
/* 넉넉한 탭 영역 (얇은 바를 쉽게 누르도록) */
.seek-track::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: -12px; }
.seek-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0%; border-radius: 3px; background: var(--accent); transition: width .4s linear; pointer-events: none; }
.seek-thumb { position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%); width: 11px; height: 11px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(196,160,104,.16); transition: left .4s linear; pointer-events: none; }
.seek-markers { position: absolute; inset: 0; }
.seek-marker { position: absolute; top: 50%; transform: translate(-50%, -50%); width: 4.5px; height: 4.5px; border-radius: 50%; background: rgba(201,189,163,.45); pointer-events: auto; cursor: pointer; }
/* 마커를 누르면 뜨는 악장 이름 라벨 */
.seek-tip { position: absolute; bottom: 15px; transform: translateX(-50%); background: #2b2114; border: 1px solid var(--brass-30); color: var(--ink-bright); font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 8px; white-space: nowrap; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: 0; transition: opacity .15s; box-shadow: 0 6px 16px rgba(0,0,0,.55); z-index: 2; }
.seek-tip.show { opacity: 1; }
.seek-marker::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; }

/* hairline */
.hairline { height: 1px; background: linear-gradient(90deg, transparent, rgba(201,189,163,.2), transparent); margin: 22px 0 2px; flex: 0 0 auto; }

/* ============ TABS (둥근 세그먼트) ============ */
/* 밑줄 선택 탭 (버튼 배경 없이 텍스트 + 슬라이딩 밑줄) */
.tabs {
  display: flex; gap: 4px; margin-top: 18px; flex: 0 0 auto;
  position: relative; background: none; border: none; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0;
}
.tab {
  flex: 1; text-align: center; background: none; border: none; padding: 10px 0 12px; font-size: 13px; font-weight: 600;
  color: var(--dim); cursor: pointer; border-radius: 0; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  transition: color .18s;
}
.tab.active { color: var(--ink-bright); font-weight: 800; background: none; }
.tab-underline {
  position: absolute; bottom: -1px; left: 0; width: 0; height: 2px;
  background: var(--accent); border-radius: 2px; pointer-events: none;
  transition: left .28s cubic-bezier(.22,1,.36,1), width .28s cubic-bezier(.22,1,.36,1);
}
@media (prefers-reduced-motion: reduce) { .tab-underline { transition: none; } }

/* 작곡가·연주자 정보 탭 — 인물 설명 카드 */
.info-pane { padding: 12px 0 16px; overflow-y: auto; }
.info-empty { color: var(--dimmest); font-style: italic; font-size: 13.5px; padding: 40px 8px; text-align: center; line-height: 1.7; }
.pcard { display: block; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--brass-18); border-radius: 16px; padding: 15px; margin-bottom: 13px; cursor: pointer; color: inherit; font: inherit; -webkit-tap-highlight-color: transparent; }
.pcard:active { background: var(--brass-07); }
.pcard.playing { border-color: var(--brass-30); box-shadow: inset 0 0 0 1px var(--brass-24); }
.pcard-head { display: flex; gap: 13px; align-items: center; }
.pcard-photo { width: 54px; height: 54px; border-radius: 50%; flex: 0 0 auto; overflow: hidden; display: flex; align-items: center; justify-content: center; background: linear-gradient(150deg,#3a2e1a,#2a2012); border: 1px solid var(--brass-24); color: var(--accent-bright); font-size: 20px; font-weight: 800; }
.pcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.pcard-meta { flex: 1; min-width: 0; }
.pcard-name { font-size: 15.5px; font-weight: 800; color: var(--ink-bright); letter-spacing: -.01em; }
.pcard.playing .pcard-name { color: var(--accent-bright); }
.pcard-life { font-size: 11.5px; color: var(--accent-bright); margin-top: 2px; font-variant-numeric: tabular-nums; }
.pcard-time { font-size: 11.5px; color: var(--muted); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-desc { font-size: 13.5px; line-height: 1.72; color: var(--ink-2); margin-top: 12px; white-space: pre-wrap; }
/* 한 인물 카드 안에 묶인 곡 리스트 (연달아 나오는 같은 작곡가/연주자의 곡들) */
.pcard-tracks { margin-top: 12px; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--brass-18); padding-top: 8px; }
.pcard-track {
  display: block; width: 100%; text-align: left; background: none; border: none; color: var(--muted);
  font: inherit; font-size: 12.5px; line-height: 1.5; padding: 7px 8px; border-radius: 8px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -webkit-tap-highlight-color: transparent;
}
.pcard-track:active { background: var(--brass-07); }
.pcard-track.playing { color: var(--accent-bright); background: var(--brass-07); font-weight: 700; }

.panes { flex: 1 1 auto; min-height: 0; display: flex; }
.pane { flex: 1; overflow-y: auto; min-height: 0; padding: 18px 0 14px; }
.pane:not(.active) { display: none; }

/* ============ 해설: liner-note commentary ============ */
.transcript { display: flex; flex-direction: column; gap: 22px; }
.liner { position: relative; display: flex; flex-direction: column; }
/* 북마크·공유 버튼은 해설 맨 끝 오른쪽에 붙이되, 해설 텍스트에 가깝게 위로 당김 */
.liner-actions { align-self: flex-end; display: flex; gap: 2px; margin-top: 4px; }
.liner-bk, .liner-share {
  width: 40px; height: 30px; margin-top: 0; border: none; background: none; padding: 0;
  color: var(--dimmest); cursor: pointer; display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent; transition: transform .1s, color .15s;
}
.liner-bk svg, .liner-share svg { width: 18px; height: 18px; }
.liner-bk:active, .liner-share:active { transform: scale(.85); }
.liner-bk.on { color: var(--accent-bright); }

/* 튜터 생각 중 타이핑 인디케이터 */
.typing { display: inline-flex; gap: 5px; align-items: center; padding: 3px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); display: block; opacity: .5; animation: typingDot 1.1s ease-in-out infinite; }
.typing i:nth-child(2){ animation-delay: .18s; } .typing i:nth-child(3){ animation-delay: .36s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* 토스트 (북마크 저장 등 짧은 피드백) */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(10px); z-index: 90;
  background: #2b2114; border: 1px solid var(--brass-30); color: var(--ink-bright);
  font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 12px 30px rgba(0,0,0,.5); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
/* 문단별 퀄리티 배지는 더 이상 쓰지 않음 (해설 탭 좌상단 단일 배지로 통합) */
.liner-quality { display: none !important; }
/* 해설 탭 우상단 음성 퀄리티 배지 (스크롤해도 상단 고정, 해설 탭에서만) */

/* 곡 정보 카드 (재생 화면, 트랜스포트 위) */
.song-info-card {
  display: flex; align-items: center; gap: 13px; width: 100%; flex: 0 0 auto;
  background: rgba(196,160,104,.07); border: 1px solid rgba(196,160,104,.18); border-radius: 16px;
  padding: 12px 14px; margin-top: 8px; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent;
}
.song-info-card:active { background: rgba(196,160,104,.12); }
.song-info-card.hidden { display: none; }
.sic-cover {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto; font-size: 18px; color: #a58f5f;
  background: linear-gradient(150deg,#2b2214,#20190f); border: 1px solid rgba(196,160,104,.22);
  display: flex; align-items: center; justify-content: center;
}
.sic-cover img { width: 100%; height: 100%; object-fit: cover; border-radius: 11px; }
.sic-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.sic-title { font-size: 12.5px; font-weight: 700; color: var(--ink-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sic-sub { font-size: 11.5px; color: #a99d84; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.sic-more { flex: 0 0 auto; font-size: 12px; font-weight: 700; color: var(--accent-bright); white-space: nowrap; }
.liner-time { font-size: 11px; font-weight: 700; letter-spacing: .14em; color: var(--dim); }
.liner.now .liner-time { color: var(--accent); }
.liner-time.seekable { cursor: pointer; }
.liner-time.seekable:active { color: var(--accent-bright); }
.liner .para { margin: 6px 0 0; font-size: 15.5px; line-height: 1.62; letter-spacing: -.01em; color: var(--muted); white-space: pre-wrap; transition: color .4s; }
.liner.now .para { color: var(--ink-bright); font-weight: 400; }
.liner.past .para { color: var(--muted); }
/* 지금 낭독 중인 문단만 볼드 강조 */
.say-now { font-weight: 700; color: var(--ink-bright); }

/* '지금으로' 복귀 버튼 (해설 탭·재생 중, 위로 스크롤했을 때만) */
.jump-now {
  position: fixed; left: 50%; bottom: calc(98px + env(safe-area-inset-bottom)); z-index: 40;
  transform: translateX(-50%) translateY(8px);
  background: var(--accent-bright); color: #1a140b; border: none;
  font-size: 12.5px; font-weight: 700; padding: 9px 17px; border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0,0,0,.5); cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.jump-now.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
body:not(.playing) .jump-now, body:not([data-tab="transcript"]) .jump-now { display: none; }
.transcript-hint { color: var(--dimmest); font-style: italic; font-size: 14px; line-height: 1.7; }

/* ============ 질문: chat ============ */
.chat { display: flex; flex-direction: column; gap: 16px; }
.bubble { max-width: 86%; align-self: flex-start; }
.bubble.user { max-width: 82%; align-self: flex-end; }
.bubble-head { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.bubble-eq { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--brass-30); background: var(--brass-10); display: flex; align-items: center; justify-content: center; gap: 1.5px; }
.bubble-eq i { width: 2px; background: var(--accent-bright); border-radius: 1px; display: block; }
.bubble-eq i:nth-child(1){ height: 5px; } .bubble-eq i:nth-child(2){ height: 9px; } .bubble-eq i:nth-child(3){ height: 6px; }
.bubble-name { font-size: 11px; font-weight: 700; color: var(--accent-bright); }
.bubble-tag { font-size: 10px; font-weight: 600; color: var(--dim); background: var(--brass-10); padding: 2px 7px; border-radius: 6px; }
.bubble .msg { font-size: 14.5px; line-height: 1.7; white-space: pre-wrap; }
.bubble.assistant .msg { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; border-top-left-radius: 5px; padding: 12px 14px; color: var(--ink); }
.bubble.user .msg { background: var(--accent-bright); color: #1a140b; border-radius: 16px; border-top-right-radius: 5px; padding: 12px 14px; font-weight: 500; }
.bubble .msg.error { background: none; border: none; padding: 0; color: var(--like); }

/* ============ COMPOSER POPUP CARD ============ */
.cpop { position: fixed; inset: 0; z-index: 65; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.cpop.hidden { display: none; }
.cpop-card { position: relative; width: 100%; max-width: 340px; background: #1f1810; border: 1px solid var(--brass-24); border-radius: 22px; padding: 26px 22px 20px; text-align: center; box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.cpop-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--dim); font-size: 15px; cursor: pointer; padding: 4px; }
.cpop-avatar { width: 60px; height: 60px; border-radius: 50%; margin: 0 auto 14px; background: linear-gradient(150deg, #3a2e1a, #2a2012); border: 1px solid var(--brass-24); display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 800; color: var(--accent-bright); overflow: hidden; }
.cpop-avatar.has-photo { background: #2a2012; }
.cpop-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 유튜브가 아닌 링크: 화난 튜터 모달 */
.link-error { position: fixed; inset: 0; z-index: 95; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.link-error.hidden { display: none; }
.link-error-card { display: flex; flex-direction: column; align-items: center; gap: 13px; text-align: center; padding: 28px; animation: angryShake .5s ease; }
.link-error-img { width: 122px; height: 122px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent-bright); box-shadow: 0 14px 36px rgba(0,0,0,.6); }
.link-error-title { font-size: 14.5px; font-weight: 700; color: var(--muted); }
.link-error-msg { font-size: 21px; font-weight: 800; color: var(--ink-bright); letter-spacing: -.02em; }
@keyframes angryShake { 0%,100%{transform:translateX(0)} 15%{transform:translateX(-9px) rotate(-2deg)} 35%{transform:translateX(9px) rotate(2deg)} 55%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }
.cpop-composer { font-size: 18px; font-weight: 800; color: var(--ink-bright); letter-spacing: -.01em; }
.cpop-life { font-size: 12px; font-weight: 500; color: var(--muted); }
.cpop-piece { font-size: 15px; font-weight: 700; color: var(--ink); margin-top: 4px; line-height: 1.4; }
.cpop-perf { font-size: 12.5px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.cpop-perf:empty { display: none; }
.cpop-note { font-size: 12.5px; color: var(--accent-bright); margin-top: 14px; line-height: 1.6; }
.cpop-note:empty { display: none; }
.cpop-more { margin-top: 18px; background: var(--brass-10); border: 1px solid var(--brass-24); color: var(--accent-bright); border-radius: 12px; padding: 10px 18px; font-size: 13px; font-weight: 700; cursor: pointer; }
.cpop-related { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--brass-18); text-align: left; }
.cpop-related.hidden { display: none; }
.cpop-related-title { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--dim); text-transform: uppercase; margin-bottom: 8px; }
.cpop-related-row { display: flex; flex-direction: column; gap: 2px; width: 100%; background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 12px; padding: 9px 12px; margin-top: 6px; text-align: left; cursor: pointer; }
.cpop-related-row:active { background: var(--brass-10); }
.cpop-related-piece { font-size: 13px; font-weight: 700; color: var(--ink-bright); }
.cpop-related-reason { font-size: 11.5px; color: var(--muted); }

/* ============ NOTE BUTTON + SHEET ============ */
.note-btn { position: relative; width: 44px; height: 44px; flex: 0 0 auto; border: none; background: none; color: var(--dim); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; -webkit-tap-highlight-color: transparent; }
.note-btn svg { width: 21px; height: 21px; }
.note-btn:active { transform: scale(.9); }
.note-count { position: absolute; top: -2px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #1a140b; font-size: 10px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.note-count[hidden] { display: none; }

.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.5); } /* 설정 화면(z70)보다 위에 떠야 요금제 시트가 바로 보임 */
.sheet-panel {
  width: 100%; max-width: 440px; background: #1c160e; border: 1px solid var(--brass-18);
  border-radius: 22px 22px 0 0; padding: 18px 20px calc(20px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px; max-height: 76vh;
  box-shadow: 0 -12px 40px rgba(0,0,0,.6);
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-title { font-size: 15px; font-weight: 800; color: var(--ink-bright); }
.sheet-close { background: none; border: none; color: var(--dim); font-size: 16px; cursor: pointer; padding: 4px; }

/* 감상 노트 상세/편집 */
.memo-panel { gap: 10px; }
.memo-time { font-size: 15px; font-weight: 800; color: var(--accent-bright); font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.memo-chapter { font-size: 12.5px; color: var(--muted); }
.memo-quote-label, .memo-memo-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--dim); margin-top: 4px; }
.memo-quote {
  margin: 0; padding: 12px 14px; background: var(--panel); border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; font-size: 14px; line-height: 1.7; color: var(--ink-2); font-style: italic;
}
.memo-input {
  width: 100%; box-sizing: border-box; background: rgba(0,0,0,.28); border: 1px solid var(--brass-18);
  border-radius: 12px; padding: 12px; color: var(--ink); font: inherit; font-size: 14px; line-height: 1.6; resize: vertical;
}
.memo-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(201,168,106,.18); }
.memo-count { text-align: right; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
.memo-actions { display: flex; gap: 10px; }
.memo-actions .paste-btn, .memo-actions .sub-cta { flex: 1; }
.note-compose { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "chip text" "chip save"; gap: 8px 10px; align-items: start; background: var(--panel); border: 1px solid var(--brass-18); border-radius: 14px; padding: 12px; }
.note-time-chip { grid-area: chip; align-self: start; font-size: 11.5px; font-weight: 800; color: var(--accent-bright); background: var(--brass-10); border: 1px solid var(--brass-24); padding: 5px 9px; border-radius: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.note-input { grid-area: text; background: none; border: none; color: var(--ink); font-size: 14px; line-height: 1.6; resize: none; }
.note-input:focus { outline: none; }
.note-input::placeholder { color: var(--dimmest); }
.note-save { grid-area: save; justify-self: end; background: var(--accent-bright); color: #1a140b; border: none; border-radius: 10px; padding: 7px 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.note-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
.note-item { display: flex; gap: 11px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.note-item-time { flex: 0 0 auto; font-size: 11.5px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; background: var(--brass-07); border: 1px solid var(--brass-18); padding: 4px 8px; border-radius: 7px; cursor: pointer; }
.note-item-text { flex: 1; font-size: 13.5px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; background: none; border: none; -webkit-appearance: none; appearance: none; text-align: left; padding: 0; margin: 0; font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.note-item-del { flex: 0 0 auto; background: none; border: none; color: var(--dimmest); font-size: 13px; cursor: pointer; padding: 2px 4px; }
.note-empty { color: var(--dimmest); font-size: 13px; font-style: italic; padding: 14px 2px; text-align: center; }

/* ============ 요금제 선택 (스와이프 카드) ============ */
.plan-panel { max-height: 88vh; }
.plan-carousel {
  display: flex; flex-direction: column; gap: 12px; overflow-y: auto;
  scrollbar-width: none; margin: 0; padding: 2px 0 6px; max-height: 52vh;
}
.plan-carousel::-webkit-scrollbar { display: none; }
.plan-card {
  flex: none; background: var(--panel); cursor: pointer;
  border: 1px solid var(--brass-18); border-radius: 20px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 8px; box-sizing: border-box;
}
.plan-card.selected { border-color: var(--accent-bright); box-shadow: 0 0 0 1px var(--accent-bright) inset; }
.plan-card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 12px 30px rgba(201,168,106,.12); }
/* 곧 출시되는 PRO — 눈에 띄는 골드 */
.plan-card.gold { border-color: #e6c25f; background: linear-gradient(160deg, rgba(230,194,95,.20), rgba(230,194,95,.05) 60%, var(--panel));
  box-shadow: 0 0 0 1px rgba(230,194,95,.7) inset, 0 10px 28px rgba(230,194,95,.18); }
.plan-card.gold .plan-badge { background: linear-gradient(135deg, #f6dd90, #d9a93f); color: #241a08; }
.plan-card.gold .plan-name, .plan-card.gold .plan-price { color: #f2d891; }

/* 요금제 v3 — 티어 아바타·연간 할인 표기·월간/연간 토글 */
.plan-billing { align-self: center; margin: 12px auto 12px; display: flex; }
.plan-head-row { display: flex; align-items: center; gap: 12px; }
.plan-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 1px solid var(--brass-30); flex: 0 0 auto; }
.plan-head-info { min-width: 0; flex: 1; }
.plan-composer { color: var(--muted); font-size: 12px; font-weight: 600; }
.plan-price-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.plan-price-was { text-decoration: line-through; color: var(--dimmest); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.plan-free-months { background: linear-gradient(135deg, #f6dd90, #d9a93f); color: #241a08; font-size: 10px; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.plan-card .plan-badge { margin-left: auto; align-self: flex-start; }
.plan-card.current { outline: 1px dashed var(--brass-30); outline-offset: 2px; }
.tier-avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.plan-card.gold.selected { border-color: #f6dd90; box-shadow: 0 0 0 1px #f6dd90 inset, 0 10px 28px rgba(230,194,95,.22); }
.plan-badge { align-self: flex-start; background: var(--accent-bright); color: #1a140b; font-size: 10.5px; font-weight: 800; letter-spacing: .02em; padding: 4px 11px; border-radius: 999px; }
.plan-price { font-size: 22px; font-weight: 800; color: var(--ink-bright); font-variant-numeric: tabular-nums; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.plan-name { font-size: 15px; font-weight: 700; color: var(--accent-bright); }
.plan-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.plan-features { display: flex; flex-direction: column; gap: 7px; margin-top: 2px; }
.plan-feature { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; color: var(--ink); }
.plan-feature .icon { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; color: var(--accent-bright); }
.plan-feature.excluded { color: var(--dimmest); }
.plan-feature.excluded .icon { color: var(--dimmest); }
.plan-dots { display: none; }
.plan-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brass-24); transition: background .2s, width .2s; }
.plan-dot.active { background: var(--accent-bright); width: 18px; border-radius: 4px; }
.plan-action-btn { background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #1a140b; border: none; border-radius: 14px; padding: 15px; font-size: 15px; font-weight: 800; cursor: pointer; }
.plan-action-btn:disabled { opacity: .6; }
.plan-hint { text-align: center; font-size: 11.5px; color: var(--muted); margin: 0; }
.plan-note { text-align: center; font-size: 11px; color: var(--dim); margin: 8px 0 0; }

/* 보관함 통계 탭 화면 */
.lib-stats-pane { flex: 1; overflow-y: auto; padding: 8px 0; min-height: 0; }
.lib-stats-pane[hidden] { display: none; }
.lib-list[hidden] { display: none; }

/* ===== 설정 > 구독 상태 카드 ===== */
.sub-card {
  border: 1px solid var(--brass-18); border-radius: 16px; padding: 16px;
  background: linear-gradient(150deg, rgba(201,168,106,.06), rgba(201,168,106,.02));
  display: flex; flex-direction: column; gap: 12px;
}
.sub-card.pro { border-color: var(--brass-24); background: linear-gradient(150deg, rgba(220,192,138,.14), rgba(201,168,106,.04)); }
.sub-card-top { display: flex; align-items: center; gap: 10px; }
.sub-plan-badge {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; padding: 3px 9px; border-radius: 999px;
  color: var(--dim); background: rgba(255,255,255,.06); border: 1px solid var(--brass-18);
}
.sub-card.pro .sub-plan-badge { color: #1a140b; background: linear-gradient(135deg, var(--accent-bright), var(--accent)); border: none; }
.sub-plan-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.sub-benefit { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0; }
/* 이번 주 남은 감상 시간 · 리셋 시각 — 한 줄로 두되 줄바꿈은 낱말 단위로 */
.sub-quota {
  font-size: 12.5px; color: var(--accent-bright); line-height: 1.5; margin: 0;
  word-break: keep-all;
}
.sub-quota[hidden] { display: none; }
.sub-cta {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #1a140b;
  border: none; border-radius: 12px; padding: 13px; font-size: 14.5px; font-weight: 800; cursor: pointer;
}
.sub-cta[hidden] { display: none; }
.sub-actions { display: flex; flex-direction: column; gap: 8px; }
.sub-actions .paste-btn[hidden] { display: none; }

/* 보관함 아이템 노트 배지 */
.history-item { position: relative; }
.h-note { position: absolute; right: 6px; top: 6px; font-size: 9.5px; font-weight: 800; background: rgba(0,0,0,.55); color: var(--accent-bright); padding: 2px 6px; border-radius: 6px; }

/* ============ TRANSPORT BAR ============ */
.transport {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: rgba(38,30,18,.6); border: 1px solid var(--line); border-radius: 26px;
  padding: 9px 15px; margin-top: 6px; flex: 0 0 auto;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
/* 곡 끝 1분 전 다음 곡 안내 배너 */
.next-up {
  flex: 0 0 auto; margin-top: 6px; text-align: center; font-size: 10.5px; font-weight: 600;
  color: var(--dim); background: none; border: none; border-radius: 0; padding: 2px 12px 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em;
}
.next-up.hidden { display: none; }
.tp-center { display: flex; align-items: center; gap: 18px; }
.tp-btn { width: 42px; height: 42px; border-radius: 50%; border: none; background: rgba(236,229,216,.09); color: var(--ink); display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; -webkit-tap-highlight-color: transparent; transition: transform .1s; }
.tp-btn:active { transform: scale(.9); }
.tp-btn svg { width: 21px; height: 21px; fill: currentColor; }
.tp-play { width: 58px; height: 58px; background: var(--accent-bright); color: #1a140b; box-shadow: var(--play-shadow); }
.tp-play svg { width: 23px; height: 23px; }

/* tutor voice = equalizer button */
.tutor-eq {
  position: relative;
  width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto;
  border: 1px solid var(--brass-30); background: var(--brass-10);
  display: flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent; transition: transform .1s, box-shadow .15s, background .15s, border-color .15s;
}
.tutor-eq:active { transform: scale(.92); }
.tutor-eq.pressing { box-shadow: 0 0 0 3px var(--brass-30); }
.tutor-eq i { width: 3px; border-radius: 2px; background: var(--accent-bright); display: block; transform-origin: center; transition: background .15s; }
.tutor-eq i:nth-child(1){ height: 9px; } .tutor-eq i:nth-child(2){ height: 16px; } .tutor-eq i:nth-child(3){ height: 12px; }
/* animate only while actively speaking (and not muted) */
body.tutor-speaking:not(.tutor-muted) .tutor-eq i,
body.tutor-speaking:not(.tutor-muted) .bubble-eq i {
  animation: eqBar 1s ease-in-out infinite;
}
.tutor-eq i:nth-child(2){ animation-delay: .18s; } .tutor-eq i:nth-child(3){ animation-delay: .36s; }
/* 음성 꺼짐: 회색 막대 + 사선(mute)으로 상태를 분명히 */
body.tutor-muted .tutor-eq { background: rgba(236,229,216,.04); border-color: var(--line); }
body.tutor-muted .tutor-eq i { height: 4px !important; background: var(--dimmest); }
body.tutor-muted .tutor-eq::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 30px; height: 2px; border-radius: 2px; background: var(--dimmest);
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* like = heart */
.fav-btn { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; border: none; background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; color: var(--dimmest); -webkit-tap-highlight-color: transparent; transition: transform .1s; }
.fav-btn:active { transform: scale(.85); }
.fav-btn.on { color: var(--like); }
.fav-btn svg { width: 23px; height: 23px; }

/* ============ CHAT INPUT (footer) ============ */
footer { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.text-form { display: flex; align-items: center; gap: 9px; padding-top: 8px; }
.text-form input {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--brass-24);
  border-radius: 16px; color: var(--ink); padding: 12px 15px; font-size: 14px;
}
.text-form input::placeholder { color: var(--dimmest); }
.text-form input:focus { outline: 1px solid var(--brass-30); }
.send-btn { width: 47px; height: 47px; border-radius: 50%; flex: 0 0 auto; border: none; background: var(--accent-bright); color: #1a140b; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: var(--play-shadow); }
.send-btn svg { width: 20px; height: 20px; fill: currentColor; }
/* 질문 입력창은 재생 중 질문 탭에서만 (홈·해설 탭에선 숨김) */
body[data-tab="transcript"] .text-form { display: none; }
body:not(.playing) .text-form { display: none; }

.status { color: var(--dim); font-size: 12px; min-height: 1em; text-align: center; }

/* ============ LIBRARY (이어 듣기 + 즐겨찾기) ============ */
.history { margin-top: 30px; }
.history[hidden] { display: none; }
.history-title { font-size: 13px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; padding: 2px 0; }
.history-title::-webkit-details-marker { display: none; }
.lib-group { margin-top: 16px; }
.lib-group[hidden] { display: none; }
.group-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 11px; }
.history-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.history-item { flex: 0 0 auto; width: 132px; cursor: pointer; }
.history-item img { width: 132px; height: 78px; object-fit: cover; border-radius: 12px; border: 1px solid var(--brass-18); display: block; background: linear-gradient(150deg,#2b2214,#20190f); }
.history-item .h-title { font-size: 11.5px; color: var(--ink-2); line-height: 1.4; margin-top: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#favGroup .history-item img { border-color: var(--brass-24); }

/* ============ 홈 추천 (사람들이 자주 들은 곡) ============ */
.recommend { margin-top: 30px; width: 100%; text-align: left; }
.recommend[hidden] { display: none; }
.recommend-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.recommend-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 12px; }
.recommend-head .recommend-title { margin-bottom: 0; }
.recommend-refresh { background: none; border: none; font-size: 12px; font-weight: 600; color: var(--dim); cursor: pointer; padding: 2px 0; -webkit-tap-highlight-color: transparent; }
.recommend-refresh:active .rr-ic { display: inline-block; transform: rotate(180deg); transition: transform .3s; }
.rec-heart { color: var(--accent-bright); }
.recommend-list { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.recommend-item {
  flex: 0 0 auto; width: 132px; cursor: pointer; background: none; border: none; padding: 0;
  text-align: left; display: block; -webkit-tap-highlight-color: transparent;
}
.recommend-thumb {
  width: 132px; height: 78px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--brass-18); display: block; background: linear-gradient(150deg,#2b2214,#20190f);
}
.recommend-info { display: block; margin-top: 7px; }
.recommend-piece { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11.5px; color: var(--ink-2); line-height: 1.4; }
.recommend-composer { display: block; font-size: 11px; color: var(--dim); margin-top: 2px; }

/* ============ HOME ACTIONS (보관함 · 설정) ============ */
.home-actions { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 20px; display: flex; gap: 4px; z-index: 3; }
/* 재생 중에도 새 링크·보관함·설정 접근 가능하게 노출 */
body.playing .home-actions { display: flex; z-index: 6; gap: 2px; }
body.playing .corner-btn { width: 36px; height: 36px; }
/* 재생 중 상단 브랜드 문구는 코너 액션과 겹치지 않도록 왼쪽 정렬·컴팩트 */
body.playing .kicker { text-align: left; letter-spacing: 0.2em; font-size: 10px; padding-left: 2px; }
.corner-btn { width: 44px; height: 44px; border-radius: 50%; border: none; background: none; color: var(--dim); cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; -webkit-tap-highlight-color: transparent; }
.corner-btn svg { width: 20px; height: 20px; }
.corner-btn:active { transform: scale(.9); }
/* 감상 통계 버튼 — 다른 코너 버튼과 구분되는 청록빛 강조색 */
.corner-stats { color: #5fc7b0; }
.corner-stats:hover { color: #7ad9c4; }

/* ============ FULL-SCREEN OVERLAYS (보관함 · 설정) ============ */
.screen { position: fixed; inset: 0; z-index: 70; background: var(--bg); display: flex; flex-direction: column; padding: calc(16px + env(safe-area-inset-top)) 24px calc(16px + env(safe-area-inset-bottom)); overflow: hidden; }
.screen::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(115% 55% at 50% -10%, rgba(196,160,104,.10), transparent 58%); }
.screen > * { position: relative; z-index: 1; }
.screen.hidden { display: none; }
/* 설정 화면은 내용이 길어 잘리므로 세로 스크롤 허용 (헤더는 상단 고정) */
#settingsScreen { overflow-y: auto; -webkit-overflow-scrolling: touch; }
#settingsScreen .screen-head { position: sticky; top: 0; z-index: 2; background: var(--bg); padding-bottom: 8px; }
.screen-head { display: flex; align-items: center; justify-content: space-between; }
.screen-head-right { display: flex; align-items: center; gap: 12px; }
.screen-title { font-size: 24px; font-weight: 800; color: var(--ink-bright); letter-spacing: -.02em; }
.screen-sub { font-size: 12px; color: var(--dim); font-weight: 600; }
.screen-close { background: none; border: none; color: var(--muted); font-size: 17px; cursor: pointer; padding: 4px; }

/* library */
.lib-search { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; margin-top: 16px; }
.lib-search svg { width: 16px; height: 16px; color: var(--dim); flex: 0 0 auto; }
.lib-search input { flex: 1; min-width: 0; background: none; border: none; color: var(--ink); font-size: 13.5px; }
.lib-search input:focus { outline: none; }
.lib-search input::placeholder { color: var(--dimmest); }
.lib-segs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.lib-seg { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); padding: 7px 14px; border-radius: 999px; cursor: pointer; }
.lib-seg.active { color: #1a140b; background: var(--accent-bright); border-color: transparent; font-weight: 700; }
.lib-list { flex: 1; overflow-y: auto; margin-top: 12px; padding-top: 6px; }
.lib-item { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.lib-cover { width: 52px; height: 52px; border-radius: 11px; flex: 0 0 auto; object-fit: cover; border: 1px solid var(--brass-18); background: linear-gradient(150deg, #2b2214, #20190f); }
.lib-meta { flex: 1; min-width: 0; }
.lib-title { font-size: 13.5px; font-weight: 700; color: var(--ink-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-sub { font-size: 11.5px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-heart { flex: 0 0 auto; background: none; border: none; cursor: pointer; color: var(--dimmest); padding: 4px; }
.lib-heart.on { color: var(--like); }
.lib-heart svg { width: 18px; height: 18px; }
/* 보기 전환 버튼 */
.lib-grid-toggle { background: none; border: none; color: var(--dim); cursor: pointer; padding: 4px; display: flex; -webkit-tap-highlight-color: transparent; }
.lib-grid-toggle svg { width: 18px; height: 18px; }
.lib-grid-toggle.on { color: var(--accent-bright); }
/* 카드 그리드 보기 (2열 커버 카드) */
.lib-list.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-content: start; }
.lib-list.grid .lib-item { display: block; position: relative; padding: 0; border-bottom: none; }
.lib-list.grid .lib-cover { width: 100%; height: auto; aspect-ratio: 16 / 10; border-radius: 14px; }
.lib-list.grid .lib-meta { margin-top: 8px; }
.lib-list.grid .lib-title { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lib-list.grid .lib-heart { position: absolute; top: 6px; right: 6px; padding: 6px; background: rgba(0,0,0,.4); border-radius: 999px; }
.lib-empty { color: var(--dimmest); text-align: center; padding: 44px 16px; font-size: 13px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lib-empty-ic { font-size: 34px; opacity: .8; }
.lib-empty-msg { margin: 0; font-style: italic; }
.lib-empty-cta {
  margin-top: 6px; background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #1a140b;
  border: none; border-radius: 12px; padding: 12px 20px; font-size: 14px; font-weight: 800; cursor: pointer;
}
/* 오프라인 배너 */
.offline-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 96; display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 6px 10px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: #3a2e18; border-bottom: 1px solid var(--brass-24);
  font-size: 12.5px; color: var(--ink-2);
}
.offline-bar[hidden] { display: none; }
/* 한글은 기본값이 글자 단위 줄바꿈이라 "있어요"의 '요' 한 글자만 다음 줄로 떨어진다.
   keep-all 로 띄어쓰기에서만 끊기게 하고, 가운뎃점 앞뒤는 통째로 묶어 둔다. */
.offline-msg { word-break: keep-all; line-height: 1.45; text-align: center; }
.offline-msg .nb { white-space: nowrap; }
.offline-retry {
  background: var(--brass-18); border: 1px solid var(--brass-30); color: var(--accent-bright);
  font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; cursor: pointer;
  white-space: nowrap; flex: 0 0 auto;   /* '재시도'의 '도' 한 글자가 떨어지지 않게 */
}

/* 보관함 북마크 통합 뷰 */
.bk-group { margin-bottom: 16px; }
.bk-group-head { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; padding: 6px 2px 8px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bk-cover { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--brass-18); }
.bk-song { flex: 1; text-align: left; font-size: 13.5px; font-weight: 700; color: var(--ink-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bk-n { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--accent-bright); background: var(--brass-10); border: 1px solid var(--brass-24); border-radius: 999px; padding: 2px 9px; }
.bk-row { display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left; background: none; border: none; border-left: 2px solid var(--brass-18); margin-left: 16px; padding: 9px 12px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.bk-row:active { background: var(--brass-07); }
.bk-time { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; padding-top: 2px; }
.bk-text { flex: 1; font-size: 13px; line-height: 1.55; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* settings */
.set-section { margin-top: 22px; }
.set-label { font-size: 12px; font-weight: 700; color: var(--dim); letter-spacing: .04em; margin-bottom: 10px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 13px 15px; background: var(--panel); border: 1px solid var(--brass-18); border-radius: 14px; margin-bottom: 8px; font-size: 13.5px; color: var(--ink); }
.set-row > span:first-child { flex: 0 0 auto; color: var(--muted); }
.set-row > span.grow { flex: 1; min-width: 0; }
.set-row input[type="range"] { flex: 1; accent-color: var(--accent); height: 4px; }
.set-row input[type="text"], .set-row input[type="password"] { flex: 1; min-width: 0; background: none; border: none; color: var(--ink); font-size: 13.5px; }
.set-row input[type="text"]::placeholder, .set-row input[type="password"]::placeholder { color: var(--dimmest); }
.set-row input[type="text"]:focus, .set-row input[type="password"]:focus { outline: none; }
.set-row.toggle { justify-content: space-between; }
.set-row-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.set-row-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.switch { width: 46px; height: 28px; border-radius: 999px; border: none; background: rgba(201,189,163,.2); position: relative; cursor: pointer; padding: 0; flex: 0 0 auto; transition: background .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch span { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch[aria-checked="true"] span { left: 21px; }
.switch-locked { cursor: default; opacity: .82; }
/* 관리자 페이지 — 모델 알약 버튼·사용량 표 */
.admin-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.admin-pill { padding: 8px 13px; border-radius: 999px; border: 1px solid var(--brass-24); background: var(--brass-07);
  color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.admin-pill.active { border-color: var(--accent-bright); color: var(--accent-bright); background: rgba(220,192,138,.12); }
.admin-pill.disabled { opacity: .45; cursor: default; }
.admin-scope-label { font-size: 12px; color: var(--muted); margin: 12px 2px 6px; font-weight: 700; }
.admin-usage-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-usage-table th, .admin-usage-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.admin-usage-table th { color: var(--accent-bright); font-weight: 700; }
.admin-usage-table th.num, .admin-usage-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-usage-total { color: var(--ink); font-weight: 800; }
.admin-warn { color: #e8a87c; }
.admin-gate-form { display: flex; gap: 10px; }
.admin-gate-form input { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--brass-24); border-radius: 12px;
  padding: 13px 14px; color: var(--ink); font: inherit; font-size: 15px; letter-spacing: .18em; }
.admin-gate-form input::placeholder { color: var(--dimmest); letter-spacing: 0; }
.admin-gate-form input:focus { outline: none; border-color: var(--accent-bright); }
.admin-gate-btn { background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #1a140b; border: none;
  border-radius: 12px; padding: 13px 22px; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; flex: 0 0 auto; }
/* 앱 타이틀 옆 PRO 배지 — 타이틀과 같은 글자 크기, Pro 결제자에게만 노출 */
.kicker-pro { display: inline-block; margin-left: 12px; padding: 1px 8px 2px; border: 1px solid var(--accent-bright);
  border-radius: 7px; color: var(--accent-bright); font-size: inherit; font-weight: 800; letter-spacing: .12em; }
.set-hint { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 18px; }
.set-hint b { color: var(--accent-bright); }
.set-row.seg-row { justify-content: space-between; }

/* 감상 통계: 요일별 바 차트 + 스트릭 */
.stats-chart {
  display: flex; align-items: flex-end; gap: 6px; height: 84px;
  background: var(--panel); border: 1px solid var(--brass-18); border-radius: 14px;
  padding: 12px 10px 8px; margin-bottom: 8px;
}
.stats-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.stats-bar { width: 100%; max-width: 20px; border-radius: 5px 5px 2px 2px; background: var(--brass-18); transition: height .35s ease; }
.stats-bar.today { background: linear-gradient(180deg, var(--accent-bright), var(--accent)); }
.stats-bar-label { font-size: 10px; color: var(--dim); font-variant-numeric: tabular-nums; }
.stats-streak {
  display: flex; justify-content: space-between; gap: 4px;
  background: var(--panel); border: 1px solid var(--brass-18); border-radius: 14px; padding: 12px 10px;
}
.streak-day { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.streak-dot {
  width: 22px; height: 22px; border-radius: 50%; background: var(--brass-07); border: 1px solid var(--brass-18);
  display: flex; align-items: center; justify-content: center; color: transparent; font-size: 11px; font-weight: 800;
}
.streak-dot.on { background: var(--accent-bright); border-color: var(--accent-bright); color: #1a140b; }
.streak-dot.today { box-shadow: 0 0 0 2px var(--brass-24); }
.streak-day-label { font-size: 10px; color: var(--dim); }
.stats-empty { color: var(--muted); text-align: center; font-size: 14px; line-height: 1.7; padding: 40px 16px; }
.stats-empty[hidden] { display: none; }
.stats-summary { font-size: 12px; color: var(--muted); text-align: center; margin: 10px 0 0; }

/* 인기 연주 TOP 10 */
.top-videos-list { display: flex; flex-direction: column; gap: 6px; }
.top-video-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: var(--panel); border: 1px solid var(--brass-18); border-radius: 12px;
  padding: 9px 12px; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent;
}
.top-video-row:active { background: var(--brass-07); }
.top-video-rank { flex: 0 0 auto; width: 20px; text-align: center; font-size: 13px; font-weight: 800; color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.top-video-thumb { flex: 0 0 auto; width: 56px; height: 34px; object-fit: cover; border-radius: 7px; border: 1px solid var(--brass-18); background: linear-gradient(150deg,#2b2214,#20190f); }
.top-video-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-video-piece { font-size: 13px; font-weight: 700; color: var(--ink-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-video-composer { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-video-plays { flex: 0 0 auto; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }
/* 1~3위 강조 — 더 크고 금빛 테두리, 순위 배지 */
.top-video-row.top3 { padding: 11px 12px; border-color: var(--brass-30); background: linear-gradient(150deg, rgba(201,168,106,.10), rgba(201,168,106,.03)); }
.top-video-row.top3 .top-video-thumb { width: 68px; height: 42px; }
.top-video-row.top3 .top-video-piece { font-size: 14px; }
.top-video-row.top3 .top-video-rank { color: #1a140b; background: linear-gradient(135deg, var(--accent-bright), var(--accent)); border-radius: 999px; width: 22px; height: 22px; line-height: 22px; }
.top-video-row.rank1 .top-video-rank { background: linear-gradient(135deg,#ffe9a8,#e8c260); }
.top-videos-empty { color: var(--dimmest); font-size: 12.5px; text-align: center; padding: 10px 0; margin: 0; }
.seg { display: flex; gap: 3px; background: rgba(201,189,163,.1); border-radius: 10px; padding: 3px; flex: 0 0 auto; }
.seg-btn { border: none; background: none; color: var(--muted); font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 8px; cursor: pointer; }
.seg-btn.active { background: var(--accent-bright); color: #1a140b; font-weight: 700; }
.policy-seg { align-self: center; margin: 14px 0 12px; }
.policy-frame { flex: 1 1 auto; width: calc(100% + 48px); margin: 0 -24px calc(-16px - env(safe-area-inset-bottom));
  border: 0; background: var(--bg); min-height: 0; }

/* ============ 튜터 음량 팝오버 (아이콘 위 세로 슬라이더) ============ */
.vol-popover {
  position: fixed;
  bottom: calc(94px + env(safe-area-inset-bottom));
  left: max(22px, calc(50% - 196px));      /* 재생바 왼쪽 튜터 버튼 위로 정렬 */
  z-index: 50;
  background: #241c11; border: 1px solid var(--brass-24);
  border-radius: 20px; padding: 14px 10px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
}
.vol-vertical {
  -webkit-appearance: slider-vertical;      /* iOS/구 Safari 세로 슬라이더 */
  appearance: slider-vertical;
  writing-mode: vertical-lr;                 /* 최신 표준 (Chrome/Safari) */
  direction: rtl;                            /* 위로 갈수록 증가 */
  width: 10px; height: 118px;
  accent-color: var(--accent);
}
.vol-cap { font-size: 15px; line-height: 1; }

/* 새 곡 재생 화면: 링크 폼 여백 정리 */
#linkScreen .yt-form { margin-top: 0; }

/* ============ 동영상 탭 (유튜브 프레임) ============ */
.pane#video { padding: 14px 0; display: flex; align-items: center; justify-content: center; }
/* 비활성(해설 탭) 시 화면 밖으로 — 소리는 계속 재생 (display:none 금지) */
.pane#video:not(.active) { display: block; position: fixed; left: 0; bottom: 0; width: 2px; height: 2px; padding: 0; margin: 0; opacity: .01; pointer-events: none; overflow: hidden; z-index: -1; }
.yt-player-wrap { width: 100%; position: relative; }
#ytPlayer { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 14px; overflow: hidden; }
#ytPlayer iframe { width: 100%; height: 100%; border: 0; display: block; }

@keyframes eqBar { 0%,100%{ transform: scaleY(.35);} 50%{ transform: scaleY(1);} }
@keyframes marquee { 0%{ transform: translateX(0);} 100%{ transform: translateX(-50%);} }


/* 앱으로 다운받기 팝업 */
.ipop { position: fixed; inset: 0; z-index: 92; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); padding: 24px; }
.ipop.hidden { display: none; }
.ipop-card { position: relative; width: 100%; max-width: 340px; background: #241c11; border: 1px solid var(--brass-24); border-radius: 20px; padding: 24px 22px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.ipop-close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--dim); font-size: 16px; cursor: pointer; }
.ipop-ic { width: 64px; height: 64px; border-radius: 16px; margin: 4px auto 12px; display: block; }
.ipop-title { font-size: 17px; font-weight: 800; color: var(--ink-bright); }
.ipop-body { font-size: 13.5px; color: var(--muted); line-height: 1.75; margin-top: 12px; text-align: left; }
.ipop-body b { color: var(--ink-bright); font-weight: 700; }
.ipop-body svg { width: 15px; height: 15px; vertical-align: -3px; color: var(--accent-bright); }
.ipop-steps { margin-top: 13px; display: flex; flex-direction: column; gap: 8px; background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 12px; padding: 11px 13px; font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }
.ipop-steps b { color: var(--ink-bright); font-weight: 700; }
.ipop-cta { margin-top: 18px; width: 100%; background: var(--accent-bright); color: #1a140b; border: none; border-radius: 13px; padding: 13px; font-size: 14px; font-weight: 800; cursor: pointer; }
.ipop-cta.hidden { display: none; }

/* 탭하여 재생 오버레이 (iOS 자동재생 막힐 때) — 살아 움직이는 반응형 */
/* 유튜브 화면 위에 겹치는 재생 안내 — 탭은 뒤 유튜브 재생버튼으로 통과(pointer-events:none) */
.tap-play { position: absolute; inset: 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 38px; background: rgba(10,8,5,.42); border-radius: 14px; pointer-events: none; }
.tap-play.hidden { display: none; }
.tap-play-ic {
  position: relative; width: 96px; height: 96px; border-radius: 50%;
  background: var(--accent-bright); color: #1a140b;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--play-shadow);
  animation: tapBreathe 1.8s ease-in-out infinite;
}
.tap-play-ic svg { width: 42px; height: 42px; fill: currentColor; display: block; }
/* 퍼져나가는 물결 링 2겹 — 더 넓게 */
.tap-play-ic::before, .tap-play-ic::after {
  content: ""; position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--accent-bright); opacity: 0;
  animation: tapRipple 1.9s ease-out infinite;
}
.tap-play-ic::after { animation-delay: .95s; }
.tap-play-tx { font-size: 14px; font-weight: 800; letter-spacing: .02em; color: var(--ink-bright); text-shadow: 0 1px 6px rgba(0,0,0,.5); animation: tapFade 1.9s ease-in-out infinite; }
@keyframes tapBreathe { 0%,100%{ transform: scale(1); box-shadow: 0 8px 22px rgba(201,168,106,.4), inset 0 2px 3px rgba(255,255,255,.35), inset 0 -3px 6px rgba(0,0,0,.18);} 50%{ transform: scale(1.07); box-shadow: 0 12px 34px rgba(201,168,106,.6), inset 0 2px 3px rgba(255,255,255,.4), inset 0 -3px 6px rgba(0,0,0,.18);} }
@keyframes tapRipple { 0%{ transform: scale(1); opacity: .55;} 100%{ transform: scale(2.1); opacity: 0;} }
@keyframes tapFade { 0%,100%{ opacity: .7;} 50%{ opacity: 1;} }

/* ============ Pro 결제 완료 (3q) ============ */
#proSuccessScreen { z-index: 85; }
.pro-success-inner {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding-bottom: 26px;
}
.pro-success-check {
  width: 94px; height: 94px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, #e9d6a8, #c9a24a); color: #2a2012;
  box-shadow: 0 16px 40px rgba(201,162,74,.45);
  animation: proPop .45s cubic-bezier(.2,.9,.3,1.3);
}
.pro-success-check svg { width: 44px; height: 44px; }
@keyframes proPop { 0%{ transform: scale(.5); opacity: 0;} 100%{ transform: scale(1); opacity: 1;} }
.pro-success-title { font-size: 22px; font-weight: 800; color: var(--ink-bright); margin-top: 24px; }
.pro-success-desc { font-size: 14px; color: var(--muted); line-height: 1.65; margin-top: 12px; max-width: 280px; }
.pro-success-desc b { color: var(--accent-bright); }
.pro-success-summary {
  width: 100%; max-width: 300px; margin-top: 24px; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 2px 16px;
}
.pss-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.pss-row:last-child { border-bottom: none; }
.pss-row > span:first-child { font-size: 12.5px; color: var(--muted); }
.pss-val { font-size: 13px; font-weight: 700; color: var(--ink); }
.pss-val.accent { color: var(--accent-bright); }
.pro-success-cta {
  width: 100%; max-width: 300px; margin-top: 20px; background: var(--accent-bright); color: #1a140b;
  border: none; border-radius: 15px; padding: 15px; font-size: 14.5px; font-weight: 800; cursor: pointer;
  box-shadow: 0 10px 22px rgba(196,160,104,.35);
}

/* ===== 상단 메뉴 버거 ===== */
.burger { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 5px; width: 22px; }
.burger i { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; display: block; }
body.playing .burger { gap: 4px; }

/* ===== 메뉴 드로어 (우측 슬라이드) ===== */
.drawer { position: fixed; inset: 0; z-index: 90; }
.drawer.hidden { display: none; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(9,6,3,.6); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: scrimFade .3s ease both; }
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: 84%; max-width: 360px;
  background: linear-gradient(180deg, #1c150c, var(--bg)); border-left: 1px solid var(--brass-18);
  box-shadow: -24px 0 50px rgba(0,0,0,.55); display: flex; flex-direction: column;
  padding: calc(18px + env(safe-area-inset-top)) 22px calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto; animation: drawerIn .4s cubic-bezier(.22,1,.36,1) both;
}
@keyframes scrimFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-top { display: flex; align-items: center; justify-content: space-between; }
.drawer-brand { font-size: 13.5px; font-weight: 800; letter-spacing: .24em; color: var(--accent-bright); }
.drawer-close { background: none; border: none; color: var(--dim); font-size: 20px; cursor: pointer; padding: 4px; }
.drawer-account { display: flex; align-items: center; gap: 13px; margin-top: 22px; width: 100%; text-align: left;
  background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 16px; padding: 13px 15px; cursor: pointer; color: inherit; font: inherit; }
.drawer-avatar { width: 46px; height: 46px; border-radius: 50%; flex: 0 0 auto; background: linear-gradient(150deg,#3a2e1a,#241c10); border: 1px solid var(--brass-30); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.drawer-account-info { flex: 1; min-width: 0; }
.drawer-account-name { display: block; font-size: 15px; font-weight: 800; color: var(--ink-bright); }
.drawer-account-sub { display: block; font-size: 11.5px; color: var(--accent-bright); font-weight: 700; margin-top: 2px; }
.drawer-nav { margin-top: 14px; }
.drawer-row { display: flex; align-items: center; gap: 16px; width: 100%; padding: 16px 4px; background: none; border: none; border-bottom: 1px solid var(--line-2); cursor: pointer; color: inherit; font: inherit; text-align: left; }
.drawer-row > svg:first-child { width: 21px; height: 21px; flex: 0 0 auto; color: var(--accent-bright); }
.drawer-row-label { flex: 1; font-size: 16px; font-weight: 700; color: var(--ink-bright); }
.drawer-chev { width: 17px; height: 17px; flex: 0 0 auto; color: var(--dim); }
/* 서비스 안내와 버전정보를 한 덩어리로 묶어 드로어 맨 아래에 붙인다.
   메뉴가 짧아도 이 블록은 늘 바닥에 있고, 길어지면 자연스럽게 뒤로 밀린다. */
.drawer-foot { margin-top: auto; }
.drawer-section-label { font-size: 10.5px; font-weight: 700; letter-spacing: .14em; color: var(--dim); margin-top: 22px; }
.drawer-service { margin-top: 2px; }
.drawer-srow { display: flex; align-items: center; width: 100%; padding: 14px 4px; background: none; border: none; border-bottom: 1px solid var(--line-2); cursor: pointer; color: inherit; font: inherit; text-align: left; }
.drawer-srow > span { flex: 1; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.drawer-srow > svg { width: 16px; height: 16px; flex: 0 0 auto; color: var(--dim); }
.drawer-version { display: flex; align-items: center; gap: 6px; width: 100%; padding: 14px 4px 0;
  border: none; border-top: 1px solid var(--line-2); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.drawer-version:active { opacity: .6; }
.drawer-version-chev { width: 15px; height: 15px; flex: none; color: var(--dim); }
.drawer-version > span:first-child { flex: 1; font-size: 14.5px; font-weight: 600; color: var(--ink-2); }
.drawer-version b { color: var(--dim); font-weight: 500; font-variant-numeric: tabular-nums; }
.drawer-version-note { font-size: 12px; color: var(--dim); }

/* ===== 설정 상단 프로필 카드 링크 ===== */
.profile-card-link { display: flex; align-items: center; gap: 13px; width: 100%; text-align: left; margin-top: 4px;
  background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 16px; padding: 13px 15px; cursor: pointer; color: inherit; font: inherit; }
.profile-card-link .drawer-chev { color: var(--dim); }

/* ===== 뒤로가기 버튼 (서브 화면) ===== */
.screen-back { background: none; border: none; color: var(--ink-2); cursor: pointer; padding: 4px; display: flex; align-items: center; }
.screen-back svg { width: 22px; height: 22px; }

/* ===== 내 프로필 화면 ===== */
.profile-body { flex: 1; overflow-y: auto; padding-top: 18px; }
.profile-idline { display: flex; align-items: center; gap: 8px; }
.profile-idavatar { width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(150deg,#3a2e1a,#241c10); border: 1px solid var(--brass-30); display: flex; align-items: center; justify-content: center; font-size: 13px; }
.profile-idline > span:last-child { font-size: 12px; font-weight: 700; color: var(--dim); }
.profile-name { font-size: 24px; font-weight: 800; color: var(--ink-bright); margin-top: 12px; letter-spacing: -.02em; }
.profile-sec-label { margin-top: 24px; }
.profile-invite-desc { font-size: 12px; color: var(--muted); line-height: 1.6; margin: -2px 0 12px; }
.profile-invite-desc b { color: var(--accent-bright); }

/* ===== 공지사항 ===== */
.notice-list { flex: 1; overflow-y: auto; padding-top: 6px; }
.notice-item { padding: 15px 0; border-bottom: 1px solid var(--line-2); }
.notice-tag { display: inline-block; font-size: 10px; font-weight: 800; color: var(--accent-bright); background: var(--brass-12); border: 1px solid var(--brass-30); padding: 2px 9px; border-radius: 6px; }
.notice-tag.update { color: #7fa8c9; background: rgba(127,168,201,.12); border-color: rgba(127,168,201,.35); }
.notice-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 9px; cursor: pointer; }
.notice-title { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.notice-chev { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 3px; color: var(--dim); transition: transform .2s; }
.notice-date { font-size: 11px; color: var(--dim); margin-top: 7px; font-variant-numeric: tabular-nums; }
.notice-body { margin: 11px 0 0; font-size: 13px; line-height: 1.7; color: var(--ink-2); white-space: pre-wrap; }

/* ===== 고객센터 ===== */
.support-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-top: 16px; }
.support-headline { font-size: 18px; font-weight: 800; color: var(--ink-bright); letter-spacing: -.01em; }
.support-desc { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 8px 0 0; }
.support-body .set-label { margin-top: 22px; }
.support-types { display: flex; flex-wrap: wrap; gap: 8px; }
.support-chip { font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); padding: 9px 15px; border-radius: 999px; white-space: nowrap; cursor: pointer; }
.support-chip.active { font-weight: 700; color: #1a140b; background: var(--accent); border-color: var(--accent); }
.support-input, .support-textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--ink); font: inherit; font-size: 13.5px; margin-top: 4px; }
.support-input::placeholder, .support-textarea::placeholder { color: var(--dimmest); }
.support-input:focus, .support-textarea:focus { outline: none; border-color: var(--brass-30); }
.support-textarea { min-height: 120px; line-height: 1.6; resize: vertical; }
.support-hint { display: flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 11px; color: var(--dim); }
.support-hint svg { width: 13px; height: 13px; flex: 0 0 auto; }
.support-hint span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-submit { width: 100%; margin: 16px 0; background: var(--accent); color: #1a140b; border: none; border-radius: 15px; padding: 15px; font-size: 14.5px; font-weight: 800; cursor: pointer; box-shadow: 0 10px 22px rgba(196,160,104,.3); }

/* ===== 용량 관리 행 ===== */
.set-manage-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 15px; background: var(--panel); border: 1px solid var(--brass-18); border-radius: 14px; cursor: pointer; color: inherit; font: inherit; }
.set-manage-row > div { flex: 1; }
.set-manage-row > svg { width: 17px; height: 17px; flex: 0 0 auto; color: var(--dim); }

/* ===== 감상 노트 카드 만들기 ===== */
.memo-card-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 10px;
  background: var(--brass-07); border: 1px solid var(--brass-24); color: var(--accent-bright);
  border-radius: 14px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; }
.memo-card-btn svg { width: 17px; height: 17px; }
.notecard-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; padding-top: 18px; }
.notecard-preview { width: 100%; max-width: 288px; aspect-ratio: 3 / 4; margin: 0 auto; border: 1px solid var(--brass-24); border-radius: 22px;
  padding: 26px 24px 22px; box-shadow: 0 26px 54px rgba(60,30,15,.3); position: relative; overflow: hidden; display: flex; }
.nc-photo-layer { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; z-index: 0; }
.nc-scrim { position: absolute; inset: 0; z-index: 0; background: linear-gradient(180deg, rgba(15,11,6,.40), rgba(15,11,6,.55) 55%, rgba(15,11,6,.82)); }
.nc-wm { position: absolute; top: -24px; right: -14px; font-size: 130px; line-height: 1; font-family: Georgia, serif; z-index: 1; }
.nc-inner { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; min-height: 0; }
.nc-head { display: flex; align-items: baseline; justify-content: space-between; }
.nc-brand { font-size: 10px; font-weight: 800; letter-spacing: .32em; }
.nc-date { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.nc-song { display: flex; align-items: center; gap: 11px; margin-top: 15px; }
.nc-thumb { width: 44px; height: 44px; border-radius: 50%; flex: 0 0 auto; border: 1px solid; background-size: cover; background-position: center; }
.nc-thumb-ph { display: flex; align-items: center; justify-content: center; font-size: 17px; }
.nc-song-info { min-width: 0; }
.nc-song-title { display: block; font-family: "MaruBuri", serif; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-song-meta { display: block; font-family: "MaruBuri", serif; font-size: 11px; margin-top: 2px; }
.nc-quote { font-family: "MaruBuri", serif; line-height: .7; opacity: .4; font-weight: 700; }
.nc-quote-open { font-size: 30px; margin-top: 18px; }
.nc-quote-close { font-size: 30px; text-align: right; margin-top: 0; }
.nc-text { margin: 2px 0 0; font-family: "MaruBuri", serif; font-size: 15.5px; line-height: 1.7; font-weight: 400; letter-spacing: -.01em; white-space: pre-wrap; text-wrap: pretty; }
.nc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 18px; }
.nc-foot > span:first-child { font-size: 10.5px; font-weight: 600; }
.nc-qr { width: 26px; height: 26px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 9px; color: #f6e4d6; font-weight: 900; }
.notecard-themes { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.nc-swatch { width: 34px; height: 34px; border-radius: 10px; border: 2px solid transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.06); cursor: pointer; padding: 0; }
.nc-swatch.active { border-color: var(--accent-bright); }
.nc-swatch-div { width: 1px; height: 26px; background: var(--line); flex: 0 0 auto; }
.nc-swatch-photo { width: auto; height: 34px; display: flex; align-items: center; gap: 6px; padding: 0 12px 0 9px;
  background: var(--brass-07); border: 2px solid transparent; box-shadow: none; color: var(--ink-2); font: inherit; }
.nc-swatch-photo svg { width: 15px; height: 15px; color: var(--accent-bright); }
.nc-swatch-label { font-size: 12px; font-weight: 700; }
.nc-swatch-photo.active { border-color: var(--accent-bright); background: var(--brass-12, rgba(196,160,104,.12)); }
.notecard-phototools { margin-top: 16px; }
.nc-tool-label { font-size: 11px; font-weight: 700; color: var(--ink-2); letter-spacing: .02em; margin: 12px 2px 8px; }
.nc-tool-label:first-child { margin-top: 0; }
.nc-filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.nc-filter { padding: 7px 13px; border-radius: 999px; border: 1px solid var(--brass-24); background: var(--brass-07);
  color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.nc-filter.active { border-color: var(--accent-bright); background: var(--brass-12, rgba(196,160,104,.12)); color: var(--accent-bright); }
.nc-focal { width: 100%; accent-color: var(--accent-bright); }
.notecard-link { background: var(--brass-07); border: 1px solid var(--brass-24); border-radius: 16px; padding: 14px 15px; margin-top: 22px; }
.nc-link-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--dim); }
.nc-link-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.nc-link-row > span { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 700; color: var(--accent-bright); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nc-link-note { margin: 11px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.nc-link-note b { color: var(--accent-bright); }
.notecard-actions { display: flex; gap: 11px; margin: 22px 0 10px; }
.notecard-actions .paste-btn, .notecard-actions .sub-cta { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; }
.notecard-actions svg { width: 17px; height: 17px; }
.notecard-invite { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-bottom: 8px;
  background: var(--brass-07); border: 1px solid var(--brass-24); color: var(--accent-bright);
  border-radius: 14px; padding: 13px; font-size: 14px; font-weight: 700; cursor: pointer; }
.notecard-invite svg { width: 17px; height: 17px; }

/* ===== 용어 탭 ===== */
.terms-intro { font-size: 12.5px; color: var(--muted); line-height: 1.6; margin: 2px 2px 14px; }
.terms-section-label { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--dim); margin: 20px 2px 8px; }
.term-card { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.term-card:last-child { border-bottom: none; }
.term-body { flex: 1; min-width: 0; }
.term-name { font-size: 14.5px; font-weight: 800; color: var(--ink-bright); letter-spacing: -.01em; }
.term-desc { font-size: 13px; line-height: 1.6; color: var(--ink-2); margin: 4px 0 0; }
.term-bk { flex: 0 0 auto; background: none; border: none; padding: 2px; cursor: pointer; color: var(--dimmest); -webkit-tap-highlight-color: transparent; }
.term-bk svg { width: 22px; height: 22px; fill: currentColor; transition: transform .1s; }
.term-bk:active svg { transform: scale(.85); }
.term-bk.on { color: var(--accent-bright); }

/* ---------- 로그인 · 회원가입 화면 ---------- */
.auth-body { padding: 26px 22px calc(30px + env(safe-area-inset-bottom)); max-width: 420px; margin: 0 auto; }
.auth-kicker { text-align: center; }
.auth-message { text-align: center; font-size: 15px; line-height: 1.65; color: var(--ink-2); margin: 14px 0 22px; }
.auth-message b { color: var(--accent-bright); }
.auth-social { display: flex; flex-direction: column; gap: 10px; }
.auth-sbtn { display: flex; align-items: center; gap: 12px; width: 100%; border: none; border-radius: 14px;
  padding: 13px 16px; font: inherit; font-size: 14.5px; font-weight: 700; cursor: pointer; }
.auth-sbtn b { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 900; flex: 0 0 auto; }
.auth-sbtn span { flex: 1; text-align: center; margin-right: 22px; }
/* 아직 열리지 않은 로그인 수단임을 버튼 안에서 조용히 알린다 */
.auth-soon { font-style: normal; font-size: .84em; font-weight: 600; opacity: .72; }
.auth-sbtn.naver { background: #03c75a; color: #fff; }
.auth-sbtn.naver b { background: rgba(255,255,255,.18); color: #fff; }
.auth-sbtn.kakao { background: #fee500; color: #191919; }
.auth-sbtn.kakao b { background: rgba(0,0,0,.08); color: #191919; }
.auth-sbtn.google { background: #f4f1ec; color: #1f1f1f; }
.auth-sbtn.google b { background: #fff; color: #4285f4; border: 1px solid #dadce0; }
.auth-sbtn.facebook { background: #1877f2; color: #fff; }
.auth-sbtn.facebook b { background: rgba(255,255,255,.18); color: #fff; }
.auth-sbtn.unready { opacity: .45; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 14px; color: var(--dim); font-size: 12px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form input[type="text"], .auth-form input[type="email"], .auth-form input[type="password"], .auth-form input[type="tel"] {
  background: var(--panel); border: 1px solid var(--brass-24); border-radius: 12px;
  padding: 13px 14px; font: inherit; font-size: 15px; color: var(--ink-bright); }
.auth-form input::placeholder { color: var(--dimmest); }
.auth-form input:focus { outline: none; border-color: var(--accent-bright); }
.auth-remember { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; padding: 2px 2px 0; }
.auth-remember input { width: 17px; height: 17px; accent-color: var(--accent-bright); }
.auth-submit { background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #1a140b; border: none;
  border-radius: 13px; padding: 14px; font: inherit; font-size: 15.5px; font-weight: 800; cursor: pointer; }
.auth-status { min-height: 18px; margin: 0; font-size: 13px; color: #e08c8c; text-align: center; }
.auth-mode-toggle { background: none; border: none; color: var(--ink-2); font: inherit; font-size: 13.5px; cursor: pointer; padding: 4px; }
.auth-mode-toggle b { color: var(--accent-bright); }
.auth-consent { font-size: 11.5px; line-height: 1.6; color: var(--dim); text-align: center; margin: 8px 0 0; }
.auth-consent b { color: var(--ink-2); }

/* 프로필 — 닉네임 변경 · 사진 변경(Pro) */
.profile-name-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.profile-name-row .profile-name { margin-top: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-photo-row { margin-top: 10px; }
.pro-lock { display: inline-block; font-size: 9.5px; font-weight: 900; letter-spacing: .08em; color: #1a140b;
  background: linear-gradient(135deg, #e8c877, #c9a86a); border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: 1px; }

/* 관리자 화면 — 내용이 길어 아래까지 스크롤 가능하게 */
.admin-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 16px; -webkit-overflow-scrolling: touch; }

/* 소셜 로그인 — 실제 브랜드 아이콘(SVG) */
.auth-sicon { width: 22px; height: 22px; border-radius: 6px; flex: 0 0 auto; }
.auth-sbtn .auth-sicon + span { margin-right: 22px; }
.auth-body .auth-consent { margin-top: 16px; }
/* 사용량 표 — 좁은 화면에서 가로 스크롤 */
.admin-usage { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-usage-month { margin-top: 6px; }

/* 관리자 메뉴 — 번호 붙은 접이식 섹션 */
.admin-sec { border: 1px solid var(--brass-18); border-radius: 14px; margin-top: 12px; background: var(--brass-07); overflow: hidden; }
.admin-sec summary { display: flex; align-items: center; gap: 13px; padding: 14px 16px; cursor: pointer; list-style: none; }
.admin-sec summary::-webkit-details-marker { display: none; }
.admin-sec-num { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent)); color: #1a140b; font-size: 13px; font-weight: 900; }
.admin-sec-info { flex: 1; min-width: 0; }
.admin-sec-info b { display: block; font-size: 15px; color: var(--ink-bright); }
.admin-sec-info small { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; line-height: 1.45; }
.admin-sec[open] summary { border-bottom: 1px solid var(--line-2); }
.admin-sec-body { padding: 4px 16px 16px; }
.admin-push-input { display: block; width: 100%; margin-top: 10px; background: var(--panel); border: 1px solid var(--brass-24);
  border-radius: 12px; padding: 12px 13px; font: inherit; font-size: 14.5px; color: var(--ink-bright); resize: vertical; }
.admin-push-input::placeholder { color: var(--dimmest); }
.admin-push-input:focus { outline: none; border-color: var(--accent-bright); }

/* .paste-btn이 width:100%라 한 줄(row) 안에서는 옆 텍스트를 세로로 짓누름 → 행 안에서는 자동 폭 */
.set-row .paste-btn, .profile-name-row .paste-btn {
  width: auto; flex: 0 0 auto; margin-top: 0; white-space: nowrap; padding: 8px 14px;
}

/* 사진 접근 안내·1:1 크롭 공용 오버레이 */
.overlay { position: fixed; inset: 0; z-index: 120; background: rgba(9,6,3,.72);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px; }
.overlay.hidden { display: none; }
.overlay-card { width: 100%; max-width: 360px; background: linear-gradient(180deg, #1c150c, var(--bg));
  border: 1px solid var(--brass-24); border-radius: 18px; padding: 20px; }
.overlay-card h3 { margin: 0 0 10px; font-size: 16.5px; color: var(--ink-bright); }
.overlay-card p { margin: 0 0 6px; font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.overlay-actions { display: flex; gap: 10px; margin-top: 16px; }
.overlay-actions .paste-btn { width: auto; flex: 1; margin-top: 0; }
.overlay-actions .sub-cta { flex: 1.3; }
#cropFrame { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 14px;
  border: 1px solid var(--brass-30); position: relative; touch-action: none; background: #000; }
#cropImg { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
#cropGuide { position: absolute; inset: 0; border-radius: 50%; border: 1.5px dashed rgba(255,255,255,.45);
  pointer-events: none; margin: 6%; }
#cropZoom { width: 100%; margin-top: 12px; accent-color: var(--accent); }
.crop-hint { font-size: 12px; color: var(--dim); text-align: center; margin: 8px 0 0; }

/* ---------- 전체 모션 — 화면·시트·카드·버튼에 일관된 움직임 ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* 화면 전환: 아래에서 살짝 떠오르며 등장 */
  .screen:not(.hidden) { animation: screenIn .34s cubic-bezier(.22,1,.36,1) both; }
  @keyframes screenIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  /* 시트(요금제 등): 배경 페이드 + 패널 슬라이드업 */
  .sheet:not(.hidden) { animation: scrimFade .25s ease both; }
  .sheet:not(.hidden) .sheet-panel { animation: sheetUp .38s cubic-bezier(.22,1,.36,1) both; }
  @keyframes sheetUp { from { transform: translateY(48px); opacity: .4; } to { transform: none; opacity: 1; } }
  /* 오버레이(사진 안내·크롭): 살짝 확대되며 등장 */
  .overlay:not(.hidden) .overlay-card { animation: cardPop .3s cubic-bezier(.22,1,.36,1) both; }
  @keyframes cardPop { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: none; } }
  /* 목록 카드: 순서대로 떠오르기 (주간 TOP10 · 추천곡 · 요금제 카드) */
  .top-video-row, .recommend-card, .plan-card, .notice-item { animation: rowIn .4s cubic-bezier(.22,1,.36,1) both; }
  .top-video-row:nth-child(2), .recommend-card:nth-child(2), .plan-card:nth-child(2), .notice-item:nth-child(2) { animation-delay: .05s; }
  .top-video-row:nth-child(3), .recommend-card:nth-child(3), .plan-card:nth-child(3), .notice-item:nth-child(3) { animation-delay: .1s; }
  .top-video-row:nth-child(4), .recommend-card:nth-child(4), .notice-item:nth-child(4) { animation-delay: .15s; }
  .top-video-row:nth-child(5), .recommend-card:nth-child(5), .notice-item:nth-child(5) { animation-delay: .2s; }
  .top-video-row:nth-child(n+6), .recommend-card:nth-child(n+6), .notice-item:nth-child(n+6) { animation-delay: .25s; }
  @keyframes rowIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  /* 버튼 눌림 반응 — 살짝 눌리는 느낌 */
  .paste-btn, .sub-cta, .auth-sbtn, .auth-submit, .admin-pill, .plan-card, .drawer-row, .drawer-srow,
  .btn-play-sq, .support-chip, .seg-btn, .admin-gate-btn {
    transition: transform .12s ease, opacity .12s ease;
  }
  .paste-btn:not(:disabled):active, .sub-cta:not(:disabled):active, .auth-sbtn:active, .auth-submit:not(:disabled):active,
  .admin-pill:not(.disabled):active, .plan-card:active, .drawer-row:active, .drawer-srow:active,
  .btn-play-sq:active, .support-chip:active, .seg-btn:active, .admin-gate-btn:active {
    transform: scale(.965);
  }
  /* 관리자 메뉴 섹션 펼침 */
  .admin-sec[open] .admin-sec-body { animation: rowIn .3s ease both; }
}

/* ---------- 디자인 시안 반영 — 홈 (엠블럼 헤일로 · 고스트 버튼 · 추천 카드 그리드) ---------- */
@keyframes halo {
  0%, 100% { box-shadow: 0 0 44px 8px rgba(201,168,106,.16), inset 0 0 24px rgba(201,168,106,.10); }
  50% { box-shadow: 0 0 80px 20px rgba(201,168,106,.30), inset 0 0 34px rgba(201,168,106,.18); }
}
/* 홈의 붙여넣기 버튼 — 테두리 없는 고스트 스타일 */
.onboard .home-ghost-btn {
  width: auto; margin: 8px auto 0; background: none; border: none;
  padding: 8px 14px; color: var(--muted); font-size: 12px; font-weight: 600;
  letter-spacing: .06em; transition: color .2s;
}
.onboard .home-ghost-btn:active { color: var(--accent-bright); }
/* 추천 섹션 제목 — 마루부리 세리프 이탤릭 */
.recommend-title.serif {
  font-family: MaruBuri, serif; font-size: 14px; font-weight: 600;
  letter-spacing: .04em; color: #e5dcc9; font-style: italic;
}
.recommend-refresh { font-size: 11px; letter-spacing: .08em; }
/* 추천·즐겨찾기 카드 — 2열 그리드, 썸네일 위에 그라데이션 오버레이 */
.recommend-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  overflow-x: visible; padding-bottom: 0;
}
.recommend-item {
  position: relative; width: auto; aspect-ratio: 1 / 0.68; flex: none;
  border: 1px solid var(--brass-18); border-radius: 13px; overflow: hidden;
  padding: 11px 12px 10px; text-align: left; cursor: pointer; background: linear-gradient(150deg, #241c10, #15100a);
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: transform .25s cubic-bezier(.22,1,.36,1), border-color .25s;
}
.recommend-item:active { transform: scale(.96); border-color: rgba(220,192,138,.55); }
.recommend-thumb {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: .38; border-radius: 0; margin: 0;
}
.recommend-item::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(15,12,8,.12), rgba(15,12,8,.82) 78%);
}
.recommend-item::after {
  content: "♪"; position: absolute; top: 9px; right: 11px; z-index: 2;
  font-size: 15px; color: rgba(220,192,138,.85);
}
.recommend-info { position: relative; z-index: 2; margin-top: 0; }
.recommend-piece {
  font-family: MaruBuri, serif; font-size: 12.5px; line-height: 1.55;
  color: var(--ink-bright); font-weight: 600; word-break: keep-all;
}
.recommend-composer { display: block; margin-top: 4px; font-size: 10px; line-height: 1.5; color: var(--dim); }
/* 홈 푸터 */
.home-copyright { margin-top: 26px; padding-bottom: 6px; text-align: center; font-size: 8.5px; letter-spacing: .22em; color: #4a4232; }

/* ---------- 질문 탭 (v2 시안) — 채팅 말풍선 + 알약 입력 ---------- */
.ask-pane { display: none; flex-direction: column; min-height: 0; }
.ask-pane.active { display: flex; }
.ask-feed { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 8px 2px; }
.ask-bubble {
  max-width: 86%; border-radius: 14px; padding: 10px 13px;
  font-size: 12.5px; line-height: 1.7; word-break: keep-all;
  align-self: flex-start; background: var(--panel); color: var(--ink); border: 1px solid var(--line);
}
.ask-bubble.user { align-self: flex-end; background: var(--accent-bright); color: #1a140b; border-color: transparent; }
.ask-bubble.typing { color: var(--dim); }
.ask-form { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 2px 4px; }
.ask-form input {
  flex: 1; min-width: 0; background: var(--panel); border: 1px solid rgba(196,160,104,.22);
  border-radius: 999px; color: var(--ink); font-size: 12.5px; padding: 10px 15px; outline: none; font: inherit;
}
.ask-form input::placeholder { color: var(--dimmest); }
.ask-form input:focus { border-color: var(--accent-bright); }
.ask-send {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto; border: none;
  background: var(--accent-bright); color: #1a140b; cursor: pointer;
  display: flex; align-items: center; justify-content: center; padding: 0;
}
.ask-send:disabled { opacity: .5; }
.ask-send svg { width: 16px; height: 16px; }
/* 탭이 6개가 되어 글자 크기 소폭 축소 */
.tab { font-size: 11.5px; letter-spacing: .02em; }

/* 다음 해설곡 표시줄 */
.next-pick b { color: var(--accent-bright); font-weight: 700; }

/* 관련곡 행 — 기본 탭=다음 해설곡 지정, 오른쪽 ▶=바로 재생 */
.cpop-related-wrap { display: flex; align-items: stretch; gap: 8px; margin-top: 6px; }
.cpop-related-wrap .cpop-related-row { flex: 1; min-width: 0; margin-top: 0; }
.cpop-related-playnow {
  flex: 0 0 auto; width: 40px; border: 1px solid var(--brass-18); border-radius: 12px;
  background: none; color: var(--accent-bright); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.cpop-related-playnow svg { width: 15px; height: 15px; fill: currentColor; }

/* ---------- v2 시안 — 챕터 알약 · 감상 통계 · 설정 칩 ---------- */
.chapter-pill-row { display: flex; justify-content: center; padding: 2px 24px 0; }
.chapter-pill {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; color: var(--accent-bright);
  background: var(--brass-10); border: 1px solid var(--brass-24);
  padding: 5px 13px; border-radius: 999px; max-width: 260px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chapter-pill.hidden { display: none; }

/* 감상 통계 — THIS WEEK 히어로·지표 타일·작곡가 비중 */
.stats-hero { text-align: center; margin-top: 18px; }
.stats-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .24em; color: var(--dim); }
.stats-bigtime { margin-top: 12px; font-family: MaruBuri, serif; font-size: 32px; font-weight: 600; color: var(--ink-bright); letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.stats-compare { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.7; min-height: 18px; }
.stats-tiles { display: flex; gap: 10px; margin-top: 22px; }
.stats-tile { flex: 1; background: var(--panel); border: 1px solid rgba(196,160,104,.16); border-radius: 14px; padding: 13px 8px; text-align: center; }
.stats-tile b { display: block; font-size: 17px; font-weight: 800; color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.stats-tile span { display: block; margin-top: 4px; font-size: 10.5px; color: var(--dim); }
.stats-composers-label { font-family: MaruBuri, serif; font-size: 13.5px; font-weight: 600; font-style: italic; letter-spacing: .04em; color: #e5dcc9; margin: 26px 0 14px; }
.stats-composers { display: flex; flex-direction: column; gap: 12px; }
.stats-comp-row { display: flex; align-items: center; gap: 12px; }
.stats-comp-name { flex: 0 0 74px; font-size: 12px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-comp-bar { flex: 1; height: 6px; border-radius: 3px; background: rgba(201,189,163,.1); overflow: hidden; }
.stats-comp-fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-bright)); transition: width 1.2s cubic-bezier(.22,1,.36,1); }
.stats-comp-pct { flex: 0 0 34px; text-align: right; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* 설정 — 세그(칩) 버튼을 시안의 알약 스타일로 */
.seg-btn { border: 1px solid transparent; border-radius: 999px; padding: 6px 13px; transition: all .2s; }
.seg-btn.active { background: var(--brass-10); border-color: var(--accent-bright); color: var(--accent-bright); font-weight: 700; }

/* ---------- 메뉴 드로어 (우측 슬라이드 · 리스트) ---------- */
.drawer-nav { margin-top: 14px; }
.drawer-row-pro .drawer-row-label, .drawer-pro-diamond { color: #f2d891; }
.drawer-pro-diamond { width: 21px; flex: 0 0 auto; text-align: center; font-size: 15px; }
.drawer-section-label { margin-top: 18px; }

/* 가장 많이 머문 곡 리스트 */
.stats-top-pieces { display: flex; flex-direction: column; }
.stats-piece-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: none; border-bottom: 1px solid var(--line-2);
  padding: 12px 2px; cursor: pointer; color: inherit; font: inherit; text-align: left;
}
.stats-piece-rank { flex: 0 0 22px; text-align: center; font-size: 12px; font-weight: 800; color: var(--accent-bright); font-variant-numeric: tabular-nums; }
.stats-piece-title { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats-piece-time { flex: 0 0 auto; font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; }

/* ---------- v3 시안 — 로그인·게이트·프로필·요금제 ---------- */
/* 로그인: 작은 엠블럼 + 마루부리 헤드라인 + 풀폭 소셜 버튼 */
.auth-emblem { width: 72px; height: 72px; margin: 10px auto 0; }
.auth-emblem i:nth-child(1){ height: 15px; } .auth-emblem i:nth-child(2){ height: 27px; }
.auth-emblem i:nth-child(3){ height: 20px; } .auth-emblem i:nth-child(4){ height: 30px; }
.auth-headline {
  margin: 18px 0 0; font-family: MaruBuri, serif; font-size: 21px; font-weight: 600;
  line-height: 1.6; text-align: center; color: var(--ink-bright); word-break: keep-all; text-wrap: balance;
}
/* 문구 위아래 여백을 같게 둔다. 앞 규칙(margin: 14px 0 22px)을 여기서 덮어쓰면서
   아래 여백이 0이 돼 위는 붙고 아래만 벌어져 보였다. */
.auth-message { margin: 16px auto; max-width: 280px; font-size: 12px; }
.auth-body .auth-social { margin-top: 20px; }
/* 문구 위 모차르트 초상 — 로딩 화면과 같은 사진 */
.auth-mark { display: block; width: 66px; height: 66px; margin: 18px auto 0; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--brass-30);
  box-shadow: 0 0 0 5px rgba(201,168,106,.08), 0 8px 20px rgba(0,0,0,.45); }
.auth-sbtn { justify-content: center; border-radius: 14px; }
.auth-sbtn span { flex: 0 1 auto; text-align: center; margin-right: 0; }
.auth-gateflow {
  display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 14px;
  font-size: 11.5px; color: var(--ink-2);
}
.auth-gateflow.hidden { display: none; }
.auth-gateflow-eq { display: inline-flex; gap: 3px; align-items: flex-end; }
.auth-gateflow-eq i { display: block; width: 3px; border-radius: 2px; background: var(--accent-bright); animation: eqBar 2s ease-in-out infinite; }
.auth-gateflow-eq i:nth-child(1){ height: 8px; } .auth-gateflow-eq i:nth-child(2){ height: 14px; animation-delay: .3s; } .auth-gateflow-eq i:nth-child(3){ height: 10px; animation-delay: .6s; }
.auth-email-link, .auth-browse {
  display: block; margin: 14px auto 0; background: none; border: none; cursor: pointer;
  font: inherit; font-size: 12px; color: var(--dim);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--brass-30);
}
.auth-browse { margin-top: 18px; color: var(--dimmest); text-decoration: none; }
.auth-form { margin-top: 14px; }
.auth-consent { margin-top: 14px; font-size: 9.5px; color: #4a4232; }
.auth-consent b { color: var(--dim); }

/* 프로필 v3 — 가운데 큰 아바타 + 연필 배지 + 티어 배지 */
.profile-hero { display: flex; flex-direction: column; align-items: center; margin-top: 10px; }
.profile-avatar-wrap { position: relative; width: 96px; height: 96px; }
.profile-idavatar.big { width: 96px; height: 96px; font-size: 40px; }
.profile-idavatar.big .tier-avatar-img { width: 100%; height: 100%; }
.avatar-edit-badge {
  position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(196,160,104,.4); background: #2b2114; color: var(--accent-bright);
  cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0;
}
.avatar-edit-badge svg { width: 15px; height: 15px; }
.profile-tier-badge {
  margin-top: 14px; font-size: 10.5px; font-weight: 800; letter-spacing: .1em; color: var(--dim);
  background: rgba(255,255,255,.05); border: 1px solid var(--brass-18); padding: 3px 10px; border-radius: 999px;
}
.profile-photo-hint { text-align: center; margin-top: 10px; }

/* 계정 카드 (묶음 리스트) */
.acct-card { border: 1px solid rgba(196,160,104,.16); border-radius: 14px; background: var(--panel); overflow: hidden; }
.acct-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 13px 15px; border-bottom: 1px solid var(--line-2);
  background: none; border-left: none; border-right: none; border-top: none;
  font: inherit; text-align: left; color: inherit;
}
.acct-card > .acct-row:last-child { border-bottom: none; }
.acct-row > span:first-child { font-size: 13px; color: var(--ink-2); }
.acct-val { font-size: 12px; color: var(--dim); max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-action { cursor: pointer; }
.acct-action > span:first-child { color: var(--accent-bright); font-weight: 600; }
.acct-chev { color: var(--dimmest); font-size: 12px; }

/* 친구 초대 카드 (대시 코드 박스) */
.invite-card {
  border: 1px solid rgba(196,160,104,.22); border-radius: 16px; padding: 15px 16px;
  background: linear-gradient(150deg, rgba(201,168,106,.08), rgba(201,168,106,.02));
}
.invite-card .profile-invite-desc { margin: 0; }
.invite-code-row { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.invite-code {
  flex: 1; text-align: center; font-size: 15px; font-weight: 800; letter-spacing: .18em;
  color: var(--accent-bright); background: rgba(0,0,0,.28); border: 1px dashed rgba(196,160,104,.35);
  border-radius: 10px; padding: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.invite-copy {
  flex: 0 0 auto; background: var(--accent-bright); color: #1a140b; border: none;
  border-radius: 10px; padding: 10px 15px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer;
}

/* 요금제 시트 — v3 컴팩트 카드 */
.plan-card { padding: 13px 15px; border-radius: 18px; }
.plan-avatar { width: 40px; height: 40px; }
.plan-feature-line { margin-top: 7px; font-size: 11px; line-height: 1.7; color: var(--muted); word-break: keep-all; }
.plan-desc { margin: 6px 0 0; font-size: 11.5px; }

/* 관리자 ADMIN 배지 (v3 시안 — 청록) */
.admin-badge {
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: #5fc7b0;
  border: 1px solid rgba(95,199,176,.4); padding: 3px 8px; border-radius: 999px; margin-left: auto; margin-right: 10px;
}
.admin-gate-min-val { flex: 0 0 38px; text-align: right; font-size: 12px; color: var(--accent-bright); font-weight: 700; font-variant-numeric: tabular-nums; }
/* 업데이트 팝업 — v3 골드 그라데이션 버튼 */
.ipop-cta { background: linear-gradient(135deg, var(--accent-bright), var(--accent)); }

/* 서비스 안내 항목 — 더 작게 */
.drawer-srow { padding: 10px 4px; }
.drawer-srow > span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.drawer-srow > svg { width: 13px; height: 13px; }
.drawer-section-label { font-size: 9.5px; margin-top: 16px; }

/* ---------- 관리자 통계 — 기간·그래프·컴팩트 표 · 저장하고 종료 ---------- */
.admin-usage-period { font-size: 12px; font-weight: 700; color: var(--accent-bright); font-variant-numeric: tabular-nums; margin-top: 4px; }
.admin-usage-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 10px 0 4px; }
.admin-period-btn { font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); padding: 6px 11px; border-radius: 999px; cursor: pointer; font-family: inherit; }
.admin-period-btn.active { color: #1a140b; background: var(--accent-bright); border-color: transparent; font-weight: 700; }
#adminUsageDaysInput { width: 74px; background: var(--panel); border: 1px solid var(--brass-24); border-radius: 999px; padding: 6px 11px; font: inherit; font-size: 11.5px; color: var(--ink); }
#adminUsageDaysInput:focus { outline: none; border-color: var(--accent-bright); }
.admin-usage-graph { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 10px 0 4px; padding: 4px 2px 0; overflow-x: auto; }
.aug-col { flex: 1 0 14px; min-width: 14px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.aug-bar { width: 100%; max-width: 26px; border-radius: 3px 3px 0 0; background: linear-gradient(180deg, var(--accent-bright), var(--accent)); }
.aug-label { font-size: 8px; color: var(--dimmest); font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 표 컴팩트 — Turbo 빼고 전 모델 한 줄 */
.admin-usage-table { font-size: 11px; }
.admin-usage-table th, .admin-usage-table td { padding: 6px 6px; }
.admin-usage-table td:first-child { white-space: nowrap; }
.fx-note { font-size: 10px; color: var(--dim); font-weight: 500; }
/* 저장하고 종료 — 골드 강조 */
.admin-save-exit { background: linear-gradient(135deg, rgba(220,192,138,.18), rgba(201,168,106,.08)); border: 1px solid rgba(220,192,138,.45); border-radius: 14px; }
.admin-save-exit .set-row-title { color: var(--accent-bright); }
.admin-unmark-link { display: block; margin: 12px auto 0; background: none; border: none; cursor: pointer; font: inherit; font-size: 11.5px; color: var(--dimmest); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 가입 추가 정보 (휴대폰 인증 · 난이도/목소리 · 가입 경로) ---------- */
.auth-extra { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.auth-phone-row { display: flex; gap: 8px; }
.auth-phone-row input { flex: 1; min-width: 0; }
.auth-phone-btn { flex: 0 0 auto; font-family: inherit; font-size: 12px; font-weight: 700; color: var(--accent-bright); background: var(--brass-07); border: 1px solid var(--brass-24); border-radius: 12px; padding: 0 14px; cursor: pointer; white-space: nowrap; }
.auth-phone-btn:disabled { opacity: .5; cursor: default; }
.auth-field-label { font-size: 11px; font-weight: 700; color: var(--dim); letter-spacing: .04em; margin-top: 4px; }
.auth-field-hint { font-size: 11px; color: var(--dim); margin: 0; min-height: 0; }
.auth-field-hint:empty { display: none; }
.auth-mini-seg { display: flex; gap: 6px; }
.auth-mini-seg .seg-btn { flex: 1; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 999px; padding: 8px 4px; cursor: pointer; }
.auth-mini-seg .seg-btn.active { color: #1a140b; background: var(--accent-bright); border-color: transparent; font-weight: 700; }
.auth-select { width: 100%; background: var(--panel); border: 1px solid var(--brass-24); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 13px; color: var(--ink); }
.auth-select:focus { outline: none; border-color: var(--accent-bright); }

/* ---------- 가입 축하 팝업 — 작곡가 4인방 ---------- */
.welcome-pop { position: fixed; inset: 0; z-index: 340; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 8, 5, .78); backdrop-filter: blur(6px); opacity: 0; transition: opacity .25s ease; }
.welcome-pop.show { opacity: 1; }
.welcome-card { position: relative; width: min(340px, 100%); text-align: center; background: var(--panel); border: 1px solid var(--brass-24); border-radius: 22px; padding: 30px 22px 24px; overflow: hidden; transform: translateY(14px) scale(.96); transition: transform .3s cubic-bezier(.34,1.56,.64,1); }
.welcome-pop.show .welcome-card { transform: none; }
.welcome-avatars { display: flex; justify-content: center; gap: 8px; margin-bottom: 16px; }
.welcome-avatars img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-bright); background: var(--brass-07); opacity: 0; transform: translateY(18px) scale(.6); }
.welcome-pop.show .welcome-avatars img { animation: welcomePopIn .55s cubic-bezier(.34,1.56,.64,1) forwards; }
.welcome-pop.show .welcome-avatars img:nth-child(1) { animation-delay: .1s; }
.welcome-pop.show .welcome-avatars img:nth-child(2) { animation-delay: .22s; }
.welcome-pop.show .welcome-avatars img:nth-child(3) { animation-delay: .34s; }
.welcome-pop.show .welcome-avatars img:nth-child(4) { animation-delay: .46s; }
@keyframes welcomePopIn { to { opacity: 1; transform: none; } }
.welcome-card h3 { margin: 0 0 6px; font-size: 18px; color: var(--accent-bright); }
.welcome-sub { margin: 0 0 18px; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.welcome-notes { position: absolute; inset: 0; pointer-events: none; }
.welcome-notes span { position: absolute; bottom: -20px; font-size: 15px; color: var(--accent-bright); opacity: 0; }
.welcome-pop.show .welcome-notes span { animation: noteFloat 2.8s ease-in infinite; }
.welcome-notes span:nth-child(1) { left: 12%; animation-delay: .3s; }
.welcome-notes span:nth-child(2) { left: 30%; animation-delay: 1.2s; font-size: 12px; }
.welcome-notes span:nth-child(3) { left: 55%; animation-delay: .7s; }
.welcome-notes span:nth-child(4) { left: 72%; animation-delay: 1.7s; font-size: 18px; }
.welcome-notes span:nth-child(5) { left: 88%; animation-delay: 2.2s; font-size: 12px; }
@keyframes noteFloat { 0% { opacity: 0; transform: translateY(0) rotate(0); } 15% { opacity: .8; } 100% { opacity: 0; transform: translateY(-190px) rotate(18deg); } }
@media (prefers-reduced-motion: reduce) {
  .welcome-pop, .welcome-card, .welcome-avatars img { transition: none; animation: none !important; opacity: 1; transform: none; }
  .welcome-notes { display: none; }
}

/* ---------- 관리자 요금제 차이 비교 ---------- */
.admin-tier-tabs { display: flex; gap: 6px; margin: 8px 0 10px; }
.admin-tier-tabs .seg-btn { flex: 1; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 999px; padding: 7px 4px; cursor: pointer; }
.admin-tier-tabs .seg-btn.active { color: #1a140b; background: var(--accent-bright); border-color: transparent; font-weight: 700; }
.tier-compare th.hl, .tier-compare td.hl { background: var(--brass-07); color: var(--accent-bright); font-weight: 700; }

/* 회원 관리 — 테스터 무료 지급 */
.comp-btn { font-family: inherit; font-size: 10px; font-weight: 700; color: var(--accent-bright); background: var(--brass-07); border: 1px solid var(--brass-24); border-radius: 999px; padding: 3px 8px; cursor: pointer; white-space: nowrap; }
.comp-btn:disabled { opacity: .5; cursor: default; }
.comp-badge { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .05em; color: #1a140b; background: var(--accent-bright); border-radius: 6px; padding: 2px 5px; margin-right: 5px; }

/* 튜터 목소리 8종 — 라벨 아래 4×2 그리드(여성 한 줄·남성 한 줄) + 요금제 잠금 표시 */
.set-row:has(#segTone) { flex-wrap: wrap; }
#segTone { flex: 1 1 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 8px; }
#segTone .seg-btn { text-align: center; padding: 7px 2px; white-space: nowrap; font-size: 12px; }
.seg-btn.locked { opacity: .45; }
.seg-btn.locked::after { content: "🔒"; font-size: 9px; margin-left: 3px; }

/* ---------- 온보딩 첫 곡 추천 (가입 축하 2단계) ---------- */
.welcome-pick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.welcome-pick { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.welcome-pick:active { background: rgba(220,192,138,.16); }
.welcome-pick .wp-note { color: var(--accent-bright); }
.welcome-skip { background: none; border: none; cursor: pointer; font: inherit; font-size: 11.5px; color: var(--dimmest); text-decoration: underline; text-underline-offset: 3px; }

/* 가입 폼 — 마케팅 수신 동의 */
.auth-marketing { font-size: 12px; color: var(--dim); }

/* 점검 모드 */
.maint-overlay { z-index: 360; }
.maint-ic { font-size: 40px; margin-bottom: 10px; }
.admin-maint-msg { width: 100%; background: var(--panel); border: 1px solid var(--brass-24); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 12.5px; color: var(--ink); margin: 6px 0 4px; }
.admin-maint-msg:focus { outline: none; border-color: var(--accent-bright); }
.admin-weekly-row { margin-top: 12px; }

.welcome-pop.picks .welcome-notes { display: none; }

/* ---------- 회원 관리 — 5열 한 화면 배치 ---------- */
.admin-members-table, .admin-comp-table { table-layout: fixed; width: 100%; font-size: 10.5px; }
.admin-members-table th, .admin-members-table td,
.admin-comp-table th, .admin-comp-table td { padding: 6px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-members-table th:nth-child(1), .admin-members-table td:nth-child(1) { width: 32%; }
.admin-members-table th:nth-child(2), .admin-members-table td:nth-child(2) { width: 18%; }
.admin-members-table th:nth-child(3), .admin-members-table td:nth-child(3) { width: 15%; }
.admin-members-table th:nth-child(4), .admin-members-table td:nth-child(4) { width: 17%; }
.admin-members-table th:nth-child(5), .admin-members-table td:nth-child(5) { width: 18%; text-align: center; }
.admin-comp-table th:nth-child(1), .admin-comp-table td:nth-child(1) { width: 34%; }
.admin-comp-table th:nth-child(2), .admin-comp-table td:nth-child(2) { width: 18%; text-align: center; }
.admin-comp-table th:nth-child(3), .admin-comp-table td:nth-child(3) { width: 33%; }
.admin-comp-table th:nth-child(4), .admin-comp-table td:nth-child(4) { width: 15%; }
.admin-members-table .mem-email, .admin-comp-table .mem-email { direction: rtl; text-align: left; } /* 긴 주소는 뒤쪽(도메인)부터 보이게 */
.comp-btn { width: 100%; font-family: inherit; font-size: 10px; font-weight: 700; color: var(--accent-bright); background: var(--brass-07); border: 1px solid var(--brass-24); border-radius: 999px; padding: 3px 2px; cursor: pointer; }
.comp-none { color: var(--dimmest); }
.comp-badge { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .04em; color: #1a140b; background: var(--accent-bright); border-radius: 6px; padding: 2px 4px; }
.comp-expired { opacity: .5; }

/* ---------- 수동 지급 팝업 (등급 + 기간 다이얼) ---------- */
.comp-card { width: min(330px, 92vw); }
.comp-target { font-size: 12px; color: var(--accent-bright); font-weight: 700; margin: 2px 0 12px; word-break: break-all; }
.comp-seg { display: flex; gap: 6px; margin-bottom: 14px; }
.comp-seg .seg-btn { flex: 1; font-family: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 999px; padding: 8px 2px; cursor: pointer; }
.comp-seg .seg-btn.active { color: #1a140b; background: var(--accent-bright); border-color: transparent; font-weight: 700; }
.comp-dial-label { font-size: 11px; font-weight: 700; color: var(--dim); margin-bottom: 4px; }
.comp-dial { position: relative; display: flex; gap: 6px; height: 102px; margin-bottom: 10px; background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 12px; overflow: hidden; }
.dial-col { flex: 1; height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; padding: 34px 0; text-align: center; }
.dial-col::-webkit-scrollbar { display: none; }
.dial-item { height: 34px; line-height: 34px; scroll-snap-align: center; font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.dial-band { position: absolute; left: 0; right: 0; top: 34px; height: 34px; pointer-events: none; border-top: 1px solid var(--brass-24); border-bottom: 1px solid var(--brass-24); background: rgba(220,192,138,.08); }
.comp-total { text-align: center; font-size: 13px; font-weight: 700; color: var(--accent-bright); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.comp-total.bad { color: #e08b8b; font-size: 11.5px; }

/* AI 연결 진단 */
.admin-diag-btn { margin-top: 8px; font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--accent-bright); background: var(--brass-07); border: 1px solid var(--brass-24); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
.admin-diag-btn:disabled { opacity: .5; }
.voice-hint { margin-top: 8px; }

/* ---------- 회원가입 화면 (연동 없이 가입) ---------- */
.signup-body { padding: 0 20px 40px; overflow-y: auto; height: calc(100% - 56px); }
.signup-steps { display: flex; gap: 8px; margin: 4px 0 18px; }
.sstep { flex: 1; text-align: center; font-size: 11.5px; font-weight: 700; color: var(--dimmest); background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 999px; padding: 7px 4px; }
.sstep.on { color: var(--accent-bright); border-color: var(--accent-bright); background: rgba(220,192,138,.1); }
.signup-h { font-size: 17px; margin: 6px 0 14px; color: var(--ink); }
.agree-row { display: flex; align-items: center; gap: 9px; padding: 11px 12px; font-size: 13px; color: var(--ink-2); background: var(--brass-07); border: 1px solid var(--brass-18); border-radius: 12px; cursor: pointer; }
.agree-row input { width: 17px; height: 17px; accent-color: var(--accent-bright); flex: 0 0 auto; }
.agree-row > span { flex: 1; }
.agree-all { margin-bottom: 10px; font-weight: 700; color: var(--accent-bright); border-color: var(--brass-24); }
.agree-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; }
.agree-view { font-family: inherit; font-size: 11px; color: var(--dim); background: none; border: none; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; flex: 0 0 auto; }
.signup-form { gap: 8px; }
.signup-form input[type="text"], .signup-form input[type="email"], .signup-form input[type="password"], .signup-form input[type="tel"] {
  width: 100%; background: var(--panel); border: 1px solid var(--brass-24); border-radius: 12px; padding: 12px 13px; font: inherit; font-size: 13.5px; color: var(--ink); }
.signup-form input:focus { outline: none; border-color: var(--accent-bright); }
.pw-meter { height: 5px; border-radius: 3px; background: var(--brass-07); overflow: hidden; margin: 2px 0; }
.pw-meter span { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .25s ease, background .25s ease; }
.pw-meter span.weak { background: #c96a6a; }
.pw-meter span.mid { background: #d3a95f; }
.pw-meter span.strong { background: #6fb98a; }

/* 로봇 아님 인증 */
.captcha-card { width: min(320px, 92vw); }
.captcha-q { font-size: 14px; font-weight: 700; color: var(--accent-bright); margin: 8px 0 14px; }
.captcha-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.captcha-opt { font-family: inherit; font-size: 13px; font-weight: 600; color: var(--ink); background: var(--brass-07); border: 1px solid var(--brass-24); border-radius: 12px; padding: 13px 6px; cursor: pointer; }
.captcha-opt:active { background: rgba(220,192,138,.18); }
.signup-step .auth-submit { display: block; width: 100%; }
.signup-step .auth-browse { display: block; width: 100%; margin-top: 10px; }

/* ---------- 첫 실행 튜토리얼 (스포트라이트 안내) ---------- */
.tut { position: fixed; inset: 0; z-index: 400; }
.tut.hidden { display: none; }
/* 튜토리얼 강조 칸 — 원래 화면의 칸과 헷갈리지 않도록 숨을 쉬듯 빛나게 한다.
   바깥 그림자(9999px)는 화면을 어둡게 덮는 층이라 애니메이션에서도 그대로 유지해야 한다. */
.tut-spot { position: fixed; border-radius: 14px; border: 2px solid var(--accent-bright);
  box-shadow: 0 0 0 9999px rgba(8,6,3,.82), 0 0 16px 3px rgba(201,168,106,.45);
  transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
  animation: tutGlow 2.2s ease-in-out infinite; pointer-events: none; overflow: hidden; }
@keyframes tutGlow {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(8,6,3,.82), 0 0 14px 2px rgba(201,168,106,.38); }
  50%      { box-shadow: 0 0 0 9999px rgba(8,6,3,.86), 0 0 30px 7px rgba(201,168,106,.78); }
}
/* 빛이 한 번씩 훑고 지나가 "여기를 보라"는 느낌을 준다 */
.tut-spot::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(201,168,106,.20) 50%, transparent 58%);
  transform: translateX(-120%);
  animation: tutSweep 2.2s ease-in-out infinite;
}
@keyframes tutSweep {
  0%, 30%   { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}
/* 모션을 줄여 달라는 설정에서는 깜빡임 없이 은은한 테두리만 남긴다 */
@media (prefers-reduced-motion: reduce) {
  .tut-spot { animation: none; box-shadow: 0 0 0 9999px rgba(8,6,3,.84), 0 0 18px 4px rgba(201,168,106,.55); }
  .tut-spot::after { animation: none; opacity: 0; }
}
.tut-tip { position: fixed; left: 50%; transform: translateX(-50%); width: min(340px, calc(100vw - 32px));
  background: var(--panel); border: 1px solid var(--brass-24); border-radius: 16px; padding: 16px 18px; }
.tut-step { font-size: 11px; font-weight: 700; color: var(--accent-bright); letter-spacing: .06em; }
.tut-tip h4 { font-size: 15.5px; margin: 6px 0 6px; color: var(--ink); }
.tut-tip p { font-size: 13px; line-height: 1.65; color: var(--muted); margin: 0 0 14px; }
.tut-actions { display: flex; gap: 10px; align-items: center; }
.tut-skip { flex: 0 0 auto; font-family: inherit; font-size: 12px; color: var(--dimmest); background: none; border: none;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tut-next { flex: 1; font-family: inherit; font-size: 13.5px; font-weight: 700; color: #1a140b;
  background: linear-gradient(135deg, var(--accent-bright), var(--accent)); border: none; border-radius: 12px; padding: 11px; cursor: pointer; }

/* 제목을 눌러 곡 정보 열기 */
.np-title-btn { background: none; border: none; font: inherit; color: inherit; text-align: inherit; padding: 0; cursor: default; width: 100%; }
.np-title-btn.has-info { cursor: pointer; }
.np-title-btn.has-info::after { content: "ⓘ"; font-size: 11px; color: var(--accent-bright); margin-left: 6px; vertical-align: middle; }

/* 프로필 로그아웃 행 */
.acct-logout span:first-child { color: var(--accent-bright); font-weight: 700; }
.tut-tip.center { top: 50%; bottom: auto; transform: translate(-50%, -50%); }

/* ===== 첫 실행 로딩 화면 — 작곡가 초상이 번갈아 나와 윙크한다 ===== */
.boot {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background:
    radial-gradient(120% 80% at 50% 24%, rgba(201, 168, 106, .12), transparent 62%),
    var(--bg);
  transition: opacity .5s ease, visibility .5s ease;
}
.boot.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

/* 초상 — 원형 액자에 담아 촛불빛 아래 걸린 그림처럼 */
.boot-portrait {
  position: relative; width: min(46vw, 168px); aspect-ratio: 1; border-radius: 50%;
  overflow: hidden; background: var(--panel-solid);
  box-shadow: 0 0 0 1px var(--brass-30), 0 0 0 7px rgba(201, 168, 106, .08),
              0 18px 40px rgba(0, 0, 0, .55);
  animation: bootRise .7s cubic-bezier(.2, .8, .3, 1) both;
}
.boot-face { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* 윙크 — 눈 감은 사진을 잠깐 얹는다. 두 사진은 눈 위치를 맞춰 잘라 두어 얼굴이 어긋나지 않고,
   아주 짧게 겹쳐 넘겨 눈을 깜빡이듯 자연스럽게 바뀐다. */
.boot-face-wink { opacity: 0; }
/* 로딩 화면은 최소 2.5초 보인다(app.js MIN_MS). 그 안에 윙크가 반드시 한 번은
   지나가도록 1.5초쯤에 눈을 감았다 뜨게 맞춰 두었다. */
/* 눈 감는 순간이 '툭' 바뀌지 않도록, 감을 때와 뜰 때 모두 부드럽게 겹쳐 넘긴다.
   실제 눈꺼풀처럼 감기는 쪽이 조금 빠르고 뜨는 쪽이 느긋하다. */
.boot-portrait.is-wink .boot-face-wink { animation: bootWink 3.2s .9s infinite; }
@keyframes bootWink {
  0%, 28%   { opacity: 0; animation-timing-function: cubic-bezier(.45, 0, .55, 1); }  /* 감기 시작 */
  40%, 48%  { opacity: 1; animation-timing-function: cubic-bezier(.35, 0, .4, 1); }   /* 잠깐 감은 채로 */
  64%, 100% { opacity: 0; }                                                            /* 천천히 뜬다 */
}

.boot-name { margin-top: 22px; font-size: 21px; letter-spacing: .16em; color: var(--ink-bright);
  animation: bootRise .7s .1s cubic-bezier(.2, .8, .3, 1) both; }
.boot-sub { margin-top: 4px; font-size: 12.5px; letter-spacing: .04em; color: var(--dim);
  animation: bootRise .7s .18s cubic-bezier(.2, .8, .3, 1) both; }

/* 지휘봉 박자처럼 오르내리는 막대 */
.boot-bars { display: flex; align-items: flex-end; gap: 4px; height: 18px; margin-top: 18px; }
.boot-bars i { width: 3px; height: 6px; border-radius: 2px; background: var(--accent);
  opacity: .75; animation: bootBar 1.1s ease-in-out infinite; }
.boot-bars i:nth-child(2) { animation-delay: .12s; }
.boot-bars i:nth-child(3) { animation-delay: .24s; }
.boot-bars i:nth-child(4) { animation-delay: .36s; }
.boot-bars i:nth-child(5) { animation-delay: .48s; }
@keyframes bootBar { 0%, 100% { height: 6px; } 50% { height: 17px; } }
@keyframes bootRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .boot-portrait, .boot-name, .boot-sub { animation: none; }
  .boot-bars i { animation: none; height: 11px; }
  .boot-portrait.is-wink .boot-face-wink { animation: none; opacity: 1; }
}

/* ----- 관리자: 소셜 로그인 주소 확인 ----- */
.admin-oauth-result { margin-top: 10px; }
.admin-oauth-result .oauth-base { font-size: 12.5px; color: var(--dim); margin-bottom: 8px; }
.admin-oauth-result .oauth-row { padding: 8px 10px; margin-bottom: 6px; border-radius: 10px;
  background: var(--panel-solid); border: 1px solid var(--brass-30); }
.admin-oauth-result .oauth-row.off { opacity: .55; }
.admin-oauth-result .oauth-name { font-size: 13px; font-weight: 700; color: var(--ink-bright); margin-bottom: 3px; }
.admin-oauth-result .oauth-state { font-weight: 400; font-size: 11.5px; color: var(--dim); }
/* 주소는 눌러서 복사한다 — 길어도 줄바꿈해 전부 보이게 둔다 */
.admin-oauth-result .oauth-url { font-size: 12px; line-height: 1.5; color: var(--accent-bright);
  word-break: break-all; cursor: pointer; text-decoration: underline dotted; }

/* ----- 관리자: AI 연결 진단 오류를 읽기 쉽게 ----- */
.diag-plain { display: block; margin: 3px 0 2px; color: var(--ink-bright); }
/* 영어 원문은 접어 두고 필요할 때만 편다 — 화면을 잡아먹지 않게 */
.diag-raw { margin: 2px 0 4px; }
.diag-raw summary { cursor: pointer; font-size: 11.5px; color: var(--dim); }
.diag-raw { font-size: 11.5px; color: var(--dim); word-break: break-all; }

/* ===== AI 추천 — 오늘의 무드 + 음악 취향 =====
   링크 입력 바로 아래에 접힌 채로 놓인다. 링크가 있는 사람은 그냥 지나치고,
   뭘 들을지 모르는 사람만 펼쳐 쓰도록 기본은 닫아 둔다. */
.ai-rec { width: min(100%, 520px); margin: 18px auto 0; text-align: left; }
.ai-rec-head { display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 13px 15px; border-radius: 14px; cursor: pointer;
  background: var(--panel-solid); border: 1px solid var(--brass-30); color: inherit; }
.ai-rec-spark { font-size: 15px; color: var(--accent-bright); }
.ai-rec-head-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ai-rec-title { font-size: 15px; color: var(--ink-bright); letter-spacing: .04em; }
.ai-rec-sub { font-size: 11.5px; color: var(--dim); }
.ai-rec-chev { width: 18px; height: 18px; color: var(--dim); flex: none; transition: transform .25s ease; }
.ai-rec-head.open .ai-rec-chev { transform: rotate(180deg); }

.ai-rec-body { padding: 14px 3px 2px; }
.ai-rec-label { font-size: 11.5px; letter-spacing: .1em; color: var(--dim); margin: 10px 2px 8px; }
.ai-rec-body .ai-rec-label:first-child { margin-top: 0; }
.ai-rec-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.ai-rec-chip { padding: 8px 13px; border-radius: 999px; font-size: 13px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--brass-30);
  transition: background .18s ease, color .18s ease, border-color .18s ease; }
.ai-rec-chip.on { background: var(--accent-bright); border-color: var(--accent-bright);
  color: #1b1509; font-weight: 700; }

.ai-rec-go { width: 100%; margin-top: 16px; padding: 13px; border-radius: 12px; cursor: pointer;
  font-size: 14px; font-weight: 700; letter-spacing: .02em;
  background: var(--accent-bright); color: #1b1509; border: 0; }
.ai-rec-go:disabled { background: transparent; color: var(--dim);
  border: 1px dashed var(--brass-30); cursor: default; font-weight: 400; }
.ai-rec-status { margin-top: 11px; font-size: 12px; color: var(--dim); text-align: center; }
.ai-rec-list:not(:empty) { margin-top: 12px; }

/* ===== 홀 사운드 (Unlimited) ===== */
.hall-btn { color: var(--accent-bright); }
/* 지금 어떤 녹음을 어떤 이용 허락으로 듣고 있는지 밝히는 줄 */
.hall-bar { display: flex; align-items: center; gap: 9px; margin: 0 auto 8px;
  width: min(100%, 520px); padding: 7px 11px; border-radius: 10px;
  background: var(--panel-solid); border: 1px solid var(--brass-30); font-size: 11.5px; }
.hall-bar.hidden { display: none; }
.hall-bar-tag { flex: none; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: 10.5px;
  background: var(--accent-bright); color: #1b1509; letter-spacing: .04em; }
/* 출처가 길어도 줄을 넘기지 않고 말줄임 — 재생 화면이 밀리지 않게 */
.hall-bar-info { flex: 1; min-width: 0; color: var(--dim);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hall-bar-info a { color: var(--accent-bright); text-decoration: underline dotted; }
.hall-bar-exit { flex: none; padding: 4px 9px; border-radius: 8px; cursor: pointer; font-size: 11px;
  background: transparent; color: var(--ink); border: 1px solid var(--brass-30); }

/* ===== 튜토리얼 마무리 연출 =====
   안내가 끝나면 화면이 환하게 밝아지고, 거장 셋이 차례로 스쳐 지나간 뒤
   타이틀이 떠서 2초 머문다. 그다음 회원가입 화면으로 넘어간다. */
.tut-finale { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center;
  background: var(--bg, #12100b); overflow: hidden; }
.tut-finale.hidden { display: none; }
/* 흰 섬광 — 게임에서 장면이 바뀔 때처럼 한 번 환하게 */
.finale-flash { position: absolute; inset: 0; background: #fff; opacity: 0;
  animation: finaleFlash 1s ease-out forwards; }
@keyframes finaleFlash {
  0% { opacity: 0; }
  12% { opacity: .95; }
  100% { opacity: 0; }
}
/* 거장 셋이 같은 자리에서 겹쳐 나타났다 사라진다 (디졸브) */
.finale-masters { position: relative; width: 168px; height: 168px; }
.finale-masters img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover; opacity: 0; border: 1px solid var(--brass-30);
  box-shadow: 0 0 0 7px rgba(201,168,106,.08), 0 18px 40px rgba(0,0,0,.55); }
.finale-masters img:nth-child(1) { animation: finaleFade 1.1s ease-in-out .55s forwards; }
.finale-masters img:nth-child(2) { animation: finaleFade 1.1s ease-in-out 1.15s forwards; }
.finale-masters img:nth-child(3) { animation: finaleFade 1.1s ease-in-out 1.75s forwards; }
@keyframes finaleFade {
  0% { opacity: 0; transform: scale(1.06); }
  35%, 60% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(.97); }
}
/* 거장들이 지나간 자리에 타이틀 */
.finale-title { position: absolute; font-family: MaruBuri, serif; font-size: 25px; letter-spacing: .22em;
  color: var(--ink-bright); opacity: 0; text-align: center;
  animation: finaleTitle 1.1s ease-out 2.6s forwards; }
@keyframes finaleTitle {
  0% { opacity: 0; letter-spacing: .5em; }
  100% { opacity: 1; letter-spacing: .22em; }
}
@media (prefers-reduced-motion: reduce) {
  .finale-flash, .finale-masters img { animation-duration: .01s; }
  .finale-title { animation: none; opacity: 1; }
}

/* 요금제 이름 옆 타이틀 — 실속형 / 애호가형 */
.plan-tagline { margin-left: 7px; padding: 2px 7px; border-radius: 999px; font-size: 10.5px;
  font-weight: 700; letter-spacing: .02em; vertical-align: middle;
  background: rgba(201,168,106,.14); color: var(--accent-bright); border: 1px solid var(--brass-30); }

/* ===== 음성 해설 사용량 게이지 ===== */
.usage { margin-top: 13px; }
.usage[hidden] { display: none; }
.usage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.usage-label { font-size: 11.5px; color: var(--dim); letter-spacing: .02em; }
.usage-value { font-size: 12.5px; font-weight: 700; color: var(--ink-bright); white-space: nowrap; }
.usage-bar { height: 7px; border-radius: 999px; overflow: hidden;
  background: rgba(255,255,255,.07); border: 1px solid var(--brass-30); }
.usage-fill { display: block; height: 100%; width: 0; border-radius: 999px;
  background: var(--accent-bright); transition: width .5s cubic-bezier(.2,.8,.3,1); }
.usage-note { margin: 6px 0 0; font-size: 10.5px; color: var(--dimmest); line-height: 1.5; }

/* 한도가 가까워지면 눈에 띄게 — 다 쓰기 전에 알아차리도록 */
.usage.is-warn .usage-fill { background: #d8a13c; }
.usage.is-full .usage-fill { background: #c96a4a; }
.usage.is-full .usage-value { color: #e08a6a; }

/* Unlimited — 잴 것이 없으니 막대 대신 흐르는 금빛 띠로 보여 준다 */
.usage.is-unlimited .usage-bar { border-color: rgba(214,182,116,.55);
  box-shadow: 0 0 12px rgba(201,168,106,.28); }
.usage.is-unlimited .usage-fill {
  background: linear-gradient(100deg,
    #8a6a2c 0%, #d6b674 18%, #fff3cf 30%, #d6b674 42%, #8a6a2c 60%,
    #d6b674 78%, #fff3cf 88%, #8a6a2c 100%);
  background-size: 260% 100%;
  animation: usageShine 3.6s linear infinite;
}
@keyframes usageShine { from { background-position: 200% 0; } to { background-position: -60% 0; } }
.usage.is-unlimited .usage-value {
  background: linear-gradient(96deg, #d6b674, #fff3cf 45%, #d6b674);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  letter-spacing: .04em;
}
.usage.is-unlimited .usage-note { color: var(--accent-bright); opacity: .75; }
@media (prefers-reduced-motion: reduce) {
  .usage.is-unlimited .usage-fill { animation: none; background-position: 50% 0; }
}

/* ===== 한도 소진 → 업그레이드 안내 ===== */
.upgrade-pop { text-align: center; max-width: 340px; }
.upgrade-face { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 2px auto 10px;
  display: block; border: 1px solid var(--brass-30);
  box-shadow: 0 0 0 6px rgba(201,168,106,.08), 0 10px 26px rgba(0,0,0,.5); }
.upgrade-badge { display: inline-block; padding: 3px 11px; border-radius: 999px; margin-bottom: 9px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .1em; color: #1b1509;
  background: linear-gradient(96deg, #d6b674, #fff3cf 50%, #d6b674); }
.upgrade-pop h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink-bright); word-break: keep-all; }
.upgrade-pop > p { margin: 0 0 14px; font-size: 13px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
/* 무엇이 열리는지 — 짧게 나열한다 */
.upgrade-benefits { list-style: none; margin: 0 0 14px; padding: 12px 14px; text-align: left;
  border-radius: 12px; background: var(--panel-solid); border: 1px solid var(--brass-30); }
.upgrade-benefits li { position: relative; padding-left: 18px; font-size: 12.5px; line-height: 1.9; color: var(--ink); }
.upgrade-benefits li::before { content: "✦"; position: absolute; left: 0; color: var(--accent-bright); font-size: 11px; }
.upgrade-price { margin-bottom: 12px; font-size: 13px; color: var(--dim); }
.upgrade-price b { font-size: 21px; color: var(--ink-bright); letter-spacing: .01em; }
.upgrade-price small { margin-left: 2px; font-size: 12px; }
.upgrade-go { width: 100%; }
.upgrade-later { width: 100%; margin-top: 8px; background: transparent; border-color: transparent; color: var(--dimmest); }

/* ===== 사업자 정보 (고객센터 하단) ===== */
.biz-info { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--brass-24); }
.biz-info[hidden] { display: none; }
.biz-list { margin: 0; }
/* 이름과 값을 두 칸으로 — 값이 길면 아래로 흐르게 두어 잘리지 않는다 */
.biz-row { display: flex; gap: 10px; padding: 4px 0; font-size: 11.5px; line-height: 1.6; }
.biz-row dt { flex: 0 0 96px; color: var(--dimmest); }
.biz-row dd { flex: 1; min-width: 0; margin: 0; color: var(--dim); word-break: keep-all; }

/* 광고 배너가 떠 있을 때 — 배너는 웹뷰 위에 겹쳐 뜨므로 그 높이만큼 아래를 비운다.
   (적응형 배너는 기기 폭에 따라 50~60dp 안팎이라 넉넉히 잡는다) */
body.has-ad-banner { padding-bottom: 62px; }

/* 미리듣기가 끝나 해설이 멈췄을 때 그 자리에 남기는 안내.
   아무 말 없이 멈추면 앱이 고장 난 것처럼 보인다. */
.gate-note {
  margin: 18px 2px 6px; padding: 18px 18px 16px; border-radius: 16px; text-align: center;
  background: var(--brass-07); border: 1px solid var(--brass-24);
}
.gate-note-title { margin: 0; font-size: 15px; font-weight: 800; color: var(--ink-bright); }
.gate-note-desc { margin: 6px 0 14px; font-size: 13px; line-height: 1.55; color: var(--muted, var(--dim)); word-break: keep-all; }
.gate-note-btn {
  width: 100%; padding: 13px 16px; border: none; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 800; color: #2a2010;
  background: linear-gradient(180deg, #e8ceA0, #d0ae74);
}
.gate-note-btn:active { opacity: .82; }
/* 한도 안내에서 광고로 시간을 더하는 버튼 */
.upgrade-ad { margin-top: 8px; }
.upgrade-ad.hidden { display: none; }
