﻿:root {
  --bg-primary: #fff8fb;
  --bg-secondary: #fff1f6;
  --bg-tertiary: #eef9f6;
  --bg-card: #ffffff;
  --bg-hover: #fff7e7;
  --text-primary: #403846;
  --text-secondary: #756b7d;
  --text-muted: #9a8fa1;
  --accent-primary: #ff7aa8;
  --accent-secondary: #57c7b6;
  --accent-warm: #f4b35e;
  --accent-cool: #7ea7ff;
  --accent-glow: rgba(255, 122, 168, 0.22);
  --border-color: #f1dce6;
  --shadow-color: rgba(107, 80, 95, 0.12);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --transition-fast: 0.15s ease;
  --transition-med: 0.28s ease;
  --font-main: 'Inter', -apple-system, 'Segoe UI', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
  --theme-page-bg: linear-gradient(135deg, #fff8fb 0%, #f3fbf8 46%, #fff6e7 100%);
  --theme-card-bg: rgba(255, 255, 255, 0.84);
  --theme-panel-bg: linear-gradient(135deg, #fff4f8, #edfbf7);
  --theme-action-bg: linear-gradient(135deg, #ff8fb2, #74d8ca);
}

body.external-only-mode .import-btn,
body.external-only-mode .online-library,
body.external-only-mode #librarySearchInput,
body.external-only-mode #songList,
body.external-only-mode #topLibrarySearch,
body.external-only-mode #librarySearchTray,
body.external-only-mode #importGuide,
body.external-only-mode .transport-card,
body.external-only-mode .pitch-control,
body.external-only-mode .volume-control {
  display: none !important;
}

body.external-only-mode .sidebar {
  min-height: 0;
}

body.external-only-mode .stage-console {
  gap: 14px;
}

body.external-only-mode #externalPlayerCard {
  display: block;
}

body.panel-theme-neon,
body.panel-theme-gradient {
  --theme-page-bg: linear-gradient(135deg, #fff4fb 0%, #effcf8 48%, #fff7e8 100%);
  --theme-panel-bg: linear-gradient(135deg, #fff0f7, #eafbf7);
  --theme-action-bg: linear-gradient(135deg, #ff78a8, #68d4c8);
}

body.panel-theme-dark {
  --bg-primary: #181521;
  --bg-secondary: #231d2e;
  --bg-tertiary: #1d2b34;
  --bg-card: #282133;
  --bg-hover: #332940;
  --text-primary: #fff8ff;
  --text-secondary: #d4c5dd;
  --text-muted: #a796b3;
  --accent-primary: #b59cff;
  --accent-secondary: #67d8d1;
  --accent-warm: #f6c46d;
  --border-color: rgba(227, 202, 242, 0.2);
  --shadow-color: rgba(8, 5, 14, 0.32);
  --theme-page-bg: linear-gradient(135deg, #17131f 0%, #211934 48%, #10252c 100%);
  --theme-card-bg: rgba(39, 32, 50, 0.9);
  --theme-panel-bg: linear-gradient(135deg, #2c2338, #16333a);
  --theme-action-bg: linear-gradient(135deg, #987dff, #5fd5c9);
}

body.panel-theme-dark .stage-console,
body.panel-theme-dark .control-panel,
body.panel-theme-dark .tab-panel,
body.panel-theme-dark .playlist-style-card,
body.panel-theme-dark .lyric-sync-panel,
body.panel-theme-dark .auto-cue-tools,
body.panel-theme-dark .obs-settings,
body.panel-theme-dark .help-card,
body.panel-theme-dark .lyrics-preview,
body.panel-theme-dark .cue-timeline,
body.panel-theme-dark .cue-stats,
body.panel-theme-dark .library-results,
body.panel-theme-dark .theme-preview-card,
body.panel-theme-dark .video-library-empty,
body.panel-theme-dark .library-empty {
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-primary);
}

body.panel-theme-dark input,
body.panel-theme-dark textarea,
body.panel-theme-dark select,
body.panel-theme-dark .scene-select,
body.panel-theme-dark .setting-row input,
body.panel-theme-dark .setting-row select,
body.panel-theme-dark .choice-group button,
body.panel-theme-dark .soft-btn,
body.panel-theme-dark .tab-btn,
body.panel-theme-dark .camera-btn,
body.panel-theme-dark .effect-btn,
body.panel-theme-dark .theme-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.18);
}

body.panel-theme-dark option {
  background: #2c2338;
  color: #fff8ff;
}

body.panel-theme-dark .video-cue-actions input,
body.panel-theme-dark .video-cue-head select,
body.panel-theme-dark .cue-mode-row select {
  border-color: rgba(255, 255, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06)) padding-box,
    linear-gradient(135deg, rgba(181, 156, 255, 0.34), rgba(103, 216, 209, 0.28)) border-box;
  color: var(--text-primary);
  box-shadow: none;
}

body.panel-theme-dark .video-cue-head select,
body.panel-theme-dark .cue-mode-row select {
  background-image:
    linear-gradient(45deg, transparent 50%, #f3eaff 50%),
    linear-gradient(135deg, #f3eaff 50%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.06));
}

body.panel-theme-dark .choice-group button:hover,
body.panel-theme-dark .soft-btn:hover,
body.panel-theme-dark .tab-btn:hover,
body.panel-theme-dark .camera-btn:hover,
body.panel-theme-dark .effect-btn:hover,
body.panel-theme-dark .theme-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

body.panel-theme-dark .choice-group button.active,
body.panel-theme-dark .theme-btn.active,
body.panel-theme-dark .effect-btn.active,
body.panel-theme-dark .camera-btn.active {
  color: #fff;
  background: var(--theme-action-bg);
}

body.panel-theme-light {
  --theme-page-bg: linear-gradient(135deg, #fffdfd 0%, #f6fbff 48%, #fff9ef 100%);
  --theme-panel-bg: linear-gradient(135deg, #fff, #effbf7);
  --theme-action-bg: linear-gradient(135deg, #ff9cbb, #8bded2);
}

body.panel-theme-sunset {
  --accent-primary: #ff8e6d;
  --accent-secondary: #7bc9c2;
  --accent-warm: #ffc25f;
  --accent-glow: rgba(255, 142, 109, 0.22);
  --border-color: #f3d7d0;
  --theme-page-bg: linear-gradient(135deg, #fff4ef 0%, #fff9df 44%, #edf9f6 100%);
  --theme-panel-bg: linear-gradient(135deg, #fff1e9, #fff8dd);
  --theme-action-bg: linear-gradient(135deg, #ff8e6d, #ffc25f);
}

body.panel-theme-ocean,
body.panel-theme-classicBlue,
body.panel-theme-islandBlue {
  --accent-primary: #66b8ff;
  --accent-secondary: #46c9bf;
  --accent-warm: #84d6ff;
  --accent-glow: rgba(102, 184, 255, 0.2);
  --border-color: #d8e9f6;
  --theme-page-bg: linear-gradient(135deg, #f3fbff 0%, #e9f7ff 46%, #f2fffb 100%);
  --theme-panel-bg: linear-gradient(135deg, #eef9ff, #eafffb);
  --theme-action-bg: linear-gradient(135deg, #72c4ff, #59d2c7);
}

body.panel-theme-cherry,
body.panel-theme-sakuraRed {
  --accent-primary: #ff7eae;
  --accent-secondary: #f3b0d0;
  --accent-warm: #ffd0e3;
  --accent-glow: rgba(255, 126, 174, 0.22);
  --border-color: #f4d7e4;
  --theme-page-bg: linear-gradient(135deg, #fff4fa 0%, #ffeef7 48%, #f6fbff 100%);
  --theme-panel-bg: linear-gradient(135deg, #fff0f8, #fff7fb);
  --theme-action-bg: linear-gradient(135deg, #ff7eae, #ffc0d8);
}

body.panel-theme-aurora,
body.panel-theme-springTouch,
body.panel-theme-noAnxiety {
  --accent-primary: #78d78d;
  --accent-secondary: #7fd2e5;
  --accent-warm: #ffb7ca;
  --accent-glow: rgba(120, 215, 141, 0.22);
  --border-color: #d9eadc;
  --theme-page-bg: linear-gradient(135deg, #f1fff3 0%, #f5fbff 47%, #fff3fa 100%);
  --theme-panel-bg: linear-gradient(135deg, #effff1, #f2f8ff);
  --theme-action-bg: linear-gradient(135deg, #88df96, #83d7ef);
}

body.panel-theme-gold,
body.panel-theme-elegantGold {
  --accent-primary: #d6a44e;
  --accent-secondary: #6cc9bb;
  --accent-warm: #f4c864;
  --accent-glow: rgba(214, 164, 78, 0.2);
  --border-color: #eadfc8;
  --theme-page-bg: linear-gradient(135deg, #fffaf0 0%, #f8fff9 48%, #f7f3ff 100%);
  --theme-panel-bg: linear-gradient(135deg, #fff6df, #f4fffb);
  --theme-action-bg: linear-gradient(135deg, #ddb15a, #74d0c2);
}

body.panel-theme-fire,
body.panel-theme-orangeWish,
body.panel-theme-cinnabar {
  --accent-primary: #f47b79;
  --accent-secondary: #f0a0b6;
  --accent-warm: #ffc26d;
  --accent-glow: rgba(244, 123, 121, 0.22);
  --border-color: #efd2d1;
  --theme-page-bg: linear-gradient(135deg, #fff2ee 0%, #fff6e5 48%, #fff2f8 100%);
  --theme-panel-bg: linear-gradient(135deg, #fff0ea, #fff7e8);
  --theme-action-bg: linear-gradient(135deg, #f47b79, #ffbd68);
}

body.panel-theme-lilac,
body.panel-theme-violetYou {
  --accent-primary: #c688d8;
  --accent-secondary: #74d4d2;
  --accent-warm: #f6bad8;
  --accent-glow: rgba(198, 136, 216, 0.22);
  --border-color: #e7d7ec;
  --theme-page-bg: linear-gradient(135deg, #fbf3ff 0%, #fff4fb 46%, #effdff 100%);
  --theme-panel-bg: linear-gradient(135deg, #fbf0ff, #f0fbff);
  --theme-action-bg: linear-gradient(135deg, #c688d8, #74d4d2);
}

body.panel-theme-beanGreen {
  --accent-primary: #7fa57e;
  --accent-secondary: #98c8bd;
  --accent-warm: #d8c38d;
  --accent-glow: rgba(127, 165, 126, 0.2);
  --border-color: #dbe6d9;
  --theme-page-bg: linear-gradient(135deg, #f6fff5 0%, #eef8f4 48%, #fff9ef 100%);
  --theme-panel-bg: linear-gradient(135deg, #f1fff0, #eff8f5);
  --theme-action-bg: linear-gradient(135deg, #88ad85, #93cfc3);
}

body.panel-theme-blueMood {
  --accent-primary: #76bfff;
  --accent-secondary: #d59dea;
  --accent-warm: #8edce5;
  --accent-glow: rgba(118, 191, 255, 0.22);
  --border-color: #d9e6f4;
  --theme-page-bg: linear-gradient(135deg, #eef8ff 0%, #f6f0ff 48%, #fff4fb 100%);
  --theme-panel-bg: linear-gradient(135deg, #edf8ff, #faf0ff);
  --theme-action-bg: linear-gradient(135deg, #76bfff, #d59dea);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--theme-page-bg);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 14px;
  line-height: 1.5;
  user-select: none;
}

body.manager-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 122, 168, 0.16), transparent 34%),
    radial-gradient(circle at 82% 0%, rgba(87, 199, 182, 0.2), transparent 28%),
    linear-gradient(135deg, #fff8fb 0%, #f4fbf8 54%, #fff7eb 100%);
}

.manager-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 42px 0 56px;
}

.manager-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 18px;
}

.manager-kicker {
  display: inline-flex;
  margin-bottom: 8px;
  color: #d94f86;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.manager-hero h1 {
  margin: 0 0 8px;
  color: #2f2540;
  font-size: 34px;
  line-height: 1.05;
}

.manager-hero p {
  max-width: 560px;
  margin: 0;
  color: #74687d;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.7;
}

.manager-back-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  color: #be4776;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.manager-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(217, 79, 135, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(113, 82, 104, 0.12);
}

.manager-note-card {
  margin-top: 16px;
}

.manager-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.manager-card h2 {
  margin: 0 0 6px;
  color: #322842;
  font-size: 18px;
}

.manager-card p {
  margin: 0;
  color: #857990;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
}

#managerStateBadge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f7edf2;
  color: #b34a73;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

#managerStateBadge[data-active="1"] {
  background: linear-gradient(135deg, #ff79a8, #6fd6c8);
  color: #fff;
}

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

.manager-form-grid label {
  display: grid;
  gap: 7px;
  color: #594b66;
  font-size: 13px;
  font-weight: 900;
}

.manager-form-grid input,
.manager-form-grid select,
.manager-form-grid textarea,
.manager-code-output {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.92);
  color: #302640;
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
  outline: none;
}

.manager-form-grid input:focus,
.manager-form-grid select:focus,
.manager-form-grid textarea:focus,
.manager-code-output:focus {
  border-color: rgba(255, 122, 168, 0.64);
  box-shadow: 0 0 0 4px rgba(255, 122, 168, 0.12);
}

.manager-code-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.manager-code-output {
  display: block;
  min-height: 120px;
  margin-top: 14px;
  resize: vertical;
  line-height: 1.65;
  color: #463650;
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: pre;
}

.manager-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.manager-actions button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #bb4774;
  font-weight: 900;
  cursor: pointer;
}

#managerLoginBtn,
#managerActivateBtn,
#managerLifetimeBtn,
#managerGenerateCodesBtn {
  border-color: transparent;
  background: linear-gradient(135deg, #ff78a8, #72d8cb);
  color: #fff;
}

#managerCancelBtn {
  color: #786370;
}

#managerLogoutBtn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #bb4774;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.manager-status {
  margin-top: 14px !important;
  padding: 10px 12px;
  border: 1px solid rgba(217, 79, 135, 0.16);
  border-radius: 8px;
  background: #fff8fb;
  color: #7a6878 !important;
}

.manager-status[data-tone="ok"] {
  border-color: rgba(87, 199, 182, 0.28);
  background: #f0fbf7;
  color: #21836f !important;
}

.manager-status[data-tone="warn"],
.manager-status[data-tone="error"] {
  border-color: rgba(255, 122, 168, 0.36);
  background: #fff0f5;
  color: #c44976 !important;
}

.manager-result {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.manager-result[hidden] {
  display: none;
}

.manager-result div {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid rgba(217, 79, 135, 0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.74);
}

.manager-result span {
  color: #8d7e95;
  font-size: 12px;
  font-weight: 900;
}

.manager-result strong {
  color: #302640;
  font-size: 14px;
  word-break: break-all;
}

.manager-result .manager-result-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manager-result .manager-result-actions button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(217, 79, 135, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.94), rgba(87, 199, 182, 0.86));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.manager-result .manager-result-actions button:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}

.manager-result .manager-result-actions small {
  color: #8d7e95;
  font-size: 12px;
  font-weight: 800;
}

.manager-feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.manager-feature-list span {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.14), rgba(87, 199, 182, 0.14));
  color: #66556f;
  font-size: 12px;
  font-weight: 900;
}

.manager-small-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #bb4774;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.manager-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.manager-stat-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(217, 79, 135, 0.14);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(246, 255, 251, 0.82));
  min-width: 0;
}

.manager-stat-card span,
.manager-stat-card small {
  color: #87778f;
  font-size: 12px;
  font-weight: 900;
}

.manager-stat-card strong {
  color: #302640;
  font-size: 22px;
  line-height: 1.1;
}

.manager-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(217, 79, 135, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.manager-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.manager-table th,
.manager-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(217, 79, 135, 0.1);
  text-align: left;
  vertical-align: middle;
}

.manager-table th {
  color: #7d6b86;
  font-size: 12px;
  font-weight: 900;
  background: rgba(255, 244, 249, 0.72);
}

.manager-table td {
  color: #3a2d48;
  font-size: 13px;
  font-weight: 800;
}

.manager-table td strong {
  display: block;
  color: #302640;
  font-size: 13px;
  word-break: break-word;
}

.manager-table td small {
  display: block;
  margin-top: 2px;
  color: #96869b;
  font-size: 11px;
}

.manager-table tr:last-child td {
  border-bottom: 0;
}

.manager-table tr.is-offline {
  opacity: 0.74;
}

.manager-online-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1edf3;
  color: #78677f;
  font-size: 12px;
  font-weight: 900;
}

.manager-table tr.is-online .manager-online-pill {
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.18), rgba(87, 199, 182, 0.22));
  color: #168876;
}

.manager-code-status {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f1edf3;
  color: #78677f;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.manager-code-status.is-active {
  background: rgba(87, 199, 182, 0.18);
  color: #168876;
}

.manager-code-status.is-redeemed {
  background: rgba(255, 122, 168, 0.16);
  color: #c24976;
}

.manager-code-status.is-disabled {
  background: rgba(80, 64, 92, 0.1);
  color: #817185;
}

.manager-empty-cell {
  text-align: center !important;
  color: #9c879c !important;
}

.manager-report-badge {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  background: #f7edf2;
  color: #b34a73;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.manager-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.manager-report-grid > div {
  min-width: 0;
}

.manager-report-grid h3 {
  margin: 0 0 8px;
  color: #3a2d48;
  font-size: 14px;
}

.manager-report-bars {
  display: grid;
  gap: 8px;
}

.manager-report-bar-row {
  display: grid;
  grid-template-columns: 66px minmax(120px, 1fr) 76px 42px;
  align-items: center;
  gap: 8px;
  color: #594b66;
  font-size: 12px;
  font-weight: 900;
}

.manager-report-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(217, 79, 135, 0.1);
}

.manager-report-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff78a8, #72d8cb);
}

.manager-report-bar-row strong {
  color: #302640;
}

.manager-report-bar-row small {
  color: #9a879b;
}

@media (max-width: 760px) {
  .manager-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 24px;
  }

  .manager-hero,
  .manager-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .manager-form-grid,
  .manager-code-form,
  .manager-stat-grid,
  .manager-report-grid {
    grid-template-columns: 1fr;
  }

  .manager-report-bar-row {
    grid-template-columns: 58px minmax(88px, 1fr) 70px;
  }

  .manager-report-bar-row small {
    display: none;
  }
}

body[class*="panel-theme-"] .song-dock,
body[class*="panel-theme-"] .stage-console,
body[class*="panel-theme-"] .now-card,
body[class*="panel-theme-"] .transport-card,
body[class*="panel-theme-"] .control-panel,
body[class*="panel-theme-"] .library-search-tray {
  background: var(--theme-card-bg, rgba(255, 255, 255, 0.84));
  border-color: var(--border-color);
}

body[class*="panel-theme-"] .dock-header,
body[class*="panel-theme-"] .sidebar-header,
body[class*="panel-theme-"] .top-library-search,
body[class*="panel-theme-"] .readiness-card,
body[class*="panel-theme-"] .obs-layout-container,
body[class*="panel-theme-"] .cloud-account-card,
body[class*="panel-theme-"] .theme-section {
  background: var(--theme-panel-bg);
  border-color: var(--border-color);
}

body[class*="panel-theme-"] .brand-mark,
body[class*="panel-theme-"] .library-open-btn,
body[class*="panel-theme-"] .top-library-search button,
body[class*="panel-theme-"] .guide-start-btn:hover,
body[class*="panel-theme-"] .round-btn.play,
body[class*="panel-theme-"] .obs-connect-btn,
body[class*="panel-theme-"] .effect-showcase-btn.active,
body[class*="panel-theme-"] .onboarding-actions button:last-child {
  background: var(--theme-action-bg);
}

body[class*="panel-theme-"] .song-item.active,
body[class*="panel-theme-"] .theme-btn.active,
body[class*="panel-theme-"] .effect-btn.active,
body[class*="panel-theme-"] .camera-btn.active {
  border-color: var(--accent-primary);
  box-shadow: inset 4px 0 0 var(--accent-primary);
}

body[class*="panel-theme-"] .teleprompter-card {
  background:
    linear-gradient(135deg, rgba(46, 38, 55, 0.98), rgba(63, 52, 72, 0.98)),
    var(--theme-panel-bg);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

body[class*="panel-theme-"] .teleprompter-head h2,
body[class*="panel-theme-"] .teleprompter-current {
  color: #fff;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.42);
}

body[class*="panel-theme-"] .teleprompter-next {
  color: rgba(255, 232, 244, 0.92);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

input,
textarea,
[contenteditable] {
  user-select: text;
}

::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e9c8d5;
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: #dcaabb;
}

.app-container {
  display: flex;
  height: 100vh;
  padding: 12px;
  gap: 12px;
}

.sidebar,
.main-content {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(241, 220, 230, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px var(--shadow-color);
  overflow: hidden;
}

.sidebar {
  width: 314px;
  min-width: 314px;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #fff4f8, #edfbf7);
  border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #ff9fbd, #74d8ca);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 8px 20px rgba(255, 122, 168, 0.24);
}

.sidebar-header h1 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
}

.song-count {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 700;
}

.sidebar-import,
.sidebar-search {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.import-btn {
  width: 100%;
  padding: 10px 12px;
  border: 1px dashed #ff9fbd;
  border-radius: var(--radius-md);
  background: #fff9fc;
  color: #c94f7c;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.import-btn:hover {
  transform: translateY(-1px);
  background: #fff1f7;
  box-shadow: 0 8px 18px rgba(255, 122, 168, 0.16);
}

.sidebar-search input {
  width: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  font-size: 13px;
  transition: all var(--transition-fast);
}

.sidebar-search input:focus {
  border-color: #ff9fbd;
  box-shadow: 0 0 0 3px rgba(255, 122, 168, 0.14);
}

.songs-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

.dock-credit {
  display: grid;
  gap: 2px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border-color);
  background: linear-gradient(135deg, rgba(255, 248, 251, 0.92), rgba(239, 251, 248, 0.86));
}

.dock-credit span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dock-credit strong {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.dock-credit .icp-link {
  width: fit-content;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.dock-credit .icp-link:hover {
  color: var(--accent-primary);
}

.song-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  margin-bottom: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.song-item:hover {
  background: #fff7e7;
  border-color: #f4d8a9;
}

.song-item.active {
  background: linear-gradient(135deg, #fff1f6, #eef9f6);
  border-color: #ffb8ce;
  box-shadow: inset 3px 0 0 var(--accent-primary);
}

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

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

.song-artist,
.song-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.song-artist {
  margin-top: 2px;
}

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

.song-vocal-btn,
.song-delete-btn {
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #ffd0dc;
  border-radius: 7px;
  background: #fff;
  color: #c94f7c;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transform: translateX(4px);
  transition: opacity var(--transition-fast), transform var(--transition-fast), background var(--transition-fast);
}

.song-vocal-btn {
  border-color: #ccefe9;
  color: #1e927e;
}

.song-vocal-btn:disabled {
  cursor: wait;
  opacity: 0.8;
}

.song-item:hover .song-delete-btn,
.song-item:hover .song-vocal-btn,
.song-delete-btn:focus-visible,
.song-vocal-btn:focus-visible {
  opacity: 1;
  transform: translateX(0);
}

.song-vocal-btn:hover {
  background: #effbf8;
}

.song-delete-btn:hover {
  background: #fff0f4;
}

.empty-state {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.72);
}

.obs-status,
.director-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge,
.director-toggle,
.cue-badge,
.cue-badge-small {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.status-badge {
  padding: 6px 10px;
}

.status-badge.connected {
  background: #e7faf4;
  color: #1c8d77;
}

.status-badge.disconnected {
  background: #fff1f4;
  color: #c35d78;
}

.director-toggle {
  border: 1px solid var(--border-color);
  background: #fff;
  color: var(--text-secondary);
  padding: 7px 12px;
  cursor: pointer;
}

.director-toggle.active {
  border-color: #80d8ca;
  background: #e8faf6;
  color: #178b78;
}

.cue-badge,
.cue-badge-small {
  padding: 4px 8px;
  background: #fff6e4;
  color: #bd7b24;
}

.now-playing {
  margin: 14px 16px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #fff5fa, #f1fbf8);
}

.now-playing-content {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 14px;
}

.now-playing-placeholder {
  color: var(--text-secondary);
  font-weight: 700;
}

.placeholder-icon {
  display: block;
  font-size: 32px;
  margin-bottom: 4px;
}

.now-title {
  font-size: 26px;
  font-weight: 900;
  color: #c94f7c;
}

.now-artist {
  color: var(--text-secondary);
}

.teleprompter-card {
  margin: 0 16px 10px;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 1px solid #f0d5a8;
  background: linear-gradient(135deg, #fffaf0, #ffffff 56%, #effaf7);
  box-shadow: 0 14px 32px rgba(174, 118, 56, 0.10);
}

.teleprompter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.teleprompter-kicker {
  display: block;
  color: #bd7b24;
  font-size: 12px;
  font-weight: 900;
}

.teleprompter-head h2 {
  font-size: 20px;
  line-height: 1.1;
}

.teleprompter-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff1f6;
  color: #c94f7c;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 900;
}

.teleprompter-current {
  min-height: 54px;
  color: #332d37;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: 0;
}

.teleprompter-next {
  margin-top: 8px;
  color: #6f6377;
  font-size: 20px;
  font-weight: 800;
}

.teleprompter-upcoming {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.teleprompter-upcoming span {
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ffffff;
  color: var(--text-muted);
  border: 1px solid #f1e5d4;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress-area {
  padding: 0 16px 10px;
}

.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 8px;
  background: #f3e3ea;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-warm), var(--accent-secondary));
  border-radius: inherit;
  transition: width 0.1s linear;
}

.progress-time {
  width: 44px;
  color: var(--text-muted);
  font: 700 12px/1 var(--font-mono);
  text-align: center;
}

.transport-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 10px 16px 14px;
}

.ctrl-btn {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: #fff;
  color: var(--text-primary);
  font-size: 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ctrl-btn:hover {
  transform: translateY(-1px);
  border-color: #ffb8ce;
  box-shadow: 0 8px 18px rgba(255, 122, 168, 0.14);
}

.ctrl-btn.primary {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #ff8db3, #62cfc1);
  color: #fff;
  border-color: transparent;
  font-size: 22px;
}

.transport-volume {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  border-left: 1px solid var(--border-color);
}

.vocal-mode-toggle {
  min-height: 38px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffd0dc;
  border-radius: 999px;
  background: #fff;
  color: #c94f7c;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.vocal-mode-toggle:hover,
.vocal-mode-toggle.active {
  border-color: #ff8db3;
  background: #fff0f6;
  box-shadow: 0 8px 18px rgba(255, 122, 168, 0.16);
}

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

.control-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-top: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.54);
}

.tab-navigation {
  display: flex;
  gap: 6px;
  padding: 10px 12px 0;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  flex: 0 0 auto;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.tab-btn:hover {
  color: var(--accent-primary);
  background: #fff9fc;
}

.tab-btn.active {
  background: #fff;
  color: #c94f7c;
  border-color: var(--border-color);
}

.tab-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.tab-panel.active {
  display: block;
}

.panel-title {
  margin-bottom: 12px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

.theme-grid,
.effect-grid,
.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}

.theme-btn,
.effect-btn,
.camera-btn {
  min-height: 76px;
  padding: 10px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-btn:hover,
.effect-btn:hover,
.camera-btn:hover,
.effect-btn.active {
  transform: translateY(-1px);
  border-color: #ffb8ce;
  background: #fff8fb;
  box-shadow: 0 10px 20px rgba(107, 80, 95, 0.10);
}

.theme-icon,
.effect-icon {
  font-size: 22px;
}

.theme-name,
.effect-name,
.camera-label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.lyric-sync-panel,
.lyrics-preview,
.cue-timeline,
.obs-settings,
.scene-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #fff;
}

.lyric-sync-panel {
  padding: 12px;
  margin-bottom: 12px;
}

.sync-title {
  margin-bottom: 10px;
  font-weight: 900;
}

.sync-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-btn,
.obs-connect-btn {
  padding: 8px 12px;
  border: 1px solid #ffb8ce;
  border-radius: var(--radius-sm);
  background: #fff5fa;
  color: #c94f7c;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.sync-btn:hover:not(:disabled),
.obs-connect-btn:hover {
  background: #ffedf5;
}

.sync-btn:disabled,
.obs-connect-btn:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.sync-offset {
  flex: 1;
  text-align: center;
}

.sync-offset span {
  display: block;
  color: var(--accent-secondary);
  font: 900 18px/1 var(--font-mono);
}

.sync-offset small {
  color: var(--text-muted);
  font-size: 11px;
}

.lyrics-preview {
  max-height: none;
  overflow: visible;
  padding: 14px;
}

.lyrics-line {
  display: flex;
  gap: 10px;
  padding: 5px 0;
  color: var(--text-secondary);
}

.lyrics-line.current {
  color: #c94f7c;
  font-weight: 900;
}

.lyrics-line.past {
  opacity: 0.48;
}

.lyrics-time {
  min-width: 62px;
  text-align: right;
  color: var(--text-muted);
  font: 700 11px/1.8 var(--font-mono);
}

.lyrics-text {
  flex: 1;
}

.lyrics-placeholder {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
}

.karaoke-highlighted {
  color: var(--accent-primary);
}

.cue-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.cue-stat-item {
  padding: 5px 8px;
  border-radius: 999px;
  background: #fff6e4;
  color: #946422;
  font-size: 12px;
  font-weight: 800;
}

.cue-timeline {
  padding: 10px;
  max-height: 270px;
  overflow-y: auto;
}

.cue-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  background: #fffafd;
  border: 1px solid transparent;
}

.cue-item.executed {
  border-color: #9be0d4;
  background: #effaf7;
}

.cue-icon {
  width: 28px;
  text-align: center;
}

.cue-info {
  flex: 1;
}

.cue-type {
  color: var(--text-primary);
  font-weight: 900;
  font-size: 12px;
}

.cue-value,
.cue-time {
  color: var(--text-muted);
  font-size: 12px;
}

.obs-settings {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
}

.obs-layout-container {
  padding: 12px;
  border: 1px solid rgba(241, 220, 230, 0.95);
  border-radius: 8px;
  background: #fff;
}

.cloud-account-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 128, 176, 0.28);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 247, 252, 0.96), rgba(241, 255, 252, 0.9));
  box-shadow: 0 12px 30px rgba(255, 119, 171, 0.08);
}

.cloud-account-card[hidden] {
  display: none !important;
}

.cloud-account-card.is-logged-in .cloud-login-grid,
.cloud-account-card.is-logged-in .cloud-captcha-row,
.cloud-account-card.is-logged-in #cloudCaptchaHint {
  display: none !important;
}

.cloud-account-quick-host {
  position: relative;
  justify-self: end;
  width: auto;
  align-self: center;
  z-index: 30;
}

.cloud-account-toggle {
  min-width: 104px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid rgba(255, 128, 176, 0.35);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 248, 252, 0.98), rgba(241, 255, 252, 0.96));
  color: #b94371;
  box-shadow: 0 8px 18px rgba(255, 120, 161, 0.1);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  cursor: pointer;
}

.cloud-account-toggle.logged-in {
  color: #16886d;
  border-color: rgba(79, 196, 169, 0.42);
}

.cloud-account-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ff8fb2;
  box-shadow: 0 0 0 3px rgba(255, 143, 178, 0.16);
}

.cloud-account-toggle.logged-in .cloud-account-dot {
  background: #43c8a4;
  box-shadow: 0 0 0 3px rgba(67, 200, 164, 0.18);
}

.cloud-account-card.cloud-account-quick {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  margin: 0;
  padding: 14px;
  gap: 10px;
  border-radius: 12px;
  max-width: none;
  z-index: 50;
}

.cloud-account-card.cloud-account-quick .setting-group-title {
  margin: 0;
  font-size: 13px;
}

.cloud-account-card.cloud-account-quick .cloud-account-header {
  align-items: flex-start;
  gap: 8px;
}

.cloud-account-card.cloud-account-quick .cloud-account-header .soft-btn {
  width: auto;
  min-width: 82px;
  min-height: 34px;
  padding: 0 12px;
  flex: 0 0 auto;
}

.cloud-account-card.cloud-account-quick .cloud-account-meta {
  display: none;
}

.cloud-account-card.cloud-account-quick .cloud-account-header strong {
  font-size: 14px;
  margin: 0;
}

.cloud-account-card.cloud-account-quick .cloud-account-header span {
  font-size: 12px;
}

.cloud-account-card.cloud-account-quick .cloud-verify {
  width: 100%;
  height: 42px;
}

.cloud-account-card.cloud-account-quick .cloud-captcha-row {
  grid-template-columns: minmax(0, 1fr) 64px;
  gap: 8px;
}

.cloud-account-card.cloud-account-quick .cloud-login-grid,
.cloud-account-card.cloud-account-quick .cloud-register-grid,
.cloud-account-card.cloud-account-quick .cloud-captcha-row,
.cloud-account-card.cloud-account-quick .cloud-save-row,
.cloud-account-card.cloud-account-quick .cloud-redeem-card,
.cloud-account-card.cloud-account-quick .cloud-pay-card {
  gap: 8px;
}

.cloud-account-card.cloud-account-quick .cloud-save-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.cloud-account-card.cloud-account-quick .cloud-login-grid,
.cloud-account-card.cloud-account-quick .cloud-register-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.cloud-account-card.cloud-account-quick .cloud-login-grid button,
.cloud-account-card.cloud-account-quick .cloud-register-grid button {
  min-width: 0;
}

.cloud-account-card.cloud-account-quick .cloud-captcha-row input {
  width: 80px;
}

.cloud-account-card.cloud-account-quick .cloud-pay-result {
  grid-template-columns: 96px minmax(0, 1fr);
}

.cloud-account-card.cloud-account-quick .cloud-pay-result img {
  width: 88px;
  height: 88px;
}

.cloud-account-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cloud-account-meta {
  color: #7a668d;
  font-size: 13px;
  line-height: 1.35;
}

.cloud-account-meta strong {
  color: #4c3f66;
  font-weight: 700;
}

.cloud-membership-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 128, 176, 0.22);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.58);
  color: #756783;
  font-size: 12px;
  font-weight: 800;
}

.cloud-membership-badge {
  min-width: 56px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 9px;
  border-radius: 999px;
  background: #f6e9f0;
  color: #b34773;
  font-weight: 900;
  white-space: nowrap;
}

.cloud-membership-badge.is-pro {
  background: linear-gradient(135deg, #ff75a7, #7bd7cb);
  color: #fff;
  box-shadow: 0 8px 18px rgba(255, 117, 167, 0.16);
}

.cloud-redeem-card,
.cloud-pay-card {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 128, 176, 0.22);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 246, 250, 0.88), rgba(239, 252, 249, 0.84));
}

.cloud-redeem-card[hidden],
.cloud-pay-card[hidden] {
  display: none;
}

.cloud-pay-card {
  display: none !important;
}

.cloud-redeem-head,
.cloud-pay-head,
.cloud-pay-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.cloud-redeem-head strong,
.cloud-pay-head strong,
.cloud-pay-result strong {
  display: block;
  color: #352943;
  font-size: 13px;
  font-weight: 900;
}

.cloud-redeem-head span,
.cloud-pay-head span,
.cloud-pay-result span {
  display: block;
  margin-top: 3px;
  color: #7f728c;
  font-size: 12px;
  font-weight: 800;
}

.cloud-redeem-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.cloud-redeem-row input {
  min-height: 38px;
  border: 1px solid rgba(255, 128, 176, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  color: #302640;
  font: inherit;
  font-weight: 900;
  padding: 0 10px;
  outline: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cloud-redeem-row input:focus {
  border-color: rgba(255, 122, 168, 0.64);
  box-shadow: 0 0 0 4px rgba(255, 122, 168, 0.12);
}

.cloud-pay-selects {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.cloud-pay-head select,
.cloud-pay-selects select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid rgba(255, 128, 176, 0.35);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #3b3048;
  font: inherit;
  font-weight: 900;
}

.cloud-pay-selects select {
  min-width: 74px;
}

.cloud-pay-result {
  grid-template-columns: 124px minmax(0, 1fr);
  padding: 10px;
  border: 1px solid rgba(111, 212, 200, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.cloud-pay-result[hidden] {
  display: none;
}

.cloud-pay-result img {
  width: 112px;
  height: 112px;
  border: 1px solid rgba(80, 64, 92, 0.12);
  border-radius: 8px;
  background: #fff;
}

.cloud-pay-result button {
  margin-top: 8px;
}

.cloud-account-header strong {
  display: block;
  color: #2c2240;
  font-size: 16px;
  margin-bottom: 4px;
}

.cloud-account-header span {
  color: #8d809b;
  font-size: 13px;
}

.cloud-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  border: 1px solid rgba(255, 128, 176, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.cloud-auth-tabs[hidden] {
  display: none;
}

.cloud-auth-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #8c7086;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.cloud-auth-tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #ff80b0, #78d8cb);
  box-shadow: 0 8px 16px rgba(255, 120, 172, 0.16);
}

.cloud-login-grid,
.cloud-register-grid {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 10px;
}

.cloud-register-grid {
  grid-template-columns: minmax(130px, 1fr) minmax(160px, 1fr) minmax(130px, 1fr) auto;
}

.cloud-login-grid[hidden],
.cloud-register-grid[hidden] {
  display: none;
}

.cloud-account-identity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(111, 212, 200, 0.38);
  border-radius: 8px;
  background: #f1fbf8;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.cloud-account-identity[hidden] {
  display: none;
}

.cloud-account-identity strong {
  color: #1b8f7b;
  font-family: var(--font-mono);
}

.cloud-captcha-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 86px;
  gap: 10px;
  align-items: center;
}

.cloud-captcha-row[hidden] {
  display: none;
}

.cloud-verify {
  position: relative;
  min-width: 0;
  height: 42px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 128, 176, 0.4);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 244, 249, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  user-select: none;
  touch-action: none;
}

.cloud-verify::before {
  content: "";
  position: absolute;
  left: 42px;
  right: 12px;
  top: 50%;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 128, 176, 0.14);
  transform: translateY(-50%);
  pointer-events: none;
}

.cloud-verify-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(135deg, rgba(255, 143, 178, 0.25), rgba(116, 216, 202, 0.32));
  transition: width 0.16s ease;
}

.cloud-verify-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9a8096;
  font-size: 12px;
  font-weight: 900;
  pointer-events: none;
}

.cloud-verify-handle {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 38px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8fb2, #74d8ca);
  color: #fff;
  box-shadow: 0 6px 14px rgba(255, 120, 161, 0.2);
  cursor: grab;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transition: box-shadow 0.16s ease, background 0.16s ease;
  user-select: none;
  touch-action: none;
  pointer-events: auto;
}

.cloud-verify-handle:active {
  cursor: grabbing;
}

.cloud-verify.verifying .cloud-verify-handle,
.cloud-verify.verified .cloud-verify-handle {
  cursor: default;
}

.cloud-verify.verified {
  border-color: rgba(67, 200, 164, 0.48);
  background: linear-gradient(135deg, rgba(237, 255, 249, 0.96), rgba(255, 255, 255, 0.95));
}

.cloud-verify.verified .cloud-verify-fill {
  width: 100% !important;
  background: linear-gradient(135deg, rgba(67, 200, 164, 0.28), rgba(255, 143, 178, 0.18));
}

.cloud-login-grid input,
.cloud-register-grid input {
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(255, 128, 176, 0.35);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #302940;
  outline: none;
}

.cloud-register-grid button,
.cloud-login-grid button {
  min-height: 40px;
}

.cloud-save-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cloud-account-card button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-row label {
  min-width: 64px;
  color: var(--text-secondary);
  font-weight: 800;
}

.setting-row input,
.scene-select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text-primary);
  outline: none;
}

.setting-row input:focus,
.scene-select:focus {
  border-color: var(--accent-secondary);
  box-shadow: 0 0 0 3px rgba(87, 199, 182, 0.14);
}

code {
  padding: 1px 5px;
  border-radius: 4px;
  background: #fff1f6;
  color: #c94f7c;
}

@media (max-width: 980px) {
  .app-container {
    flex-direction: column;
    overflow: auto;
  }

  .sidebar {
    width: 100%;
    min-width: 0;
    max-height: 34vh;
  }

  .main-content {
    min-height: 760px;
  }

  .teleprompter-current {
    font-size: 28px;
  }
}

/* Redesigned cute control console */
.app-shell {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  min-height: 100vh;
  gap: 12px;
  padding: 12px;
}

.song-dock,
.stage-console,
.now-card,
.teleprompter-card,
.transport-card,
.control-panel {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(241, 220, 230, 0.95);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(107, 80, 95, 0.11);
}

.song-dock,
.stage-console {
  min-height: 0;
}

.song-dock {
  height: calc(100vh - 24px);
  overflow: hidden;
}

.song-dock {
  display: flex;
  flex-direction: column;
}

.dock-header {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: linear-gradient(135deg, #fff2f7, #ecfbf7);
  border-bottom: 1px solid var(--border-color);
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8fb2, #6fd4c8);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.dock-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
}

.dock-header p {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.dock-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.clear-songs-btn {
  min-width: 58px;
  padding: 10px 11px;
  border: 1px solid #ffd0dc;
  border-radius: var(--radius-md);
  background: #fff;
  color: #c94f7c;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.clear-songs-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: #fff0f5;
  box-shadow: 0 8px 18px rgba(201, 79, 124, 0.14);
}

.clear-songs-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  box-shadow: none;
}

.online-library {
  display: grid;
  gap: 9px;
  margin: 12px 14px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff8fb;
}

.online-library-shortcut {
  margin-top: 12px;
  background: linear-gradient(135deg, #fff5fa, #effbf8);
}

.lyrics-library-panel + .online-library-shortcut {
  display: grid;
}

.library-open-btn {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8fb2, #74d8ca);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.lyrics-library-panel {
  margin: 0 0 12px;
  background: #fff;
}

.lyrics-library-panel .library-results {
  max-height: 260px;
}

.library-search-tray {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 120, 161, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 14px 32px rgba(107, 80, 95, 0.08);
}

.library-search-tray[hidden] {
  display: none;
}

.library-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
}

.library-tray-head span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.top-library-panel {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.top-library-panel > .online-library-head,
.top-library-panel > .online-search-row:not(.kg-share-row) {
  display: none;
}

.top-library-panel .library-results {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  max-height: 270px;
}

.online-library-head,
.online-search-row,
.library-result {
  display: flex;
  align-items: center;
}

.online-library-head {
  justify-content: space-between;
  gap: 8px;
  color: #302938;
  font-size: 13px;
}

.online-library-head span {
  color: #b94371;
  font-size: 11px;
  font-weight: 900;
}

.online-library-head select {
  height: 28px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: #b94371;
  font-size: 12px;
  font-weight: 900;
  outline: 0;
}

.online-search-row {
  gap: 8px;
}

.netease-auth-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #f2c9db;
  border-radius: 8px;
  background: linear-gradient(135deg, #fff, #fff5fb);
}

.netease-auth-top,
.netease-config-actions,
.netease-auth-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.netease-auth-top {
  justify-content: space-between;
}

.netease-auth-top > div:first-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.netease-auth-top strong {
  color: #302938;
  font-size: 12px;
  font-weight: 900;
}

.netease-auth-top span,
.netease-config-actions small {
  color: #8f7d98;
  font-size: 11px;
  line-height: 1.4;
}

.netease-auth-actions button,
.netease-config-actions button {
  min-height: 30px;
  border: 1px solid #f5b4ce;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #c53d75;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.netease-auth-actions button:last-child,
.netease-config-actions button {
  background: #ff8fb2;
  color: #fff;
}

.streamer-only-auth #neteaseCloudToggleBtn,
.streamer-only-auth #neteaseConfigToggleBtn,
.netease-config-panel,
.netease-cloud-panel {
  display: none !important;
}

.netease-auth-actions button:disabled,
.netease-config-actions button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.netease-config-panel,
.netease-cloud-panel {
  display: grid;
  gap: 8px;
}

.netease-config-panel[hidden],
.netease-cloud-panel[hidden] {
  display: none;
}

.netease-config-panel input,
.netease-config-panel textarea,
.netease-cloud-panel input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text-primary);
  font-size: 12px;
  outline: 0;
  resize: vertical;
}

.netease-config-actions {
  justify-content: space-between;
  align-items: flex-start;
}

.online-search-row input {
  min-width: 0;
  flex: 1;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: var(--text-primary);
  font-size: 13px;
  outline: 0;
}

.online-search-row button,
.library-action {
  border: 0;
  border-radius: 8px;
  background: #ff8fb2;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.online-search-row button {
  height: 34px;
  padding: 0 12px;
  cursor: pointer;
}

.online-search-row button:disabled {
  opacity: 0.55;
  cursor: wait;
}

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

.kg-auth-row button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: #70d1c1;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.kg-auth-row span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.kg-login-panel:empty {
  display: none;
}

.kg-login-box {
  display: grid;
  gap: 5px;
  padding: 8px;
  border: 1px dashed #ffbad0;
  border-radius: 8px;
  background: #fff;
}

.kg-login-box a {
  color: #b94371;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.kg-login-box small {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
}

.kg-share-row {
  padding-top: 2px;
}

.library-results {
  display: grid;
  gap: 7px;
  max-height: 190px;
  overflow-y: auto;
}

.library-empty {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.library-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.library-link-actions .soft-btn {
  min-height: 38px;
  padding-inline: 16px;
}

.library-progress-card {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #f6bdd2;
  border-radius: 10px;
  background: linear-gradient(135deg, #fff7fb, #f5fffc);
  box-shadow: 0 10px 24px rgba(236, 121, 170, 0.12);
}

.library-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
}

.library-progress-head span {
  color: #cf4b86;
  font-size: 12px;
}

.library-import-bar {
  position: relative;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #f6e7f0;
}

.library-import-bar span {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff73a8, #7fd8d0, #ffc55d);
  transition: width 260ms ease;
}

.library-import-bar span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent);
  animation: libraryProgressShine 1.1s linear infinite;
}

.library-progress-card small {
  color: #8b788f;
  font-size: 12px;
  font-weight: 700;
}

@keyframes libraryProgressShine {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.library-result {
  width: 100%;
  min-height: 66px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
}

.library-main {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 4px;
  line-height: 1.25;
}

.library-song,
.library-artist {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.library-song {
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.library-artist {
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.25;
}

.library-note {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.25;
}

.library-note.stream-ready {
  background: #dcfff7;
  color: #158f7d;
}

.library-note.stream-missing {
  background: #fff0f6;
  color: #c53d75;
}

.library-action {
  flex: 0 0 auto;
  align-self: center;
  padding: 6px 8px;
  white-space: nowrap;
}

.kg-share-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.kg-share-cover {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #fff1f6;
}

.kg-share-copy {
  min-width: 0;
}

.kg-share-copy strong,
.kg-share-copy p {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kg-share-copy strong {
  color: var(--text-primary);
  font-size: 13px;
  white-space: nowrap;
}

.kg-share-copy p {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.kg-share-copy a {
  display: inline-flex;
  margin-top: 5px;
  color: #b94371;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.soft-btn,
.icon-btn,
.director-toggle,
.tab-btn,
.camera-btn,
.theme-btn,
.effect-btn,
.sync-btn,
.obs-connect-btn,
.round-btn {
  appearance: none;
  border: 1px solid var(--border-color);
  font: inherit;
  color: var(--text-primary);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.soft-btn {
  width: 100%;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-style: dashed;
  border-color: #ff9fbd;
  border-radius: 8px;
  background: #fff8fb;
  color: #b94371;
  font-weight: 900;
}

.btn-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #ff8fb2;
  color: #fff;
  font-weight: 900;
  line-height: 1;
}

.search-box {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: center;
  margin: 12px 14px;
  padding: 0 10px;
  height: 42px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.search-symbol {
  color: var(--accent-primary);
  font-weight: 900;
}

.search-box input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
}

.stage-console {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: contain;
}

.stage-console > .console-top {
  flex: 0 0 56px;
}

.stage-console > .readiness-card {
  flex: 0 0 92px;
  overflow: hidden;
}

.stage-console > .now-card {
  flex: 0 0 86px;
}

.stage-console > .now-card.has-song {
  flex: 0 0 104px;
}

.stage-console > .teleprompter-card {
  flex: 0 0 clamp(420px, 44vh, 520px);
  min-height: 420px;
  overflow: hidden;
}

.stage-console > .transport-card {
  flex: 0 0 132px;
  overflow: visible;
}

.stage-console > .control-panel {
  flex: 0 0 auto;
}

.console-top {
  display: grid;
  grid-template-columns: auto minmax(320px, 1fr) auto auto auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
}

.top-library-search {
  width: 100%;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 74px;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 120, 161, 0.28);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 247, 251, 0.96), rgba(239, 251, 248, 0.96));
  box-shadow: 0 8px 20px rgba(255, 120, 161, 0.08);
}

.top-library-search select,
.top-library-search input,
.top-library-search button {
  height: 34px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.top-library-search select,
.top-library-search input {
  min-width: 0;
  border: 1px solid rgba(217, 79, 135, 0.18);
  background: #fff;
  color: var(--text-primary);
  outline: 0;
}

.top-library-search select {
  padding: 0 8px;
  color: #b94371;
}

.top-library-search input {
  padding: 0 11px;
}

.top-library-search button {
  border: 0;
  background: linear-gradient(135deg, #ff8fb2, #74d8ca);
  color: #fff;
  cursor: pointer;
}

.top-library-search button:disabled {
  opacity: .58;
  cursor: wait;
}

.guide-start-btn,
.external-sync-top-btn {
  min-height: 36px;
  border: 1px solid #f5b4ce;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #c53d75;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.external-sync-top-btn {
  color: #0c8d80;
  border-color: rgba(126, 216, 205, 0.46);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(231, 255, 251, 0.96));
}

.guide-start-btn:hover,
.external-sync-top-btn:hover {
  background: #fff4f8;
  box-shadow: 0 8px 18px rgba(255, 122, 168, 0.14);
}

.status-group,
.director-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.icon-btn {
  width: 42px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 8px;
  background: #fff;
  color: #5f5269;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.status-badge,
.cue-badge,
.teleprompter-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.status-badge.connected {
  background: #e8fbf4;
  color: #16886d;
}

.status-badge.disconnected {
  background: #fff0f4;
  color: #bd4a70;
}

.readiness-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 120, 161, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 24px rgba(107, 80, 95, 0.07);
}

.readiness-card.ready {
  border-color: rgba(56, 181, 143, 0.28);
  background: linear-gradient(90deg, rgba(232, 251, 244, 0.86), rgba(255, 255, 255, 0.82));
}

.readiness-card.warn {
  background: linear-gradient(90deg, rgba(255, 244, 248, 0.9), rgba(255, 255, 255, 0.78));
}

.readiness-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.readiness-head strong {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 900;
}

.readiness-head span {
  color: #bd4a70;
  font-size: 12px;
  font-weight: 900;
}

.readiness-card.ready .readiness-head span {
  color: #16886d;
}

.readiness-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.readiness-chip {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.readiness-chip b {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.readiness-chip small {
  min-width: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.readiness-chip.ok {
  background: #e8fbf4;
  color: #16886d;
}

.readiness-chip.ok b {
  background: #25b990;
}

.readiness-chip.warn {
  background: #fff0f4;
  color: #bd4a70;
}

.readiness-chip.warn b {
  background: #ff78a1;
}

.director-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 8px;
  background: #fff;
  font-weight: 900;
}

.director-indicator {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #70d1c1;
  color: #fff;
  line-height: 1;
}

.cue-badge {
  min-width: 30px;
  background: #fff6df;
  color: #a26714;
}

.now-card,
.teleprompter-card,
.transport-card,
.control-panel {
  overflow: hidden;
}

.now-card {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 15px 16px;
  background: linear-gradient(135deg, rgba(255, 244, 248, 0.96), rgba(238, 250, 247, 0.96));
  transition: min-height var(--transition-fast), padding var(--transition-fast), background var(--transition-fast);
}

.now-card.has-song {
  padding-bottom: 20px;
}

.now-card:not(.has-song) {
  background:
    linear-gradient(135deg, rgba(255, 248, 251, 0.96), rgba(242, 251, 249, 0.96));
}

.now-card:not(.has-song) .record-dot {
  background: #ead5df;
  box-shadow: 0 0 0 5px rgba(196, 174, 188, 0.12);
}

.now-card:not(.has-song) .now-label {
  color: #9a7587;
}

.now-card:not(.has-song) .now-title {
  color: #3c2f3f;
  font-size: 22px;
}

.now-card:not(.has-song) .now-artist {
  color: #7f7082;
}

.record-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff7aa8;
  box-shadow: 0 0 0 5px rgba(255, 122, 168, 0.14);
}

.now-copy {
  min-width: 0;
}

.now-label,
.teleprompter-kicker {
  color: var(--accent-primary);
  font-size: 12px;
  font-weight: 900;
}

.now-title {
  margin-top: 2px;
  color: #302938;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.now-artist {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 13px;
}

.teleprompter-card {
  display: grid;
  grid-template-rows: auto auto auto minmax(72px, auto) auto minmax(48px, 1fr);
  gap: 8px;
  padding: 14px 18px;
  min-height: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #2e2637, #3f3448);
  color: #fff;
}

.teleprompter-open {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(255, 143, 178, 0.36);
  border-radius: 8px;
  background: #fff7fb;
  color: #b94371;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.teleprompter-open:hover {
  border-color: #ff9fbd;
  background: #fff0f6;
}

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

.teleprompter-head h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.teleprompter-pill {
  background: rgba(255, 255, 255, 0.12);
  color: #ffe8f0;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.teleprompter-prep {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 122, 168, 0.32);
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.22), rgba(125, 223, 208, 0.14));
  box-shadow: inset 0 0 18px rgba(255, 255, 255, 0.06);
  color: #fff7fb;
}

.teleprompter-prep[hidden] {
  display: none !important;
}

.teleprompter-prep .prep-label {
  color: #ff9fbd;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.teleprompter-prep .prep-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 78px;
}

.teleprompter-prep .prep-dots i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 28%, #fff, #ff7aa8 48%, #7ddfd0);
  box-shadow: 0 0 10px rgba(255, 122, 168, 0.58);
}

.teleprompter-prep .prep-text {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teleprompter-prep.is-final-dot .prep-dots i {
  animation: prepFinalDot 0.72s ease-in-out infinite;
}

.teleprompter-current {
  margin-top: 0;
  padding-bottom: 2px;
  color: #fff8f0;
  font-size: clamp(20px, 2.45vw, 30px);
  font-weight: 900;
  line-height: 1.14;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-height: 2.28em;
  max-height: 3.42em;
  overflow: hidden;
}

.teleprompter-next {
  margin-top: 0;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffe8f0;
  font-size: clamp(13px, 1.55vw, 17px);
  font-weight: 900;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teleprompter-upcoming {
  display: grid;
  gap: 6px;
  margin-top: 0;
  max-height: 96px;
  overflow-y: auto;
  scrollbar-width: thin;
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
}

.teleprompter-line {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 24px;
}

.teleprompter-line-index {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.teleprompter-line-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

@keyframes prepFinalDot {
  0%, 100% {
    opacity: 0.62;
    transform: scale(0.84);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

.transport-card {
  position: relative;
  z-index: 1;
  padding: 13px 16px 15px;
}

.playlist-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.8fr);
  gap: 16px;
  align-items: stretch;
}

.playlist-editor-main,
.playlist-style-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #f4d4df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.playlist-editor label,
.playlist-style-card label {
  color: #4a3a52;
  font-size: 13px;
  font-weight: 900;
}

#playlistText {
  width: 100%;
  min-height: 260px;
  max-height: none;
  resize: vertical;
  padding: 12px;
  border: 1px solid #f1cad8;
  border-radius: 9px;
  background: #fff;
  color: #2c2431;
  font: 800 14px/1.7 "Microsoft YaHei", sans-serif;
  overflow: auto;
  scrollbar-width: thin;
}

.playlist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.playlist-missing-hint {
  display: grid;
  gap: 6px;
  padding: 18px 14px;
  color: #7b6d82;
}

.playlist-missing-hint strong {
  color: #d94f83;
  font-size: 14px;
}

.song-missing-accompaniment {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 122, 168, 0.14);
  color: #d94f83;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.playlist-cover-progress {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) 48px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 122, 168, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.64);
}

.playlist-cover-progress[hidden] {
  display: none;
}

.playlist-cover-progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(90, 74, 104, 0.12);
}

.playlist-cover-progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7aa8, #b08cff, #65dcca);
  transition: width 0.22s ease;
}

.playlist-cover-progress b,
.playlist-limit-note {
  color: #7b6d82;
  font-size: 12px;
  font-weight: 900;
}

.playlist-limit-note {
  display: block;
}

.playlist-style-card input,
.playlist-style-card select {
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #f1cad8;
  border-radius: 8px;
  background: #fff;
  color: #2c2431;
  font-weight: 800;
}

.playlist-style-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.playlist-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #f4d4df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.playlist-preview-head strong {
  color: #4a3a52;
  font-size: 14px;
  font-weight: 900;
}

.playlist-page-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.playlist-page-controls button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #f1cad8;
  border-radius: 8px;
  background: #fff;
  color: #c94f7c;
  font-weight: 900;
  cursor: pointer;
}

.playlist-page-controls button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.playlist-page-controls span {
  min-width: 52px;
  color: #7b6d82;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.playlist-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.playlist-preview-grid.is-inline-cover {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.playlist-preview-card {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid #f4d4df;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  text-align: center;
}

.playlist-preview-card.is-inline-cover {
  grid-template-columns: 54px minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-items: stretch;
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
  min-height: 76px;
  padding: 11px 12px 11px 42px;
  text-align: left;
}

.playlist-preview-number {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(48, 36, 58, 0.76);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.playlist-preview-card.is-inline-cover .playlist-preview-number {
  top: 50%;
  transform: translateY(-50%);
}

.playlist-preview-card img,
.playlist-cover-fallback {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(135deg, #ff7aa8, #7ddfd0);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.playlist-preview-card.is-inline-cover img,
.playlist-preview-card.is-inline-cover .playlist-cover-fallback {
  grid-row: 1 / span 2;
  width: 54px;
  height: 54px;
  border-radius: 9px;
  font-size: 22px;
}

.playlist-preview-card strong,
.playlist-preview-card small {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.playlist-preview-card.is-inline-cover strong,
.playlist-preview-card.is-inline-cover small {
  justify-self: stretch;
}

.playlist-preview-card strong {
  display: -webkit-box;
  color: #30243a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.playlist-preview-card small {
  color: #7b6d82;
  font-size: 12px;
  font-weight: 800;
}

.playlist-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed #f0bfd0;
  border-radius: 10px;
  color: #8a718f;
  font-weight: 900;
  text-align: center;
}

@media (max-width: 900px) {
  .playlist-editor {
    grid-template-columns: 1fr;
  }
}

.progress-row {
  display: grid;
  grid-template-columns: 46px minmax(120px, 1fr) 46px;
  align-items: center;
  gap: 10px;
}

.progress-time {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.progress-bar {
  position: relative;
  height: 10px;
  border-radius: 8px;
  background: #f2e6ed;
  overflow: visible;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.progress-bar::before {
  content: '';
  position: absolute;
  inset: -10px 0;
  border-radius: 999px;
}

.progress-fill {
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7aa8, #72d4c8, #f5bd68);
  pointer-events: none;
}

.progress-preview {
  position: absolute;
  left: 0;
  bottom: 18px;
  z-index: 3;
  min-width: 44px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 122, 168, 0.45);
  border-radius: 999px;
  background: rgba(48, 35, 57, 0.94);
  box-shadow: 0 8px 22px rgba(48, 35, 57, 0.22);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
}

.progress-preview[hidden] {
  display: none !important;
}

.progress-bar.dragging .progress-fill {
  filter: saturate(1.12);
}

.transport-controls {
  display: grid;
  grid-template-columns: 176px minmax(360px, 1fr) minmax(210px, 270px);
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  padding: 0 14px 2px;
}

.round-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: #fff;
  color: #5f5269;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.round-btn.play {
  width: 58px;
  height: 58px;
  min-width: 58px;
  min-height: 58px;
  background: linear-gradient(135deg, #ff82ad, #74d8ca);
  border-color: transparent;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 12px 24px rgba(255, 122, 168, 0.26);
}

.vocal-mode-toggle {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  align-self: center;
}

#stopBtn {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  align-self: center;
  margin-left: 2px;
}

#playBtn,
#pauseBtn {
  grid-column: 1;
  grid-row: 1;
  justify-self: center;
  align-self: center;
}

.volume-control {
  grid-column: 3;
  grid-row: 1;
  width: min(100%, 270px);
  min-width: 210px;
  min-height: 38px;
  align-self: center;
  display: grid;
  grid-template-columns: 46px minmax(130px, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.pitch-control {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: 54px 32px 58px 32px 46px minmax(120px, 1fr);
  align-items: center;
  gap: 6px;
  min-height: 60px;
  align-self: center;
  padding: 8px 10px 7px;
  border: 1px solid rgba(255, 143, 178, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8fb, #f4fbfa);
}

.pitch-control span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.pitch-control strong {
  min-width: 54px;
  color: #3a303f;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.pitch-control button {
  height: 28px;
  border: 1px solid rgba(217, 79, 135, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #c43f78;
  font-weight: 900;
  cursor: pointer;
}

.pitch-control button:hover {
  background: #fff1f7;
  border-color: rgba(217, 79, 135, 0.42);
}

.pitch-control small {
  grid-column: 6;
  grid-row: 1;
  min-height: 14px;
  color: #9b8794;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pitch-precache {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(82px, 116px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 14px;
  max-width: 100%;
  overflow: hidden;
}

.pitch-precache[hidden] {
  display: none !important;
}

.pitch-precache-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(229, 203, 216, 0.74);
}

.pitch-precache-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7aa8, #72d4c8, #f4c46e);
  transition: width 0.26s ease;
}

.pitch-precache b {
  color: #8d7b88;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vol-slider {
  width: 100%;
  cursor: pointer;
  touch-action: pan-y;
  accent-color: var(--accent-primary);
}

.control-panel {
  position: relative;
  z-index: 1;
  min-height: 380px;
  display: grid;
  grid-template-rows: auto minmax(280px, auto);
}

.tab-navigation {
  display: flex;
  gap: 6px;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.tab-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 11px;
  border-radius: 8px;
  background: #fff;
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: 13px;
  font-weight: 900;
}

.tab-btn span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f7edf3;
  color: #b94371;
  line-height: 1;
}

.tab-btn b {
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #fff1cf;
  color: #9c6411;
  font-size: 11px;
}

.tab-btn.active {
  border-color: #ffb7cf;
  background: #fff3f8;
  color: #3a303f;
}

.tab-panel {
  min-height: 0;
  overflow-y: auto;
  padding: 16px;
}

.panel-title {
  margin-bottom: 12px;
  color: #3a303f;
  font-size: 16px;
  font-weight: 900;
}

.effect-tools {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px solid rgba(255, 120, 161, 0.18);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 244, 248, 0.86), rgba(240, 251, 248, 0.86));
}

.effect-showcase-btn {
  min-height: 36px;
  padding: 0 14px;
  white-space: nowrap;
}

.effect-showcase-btn.active {
  color: #fff;
  border-color: #ff78a1;
  background: linear-gradient(135deg, #ff78a1, #75d8ca);
}

#effectShowcaseStatus {
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.theme-grid,
.effect-grid,
.camera-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

#themePanel .theme-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}

.theme-preview-card {
  position: relative;
  display: grid;
  gap: 10px;
  min-height: 0;
  padding: 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.88), transparent 26%),
    radial-gradient(circle at 80% 22%, rgba(255, 255, 255, 0.56), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 252, 0.52)),
    linear-gradient(135deg, var(--theme-swatch, #ff8fb2, #74d8ca));
  box-shadow: 0 16px 34px rgba(107, 80, 95, 0.10);
}

.theme-preview-card::before {
  content: '';
  position: absolute;
  inset: auto -8% -42% 44%;
  height: 160px;
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.40), rgba(255, 255, 255, 0.08));
  transform: rotate(-8deg);
  pointer-events: none;
}

.theme-preview-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.theme-preview-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.theme-preview-copy span {
  color: rgba(185, 67, 113, 0.92);
  font-size: 13px;
  font-weight: 900;
}

.theme-preview-copy strong {
  color: #2f2936;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
  text-shadow: 0 2px 14px rgba(255, 255, 255, 0.54);
}

.theme-preview-swatches {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.theme-preview-swatches i {
  width: 24px;
  height: 24px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  box-shadow: 0 7px 16px rgba(107, 80, 95, 0.14);
}

.theme-preview-surface {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(14px);
}

.theme-preview-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 122, 168, 0.96), rgba(117, 216, 202, 0.96));
  box-shadow: 0 10px 22px rgba(107, 80, 95, 0.16);
}

