/* hallmark: 3.0.0 | scope: app | theme: custom (modern-two-tone-studio) | signature: unified-sheet-lyrics-loop-studio
 * critique: crisp cool-ivory studio white + deep slate ink + signature indigo + warm amber, midnight dark studio (WCAG AA 4.5:1+), frosted glass header, zero transition:all
 * waive: 24b (dense studio utility controls intentionally use compact 6px/10px rhythm for mobile viewport fit)
 */

:root {
  --font-sans: 'Pretendard Variable', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SFMono-Regular', Menlo, Consolas, monospace;

  /* Modern Two-Tone Studio Light Palette (WCAG >= 4.5:1 verified) */
  --bg-canvas: #F4F6F9;
  --bg-surface: #FFFFFF;
  --bg-elevated: #F8FAFC;
  --bg-subtle: #EEF2F6;
  --bg-subtle-hover: #E2E8F0;
  --bg-sheet-stage: #E9EEF4;
  --bg-player: #0F172A;
  --bg-player-elevated: #172235;
  --bg-player-subtle: #22304A;

  --ink-primary: #0F172A;
  --ink-secondary: #475569;
  --ink-muted: #64748B;
  --ink-on-dark: #F8FAFC;
  --ink-on-dark-muted: #94A3B8;
  --ink-on-accent: #FFFFFF;

  --border-hairline: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-on-dark: rgba(148, 163, 184, 0.20);

  --accent-primary: #1D4ED8;
  --accent-primary-hover: #1E40AF;
  --accent-primary-soft: #EFF6FF;
  --accent-brass: #B45309;
  --accent-brass-soft: #FEF3C7;
  --accent-crimson: #B91C1C;
  --accent-crimson-soft: #FEF2F2;
  --accent-sage: #15803D;
  --accent-sage-soft: #ECFDF5;
  --accent-teal: #0F766E;
  --accent-teal-soft: #F0FDFA;
  --accent-plum: #6D28D9;
  --accent-plum-soft: #F5F3FF;

  --wave-idle: #64748B;
  --loop-fill: rgba(245, 158, 11, 0.24);
  --overlay-scrim: rgba(15, 23, 42, 0.62);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 6px 18px rgba(15, 23, 42, 0.06), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.08);

  --radius-sm: 7px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);

  --header-h: 58px;
  --player-h: 86px;
  --container-max: 1440px;
}

[data-theme="dark"] {
  /* Midnight Studio Dark Palette (WCAG AA 4.5:1+ verified) */
  --bg-canvas: #0B111C;
  --bg-surface: #131C2B;
  --bg-elevated: #1A2538;
  --bg-subtle: #202E45;
  --bg-subtle-hover: #2A3B57;
  --bg-sheet-stage: #080D16;
  --bg-player: #090F1A;
  --bg-player-elevated: #131E30;
  --bg-player-subtle: #1E2D45;

  --ink-primary: #F1F5F9;
  --ink-secondary: #CBD5E1;
  --ink-muted: #94A3B8;
  --ink-on-dark: #F8FAFC;
  --ink-on-dark-muted: #94A3B8;
  --ink-on-accent: #0B111C;

  --border-hairline: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.26);
  --border-on-dark: rgba(148, 163, 184, 0.22);

  --accent-primary: #60A5FA;
  --accent-primary-hover: #93C5FD;
  --accent-primary-soft: #172947;
  --accent-brass: #FBBF24;
  --accent-brass-soft: #332510;
  --accent-crimson: #F87171;
  --accent-crimson-soft: #3B1A1F;
  --accent-sage: #34D399;
  --accent-sage-soft: #123329;
  --accent-teal: #2DD4BF;
  --accent-teal-soft: #113235;
  --accent-plum: #C084FC;
  --accent-plum-soft: #2C1E42;

  --wave-idle: #475569;
  --loop-fill: rgba(251, 191, 36, 0.28);
  --overlay-scrim: rgba(4, 7, 14, 0.80);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30), 0 1px 3px rgba(0, 0, 0, 0.22);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.38), 0 2px 6px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.56), 0 6px 16px rgba(0, 0, 0, 0.36);
}

*, *::before, *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--ink-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
  padding: 0;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================================
 * 잠금 게이트 (팀 접근코드)
 * ============================================================================ */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--bg-canvas);
}

.lock-screen[hidden] {
  display: none;
}

.lock-card {
  width: 100%;
  max-width: 400px;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-md);
}

.lock-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.lock-emblem {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lock-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
  min-width: 0;
}

.lock-sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.lock-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-secondary);
  line-height: 1.55;
}

.lock-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lock-input {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-align: center;
  transition: border-color 160ms var(--ease-out);
}

.lock-input:focus {
  border-color: var(--accent-primary);
  outline: none;
}

.lock-error {
  min-height: 20px;
  font-size: 13px;
  color: var(--accent-crimson);
  font-weight: 500;
}

.lock-hint {
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border-hairline);
  font-size: 12.5px;
  color: var(--ink-muted);
}

/* ============================================================================
 * 공통 버튼 시스템
 * ============================================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
}

.btn-secondary {
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
  border: 1px solid var(--border-hairline);
}

.btn-ghost {
  background-color: transparent;
  color: var(--ink-secondary);
}

.btn-brass {
  background-color: var(--accent-brass-soft);
  color: var(--accent-brass);
  border: 1px solid var(--accent-brass);
}

.btn-danger {
  background-color: var(--accent-crimson-soft);
  color: var(--accent-crimson);
  border: 1px solid var(--accent-crimson);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12.5px;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-block {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover:not(:disabled) { background-color: var(--accent-primary-hover); }
  .btn-secondary:hover:not(:disabled) { background-color: var(--bg-subtle-hover); }
  .btn-ghost:hover:not(:disabled) { background-color: var(--bg-subtle); color: var(--ink-primary); }
}

/* ============================================================================
 * 상단 내비게이션 헤더
 * ============================================================================ */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--player-h) + 12px);
}

.app-shell[hidden] {
  display: none;
}

body.is-beloved-tab .app-shell,
body.is-prayer-tab .app-shell {
  padding-bottom: 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background-color: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-hairline);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] .topbar {
  background-color: rgba(11, 17, 28, 0.86);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
}

.topbar-inner {
  max-width: var(--container-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-align: left;
  padding: 4px 8px 4px 4px;
  margin-left: -4px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 140ms ease, transform 140ms var(--ease-out);
}

.brand:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .brand:hover {
    background-color: var(--bg-subtle);
  }
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
  box-shadow: 0 2px 8px rgba(29, 78, 216, 0.24);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 2026-11-25 새 앱 로고(비둘기) 그림 — 테마와 무관하게 그림 그대로 */
.brand-mark.brand-mark--img,
html[data-mood] .brand-mark.brand-mark--img,
html[data-custom-ink="1"] .brand-mark.brand-mark--img {
  background: transparent !important;
  padding: 0 !important;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(180, 100, 80, 0.22) !important;
}

.brand-mark--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--bg-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 7px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: transform 140ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}

.nav-tab:active {
  transform: scale(0.97);
}

.nav-tab svg {
  width: 15px;
  height: 15px;
}

.nav-tab.is-active {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 상단 우측 화면 밝기 조절 슬라이더·휠 스크롤·팝오버 */
.brightness-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 8px 0 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.brightness-control:hover,
.brightness-control:focus-within {
  border-color: var(--accent-primary);
}

.brightness-control.is-dimmed {
  border-color: rgba(217, 119, 6, 0.45);
  background-color: rgba(217, 119, 6, 0.10);
  color: var(--ink-primary);
}

.brightness-icon-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  width: 22px;
  height: 22px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.brightness-icon-btn svg {
  width: 15px;
  height: 15px;
}

.brightness-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 72px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong, rgba(100, 116, 139, 0.35));
  outline: none;
  cursor: pointer;
  margin: 0;
}