.theme-preview-lines {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.theme-preview-lines b,
.theme-preview-lines span {
  height: 8px;
  border-radius: 999px;
  background: rgba(48, 41, 56, 0.15);
}

.theme-preview-lines b {
  width: min(360px, 74%);
  background: rgba(255, 255, 255, 0.88);
}

.theme-preview-meter {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: rgba(48, 41, 56, 0.16);
  overflow: hidden;
}

.theme-preview-meter i {
  display: block;
  width: 56%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff78a1, #75d8ca);
}

.theme-preview-tags {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.theme-preview-tags em {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid rgba(255, 143, 178, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.theme-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.theme-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.theme-section-head strong {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

.theme-section-head span {
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-section-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
}

.theme-btn,
.effect-btn,
.camera-btn {
  position: relative;
  min-height: 74px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  overflow: hidden;
}

.theme-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--theme-swatch, #ff8fb2, #74d8ca));
  opacity: 0.12;
  pointer-events: none;
}

.theme-btn > * {
  position: relative;
  z-index: 1;
}

.theme-icon,
.effect-icon,
.camera-btn span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f7edf3;
  color: #b94371;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.theme-icon {
  background: linear-gradient(135deg, var(--theme-swatch, #ff8fb2, #74d8ca));
  color: #fff;
  text-shadow: 0 1px 6px rgba(42, 30, 48, 0.24);
}

.theme-name,
.effect-name,
.camera-btn b {
  min-width: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.theme-btn.active,
.effect-btn.active,
.camera-btn.active {
  border-color: #ff9fbd;
  background: linear-gradient(135deg, #fff4f8, #f0fbf8);
  box-shadow: inset 4px 0 0 #ff7aa8;
}

.theme-btn.active::before {
  opacity: 0.24;
}

body[class*="panel-theme-"] .theme-btn.active,
body[class*="panel-theme-"] .effect-btn.active,
body[class*="panel-theme-"] .camera-btn.active {
  border-color: var(--accent-primary);
  background: var(--theme-panel-bg);
  box-shadow: inset 4px 0 0 var(--accent-primary);
}

.soft-btn:hover,
.icon-btn:hover,
.director-toggle:hover,
.tab-btn:hover,
.camera-btn:hover,
.theme-btn:hover,
.effect-btn:hover,
.sync-btn:hover,
.obs-connect-btn:hover,
.round-btn:hover {
  transform: translateY(-1px);
  border-color: #ffc1d3;
  box-shadow: 0 10px 20px rgba(107, 80, 95, 0.1);
}

.scene-select,
.setting-row input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  padding: 0 11px;
  outline: 0;
}

.setting-row select {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-primary);
  padding: 0 11px;
  outline: 0;
}

.lyric-sync-panel,
.auto-cue-tools,
.obs-settings,
.help-card,
.lyrics-preview,
.cue-timeline,
.cue-stats {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
}

.lyric-sync-panel {
  padding: 14px;
  margin-bottom: 12px;
}

.sync-title {
  color: var(--text-primary);
  font-weight: 900;
  margin-bottom: 10px;
}

.sync-controls {
  display: grid;
  grid-template-columns: minmax(100px, 138px) minmax(0, 1fr) minmax(100px, 138px);
  align-items: center;
  gap: 10px;
}

.sync-anchor-tools {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.sync-speed-tools {
  display: grid;
  grid-template-columns: auto minmax(128px, 1fr) minmax(128px, 1fr);
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.sync-speed-tools span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.sync-anchor-status {
  margin: 8px 2px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.sync-btn {
  min-height: 38px;
  border-radius: 8px;
  background: #fff8fb;
  color: #b94371;
  font-weight: 900;
}

.sync-offset {
  min-width: 0;
  text-align: center;
}

.sync-offset span {
  display: block;
  color: #3a303f;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 900;
}

.sync-offset small {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
}

.lyrics-preview {
  min-height: 150px;
  max-height: none;
  overflow: visible;
  padding: 16px;
}

.import-guide {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid rgba(255, 143, 178, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff7fa, #f0fbf8);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.import-guide strong {
  flex: 0 0 auto;
  color: #d94f87;
  font-size: 14px;
}

.auto-cue-tools {
  display: grid;
  grid-template-columns: minmax(160px, 210px) repeat(2, minmax(190px, 1fr)) minmax(96px, 128px) minmax(104px, 140px);
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.cue-mode-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.cue-mode-row label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.cue-mode-row select {
  min-width: 0;
  height: 40px;
  font-size: 13px;
  font-weight: 900;
}

.auto-cue-btn {
  min-height: 40px;
  min-width: 0;
  padding-inline: 12px;
  line-height: 1.24;
  white-space: normal;
  border-style: solid;
  background: linear-gradient(135deg, #fff4f8, #effbf8);
}

.auto-cue-btn .btn-icon {
  flex: 0 0 auto;
}

.clear-cue-btn {
  background: #fff;
  color: #bd4a70;
  border-color: rgba(189, 74, 112, 0.24);
}

.restore-cue-btn {
  background: #fff;
  color: #16886d;
  border-color: rgba(37, 185, 144, 0.24);
}

.video-cue-panel {
  margin: 14px 0 12px;
  padding: 14px;
  border: 1px solid rgba(255, 143, 178, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, #fff8fb, #f3fbf9);
}

.video-cue-head,
.video-cue-actions,
.video-libraries {
  display: grid;
  gap: 10px;
}

.video-cue-head {
  grid-template-columns: minmax(0, 1fr) minmax(110px, 150px);
  align-items: center;
}

.video-cue-head strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

.video-cue-head span,
.video-library-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.video-cue-actions {
  grid-template-columns: minmax(94px, 120px) auto minmax(90px, 120px) minmax(110px, 150px) minmax(120px, 150px);
  align-items: center;
}

.video-cue-actions label,
.video-library-title {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.video-cue-actions input,
.video-cue-head select,
.cue-mode-row select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(255, 128, 176, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 253, 250, 0.92)) padding-box,
    linear-gradient(135deg, rgba(255, 128, 176, 0.28), rgba(117, 216, 202, 0.3)) border-box;
  color: var(--text-primary);
  box-shadow: 0 8px 18px rgba(107, 80, 95, 0.055);
  outline: 0;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.video-cue-head select,
.cue-mode-row select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #c94f82 50%),
    linear-gradient(135deg, #c94f82 50%, transparent 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(245, 253, 250, 0.92));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%,
    0 0;
  background-size: 5px 5px, 5px 5px, 100% 100%;
  background-repeat: no-repeat;
}

.video-cue-actions input:focus,
.video-cue-head select:focus,
.cue-mode-row select:focus {
  border-color: rgba(255, 122, 168, 0.62);
  box-shadow: 0 0 0 3px rgba(255, 122, 168, 0.12), 0 12px 24px rgba(107, 80, 95, 0.08);
}

.video-cue-actions input {
  padding-right: 12px;
}

.video-libraries {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.video-library-block {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(215, 98, 143, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.video-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.video-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(217, 79, 135, 0.18);
  border-radius: 8px;
  background: #fff;
  text-align: left;
}

.video-select-btn {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
}

.video-item span {
  display: inline-block;
  margin-bottom: 3px;
  color: #d94f87;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 900;
}

.video-item b {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-item.selected {
  border-color: rgba(217, 79, 135, 0.62);
  box-shadow: 0 0 0 3px rgba(217, 79, 135, 0.1);
}

.video-delete-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  align-self: center;
  border-radius: 8px;
  background: #fff1f5;
  color: #c74370;
  font-size: 12px;
  font-weight: 900;
}

.video-delete-btn:hover {
  background: #ffdfea;
  border-color: rgba(199, 67, 112, 0.34);
}

.auto-cue-tools p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.lyrics-placeholder {
  color: var(--text-muted);
  text-align: center;
  padding: 36px 0;
}

.obs-settings {
  padding: 14px;
}

.external-player-card {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(217, 79, 135, 0.18);
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 122, 168, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(237, 255, 252, 0.88));
  box-shadow: 0 14px 34px rgba(56, 39, 64, 0.06);
}

.external-player-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.external-player-head strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 1000;
}

.external-player-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.setting-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.setting-switch input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.external-player-platform-row {
  margin-bottom: 10px;
}

.external-player-platform-row .choice-group {
  max-height: 152px;
  overflow: auto;
  padding-right: 4px;
}

.external-player-card.is-highlighted {
  animation: externalPlayerCardPulse 1.25s ease;
}

@keyframes externalPlayerCardPulse {
  0%,
  100% {
    box-shadow: 0 14px 34px rgba(56, 39, 64, 0.06);
  }
  35% {
    box-shadow: 0 0 0 4px rgba(255, 122, 168, 0.18), 0 18px 44px rgba(255, 122, 168, 0.2);
  }
}

.external-player-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(126, 216, 205, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.external-player-status-row .soft-btn {
  min-width: 90px;
  padding: 8px 12px;
}

body.panel-theme-dark .external-player-card {
  background:
    radial-gradient(circle at 8% 12%, rgba(255, 122, 168, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(38, 30, 48, 0.96), rgba(28, 45, 48, 0.9));
  border-color: rgba(255, 122, 168, 0.26);
}

body.panel-theme-dark .setting-switch,
body.panel-theme-dark .external-player-status-row {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.diagnostic-card {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid rgba(126, 216, 205, 0.24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 8%, rgba(126, 216, 205, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 246, 251, 0.9));
  box-shadow: 0 14px 34px rgba(56, 39, 64, 0.06);
}

.diagnostic-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.diagnostic-head strong {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 1000;
}

.diagnostic-head p {
  margin: 5px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.diagnostic-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 280px;
}

.diagnostic-actions .soft-btn {
  min-width: 78px;
  padding: 8px 12px;
}

.danger-soft-btn {
  color: #c0345f;
  border-color: rgba(255, 122, 168, 0.42);
}

.diagnostic-status {
  padding: 9px 11px;
  border: 1px solid rgba(217, 79, 135, 0.14);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.diagnostic-log-view {
  width: 100%;
  max-height: 260px;
  margin: 10px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid rgba(217, 79, 135, 0.18);
  border-radius: 12px;
  background: rgba(36, 28, 48, 0.92);
  color: #f9f0ff;
  font: 12px/1.55 "Cascadia Mono", "Consolas", monospace;
  white-space: pre-wrap;
}

body.panel-theme-dark .diagnostic-card {
  background:
    radial-gradient(circle at 92% 8%, rgba(126, 216, 205, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(38, 30, 48, 0.96), rgba(42, 35, 48, 0.9));
  border-color: rgba(126, 216, 205, 0.28);
}

body.panel-theme-dark .diagnostic-status {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.setting-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.layout-setting-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 14px;
  margin-bottom: 10px;
}

.layout-setting-grid .setting-row {
  margin-bottom: 0;
}

.layout-setting-grid .setting-row-wide {
  grid-column: 1 / -1;
}

.layout-setting-grid .setting-check.setting-row-wide {
  margin-left: 0;
}

.layout-setting-grid select {
  min-width: 0;
}

.setting-row-options {
  align-items: start;
}

.choice-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.choice-group button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(217, 79, 135, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #695b72;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.choice-group button:hover {
  background: #fff5f9;
  border-color: rgba(217, 79, 135, 0.38);
}

.choice-group button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff7aa8, #7ed8cd);
  box-shadow: 0 8px 18px rgba(255, 122, 168, 0.2);
}

.compact-choice-group button {
  flex: 1 1 96px;
  padding: 0 12px;
}

.lyric-style-choice-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 1fr));
}

.lyric-font-choice-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 1fr));
}

.lyric-font-weight-group {
  display: grid;
  grid-template-columns: repeat(5, minmax(76px, 1fr));
}

.visual-package-choice-group {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
}

.visual-package-choice-group button {
  min-height: 42px;
  padding: 0 12px;
  letter-spacing: 0;
}

.visual-package-choice-group button[data-value="neonStage"].active {
  background: linear-gradient(135deg, #ff75cf, #7de8ff);
  box-shadow: 0 12px 26px rgba(235, 93, 211, 0.22);
}

.visual-package-choice-group button[data-value="inkCinema"].active {
  background: linear-gradient(135deg, #1f2830, #8fb7a5);
  box-shadow: 0 12px 26px rgba(48, 70, 64, 0.18);
}

.visual-package-choice-group button[data-value="popGlow"].active {
  background: linear-gradient(135deg, #ff7aa8, #f7d36a 52%, #7ed8cd);
  box-shadow: 0 12px 26px rgba(255, 122, 168, 0.2);
}

.lyric-decor-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
}

.lyric-style-choice-group button,
.lyric-font-choice-group button,
.lyric-font-weight-group button,
.visual-package-choice-group button,
.lyric-decor-choice-group button {
  width: 100%;
  padding: 0 10px;
}

.lyric-font-import-card {
  align-items: start;
}

.lyric-font-import-box {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(217, 79, 135, 0.18);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,245,250,0.82));
}

.lyric-font-preview {
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 10px;
  background: #fff;
  color: #30243a;
  font-family: "BMVPanelImportedLyric", "KaiTi", "STKaiti", "Microsoft YaHei", serif;
  font-size: clamp(24px, 3vw, 42px);
  font-weight: 900;
  letter-spacing: 2px;
  box-shadow: inset 0 0 0 1px rgba(217, 79, 135, 0.12);
}

.lyric-font-library {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 79, 135, 0.16);
}

.lyric-font-library span {
  color: #7d6f88;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.lyric-font-library select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(217, 79, 135, 0.26);
  border-radius: 8px;
  background: #fff;
  color: #342840;
  font-weight: 800;
  padding: 0 10px;
}

.lyric-font-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lyric-font-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(217, 79, 135, 0.24);
  border-radius: 8px;
  background: #fff;
  color: #c94f7c;
  font-weight: 900;
  cursor: pointer;
}

.lyric-font-actions button.primary {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff7aa8, #7ed8cd);
}

.lyric-font-actions button.danger {
  color: #b7365b;
  border-color: rgba(217, 79, 135, 0.36);
  background: linear-gradient(135deg, rgba(255,255,255,0.94), rgba(255,242,247,0.92));
}

.premium-inline-note {
  margin: 2px 0 0;
  padding: 8px 10px;
  border: 1px dashed rgba(217, 79, 135, 0.32);
  border-radius: 10px;
  background: rgba(255, 247, 251, 0.72);
  color: #9f4b70;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.premium-inline-note[hidden] {
  display: none !important;
}

button.premium-locked,
.lyric-font-actions button.premium-locked,
.choice-group button.premium-locked {
  cursor: not-allowed;
  opacity: 0.58;
  filter: grayscale(0.15);
}

.premium-card-locked .lyric-font-import-box {
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(252,247,249,0.86));
}

.lyric-font-import-box small {
  grid-column: 1 / -1;
  color: #8b7c95;
  font-size: 12px;
  font-weight: 800;
}

.setting-row-split {
  align-items: start;
}

.resolution-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.resolution-fields span {
  color: var(--text-muted);
  font-weight: 900;
}

.setting-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 10px 80px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 900;
}

.setting-check input {
  width: 16px;
  height: 16px;
  accent-color: #ff78a1;
}

.ambient-light-check {
  min-height: 32px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 120, 161, 0.22);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 120, 161, 0.08), rgba(117, 216, 202, 0.08));
  color: var(--text-primary);
}

.setting-row label {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 900;
}

.setting-group-title {
  margin: 4px 0 10px;
  color: #3a303f;
  font-size: 14px;
  font-weight: 900;
}

.setting-group-title:not(:first-child) {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.setting-hint {
  margin: -2px 0 12px 80px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.setting-hint.is-error {
  color: #d9487a;
}

.obs-source-card {
  display: grid;
  gap: 9px;
  margin: 0 0 16px;
  padding: 10px;
  border: 1px solid rgba(117, 216, 202, 0.24);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(240, 251, 248, 0.88), rgba(255, 244, 248, 0.78));
}

.obs-source-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) 54px;
  align-items: center;
  gap: 8px;
}

.obs-source-row label {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 900;
}

.obs-source-row input {
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 800;
}

.obs-source-row button {
  height: 34px;
  border-radius: 8px;
  background: #fff;
  color: #b94371;
  font-size: 12px;
  font-weight: 900;
}

#obsSourceHint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.obs-source-card.requires-login {
  background: linear-gradient(135deg, rgba(255, 247, 251, 0.95), rgba(239, 252, 249, 0.92));
}

.obs-source-card.requires-login .obs-source-row {
  display: none;
}

.obs-source-card.requires-login #obsSourceHint {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 128, 176, 0.36);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: #805b76;
}