.brightness-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.32);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.brightness-slider::-webkit-slider-thumb:hover {
  transform: scale(1.16);
}

.brightness-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.32);
  cursor: pointer;
}

.brightness-pct-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 11px;
  font-weight: 700;
  min-width: 31px;
  padding: 0 2px;
  text-align: right;
  cursor: pointer;
}

.brightness-control.is-dimmed .brightness-pct-btn {
  color: #b45309;
}

[data-theme="dark"] .brightness-control.is-dimmed .brightness-pct-btn {
  color: #fbbf24;
}

.screen-dim-veil {
  position: fixed;
  inset: 0;
  background: #000000;
  opacity: 0;
  pointer-events: none;
  z-index: 9990;
  transition: opacity 0.08s linear;
}

.brightness-popover {
  position: fixed;
  top: calc(var(--header-h, 56px) + 8px);
  right: 12px;
  width: min(300px, calc(100vw - 24px));
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-surface);
  color: var(--ink-primary);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.26);
  z-index: 9995;
}

.brightness-popover[hidden] {
  display: none !important;
}

.brightness-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.brightness-pop-title {
  font-size: 13px;
  font-weight: 700;
}

.brightness-pop-pct {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-primary);
}

.brightness-pop-slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.brightness-pop-edge {
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.brightness-pop-slider {
  flex: 1;
  accent-color: var(--accent-primary);
  height: 24px;
  cursor: pointer;
}

.brightness-pop-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.brightness-preset-btn {
  appearance: none;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  border-radius: 8px;
  padding: 6px 4px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.brightness-preset-btn.is-active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
}

@media (max-width: 980px) {
  .brightness-control {
    padding: 0 5px;
    gap: 0;
  }
  .brightness-slider,
  .brightness-pct-btn {
    display: none;
  }
  .brightness-icon-btn {
    width: 26px;
    height: 26px;
  }
}

.sync-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-sage-soft);
  color: var(--accent-sage);
  font-size: 12px;
  font-weight: 600;
}

/* ============================================================================
 * 메인 컨테이너 & 탭 뷰
 * ============================================================================ */
.main-wrap {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px 18px 24px;
  flex: 1;
}

.tab-panel[hidden] {
  display: none;
}

/* PWA 1줄 설치 안내 배너 */
.pwa-install-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 12px;
  margin-bottom: 12px;
  background-color: var(--accent-primary-soft);
  border: 1px solid rgba(29, 78, 216, 0.20);
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .pwa-install-bar {
  border-color: rgba(96, 165, 250, 0.28);
}

.pwa-install-desc {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.45;
  flex: 1 1 240px;
  min-width: 0;
}

/* 3초 사용 가이드 배너 */
.quick-guide-banner {
  background-color: var(--accent-primary-soft);
  border: 1px solid rgba(29, 78, 216, 0.24);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

[data-theme="dark"] .quick-guide-banner {
  border-color: rgba(96, 165, 250, 0.30);
}

.quick-guide-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 13px;
  color: var(--ink-primary);
  line-height: 1.45;
}

.quick-guide-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.quick-guide-num {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
  font-size: 11.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* 악보 바로 위: 프로급 이 곡 연습 스튜디오 카드 */
.inline-practice-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-practice-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.inline-practice-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.inline-practice-status {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-primary);
  font-variant-numeric: tabular-nums;
}

.inline-wave-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.inline-wave-canvas {
  width: 100%;
  height: 52px;
  display: block;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  touch-action: none;
}

.inline-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.pro-transport-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pro-transport-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.play-tri-icon {
  transform: translateX(1px);
}

.inline-play-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 10px rgba(29, 78, 216, 0.28);
  transition: transform 140ms var(--ease-out), background-color 150ms ease, box-shadow 180ms ease;
}

.inline-play-circle.is-playing {
  background-color: #16A34A;
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.24), 0 3px 10px rgba(22, 163, 74, 0.35);
}

.inline-play-circle:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .inline-play-circle:hover {
    background-color: var(--accent-primary-hover);
  }
  .inline-play-circle.is-playing:hover {
    background-color: #15803D;
  }
}

/* 재생 중 / 일시정지 상태 뱃지 + 3막대 이퀄라이저 */
.play-state-badge,
.dock-state-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.play-state-badge {
  background-color: var(--bg-subtle);
  color: var(--ink-muted);
  border: 1px solid var(--border-hairline);
}

.play-state-badge.is-playing {
  background-color: rgba(22, 163, 74, 0.14);
  color: #15803D;
  border-color: rgba(22, 163, 74, 0.38);
}

[data-theme="dark"] .play-state-badge.is-playing {
  background-color: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.4);
}

.dock-state-badge {
  background-color: rgba(148, 163, 184, 0.16);
  color: #94A3B8;
  border: 1px solid rgba(148, 163, 184, 0.24);
}

.dock-state-badge.is-playing {
  background-color: rgba(34, 197, 94, 0.22);
  color: #4ADE80;
  border-color: rgba(74, 222, 128, 0.48);
}

.eq-bars {
  display: inline-flex;
  align-items: flex-end;
  gap: 1.5px;
  height: 10px;
}

.eq-bars i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 1px;
  background-color: currentColor;
  animation: eqBounce 0.72s ease-in-out infinite alternate;
}

.eq-bars i:nth-child(2) {
  animation-delay: 0.22s;
  height: 60%;
}

.eq-bars i:nth-child(3) {
  animation-delay: 0.44s;
  height: 80%;
}

@keyframes eqBounce {
  0% { transform: scaleY(0.28); }
  100% { transform: scaleY(1); }
}

.vol-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 2px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-hairline);
}

.vol-slider {
  width: 82px;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.vol-pct {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  min-width: 34px;
  text-align: right;
}

.playmode-seg {
  display: inline-flex;
  background-color: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 2px;
}

.playmode-btn {
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: background-color 150ms ease, color 150ms ease;
}

.playmode-btn.is-active {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

.playmode-btn.is-active[data-playmode="repeat-all"] {
  background-color: #16A34A;
  color: #FFFFFF;
}

.playmode-btn.is-active[data-playmode="repeat-one"] {
  background-color: var(--accent-brass);
  color: var(--ink-on-accent);
}

.conti-all-loop-btn {
  width: 100%;
  justify-content: center;
  margin-top: 4px;
}

.conti-all-loop-btn.is-all-looping,
.btn-emerald {
  background-color: #16A34A;
  border-color: #16A34A;
  color: #FFFFFF;
}

.conti-all-loop-btn.is-all-looping:hover,
.btn-emerald:hover {
  background-color: #15803D;
  border-color: #15803D;
}

.pro-practice-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border-hairline);
}

.speed-pill-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background-color: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-sm);
}

.speed-pill-btn {
  padding: 4px 7px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.speed-pill-btn.is-active {
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
}

.inline-practice-empty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 0;
}

.inline-practice-empty-text {
  font-size: 13px;
  color: var(--ink-secondary);
  line-height: 1.45;
}

/* ============================================================================
 * 실시간 싱크 가사 UI 세트 (1줄 리본 · 펼침 패널 · 클릭 즉시 이동)
 * ============================================================================ */
.live-lyric-ribbon {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  background-color: var(--accent-primary-soft);
  border: 1px solid rgba(29, 78, 216, 0.18);
  text-align: left;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 140ms var(--ease-out);
}

[data-theme="dark"] .live-lyric-ribbon {
  background-color: rgba(59, 130, 246, 0.14);
  border-color: rgba(96, 165, 250, 0.26);
}

.live-lyric-ribbon:active {
  transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
  .live-lyric-ribbon:hover {
    border-color: var(--accent-primary);
  }
}

.live-lyric-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-lyric-lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.live-lyric-cur {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-lyric-next {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-lyric-next:empty {
  display: none;
}

.live-lyric-more {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.lyrics-panel {
  border: 1px solid var(--border-hairline);
  border-radius: 12px;
  background-color: var(--bg-elevated);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.lyrics-panel-head {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-hairline);
  background-color: var(--bg-surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.lyrics-panel-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  min-width: 0;
}

.lyrics-list {
  max-height: 230px;
  overflow-y: auto;
  scroll-behavior: smooth;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lyric-line {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 12px;
  border-radius: 10px;
  text-align: left;
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--ink-secondary);
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.lyric-line:active {
  transform: scale(0.99);
}

@media (hover: hover) and (pointer: fine) {
  .lyric-line:hover:not(.is-active) {
    background-color: var(--bg-subtle);
    color: var(--ink-primary);
  }
}

.lyric-line-time {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  min-width: 34px;
  flex-shrink: 0;
}

.lyric-line-text {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

.lyric-line.is-past {
  opacity: 0.58;
}

.lyric-line.is-active {
  background-color: var(--accent-primary-soft);
  color: var(--accent-primary);
  font-weight: 800;
  font-size: 15.5px;
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

.lyric-line.is-active .lyric-line-time {
  color: var(--accent-primary);
  font-weight: 700;
}

/* ============================================================================
 * 탭 1: 날짜별 콘티 워크벤치 (PC 2컬럼 / 모바일 1컬럼)
 * ============================================================================ */
.workbench {
  display: grid;
  grid-template-columns: 356px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.conti-rail {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + 14px);
  max-height: calc(100dvh - var(--header-h) - var(--player-h) - 34px);
  display: flex;
  flex-direction: column;
}

.rail-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border-hairline);
  background-color: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 날짜·콘티 초고속 연관검색 (예: 260523, 5월, 주를 기억) */
.conti-quick-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.conti-qs-icon {
  position: absolute;
  left: 10px;
  width: 14px;
  height: 14px;
  color: var(--ink-muted);
  pointer-events: none;
}

.conti-qs-input {
  width: 100%;
  padding: 8px 28px 8px 31px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 12.5px;
  font-weight: 500;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.conti-qs-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-primary-soft);
}

.conti-qs-clear {
  position: absolute;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.conti-qs-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 65;
  max-height: 320px;
  overflow-y: auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.conti-qs-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  transition: background-color 120ms ease;
}

.conti-qs-item:hover,
.conti-qs-item.is-hi {
  background-color: var(--accent-primary-soft);
}

.conti-qs-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.conti-qs-date {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-primary);
  font-variant-numeric: tabular-nums;
}

.conti-qs-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.conti-qs-badge.is-exact {
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
}

.conti-qs-badge.is-near {
  background-color: var(--accent-brass-soft);
  color: var(--accent-brass);
}

.conti-qs-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conti-qs-empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-muted);
}

/* 아카이브 카드 내 해당 주간 콘티 바로 이동 칩 */
.archive-week-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.archive-week-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary-soft);
  color: var(--accent-primary);
  border: 1px solid transparent;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .archive-week-chip:hover {
    background-color: var(--accent-primary);
    color: var(--ink-on-accent);
  }
}

.date-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-select {
  flex: 1;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
}

.conti-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
}

.meta-pill.is-primary {
  background-color: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.conti-notice {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-brass-soft);
  border: 1px solid var(--accent-brass);
  font-size: 12.5px;
  color: var(--ink-primary);
  line-height: 1.45;
  white-space: pre-line;
}

.song-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.song-row,
.song-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background-color: transparent;
  cursor: pointer;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, box-shadow 180ms ease;
}

.song-item:has(> .song-row) {
  padding: 3px 8px 3px 3px;
  gap: 6px;
  cursor: default;
}

.song-item > .song-row {
  flex: 1;
  min-width: 0;
  padding: 7px 6px 7px 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: transparent;
  box-shadow: none;
}

.song-item > .song-row.is-active,
.song-item > .song-row.is-playing-now {
  background-color: transparent;
  border-color: transparent;
  box-shadow: none;
}

.song-row:active,
.song-item:active {
  transform: scale(0.985);
}

.song-row.is-active,
.song-item.is-active,
.song-item:has(> .song-row.is-active) {
  background-color: var(--accent-primary-soft);
  border-color: rgba(29, 78, 216, 0.22);
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

[data-theme="dark"] .song-row.is-active,
[data-theme="dark"] .song-item.is-active,
[data-theme="dark"] .song-item:has(> .song-row.is-active) {
  border-color: rgba(96, 165, 250, 0.30);
}

.song-row.is-playing-now,
.song-item.is-playing-now,
.song-item:has(> .song-row.is-playing-now) {
  background-color: rgba(16, 185, 129, 0.10);
  border-color: rgba(16, 185, 129, 0.36);
  box-shadow: inset 3px 0 0 #10B981, 0 0 0 1px rgba(16, 185, 129, 0.16), 0 4px 14px rgba(16, 185, 129, 0.14);
}

[data-theme="dark"] .song-row.is-playing-now,
[data-theme="dark"] .song-item.is-playing-now,
[data-theme="dark"] .song-item:has(> .song-row.is-playing-now) {
  background-color: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.42);
  box-shadow: inset 3px 0 0 #34D399, 0 0 16px rgba(16, 185, 129, 0.20);
}

.song-row.is-medley-sub,
.song-item.is-medley-sub {
  margin-left: 16px;
  width: calc(100% - 16px);
  border-left: 2.5px solid var(--accent-brass);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .song-row:hover:not(.is-active):not(.is-playing-now),
  .song-item:hover:not(.is-active):not(.is-playing-now) {
    background-color: var(--bg-subtle);
  }
  .song-item > .song-row:hover {
    background-color: transparent;
  }
}

.song-num {
  min-width: 28px;
  height: 26px;
  padding: 0 5px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.song-row.is-active .song-num,
.song-item.is-active .song-num {
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
}

.song-row.is-playing-now .song-num,
.song-item.is-playing-now .song-num {
  background-color: #15803D;
  color: #FFFFFF;
}

[data-theme="dark"] .song-row.is-playing-now .song-num,
[data-theme="dark"] .song-item.is-playing-now .song-num {
  background-color: #34D399;
  color: #0B111C;
}

.song-row.is-playing-now .song-row-title,
.song-item.is-playing-now .song-row-title {
  color: var(--accent-sage);
  font-weight: 700;
}

.song-row-eq {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--accent-sage);
  flex-shrink: 0;
}

.song-row-eq .eq-bars {
  height: 12px;
  gap: 2px;
}

.song-row-eq .eq-bars i {
  width: 2.5px;
  border-radius: 1.5px;
}

.song-row-play-btn {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  border: 1px solid var(--border-hairline);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 160ms ease;
}

.song-row-play-btn svg {
  width: 12px;
  height: 12px;
}

.song-row-play-btn:active {
  transform: scale(0.92);
}

.song-row.is-active .song-row-play-btn,
.song-item.is-active .song-row-play-btn,
.song-row-play-btn.is-active {
  background-color: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--ink-on-accent);
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.26);
}

.song-row.is-playing-now .song-row-play-btn,
.song-item.is-playing-now .song-row-play-btn,
.song-row-play-btn.is-playing {
  background-color: #16A34A;
  border-color: #16A34A;
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}