.obs-connect-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ff8fb2, #75d8ca);
  color: #fff;
  font-weight: 900;
}

.obs-diagnose-btn {
  margin-top: 4px;
}

.obs-diagnose-result {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 143, 178, 0.24);
  border-radius: 8px;
  background: #fff9fb;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.obs-diagnose-result.ok {
  border-color: rgba(117, 216, 202, 0.45);
  background: #f3fffc;
}

.obs-diagnose-result.warn {
  border-color: rgba(255, 188, 85, 0.46);
  background: #fffaf0;
}

.obs-diagnose-result.error {
  border-color: rgba(255, 110, 140, 0.42);
  background: #fff4f7;
}

.obs-diagnose-result strong,
.obs-diagnose-result span {
  display: block;
  margin-bottom: 4px;
}

.obs-diagnose-result ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.help-card {
  margin-top: 12px;
  padding: 14px;
  color: var(--text-secondary);
}

.help-card strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.help-card p {
  margin: 4px 0;
}

.help-card .developer-credit {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255, 143, 178, 0.32);
  color: var(--accent-primary);
  font-weight: 900;
}

.help-card .icp-credit {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.help-card .icp-credit a {
  color: inherit;
  text-decoration: none;
}

.help-card .icp-credit a:hover {
  color: var(--accent-primary);
}

.panel-note {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }

  body {
    min-height: 100vh;
    overflow: auto;
  }

  .song-dock {
    height: auto;
    min-height: 360px;
  }

  .stage-console {
    overflow: visible;
  }

  .control-panel {
    min-height: 420px;
  }

  .theme-preview-card {
    grid-template-columns: 1fr;
  }

  .theme-preview-copy strong {
    font-size: 24px;
  }

  .transport-controls {
    grid-template-columns: 176px minmax(220px, 1fr);
  }

  .pitch-control,
  .volume-control {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    min-width: 0;
  }

  #stopBtn,
  #playBtn,
  #pauseBtn,
  .vocal-mode-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  .volume-control {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .sync-controls {
    grid-template-columns: 1fr;
  }

  .sync-speed-tools {
    grid-template-columns: 1fr;
  }

  .auto-cue-tools {
    grid-template-columns: 1fr;
  }
}

/* Final responsive layout fixes for BMV 0.1 installer build */
.transport-card {
  min-height: 0;
  height: auto;
  display: grid;
  grid-template-rows: auto minmax(72px, auto);
  gap: 8px;
  overflow: visible;
  padding-bottom: 10px;
}

.transport-card .progress-row {
  min-width: 0;
}

.transport-controls {
  min-height: 72px;
  align-items: center;
}

.control-panel {
  min-height: 0;
  height: auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.tab-navigation {
  flex: 0 0 auto;
}

.tab-panel {
  display: none;
  min-height: 0;
  overflow: visible;
}

.tab-panel.active {
  display: block;
}

#cameraPanel.active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.video-cue-panel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

.video-cue-actions {
  grid-template-columns: minmax(94px, 120px) auto minmax(90px, 120px) minmax(120px, 1fr) minmax(120px, 150px);
}

.video-libraries {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.video-library-block {
  min-height: 86px;
  display: flex;
  flex-direction: column;
}

.video-library-grid {
  flex: 1 1 auto;
  align-content: start;
  max-height: none;
  overflow: visible;
}

#cameraPanel .camera-grid {
  flex: 0 0 auto;
}

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

.onboarding-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  pointer-events: none;
}

.onboarding-scrim {
  position: absolute;
  inset: 0;
  background: rgba(32, 24, 38, 0.42);
  pointer-events: auto;
}

.onboarding-highlight {
  position: fixed;
  z-index: 5001;
  border: 2px solid #ff8fb2;
  border-radius: 10px;
  box-shadow:
    0 0 0 9999px rgba(32, 24, 38, 0.42),
    0 0 0 6px rgba(255, 143, 178, 0.18);
  pointer-events: none;
  transition: top 180ms ease, left 180ms ease, width 180ms ease, height 180ms ease;
}

.onboarding-card {
  position: fixed;
  z-index: 5002;
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(255, 143, 178, 0.48);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(32, 24, 38, 0.22);
  color: var(--text-primary);
  pointer-events: auto;
}

.onboarding-step {
  width: max-content;
  padding: 3px 8px;
  border-radius: 999px;
  background: #fff0f6;
  color: #c53d75;
  font-size: 12px;
  font-weight: 900;
}

.onboarding-card h2 {
  margin: 0;
  color: #302938;
  font-size: 18px;
  font-weight: 900;
}

.onboarding-card p {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.onboarding-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 8px;
}

.onboarding-actions button {
  min-height: 34px;
  border: 1px solid #f3c4d7;
  border-radius: 8px;
  background: #fff;
  color: #b94371;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.onboarding-actions button:disabled {
  opacity: .45;
  cursor: default;
}

.onboarding-actions button:last-child {
  border: 0;
  background: linear-gradient(135deg, #ff8fb2, #74d8ca);
  color: #fff;
}

@media (max-width: 1100px) {
  .console-top {
    grid-template-columns: 1fr;
  }

  .top-library-search {
    grid-template-columns: 86px minmax(0, 1fr) 68px;
    order: 2;
  }

  .cloud-account-quick-host {
    order: 3;
    width: 100%;
    max-width: none;
  }

  .guide-start-btn {
    order: 4;
    width: 100%;
  }

  .director-status-bar {
    order: 1;
    justify-content: flex-end;
  }

  .transport-controls {
    grid-template-columns: 176px minmax(220px, 1fr);
  }

  .pitch-control,
  .volume-control {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 100%;
    max-width: 420px;
  }

  #stopBtn,
  #playBtn,
  #pauseBtn,
  .vocal-mode-toggle {
    grid-column: 1;
    grid-row: 1;
  }

  .video-cue-actions,
  .video-libraries {
    grid-template-columns: 1fr;
  }

  .layout-setting-grid {
    grid-template-columns: 1fr;
  }

  .layout-setting-grid .setting-row-wide {
    grid-column: auto;
  }

  .lyric-style-choice-group {
    grid-template-columns: repeat(2, minmax(92px, 1fr));
  }
}