@media (hover: hover) and (pointer: fine) {
  .song-row-play-btn:hover {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
    color: var(--ink-on-accent);
    transform: scale(1.08);
  }
  .song-row.is-playing-now .song-row-play-btn:hover,
  .song-item.is-playing-now .song-row-play-btn:hover,
  .song-row-play-btn.is-playing:hover {
    background-color: #15803D;
    border-color: #15803D;
    color: #FFFFFF;
  }
}

.song-row-body {
  flex: 1;
  min-width: 0;
}

.song-row-top {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: space-between;
}

.song-row-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-row-badges {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.key-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.key-badge.is-keyup {
  background-color: var(--accent-brass-soft);
  color: var(--accent-brass);
}

.new-badge {
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-crimson-soft);
  color: var(--accent-crimson);
  font-size: 11px;
  font-weight: 700;
}

.song-row-sub {
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink-muted);
}

.practice-dot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  font-weight: 600;
}

.practice-dot.is-ready { color: var(--accent-sage); }
.practice-dot.is-practicing { color: var(--accent-brass); }

.rail-foot {
  padding: 10px 12px;
  border-top: 1px solid var(--border-hairline);
  background-color: var(--bg-elevated);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

/* ============================================================================
 * 우측 메인 스테이지 (선택 곡 헤더 · 송폼 타임라인 · 조옮김 · 악보 뷰어)
 * ============================================================================ */
.stage-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.song-header-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 15px 18px;
}

.song-head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.song-title-group {
  min-width: 0;
  flex: 1;
}

.song-main-title {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  overflow-wrap: break-word;
  min-width: 0;
}

.song-key-strip {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.key-pill-lg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-primary);
  color: var(--ink-on-accent);
  font-size: 13.5px;
  font-weight: 700;
}

.key-pill-lg.is-keyup {
  background-color: var(--accent-brass);
}

.sheet-key-diff-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-brass-soft);
  color: var(--accent-brass);
  border: 1px solid var(--accent-brass);
  font-size: 12.5px;
  font-weight: 600;
  transition: transform 140ms var(--ease-out);
}

.sheet-key-diff-btn:active {
  transform: scale(0.97);
}

.song-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* 연습 상태 세그먼트 */
.practice-seg {
  display: inline-flex;
  background-color: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 2px;
}

.practice-seg-btn {
  padding: 5px 9px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-secondary);
  transition: background-color 150ms ease, color 150ms ease;
}

.practice-seg-btn.is-active {
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  box-shadow: var(--shadow-sm);
}

.practice-seg-btn.is-active[data-status="ready"] {
  background-color: var(--accent-sage);
  color: var(--ink-on-accent);
}

.practice-seg-btn.is-active[data-status="practicing"] {
  background-color: var(--accent-brass);
  color: var(--ink-on-accent);
}

/* 송폼 비주얼 타임라인 */
.songform-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
}

.songform-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.sf-token {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  border: 1px solid transparent;
}

.sf-token.kind-verse {
  background-color: var(--accent-primary-soft);
  color: var(--accent-primary);
}

.sf-token.kind-prechorus {
  background-color: var(--accent-teal-soft);
  color: var(--accent-teal);
}

.sf-token.kind-chorus {
  background-color: var(--accent-brass-soft);
  color: var(--accent-brass);
  border-color: var(--accent-brass);
}

.sf-token.kind-bridge {
  background-color: var(--accent-plum-soft);
  color: var(--accent-plum);
}

.sf-token.kind-keyup {
  background-color: var(--accent-crimson);
  color: var(--ink-on-accent);
}

.sf-token.kind-interlude,
.sf-token.kind-other,
.sf-token.kind-cue {
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
}

.sf-rep {
  padding: 1px 5px;
  border-radius: 4px;
  background-color: var(--bg-surface);
  color: var(--ink-primary);
  font-size: 11px;
  font-weight: 700;
}

.sf-token.kind-keyup .sf-rep {
  background-color: var(--bg-player);
  color: var(--ink-on-dark);
}

.sf-arrow {
  color: var(--ink-muted);
  font-size: 12px;
  user-select: none;
}

.sf-cues {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sf-cue-item {
  font-size: 13px;
  color: var(--ink-secondary);
  padding: 4px 10px;
  border-left: 2.5px solid var(--accent-primary);
  background-color: var(--bg-elevated);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.sf-cue-tag {
  font-weight: 700;
  color: var(--ink-primary);
  margin-right: 6px;
}

/* 조옮김 · 기타 카포 드로어 패널 */
.transpose-panel {
  margin-top: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-strong);
}

.transpose-panel[hidden] {
  display: none;
}

.transpose-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.transpose-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.transpose-select {
  padding: 5px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  font-weight: 700;
}

.transpose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 6px;
}

.chord-pair {
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.chord-deg {
  font-size: 11px;
  color: var(--ink-muted);
  font-weight: 600;
}

.chord-map {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-primary);
  display: flex;
  align-items: center;
  gap: 5px;
}

.chord-from {
  color: var(--ink-muted);
  font-weight: 600;
}

.chord-to {
  color: var(--accent-primary);
}

.capo-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.capo-chip {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-subtle);
  color: var(--ink-primary);
  font-weight: 600;
}

.capo-chip.is-rec {
  background-color: var(--accent-sage-soft);
  color: var(--accent-sage);
}

/* ============================================================================
 * 악보 뷰어 카드 & 툴바
 * ============================================================================ */
.sheet-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sheet-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-hairline);
  background-color: var(--bg-elevated);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.zoom-label {
  min-width: 44px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-secondary);
  font-variant-numeric: tabular-nums;
}

.draw-toolbar {
  padding: 8px 14px;
  background-color: var(--accent-brass-soft);
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.draw-toolbar[hidden] {
  display: none;
}

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--bg-surface);
  box-shadow: 0 0 0 1px var(--border-strong);
  transition: transform 140ms var(--ease-out);
}

.color-swatch.is-active {
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--ink-primary);
}

.swatch-amber { background-color: var(--accent-brass); }
.swatch-crimson { background-color: var(--accent-crimson); }
.swatch-blue { background-color: var(--accent-primary); }
.swatch-sage { background-color: var(--accent-sage); }

.sv-viewport {
  position: relative;
  width: 100%;
  min-height: 520px;
  background-color: var(--bg-sheet-stage);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  padding: 14px;
}

.sv-viewport.is-zoomed,
.sv-viewport.is-drawing {
  touch-action: none;
}

.sv-viewport.is-zoomed {
  cursor: grab;
}

/* 가로 꽉 채우기 + 웹툰형 세로 스크롤 (이중 스크롤 갇힘 방지) */
.sv-viewport.is-fit-width {
  min-height: 360px;
  height: auto;
  overflow: visible;
  padding: 0;
  align-items: flex-start;
}

.sv-viewport.is-fit-width.is-zoomed {
  overflow: hidden;
}

.sv-transform {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform-origin: center top;
  will-change: transform;
  max-width: 100%;
}

.sv-viewport.is-fit-width .sv-transform {
  width: 100%;
}

.sv-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  background-color: var(--bg-surface);
}

.sv-viewport.is-fit-width .sv-img {
  width: 100%;
  max-width: 100%;
  max-height: none;
  height: auto;
}

.sv-img.is-inverted {
  filter: invert(0.91) hue-rotate(180deg) contrast(1.06);
}

.sv-anno-canvas {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  touch-action: none;
}

.sv-anno-canvas.is-drawing {
  pointer-events: auto;
  cursor: crosshair;
}

.sv-pdf-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sv-pdf-frame {
  width: 100%;
  height: 75vh;
  border: 0;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
}

.sv-pdf-open {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 13.5px;
}

.sv-page-pill {
  position: absolute;
  bottom: 14px;
  right: 14px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-player);
  color: var(--ink-on-dark);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sv-empty {
  padding: 54px 20px;
  text-align: center;
  color: var(--ink-secondary);
  max-width: 380px;
}

.sv-empty-icon {
  width: 44px;
  height: 44px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.sv-empty-title {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink-primary);
}

.sv-empty-desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* 개인 메모 + 곡별 오디오 챕터·유튜브 스트립 */
.song-extras-bar {
  padding: 12px 14px;
  border-top: 1px solid var(--border-hairline);
  background-color: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.extras-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.personal-memo-input {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  font-size: 13px;
  resize: vertical;
  min-height: 38px;
}

/* ============================================================================
 * 강단 스탠드 풀스크린 모드 (가로 꽉 채우기 · 플로팅 연습 바 · 1탭 몰입)
 * ============================================================================ */
.stand-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background-color: var(--bg-sheet-stage);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stand-overlay[hidden] {
  display: none;
}

.stand-bar {
  position: relative;
  z-index: 15;
  padding: 8px 14px;
  padding-top: calc(8px + env(safe-area-inset-top, 0px));
  background-color: var(--bg-player);
  color: var(--ink-on-dark);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  transform: translateY(0);
  opacity: 1;
  transition: transform 200ms ease, opacity 200ms ease;
}

.stand-song-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.stand-song-title {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stand-form-inline {
  font-size: 12.5px;
  color: var(--ink-on-dark-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stand-top-actions {
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.stand-body {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
}

.stand-body .sv-viewport {
  min-height: 0;
  height: 100%;
  padding: 8px 8px 60px;
  align-items: center;
}

.stand-body .sv-img {
  max-height: calc(100dvh - 116px);
}

.stand-body .sv-page-pill {
  bottom: 60px;
}

.stand-body .sv-viewport.is-fit-width {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 74px 0;
  align-items: flex-start;
  justify-content: center;
}

.stand-body .sv-viewport.is-fit-width.is-zoomed {
  overflow: hidden;
}

.stand-body .sv-viewport.is-fit-width .sv-transform {
  width: 100%;
  max-width: 1120px;
}

.stand-body .sv-viewport.is-fit-width .sv-img {
  width: 100%;
  max-width: 100%;
  max-height: none;
  height: auto;
  border-radius: 0;
}

.stand-tap-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 34px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink-muted);
  opacity: 0.55;
  transition: opacity 180ms ease, background-color 180ms ease;
}

.stand-tap-zone.is-prev { left: 0; }
.stand-tap-zone.is-next { right: 0; }

@media (hover: hover) and (pointer: fine) {
  .stand-tap-zone:hover {
    opacity: 0.95;
    background-color: rgba(148, 163, 184, 0.16);
    color: var(--ink-primary);
  }
}

/* 풀스크린 악보 내 송폼 팝오버 & 실시간 싱크 가사 자막 바 */
.stand-form-popover {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  width: max-content;
  max-width: min(680px, 92vw);
  max-height: 45vh;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  color: #F8FAFC;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.stand-form-popover .sf-arrow {
  color: #94A3B8;
}

.stand-form-popover .sf-cue-item {
  background-color: rgba(30, 41, 59, 0.85);
  color: #E2E8F0;
  border-left-color: #60A5FA;
}

.stand-form-popover .sf-cue-tag {
  color: #F8FAFC;
}

.stand-form-popover .sf-token.kind-interlude,
.stand-form-popover .sf-token.kind-other,
.stand-form-popover .sf-token.kind-cue {
  background-color: rgba(51, 65, 85, 0.85);
  color: #E2E8F0;
}

.stand-lyrics-bar {
  position: absolute;
  bottom: calc(58px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 14;
  width: max-content;
  max-width: min(760px, 92vw);
  background: rgba(15, 23, 42, 0.86);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 14px;
  padding: 8px 18px;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.38);
  transition: bottom 200ms ease;
}

/* 2026-11-25: 가사 상자 드래그 이동 (위치는 기기에 기억, ↺로 원래 자리) */
.stand-lyrics-bar {
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  padding-top: 11px;
}

.stand-overlay .stand-lyrics-bar {
  padding-top: 11px;
}

.stand-lyrics-bar::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 50%;
  width: 30px;
  height: 3px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.55);
  transform: translateX(-50%);
}

.stand-lyrics-bar.is-moved,
.stand-overlay.is-immersed .stand-lyrics-bar.is-moved {
  bottom: auto;
  transform: none;
  transition: none;
}

.stand-lyrics-bar.is-dragging {
  cursor: grabbing;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.5);
  border-color: rgba(251, 191, 36, 0.55);
}

.stand-lyric-reset {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(30, 41, 59, 0.95);
  color: #F8FAFC;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.stand-lyric-reset[hidden] {
  display: none;
}

.stand-lyric-cur {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.stand-lyric-next {
  font-size: 12.5px;
  color: #94A3B8;
  margin-top: 2px;
  line-height: 1.3;
  overflow-wrap: break-word;
}

.stand-lyric-next:empty {
  display: none;
}

.stand-guide-toast {
  position: absolute;
  bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
  background: rgba(15, 23, 42, 0.86);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #F8FAFC;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.32);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  pointer-events: none;
  white-space: nowrap;
  max-width: 92vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 초슬림 플로팅 연습·자동스크롤 바 */
.stand-practice-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 15;
  background: rgba(15, 23, 42, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  padding: 4px 12px calc(6px + env(safe-area-inset-bottom, 0px));
  transform: translateY(0);
  opacity: 1;
  transition: transform 200ms ease, opacity 200ms ease;
}

/* 풀스크린 노래 구간 이동 시크바 */
.stand-seek-wrap {
  position: relative;
  width: min(860px, 100%);
  height: 22px;
  margin: 0 auto 3px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.stand-seek-rail {
  position: relative;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.28);
  transition: height 0.12s ease;
}

.stand-seek-wrap:hover .stand-seek-rail,
.stand-seek-wrap.is-seeking .stand-seek-rail {
  height: 8px;
}

.stand-seek-loop {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.58);
  pointer-events: none;
}

.stand-seek-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #60a5fa);
  pointer-events: none;
}

.stand-seek-thumb {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  margin-top: -7px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.72);
  pointer-events: none;
  transition: transform 0.1s ease;
}

.stand-seek-wrap:hover .stand-seek-thumb,
.stand-seek-wrap.is-seeking .stand-seek-thumb {
  transform: scale(1.22);
}

.stand-seek-tooltip {
  position: absolute;
  bottom: 24px;
  left: 0%;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.96);
  color: #f8fafc;
  border: 1px solid rgba(56, 189, 248, 0.45);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.stand-seek-wrap.is-disabled {
  opacity: 0.38;
  cursor: default;
}

.stand-practice-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-content: safe center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stand-practice-inner::-webkit-scrollbar {
  display: none;
}

.stand-play-mini {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  flex-shrink: 0;
  background: #D97706;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.38);
  transition: transform 140ms var(--ease-out), background-color 150ms ease, box-shadow 180ms ease;
}

.stand-play-mini:active {
  transform: scale(0.95);
}

.stand-play-mini.is-playing {
  background: #16A34A;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.3);
}

@media (hover: hover) and (pointer: fine) {
  .stand-play-mini:hover {
    background: #EA580C;
  }
  .stand-play-mini.is-playing:hover {
    background: #15803D;
  }
}

.stand-time-label {
  font-size: 11.5px;
  font-weight: 700;
  color: #E2E8F0;
  white-space: nowrap;
  flex-shrink: 0;
}

.stand-mini-btn,
.player-btn-dark.stand-mini-btn {
  padding: 5px 8px;
  font-size: 11.5px;
  flex-shrink: 0;
}

.stand-mini-sep {
  width: 1px;
  height: 18px;
  background: rgba(148, 163, 184, 0.28);
  flex-shrink: 0;
}

.stand-scroll-spd-group {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.stand-spd-val {
  font-size: 11.5px;
  font-weight: 700;
  color: #F8FAFC;
  min-width: 32px;
  text-align: center;
  flex-shrink: 0;
}

/* 1탭 몰입 100% 숨김 모드 */
.stand-overlay.is-immersed .stand-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 15;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

.stand-overlay.is-immersed .stand-practice-bar {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.stand-overlay.is-immersed .stand-tap-zone {
  opacity: 0;
  pointer-events: none;
}

.stand-overlay.is-immersed .stand-body .sv-viewport.is-fit-width {
  padding-bottom: 12px;
}

.stand-overlay.is-immersed .stand-body .sv-viewport:not(.is-fit-width) {
  padding: 8px;
}

.stand-overlay.is-immersed .stand-body .sv-viewport:not(.is-fit-width) .sv-img {
  max-height: calc(100dvh - 16px);
}

.stand-overlay.is-immersed .stand-body .sv-page-pill {
  bottom: 14px;
}

.stand-overlay.is-immersed .stand-lyrics-bar {
  bottom: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
}

/* ============================================================================
 * 실시간 싱크 가사 크게 보기 오버레이 (애플뮤직 스타일)
 * ============================================================================ */
.lyrics-overlay {
  position: fixed;
  inset: 0;
  z-index: 170;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at 20% 0%, #1E3A8A 0%, #0F172A 55%, #070B14 100%);
  color: #F8FAFC;
  overflow: hidden;
}

.lyrics-ov-head {
  padding: 14px 18px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 11, 20, 0.42);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.lyrics-ov-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 200px;
}

.lyrics-ov-meta > div {
  min-width: 0;
}

.lyrics-ov-meta .key-badge:empty {
  display: none;
}

.lyrics-ov-title {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyrics-ov-sub {
  font-size: 12px;
  color: #94A3B8;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lyrics-ov-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 36px 20px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  scroll-behavior: smooth;
}

.lyrics-ov-line {
  max-width: 720px;
  width: 100%;
  text-align: center;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: clamp(20px, 4.5vw, 28px);
  font-weight: 700;
  line-height: 1.45;
  color: rgba(248, 250, 252, 0.42);
  cursor: pointer;
  overflow-wrap: break-word;
  transition: color 200ms ease, transform 200ms ease, background-color 200ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .lyrics-ov-line:hover:not(.is-active) {
    color: rgba(248, 250, 252, 0.78);
    background: rgba(255, 255, 255, 0.06);
  }
}

.lyrics-ov-line.is-past {
  color: rgba(248, 250, 252, 0.30);
}

.lyrics-ov-line.is-active {
  color: #FFFFFF;
  transform: scale(1.04);
  background: rgba(56, 189, 248, 0.14);
  text-shadow: 0 2px 18px rgba(56, 189, 248, 0.4);
}

.lyrics-ov-empty {
  margin: auto;
  text-align: center;
  font-size: 16px;
  color: #94A3B8;
  padding: 32px 16px;
}

.lyrics-ov-foot {
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 11, 20, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}

/* ============================================================================
 * 하단 도킹 연습 오디오 스튜디오
 * ============================================================================ */
.player-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 80;
  background-color: rgba(11, 17, 28, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  color: #F8FAFC;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 -8px 28px rgba(2, 6, 23, 0.42);
}

.player-dock.is-picker-open {
  z-index: 125;
}

.player-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 9px 16px 11px;
}

.player-compact-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.player-transport {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.player-transport-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 62px;
  flex-shrink: 0;
}

.player-transport-btn {
  width: 100%;
  min-height: 26px;
  padding: 4px 6px;
  font-size: 11.5px;
  line-height: 1.2;
  gap: 3px;
}

.player-song-step-btn {
  background-color: #152033;
  border-color: #2B3B54;
  color: #CBD5E1;
  font-size: 11px;
}

.play-btn-main {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--radius-pill);
  background-color: #D97706;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.42);
  transition: transform 140ms var(--ease-out), background-color 150ms ease, box-shadow 180ms ease;
}

.play-btn-main.is-playing {
  background-color: #16A34A;
  color: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.3), 0 3px 12px rgba(22, 163, 74, 0.45);
}

.play-btn-main:active {
  transform: scale(0.95);
}

@media (hover: hover) and (pointer: fine) {
  .play-btn-main:hover {
    background-color: #EA580C;
  }
  .play-btn-main.is-playing:hover {
    background-color: #15803D;
  }
}

.player-btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 7px;
  background-color: #1E293B;
  color: #E2E8F0;
  border: 1px solid #334155;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform 140ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}

.player-icon-btn {
  padding: 6px 8px;
}

.player-btn-dark:disabled {
  opacity: 0.36;
  cursor: not-allowed;
}

.player-btn-dark:active:not(:disabled) {
  transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
  .player-btn-dark:hover:not(:disabled):not(.is-active):not(.is-loop-on):not(.is-blue) {
    background-color: #283548;
    border-color: #475569;
    color: #FFFFFF;
  }
  .player-btn-dark.is-active:hover:not(:disabled) {
    background-color: #FBBF24;
    border-color: #FCD34D;
    color: #0F172A;
  }
  .player-btn-dark.is-loop-on:hover:not(:disabled) {
    background-color: #15803D;
    border-color: #22C55E;
    color: #FFFFFF;
  }
  .player-btn-dark.is-blue:hover:not(:disabled) {
    background-color: #1D4ED8;
    border-color: #60A5FA;
    color: #FFFFFF;
  }
}

.player-btn-dark.is-active {
  background-color: #F59E0B;
  border-color: #FBBF24;
  color: #0F172A;
}

.player-btn-dark.is-loop-on {
  background-color: #16A34A;
  border-color: #22C55E;
  color: #FFFFFF;
}

.player-btn-dark.is-blue {
  background-color: #2563EB;
  border-color: #3B82F6;
  color: #FFFFFF;
}

.player-timeline-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.player-track-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
}

.player-track-title-group {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 7px;
}

.dock-song-picker-trigger {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px 2px 6px;
  margin-left: -4px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.06);
  color: #F8FAFC;
  text-align: left;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.dock-song-picker-trigger:hover,
.dock-song-picker-trigger[aria-expanded="true"] {
  background: rgba(59, 130, 246, 0.20);
  border-color: rgba(96, 165, 250, 0.55);
}

.dock-song-picker-caret {
  flex-shrink: 0;
  color: #93C5FD;
  transition: transform 160ms ease;
}

.dock-song-picker-trigger[aria-expanded="true"] .dock-song-picker-caret {
  transform: rotate(180deg);
}

.player-track-title {
  font-weight: 700;
  color: #F8FAFC;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 하단 플레이어 위로 열리는 곡 선택 팝업 메뉴 */
.dock-song-picker-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: min(460px, calc(100vw - 16px));
  z-index: 120;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.96);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(148, 163, 184, 0.30);
  box-shadow: 0 -14px 38px rgba(2, 6, 23, 0.58), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  color: #F8FAFC;
  overflow: hidden;
}

.dock-song-picker-menu[hidden] {
  display: none !important;
}

.dock-song-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.65);
}

.dock-song-picker-head-title {
  font-size: 12.5px;
  font-weight: 800;
  color: #E2E8F0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.dock-song-picker-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dock-song-picker-mix-btn {
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.45);
  background: rgba(245, 158, 11, 0.18);
  color: #FDE68A;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.dock-song-picker-mix-btn:hover {
  background: rgba(245, 158, 11, 0.32);
}

.dock-song-picker-close {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(255, 255, 255, 0.06);
  color: #CBD5E1;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.dock-song-picker-list {
  max-height: min(52dvh, 340px);
  overflow-y: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dock-song-picker-row {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 9px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: #F8FAFC;
  text-align: left;
  cursor: pointer;
  transition: background-color 130ms ease, border-color 130ms ease;
}

.dock-song-picker-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.dock-song-picker-row.is-active {
  background: rgba(37, 99, 235, 0.26);
  border-color: rgba(96, 165, 250, 0.50);
}

.dock-song-picker-num {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: rgba(148, 163, 184, 0.16);
  color: #CBD5E1;
  font-size: 11.5px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dock-song-picker-row.is-active .dock-song-picker-num {
  background: #3B82F6;
  color: #FFFFFF;
}

.dock-song-picker-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dock-song-picker-name {
  font-size: 13px;
  font-weight: 700;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dock-song-picker-meta {
  font-size: 11px;
  color: #94A3B8;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-song-picker-key {
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(148, 163, 184, 0.16);
  color: #E2E8F0;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.dock-song-picker-play {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(255, 255, 255, 0.08);
  color: #F8FAFC;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
}

.dock-song-picker-row.is-active .dock-song-picker-play {
  background: #16A34A;
  border-color: #22C55E;
  color: #FFFFFF;
}

.dock-song-picker-play:hover {
  background: #2563EB;
  border-color: #60A5FA;
}

.dock-loop-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background-color: rgba(251, 191, 36, 0.2);
  color: #FCD34D;
  border: 1px solid rgba(251, 191, 36, 0.45);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.player-time-readout {
  color: #94A3B8;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 12.5px;
}

.player-time-readout .time-cur {
  color: #F8FAFC;
  font-weight: 700;
}

.waveform-canvas {
  width: 100%;
  height: 44px;
  display: block;
  border-radius: 7px;
  background-color: #0A111D;
  border: 1px solid rgba(148, 163, 184, 0.24);
  cursor: pointer;
  touch-action: none;
}

.player-quick-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dock-vol-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px 4px 6px;
  border-radius: 7px;
  background-color: #172133;
  border: 1px solid #334155;
}

.dock-vol-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 22px;
  color: #E2E8F0;
  border-radius: 4px;
}

.dock-vol-btn:hover {
  color: #38BDF8;
}

.dock-vol-slider {
  width: 72px;
  accent-color: #38BDF8;
  cursor: pointer;
}

.dock-vol-pct {
  font-size: 11px;
  font-weight: 700;
  color: #CBD5E1;
  min-width: 31px;
  text-align: right;
}

.drawer-vol-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 7px;
  background-color: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

/* 확장 연습 스튜디오 드로어 (구간반복 세부 · 배속 · 파트 전환 · 메트로놈 · 책갈피) */
.player-expanded {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-on-dark);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.player-expanded[hidden] {
  display: none;
}

.studio-box {
  background-color: var(--bg-player-elevated);
  border: 1px solid var(--border-on-dark);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.studio-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-on-dark-muted);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.loop-bookmark-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.metro-beat-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.metro-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-player-subtle);
  transition: transform 90ms var(--ease-out), background-color 90ms ease;
}

.metro-dot.is-lit {
  background-color: var(--accent-brass);
  transform: scale(1.3);
}

.metro-dot.is-accent.is-lit {
  background-color: var(--accent-crimson);
}

/* ============================================================================
 * 탭 2: 찬양 아카이브 (305곡 마스터 DB · 초성/키 검색 · 1초 재사용)
 * ============================================================================ */
.archive-header {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 16px 18px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.archive-search-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  font-size: 14px;
}

.filter-select {
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background-color: var(--bg-elevated);
  font-size: 13.5px;
  font-weight: 600;
}

.archive-stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
}

.archive-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 150ms ease, transform 140ms var(--ease-out), box-shadow 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .archive-card:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-md);
  }
}

.archive-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.archive-card-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
  min-width: 0;
}

.archive-play-count {
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background-color: var(--accent-primary-soft);
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.archive-key-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.archive-card-foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

/* ============================================================================
 * 탭 3: 관리자 · 10초 업로드 스튜디오
 * ============================================================================ */
.admin-lock-box {
  max-width: 440px;
  margin: 36px auto;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px 24px;
  text-align: center;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.admin-auto-card {
  grid-column: 1 / -1;
}

.auto-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.auto-schedule-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auto-check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-primary);
}

.auto-check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.auto-log-box {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  max-height: 190px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
}

.auto-log-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  line-height: 1.4;
}

.auto-log-time {
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-size: 11.5px;
}

.auto-log-tag {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background-color: var(--bg-subtle);
  color: var(--ink-secondary);
  white-space: nowrap;
}

.auto-log-tag.is-ok {
  background-color: var(--accent-sage-soft);
  color: var(--accent-sage);
}

.auto-log-tag.is-err {
  background-color: var(--accent-crimson-soft);
  color: var(--accent-crimson);
}

@media (max-width: 900px) {
  .auto-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section-sub {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ink-secondary);
}

.field-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-secondary);
}

.field-input,
.field-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg-elevated);
  font-size: 13.5px;
}

.field-textarea {
  min-height: 180px;
  resize: vertical;
  line-height: 1.55;
}

.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 20px 14px;
  text-align: center;
  background-color: var(--bg-elevated);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.dropzone.is-over {
  border-color: var(--accent-primary);
  background-color: var(--accent-primary-soft);
}

.admin-song-editor {
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  padding: 12px;
  background-color: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-song-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.archive-match-banner {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background-color: var(--accent-sage-soft);
  color: var(--accent-sage);
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.thumb-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.thumb-item {
  position: relative;
  width: 68px;
  height: 86px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background-color: var(--bg-surface);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-pill);
  background-color: var(--bg-player);
  color: var(--ink-on-dark);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================================
 * 모달 & 토스트
 * ============================================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 160;
  background-color: var(--overlay-scrim);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 640px;
  max-height: 86dvh;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-head {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.toast-stack {
  position: fixed;
  right: 16px;
  top: calc(var(--header-h) + 12px);
  z-index: 220;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  pointer-events: none;
}

.toast-item {
  padding: 8px 14px;
  border-radius: var(--radius-md);
  background-color: var(--bg-player);
  color: var(--ink-on-dark);
  border: 1px solid var(--border-on-dark);
  box-shadow: var(--shadow-md);
  font-size: 13px;
  font-weight: 600;
  max-width: 320px;
  transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out);
}

.toast-item.is-success { border-color: var(--accent-sage); }
.toast-item.is-error { border-color: var(--accent-crimson); }

.kbd-hint-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-on-dark-muted);
}

.kbd-hint-row kbd {
  padding: 1px 5px;
  border-radius: 4px;
  background-color: var(--bg-player-subtle);
  color: var(--ink-on-dark);
  font-family: var(--font-mono);
  font-size: 11px;
}

/* ============================================================================
 * 반응형 (태블릿 & 모바일 390px)
 * ============================================================================ */
@media (max-width: 1024px) {
  .workbench {
    grid-template-columns: minmax(0, 1fr);
  }
  .conti-rail {
    position: static;
    max-height: none;
  }
  .song-list {
    max-height: 300px;
  }
  .admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .player-expanded {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  :root {
    --header-h: 54px;
    --player-h: 98px;
  }
  .topbar-inner {
    padding: 0 10px;
    gap: 6px;
  }
  .brand-text,
  .sync-badge {
    display: none;
  }
  .nav-tabs {
    flex: 1 1 0;
    min-width: 0;
    justify-content: flex-start;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 3px;
    padding: 3px;
  }
  .nav-tabs::-webkit-scrollbar {
    display: none;
  }
  .nav-tab {
    flex: 0 0 auto;
    flex-shrink: 0;
    justify-content: center;
    padding: 6px 9px;
    font-size: 12px;
    white-space: nowrap;
  }
  .nav-tab svg {
    display: none;
  }
  .main-wrap {
    padding: 10px 10px 24px;
  }
  .pwa-install-bar {
    padding: 8px 12px;
    gap: 8px;
  }
  .pwa-install-desc {
    font-size: 12.5px;
    flex: 1 1 180px;
  }
  .song-header-card {
    padding: 13px 12px;
  }
  .song-main-title {
    font-size: 18px;
  }
  .inline-practice-card {
    padding: 10px 12px;
    gap: 8px;
  }
  .inline-wave-canvas {
    height: 48px;
  }
  .playmode-seg,
  .speed-pill-group,
  .practice-seg {
    flex-wrap: wrap;
    max-width: 100%;
  }
  .live-lyric-ribbon {
    padding: 8px 10px;
    gap: 8px;
  }
  .live-lyric-cur {
    font-size: 13.5px;
  }
  .live-lyric-next {
    font-size: 11.5px;
  }
  .lyrics-panel-head {
    padding: 8px 10px;
  }
  .lyric-line {
    padding: 7px 10px;
    gap: 8px;
    font-size: 14px;
  }
  .lyric-line.is-active {
    font-size: 15px;
  }
  .sheet-card {
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .sv-viewport {
    min-height: 360px;
    padding: 8px;
  }
  .sv-viewport.is-fit-width .sv-img {
    border-radius: 0;
    box-shadow: none;
  }
  .stand-bar {
    flex-wrap: wrap;
    padding: 6px 10px;
    padding-top: calc(6px + env(safe-area-inset-top, 0px));
    gap: 6px;
  }
  .stand-song-info {
    flex: 1 1 100%;
  }
  .stand-form-inline {
    display: none;
  }
  .stand-top-actions {
    width: 100%;
    flex-wrap: nowrap;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 4px;
  }
  .stand-top-actions::-webkit-scrollbar {
    display: none;
  }
  .stand-top-actions .player-btn-dark {
    padding: 5px 8px;
    font-size: 11.5px;
    flex-shrink: 0;
  }
  .stand-tap-zone {
    width: 26px;
    opacity: 0.35;
  }
  .stand-form-popover {
    padding: 10px 12px;
    max-width: 94vw;
  }
  .stand-lyrics-bar {
    padding: 7px 14px;
    max-width: 94vw;
  }
  .stand-lyric-cur {
    font-size: 14.5px;
  }
  .stand-lyric-next {
    font-size: 11.5px;
  }
  .stand-practice-inner {
    justify-content: flex-start;
    justify-content: safe center;
  }
  .lyrics-ov-head {
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    gap: 8px;
  }
  .lyrics-ov-title {
    font-size: 15px;
  }
  .lyrics-ov-body {
    padding: 24px 14px 48px;
    gap: 10px;
  }
  .lyrics-ov-line {
    padding: 9px 12px;
  }
  .lyrics-ov-foot {
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 6px;
  }
  .player-inner {
    padding: 7px 10px 9px;
  }
  .player-compact-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }
  .player-transport {
    gap: 5px;
  }
  .player-transport-col {
    width: 54px;
    gap: 3px;
  }
  .player-transport-btn {
    min-height: 24px;
    padding: 3px 4px;
    font-size: 11px;
    gap: 2px;
  }
  .player-song-step-btn {
    font-size: 10.5px;
  }
  .player-song-step-btn svg {
    width: 10px;
    height: 10px;
  }
  .play-btn-main {
    width: 44px;
    height: 44px;
  }
  .dock-hide-sm,
  .dock-loop-badge {
    display: none;
  }
  .dock-vol-slider,
  .dock-vol-pct {
    display: none;
  }
  .dock-vol-control {
    padding: 4px 5px;
  }
  .player-quick-controls {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 5px;
  }
  .player-quick-controls::-webkit-scrollbar {
    display: none;
  }
  .archive-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .field-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 540px) and (orientation: landscape) {
  .stand-bar {
    flex-wrap: nowrap;
    padding: 4px 10px;
    gap: 8px;
  }
  .stand-song-info {
    flex: 1 1 auto;
  }
  .stand-song-title {
    font-size: 13.5px;
  }
  .stand-form-inline {
    display: none;
  }
  .stand-top-actions {
    width: auto;
    gap: 4px;
  }
  .stand-top-actions .player-btn-dark {
    padding: 4px 8px;
    font-size: 11.5px;
  }
  .stand-practice-bar {
    padding: 4px 8px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  }
  .stand-play-mini {
    width: 30px;
    height: 30px;
  }
  .stand-lyrics-bar {
    bottom: calc(46px + env(safe-area-inset-bottom, 0px));
    padding: 6px 14px;
  }
  .stand-lyric-cur {
    font-size: 14px;
  }
  .stand-guide-toast {
    bottom: calc(48px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
 * 악보 보며 화면 어디로든 드래그 이동 가능한 실시간 미니 가사 창
 * ============================================================================ */
.floating-lyric-bar {
  position: fixed;
  left: 50%;
  bottom: calc(var(--player-h, 74px) + 10px);
  transform: translateX(-50%);
  z-index: 95;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: min(640px, calc(100vw - 16px));
  min-width: min(290px, calc(100vw - 16px));
  padding: 7px 10px 7px 6px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(96, 165, 250, 0.36);
  box-shadow: 0 10px 28px rgba(2, 6, 23, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  color: #f8fafc;
  user-select: none;
  -webkit-user-select: none;
}

.floating-lyric-bar[hidden] {
  display: none !important;
}

.floating-lyric-bar.is-dragged {
  transform: none;
  bottom: auto;
}

.floating-lyric-bar.is-dragging {
  cursor: grabbing;
  border-color: rgba(251, 191, 36, 0.72);
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.56);
}

.float-lyric-grip {
  flex: 0 0 auto;
  width: 26px;
  height: 36px;
  border-radius: 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #93c5fd;
  font-size: 16px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  touch-action: none;
}

.float-lyric-grip:active {
  cursor: grabbing;
  background: rgba(96, 165, 250, 0.25);
}

.float-lyric-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: pointer;
}

.float-lyric-cur {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.32;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.float-lyric-next {
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.25;
  color: rgba(203, 213, 225, 0.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.float-lyric-next:empty {
  display: none;
}

.float-lyric-actions {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.float-lyric-btn {
  padding: 4px 7px;
  border-radius: 7px;
  border: 1px solid rgba(148, 163, 184, 0.26);
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}

.float-lyric-btn[hidden] {
  display: none !important;
}

.float-lyric-btn.is-close {
  padding: 3px 7px;
  font-size: 14px;
}

@media (max-width: 720px) {
  .floating-lyric-bar {
    bottom: calc(134px + env(safe-area-inset-bottom, 0px));
    padding: 6px 8px 6px 5px;
    gap: 6px;
  }
  .float-lyric-cur {
    font-size: 13px;
  }
  .float-lyric-next {
    font-size: 11px;
  }
}
