:root {
  color-scheme: dark;
  --window-chrome-height: 0px;
  --bg: #0b0d12; --surface: #11141b; --surface-2: #171b24; --surface-3: #202633;
  --line: #2b3240; --line-strong: #465064; --text: #f5f7fb; --muted: #a9b1c0; --subtle: #818b9d;
  --blue: #6681ff; --violet: #8d62ed; --coral: #eb6682; --amber: #e3b85a; --radius: 5px;
  --shadow: 0 14px 40px rgba(0,0,0,.32);
  --font-meta: 11px; --font-label: 12px; --font-ui: 13px;
  font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; min-width: 320px; margin: 0; }
html, body, body * { cursor: default !important; }
html.desktop-app[data-window-resize-edge="left"],
html.desktop-app[data-window-resize-edge="right"],
html.desktop-app[data-window-resize-edge="left"] *,
html.desktop-app[data-window-resize-edge="right"] * { cursor: ew-resize !important; }
html.desktop-app[data-window-resize-edge="top"],
html.desktop-app[data-window-resize-edge="bottom"],
html.desktop-app[data-window-resize-edge="top"] *,
html.desktop-app[data-window-resize-edge="bottom"] * { cursor: ns-resize !important; }
html.desktop-app[data-window-resize-edge="top-left"],
html.desktop-app[data-window-resize-edge="bottom-right"],
html.desktop-app[data-window-resize-edge="top-left"] *,
html.desktop-app[data-window-resize-edge="bottom-right"] * { cursor: nwse-resize !important; }
html.desktop-app[data-window-resize-edge="top-right"],
html.desktop-app[data-window-resize-edge="bottom-left"],
html.desktop-app[data-window-resize-edge="top-right"] *,
html.desktop-app[data-window-resize-edge="bottom-left"] * { cursor: nesw-resize !important; }
html, body { background: var(--bg); }
body { overflow: clip; color: var(--text); font-size: var(--font-ui); }
body { display: flex; flex-direction: column; }
html.desktop-app body { overflow: hidden; }
button, input, textarea, select { color: inherit; font: inherit; letter-spacing: 0; }
button { border: 0; }
button:disabled { opacity: .45; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[hidden] { display: none !important; }
html.ui-ready .startup-page { display: none !important; }
* { scrollbar-width: thin; scrollbar-color: #373e4d transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border-radius: 3px; background: #373e4d; }

.startup-page { position: fixed; z-index: 600; inset: 0; display: grid; place-items: center; background: #0b0d12; }
.startup-page-content { display: flex; align-items: center; flex-direction: column; }
.startup-page h1 { margin: 26px 0 9px; color: #f4f6ff; font-size: 20px; letter-spacing: 0; }
.startup-page p { margin: 0; color: #8f99ad; font-size: 14px; letter-spacing: 0; }
.startup-dot-spinner { position: relative; width: 52px; height: 52px; overflow: visible; }
.startup-dot-spinner i { position: absolute; top: 50%; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: #7f93ff; opacity: .19; transform: translate(-50%,-50%) rotate(calc(var(--dot) * 45deg)) translateY(-19px); transition: opacity .08s linear; }
.startup-dot-spinner i.active { opacity: 1; }

.app-shell { display: grid; grid-template: 78px minmax(0,1fr) / 76px minmax(0,1fr); width: 100%; min-height: 0; flex: 1 1 auto; overflow: clip; }
.topbar { position: relative; grid-column: 1/-1; display: grid; grid-template-columns: minmax(180px,1fr) minmax(260px,320px) minmax(280px,1fr); align-items: center; gap: 16px; min-width: 0; padding: 28px 22px 0; border-bottom: 1px solid var(--line); background: #0e1117; }
.topbar::before { position: absolute; top: 27px; right: 0; left: 0; height: 1px; content: ""; background: var(--line); pointer-events: none; }
.window-drag-handle { position: absolute; z-index: 3; top: 0; right: 138px; left: 0; height: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; padding: 7px 0; background: transparent; text-align: left; }
.brand-symbol { width: 42px; height: 22px; object-fit: contain; }
.brand-divider { width: 1px; height: 25px; background: var(--line-strong); }
.brand-identity { display: flex; align-items: flex-end; gap: 8px; }
.brand-wordmark { width: 92px; height: 25px; object-fit: contain; }
.brand-identity small { padding-bottom: 3px; color: var(--subtle); font: 700 var(--font-meta)/1 Consolas, monospace; }
.workspace-mode-switch { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); justify-self: center; width: 100%; min-height: 42px; padding: 3px; border: 1px solid #343d50; border-radius: 5px; background: #090c12; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.workspace-mode-switch button { display: flex; min-width: 0; min-height: 34px; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; border: 1px solid transparent; border-radius: 3px; color: #8993a6; background: transparent; font-size: 12px; font-weight: 650; }
.workspace-mode-switch button:hover { color: #e3e7ef; background: #151a24; }
.workspace-mode-switch button.active { border-color: #465788; color: #fff; background: #232b3e; box-shadow: inset 0 -2px #6681ff; }
.workspace-mode-switch button i { position: relative; display: block; width: 16px; height: 14px; flex: 0 0 auto; color: currentColor; }
.stage-mode-icon { border: 1px solid currentColor; border-radius: 2px; }
.stage-mode-icon::after { position: absolute; right: 3px; bottom: -4px; left: 3px; height: 1px; content: ""; background: currentColor; box-shadow: 0 -2px currentColor; }
.prompter-mode-icon { border-top: 2px solid currentColor; border-bottom: 2px solid currentColor; }
.prompter-mode-icon::before, .prompter-mode-icon::after { position: absolute; right: 0; left: 0; height: 2px; content: ""; background: currentColor; }
.prompter-mode-icon::before { top: 3px; }
.prompter-mode-icon::after { bottom: 3px; }
.topbar-status { display: flex; align-items: center; justify-self: end; gap: 9px; }
html.desktop-app .topbar { padding-right: 0; }
html.desktop-app .topbar-status { padding-right: 22px; }
.window-controls { position: absolute; z-index: 8; top: 0; right: 0; display: flex; height: 28px; align-items: stretch; margin: 0; background: transparent; }
html:not(.desktop-app) .window-controls { display: none; }
.window-control { display: grid; width: 46px; min-width: 46px; height: 28px; padding: 0; place-items: center; color: #f2f2f2; background: transparent; }
.window-control:hover { background: rgba(255,255,255,.1); }
.window-control:active { background: rgba(255,255,255,.18); }
.window-control:focus-visible { z-index: 1; outline: 1px solid rgba(255,255,255,.8); outline-offset: -2px; }
.window-control i { display: grid; width: 100%; height: 100%; place-items: center; font: 400 10px/1 "Segoe MDL2 Assets"; font-style: normal; }
.window-control i::before { display: block; }
.window-minimize i::before { content: "\E921"; }
.window-maximize i::before { content: "\E922"; }
.window-maximize.is-maximized i::before { content: "\E923"; }
.window-close i::before { content: "\E8BB"; }
.window-close:hover { color: #fff; background: #e81123; }
.window-close:active { color: #000; background: #f1707a; }
.output-pulse { display: flex; align-items: center; gap: 7px; padding: 0 8px; color: var(--subtle); font-size: var(--font-label); }
.output-pulse i, .route-status i, .save-state i { width: 6px; height: 6px; border-radius: 50%; background: #596273; }
.output-pulse.live { color: var(--text); }
.output-pulse.live i { background: var(--coral); box-shadow: 0 0 10px rgba(235,102,130,.65); }
.credit-chip, .account-button, .top-detect { min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: #121620; transition: border-color .16s ease, background-color .16s ease; }
.credit-chip:hover, .account-button:hover { border-color: var(--line-strong); background: #181d27; }
.credit-chip { display: flex; align-items: baseline; gap: 5px; padding: 7px 11px; color: var(--muted); font-size: var(--font-label); }
.credit-chip strong { color: var(--text); font-size: 14px; }
.account-button { display: flex; align-items: center; gap: 8px; padding: 4px 11px 4px 5px; color: #d5dae4; font-size: var(--font-label); }
.account-button > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 3px; color: #d9deea; background: #252c3a; font-weight: 700; }
.account-button b { max-width: 88px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-detect { display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; color: var(--text); font-size: var(--font-label); font-weight: 650; }
.top-detect:hover { border-color: var(--line-strong); background: #181d27; }
.top-detect i { width: 7px; height: 7px; border: 1px solid #9cace8; border-radius: 50%; box-shadow: inset 0 0 0 2px #121620; background: #6681ff; }

.side-nav { grid-row: 2; display: flex; min-height: 0; flex-direction: column; gap: 5px; padding: 12px 8px; border-right: 1px solid var(--line); background: #0e1117; }
.nav-button { display: grid; min-height: 64px; place-content: center; gap: 7px; border: 1px solid transparent; border-radius: var(--radius); color: #8e98aa; background: transparent; font-size: var(--font-label); }
.nav-button img { width: 23px; height: 23px; margin: 0 auto; object-fit: contain; opacity: .74; transition: opacity .16s ease, filter .16s ease; }
.nav-button b { font-weight: 600; }
.nav-button:hover { color: #dce1eb; background: #151922; }
.nav-button.active { border-color: #313847; color: #fff; background: #1a1f29; box-shadow: inset 3px 0 var(--blue); }
.nav-button:hover img, .nav-button.active img { opacity: 1; filter: brightness(1.16); }
.nav-settings { margin-top: auto; }

.app-content { grid-column: 2; grid-row: 2; min-width: 0; min-height: 0; overflow: clip; padding: 10px; }
.app-view { width: 100%; height: 100%; min-height: 0; }
.app-view.active { animation: view-in .18s ease-out both; }
@keyframes view-in { from { opacity: 0; transform: translateY(3px); } }
.materials-view { width: 100%; height: 100%; min-height: 0; overflow: hidden; background: #000; }
.materials-banner { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; overflow: hidden; background: #000; }
.materials-banner img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.studio-shell { display: grid; grid-template-columns: clamp(260px,19vw,300px) minmax(0,1fr) clamp(286px,21vw,324px); gap: 10px; width: 100%; height: 100%; min-height: 0; overflow: clip; }
.glass, .glass-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 1px 0 rgba(255,255,255,.025); }

.source-rail, .style-rail { min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 15px; }
.source-rail { display: flex; flex-direction: column; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.rail-heading > div { display: flex; align-items: center; gap: 8px; }
.rail-heading h2 { margin: 0; font-size: 15px; }
.rail-index { color: #86a0ff; font: 700 var(--font-meta)/1 Consolas, monospace; }
.micro-badge { padding: 4px 6px; border: 1px solid #3d4d70; border-radius: 3px; color: #a9b9f3; background: #171d2b; font: 700 var(--font-meta)/1 Consolas, monospace; }
.micro-badge.violet { border-color: #493d66; color: #b497e7; background: #211a2c; }
.compact-field { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; margin-bottom: 11px; border: 1px solid var(--line); border-radius: var(--radius); background: #0d1016; }
.compact-field span { padding-left: 10px; color: var(--muted); font-size: var(--font-label); }
.compact-field input { min-width: 0; padding: 10px; border: 0; outline: 0; background: transparent; font-size: var(--font-ui); }
.project-title-row { display: flex; align-items: stretch; gap: 7px; margin-bottom: 11px; }
.project-title-row .compact-field { flex: 1 1 auto; margin-bottom: 0; }
.project-new-task { display: grid; width: 38px; flex: 0 0 38px; place-items: center; border: 1px solid #4a5fb4; border-radius: var(--radius); color: #dce3ff; background: #1b2540; font-size: 20px; line-height: 1; }
.project-new-task:hover { border-color: #8197ff; color: #fff; background: #25345d; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--radius); background: #0c0f15; }
.segmented button { flex: 1; min-width: 0; min-height: 34px; padding: 7px; border-radius: 3px; color: var(--muted); background: transparent; font-size: var(--font-label); }
.segmented button:hover { color: #d9dee8; }
.segmented button.active { color: #fff; background: #222837; box-shadow: inset 0 -2px #687fff; }
.source-tabs { margin-bottom: 12px; }
.source-content.active { animation: view-in .16s ease-out both; }
.source-content[data-source-panel="text"].active { display: flex; min-height: 0; flex: 1 1 auto; flex-direction: column; }
.file-drop { display: grid; width: 100%; min-height: 104px; margin-bottom: 13px; place-content: center; place-items: center; gap: 5px; border: 1px dashed #3a4354; border-radius: var(--radius); color: #dfe4ed; background: #0d1016; }
.file-drop:hover, .file-drop.dragover { border-color: #7488ef; background: #121827; }
.file-drop strong { max-width: 100%; overflow: hidden; font-size: var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.file-drop small { color: var(--subtle); font: var(--font-meta)/1.4 Consolas, monospace; }
.file-icon { color: #9daeff; font-size: 22px; }
.field-label { display: flex; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: var(--font-label); }
.field-label em { font-style: normal; }
#lyricsInput { --lyrics-editor-min-height: 218px; width: 100%; height: clamp(var(--lyrics-editor-min-height),38vh,360px); min-height: var(--lyrics-editor-min-height); flex: 0 1 auto; resize: vertical; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); outline: 0; color: #d5dae4; background: #0c0f14; font-size: var(--font-ui); line-height: 1.65; }
#lyricsInput:focus { border-color: #5d70c5; }
.button { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: #eef1f7; background: #191e28; font-size: var(--font-label); font-weight: 650; transition: border-color .16s ease, background-color .16s ease, transform .12s ease; }
.button:hover:not(:disabled) { border-color: var(--line-strong); background: #202633; }
.button:active:not(:disabled) { transform: translateY(1px); }
.button.primary { border-color: #666be4; color: #fff; background: linear-gradient(110deg,#5575ee,#7951df); }
.button.secondary { background: #171b24; }
.button.ghost { color: #b5bdca; background: transparent; }
.button.full { width: 100%; }
.button.output-button { border-color: #56405a; color: #f0dbe1; background: #251820; }
.button.output-button.active { border-color: #8b4054; color: #fff; background: #3a1822; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 9px rgba(235,102,130,.65); }
.loading-spinner { width: 12px; height: 12px; border: 2px solid rgba(255,255,255,.25); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.rail-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid var(--line); }
.save-state { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--font-meta); }
.save-state.saved { color: #91a2ea; }
.save-state.saved i { background: var(--blue); }
.audio-inspector { margin-bottom: 10px; padding: 9px; border: 1px solid var(--line); border-radius: var(--radius); background: #0c0f15; }
.audio-inspector > div { display: grid; grid-template-columns: 26px 1fr auto 26px; align-items: center; gap: 7px; }
.audio-inspector strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--font-label); }
.audio-inspector span { color: var(--muted); font: var(--font-meta) Consolas, monospace; }
.audio-inspector canvas { width: 100%; height: 48px; margin-top: 7px; }
.audio-language-field { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 10px; margin: 9px 0; color: var(--muted); font-size: var(--font-label); }
.audio-language-field select { min-width: 0; height: 34px; padding: 0 28px 0 9px; border: 1px solid var(--line); border-radius: var(--radius); color: #e2e6ee; background: #0c0f15; font-size: var(--font-label); }
.transcription-progress { display: grid; gap: 5px; margin-top: 9px; }
.transcription-progress[hidden] { display: none; }
.transcription-progress-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #c8d0de; font-size: var(--font-meta); }
.transcription-progress-head span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transcription-progress-head strong { color: #fff; font: 600 var(--font-meta) Consolas, monospace; }
.transcription-progress progress { width: 100%; height: 6px; overflow: hidden; border: 0; border-radius: 3px; appearance: none; background: #252b37; }
.transcription-progress progress::-webkit-progress-bar { border-radius: 3px; background: #252b37; }
.transcription-progress progress::-webkit-progress-value { border-radius: 3px; background: linear-gradient(90deg, #5f7cff, #8b5cf6); transition: width .25s ease; }
.transcription-progress progress::-moz-progress-bar { border-radius: 3px; background: #6e70f4; }
.transcription-progress small { color: #7f8a9d; font-size: var(--font-meta); line-height: 1.2; }
.local-ai-status { margin: 7px 0 0; color: #8d98aa; font-size: var(--font-meta); line-height: 1.4; text-align: center; }
.icon-button { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #171b24; }
.icon-button:hover { border-color: var(--line-strong); color: #fff; }

.stage-workspace { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(300px,1fr) auto auto auto; gap: 9px; overflow-x: hidden; overflow-y: auto; padding-right: 2px; }
.stage-toolbar { --toolbar-control-height: 42px; display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px 12px; padding: 9px 11px; flex-wrap: wrap; }
.toolbar-group, .toolbar-actions, .resolution-controls, .dimension-input { display: flex; min-width: 0; align-items: center; gap: 7px; }
.control-label, .toolbar-caption { color: var(--muted); font-size: var(--font-label); }
.dimension-input, .output-display { height: var(--toolbar-control-height); border: 1px solid var(--line); border-radius: var(--radius); background: #0c0f15; }
.dimension-input { padding: 0 7px; }
.dimension-input input { width: 54px; padding: 0; border: 0; outline: 0; background: transparent; text-align: center; font: var(--font-label) Consolas, monospace; }
.dimension-input span { color: var(--subtle); font-size: var(--font-meta); }
.output-display { max-width: 156px; padding: 0 24px 0 9px; outline: 0; font-size: var(--font-label); }
.stage-toolbar .custom-select { height: var(--toolbar-control-height); }
.stage-toolbar .custom-select-trigger { height: var(--toolbar-control-height); min-height: var(--toolbar-control-height); padding-top: 4px; padding-bottom: 4px; }
.stage-toolbar .button.output-button { height: var(--toolbar-control-height); min-height: var(--toolbar-control-height); padding-top: 0; padding-bottom: 0; }
.stage-main { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #090b10; box-shadow: var(--shadow); }
.canvas-header { display: flex; align-items: center; justify-content: space-between; min-height: 38px; padding: 8px 11px; border-bottom: 1px solid var(--line); background: #11141b; }
.canvas-header > div { display: flex; align-items: center; gap: 9px; }
.canvas-kicker { color: #aebbf1; font: 700 var(--font-meta) Consolas, monospace; }
.canvas-header strong { font: 600 var(--font-label) Consolas, monospace; }
.canvas-meta span { color: var(--muted); font: var(--font-meta) Consolas, monospace; }
.canvas-meta span + span { padding-left: 9px; border-left: 1px solid var(--line); }
.stage-frame { display: flex; min-height: 0; flex: 1; align-items: center; justify-content: center; padding: 12px; background: #0a0c11; }
#stagePreview { flex: 0 0 auto; width: 100%; height: auto; max-width: 100%; max-height: 100%; aspect-ratio: 16/9; border: 1px solid #2e3440; box-shadow: 0 16px 48px rgba(0,0,0,.48); }
.transport { display: grid; grid-template-columns: 28px 28px 38px auto minmax(90px,1fr) auto auto minmax(124px,auto) 44px 44px; align-items: center; gap: 7px; padding: 7px 9px; }
.transport-button, .play-button { display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: #171b24; }
.transport-button { width: 28px; height: 28px; font-size: 16px; }
.transport-button.reset-preview-button { font-family: "Segoe UI Symbol", "Segoe UI", sans-serif; font-size: 18px; line-height: 1; }
.transport-button.text { width: 46px; font: var(--font-meta) Consolas, monospace; }
.play-button { width: 38px; height: 30px; color: #0b0d12; background: #f1f3f7; font-size: var(--font-label); }
.transport > span { color: var(--muted); font: var(--font-meta) Consolas, monospace; }
.transport .transport-offset { min-width: 38px; color: #a8b3c7; text-align: center; }
.transport-volume { display: grid; min-width: 124px; grid-template-columns: 28px minmax(52px,1fr) 34px; align-items: center; gap: 5px; }
.transport-volume .volume-button { font: 13px/1 "Segoe MDL2 Assets", "Segoe UI Symbol", sans-serif; }
.transport-volume input { width: 100%; min-width: 52px; }
.transport-volume output { color: var(--muted); font: var(--font-meta) Consolas, monospace; text-align: right; }
.transport-track { position: relative; height: 6px; border-radius: 3px; background: #2a303b; touch-action: none; }
.transport-track i { position: relative; display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#657fff,#8b64ee,#e16a86); pointer-events: none; }
.transport-track i::after { position: absolute; top: 50%; right: -5px; width: 10px; height: 10px; border: 2px solid #dfe4ee; border-radius: 50%; background: #758cff; content: ""; transform: translateY(-50%); }

.song-taskbar { display: grid; grid-template-columns: 88px 28px minmax(90px,1fr) 28px auto; align-items: center; gap: 6px; min-height: 72px; padding: 8px 9px; }
.song-taskbar-heading { display: grid; gap: 5px; }
.song-taskbar-heading > span { font-size: var(--font-label); font-weight: 700; }
.song-taskbar-heading > em { display: flex; align-items: center; gap: 4px; color: var(--muted); font: var(--font-meta) Consolas, monospace; font-style: normal; white-space: nowrap; }
.song-taskbar-heading > em i { width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.song-taskbar-heading > em.dirty i { background: var(--amber); }
.song-task-nav, .song-task-icon { display: grid; width: 28px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #161a23; }
.song-task-strip { display: flex; min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.song-task-strip::-webkit-scrollbar { display: none; }
.song-task-tab { position: relative; display: grid; min-width: 178px; height: 56px; grid-template: auto auto/28px minmax(0,1fr) 20px; align-content: center; gap: 3px 6px; padding: 7px 6px 7px 9px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #0d1016; }
.song-task-tab > span { grid-row: 1/3; align-self: center; color: #91a2e4; font: var(--font-meta) Consolas, monospace; }
.song-task-tab > strong { min-width: 0; overflow: hidden; color: inherit; font-size: var(--font-label); text-overflow: ellipsis; white-space: nowrap; }
.song-task-tab > small { color: var(--subtle); font: var(--font-meta) Consolas, monospace; }
.song-task-tab.active { border-color: #6475d8; color: #fff; background: #171b2a; box-shadow: inset 2px 0 #748cff; }
.song-task-tab.dragging { opacity: .4; }
.song-task-tab.drop-before { box-shadow: -3px 0 var(--blue); }
.song-task-tab.drop-after { box-shadow: 3px 0 var(--blue); }
.song-task-tab.dirty::after { position: absolute; top: 4px; right: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--amber); content: ""; }
.song-task-delete { grid-column: 3; grid-row: 1/3; align-self: center; width: 18px; height: 24px; border-radius: 3px; color: var(--subtle); background: transparent; }
.song-task-delete:hover, .song-task-icon.danger:hover { color: #ff8da3; background: #2b171e; }
.song-task-rename { width: 100%; min-width: 0; padding: 0; border: 0; outline: 0; background: transparent; font-size: var(--font-label); font-weight: 700; }
.song-task-actions { display: flex; align-items: center; gap: 5px; }
.song-task-save { min-width: 92px; white-space: nowrap; }
.cue-dock { display: grid; grid-template-columns: 138px minmax(0,1fr); min-height: 88px; padding: 8px; }
.cue-dock-heading { display: flex; flex-direction: column; justify-content: space-between; padding: 4px 8px 4px 3px; border-right: 1px solid var(--line); }
.cue-dock-heading span { font-size: var(--font-label); font-weight: 700; }
.cue-dock-heading em { color: var(--muted); font: var(--font-meta) Consolas, monospace; font-style: normal; }
.cue-dock-meta { display: grid; grid-template-columns: minmax(42px,1fr) repeat(3,24px); align-items: center; gap: 4px; }
.cue-add-button, .cue-nav-button, .cue-insert-button, .cue-delete-button { display: grid; place-items: center; border: 1px solid var(--line); color: var(--muted); background: #151a23; }
.cue-add-button, .cue-nav-button { width: 24px; height: 25px; border-radius: 4px; font-size: 16px; }
.cue-add-button { font-size: 18px; }
.cue-nav-button:disabled { opacity: .28; }
.cue-strip { display: flex; align-items: stretch; gap: 5px; overflow-x: auto; padding-left: 8px; }
.cue-insert-button { flex: 0 0 22px; width: 22px; min-height: 54px; border-color: transparent; border-radius: 3px; background: transparent; font-size: 17px; }
.cue-insert-button:hover, .cue-add-button:hover, .cue-nav-button:hover:not(:disabled) { border-color: #6175db; color: #fff; background: #1d2438; }
.cue-card { position: relative; min-width: 164px; max-width: 190px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #0d1016; }
.cue-card-main { width: 100%; height: 100%; padding: 9px 30px 9px 9px; color: inherit; background: transparent; text-align: left; }
.cue-delete-button { position: absolute; top: 6px; right: 5px; width: 22px; height: 22px; border-color: transparent; border-radius: 3px; background: transparent; }
.cue-delete-button:hover { color: #ff8da3; background: #2b171e; }
.cue-delete-button:disabled { opacity: .3; }
.cue-card:hover { border-color: var(--line-strong); color: #fff; }
.cue-card.active { border-color: #6577d6; color: #fff; background: #171b2a; box-shadow: inset 2px 0 var(--blue); }
.cue-card.empty { border-color: #785f35; color: #e5bd6f; background: #1d1810; box-shadow: inset 2px 0 #b88b42; }
.cue-card.empty.active { border-color: #d4a451; background: #272013; box-shadow: inset 3px 0 var(--amber), 0 0 0 1px rgba(227,184,90,.12); }
.cue-card.empty .cue-card-main strong { color: #e9c980; }
.cue-card-main span { display: block; font: var(--font-meta) Consolas, monospace; }
.cue-card-main .cue-card-start { margin-bottom: 3px; }
.cue-card-main .cue-card-duration { margin-bottom: 6px; color: #7f8ba1; }
.cue-card.active .cue-card-duration { color: #aab7df; }
.cue-card-main strong { display: block; overflow: hidden; font-size: var(--font-label); text-overflow: ellipsis; white-space: nowrap; }

.section-line { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; }
.section-line h2, .section-line h3 { margin: 0; font-size: 14px; }
.section-line > span, .section-line > div > span { color: var(--subtle); font: var(--font-meta) Consolas, monospace; }
.look-panel, .lyric-template-panel, .visual-preset-panel, .phrase-panel, .resolume-panel { padding: 12px 0; border-bottom: 1px solid var(--line); }
.lyric-template-panel { padding-top: 9px; padding-bottom: 9px; }
.lyric-template-panel .section-line { margin-bottom: 8px; }
.phrase-panel { padding-top: 0; }
.cue-timing-editor { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 6px; margin-bottom: 8px; }
.cue-timing-editor label { display: grid; min-width: 0; gap: 4px; color: var(--muted); font-size: var(--font-meta); }
.cue-timing-editor input { width: 100%; min-width: 0; height: 30px; padding: 0 7px; border: 1px solid var(--line); border-radius: 4px; outline: 0; color: #eef1f7; background: #0c0f15; font: var(--font-meta) Consolas, monospace; }
.cue-timing-editor input:focus { border-color: #6478df; }
.cue-timing-editor output { height: 30px; padding: 8px 7px 0; color: #8f9ab0; font: var(--font-meta) Consolas, monospace; white-space: nowrap; }
.font-control { display: grid; min-width: 0; gap: 7px; color: var(--muted); font-size: var(--font-label); }
.font-control select { width: 100%; height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); outline: 0; background: #0c0f15; font-size: var(--font-ui); }
.lyric-color-control { display: grid; gap: 5px; margin-top: 8px; }
.lyric-color-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: var(--font-label); }
.lyric-color-row { display: grid; grid-template-columns: minmax(0,1fr) 28px 76px; align-items: center; gap: 5px; min-width: 0; }
.lyric-color-swatches { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 4px; min-width: 0; }
.lyric-color-swatch { min-width: 0; min-height: 28px; height: 28px; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: #0c0f15; }
.lyric-color-swatch::after { display: block; width: 100%; height: 100%; min-height: 20px; border: 1px solid rgba(255,255,255,.18); border-radius: 2px; background: var(--swatch-color); content: ""; }
.lyric-color-swatch:hover { border-color: var(--line-strong); }
.lyric-color-swatch.active { border-color: #7187f4; box-shadow: 0 0 0 2px rgba(113,135,244,.16); }
.lyric-color-picker { display: grid; width: 28px; height: 28px; min-width: 0; place-items: center; padding: 3px; border: 1px solid var(--line); border-radius: 4px; background: #0c0f15; }
.lyric-color-picker input { width: 20px; height: 20px; padding: 0; border: 0; background: transparent; }
.lyric-color-picker input::-webkit-color-swatch-wrapper { padding: 0; }
.lyric-color-picker input::-webkit-color-swatch { border: 1px solid rgba(255,255,255,.24); border-radius: 2px; }
.lyric-color-hex { display: block; min-width: 0; }
.lyric-color-hex input { width: 100%; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; outline: 0; color: #e9edf5; background: #0c0f15; font: 600 var(--font-meta) Consolas, monospace; text-transform: uppercase; }
.lyric-color-hex input:focus { border-color: #7187f4; }
.motion-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.motion-grid { margin-top: 10px; }
.motion-grid label { display: grid; min-width: 0; gap: 7px; color: var(--muted); font-size: var(--font-label); }
.generation-actions { display: grid; gap: 8px; }
.generation-actions .button:not(.primary) { border-color: #46516a; color: #d9def0; background: #171d29; }
.generation-actions .button:not(.primary):hover { border-color: #6678ad; background: #20283a; }
.phrase-generation-actions { margin-top: 8px; }
.display-mode-control { display: grid; gap: 8px; margin-top: 11px; color: var(--muted); font-size: var(--font-label); }
.display-mode-control > span, .display-mode-control > i { display: flex; align-items: center; justify-content: space-between; }
.display-mode-control b { font-weight: 500; }
.display-mode-control strong { color: #e0e4ec; font: var(--font-meta) Consolas, monospace; }
.display-mode-control > i { color: var(--subtle); font: normal var(--font-meta) Consolas, monospace; }
.display-mode-control em { font-style: normal; }
.lyric-template-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.lyric-template-card { display: grid; min-width: 0; grid-template-rows: 40px auto; gap: 4px; min-height: 76px; padding: 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #0d1016; text-align: left; }
.lyric-template-card:hover { border-color: var(--line-strong); }
.lyric-template-card.active { border-color: #6576d4; color: #fff; background: #171b2a; box-shadow: inset 0 -2px #6681ff; }
.lyric-template-card > span { display: grid; min-width: 0; gap: 2px; }
.lyric-template-card strong, .lyric-template-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lyric-template-card strong { font-size: var(--font-label); }
.lyric-template-card small { color: var(--subtle); font-size: var(--font-meta); }
.lyric-template-card-shell { position: relative; min-width: 0; }
.lyric-template-card-shell .lyric-template-card { width: 100%; }
.firstday-template-shell .lyric-template-card { padding-bottom: 5px; }
.firstday-template-shell .lyric-template-card > span { padding-right: 36px; }
.template-background-toggle { position: absolute; z-index: 2; right: 7px; bottom: 7px; display: flex; align-items: center; gap: 0; color: var(--subtle); font-size: 0; line-height: 1; }
.template-background-toggle input { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; }
.template-background-toggle i { position: relative; display: block; width: 28px; height: 15px; border: 1px solid #394354; border-radius: 8px; background: #202631; box-shadow: inset 0 1px 2px rgba(0,0,0,.45); transition: border-color .14s ease, background-color .14s ease; }
.template-background-toggle i::after { position: absolute; top: 2px; left: 2px; width: 9px; height: 9px; content: ""; border-radius: 50%; background: #8d96a7; box-shadow: 0 1px 2px rgba(0,0,0,.5); transition: translate .14s ease, background-color .14s ease; }
.template-background-toggle input:checked + i { border-color: #7188ff; background: #526bdd; }
.template-background-toggle input:checked + i::after { translate: 13px 0; background: #fff; }
.template-background-toggle input:focus-visible + i { outline: 2px solid #9cadff; outline-offset: 2px; }
.lyric-template-thumb { position: relative; display: grid; width: 100%; height: 40px; place-items: end center; overflow: hidden; padding: 0 5px 6px; border: 1px solid #2e3543; border-radius: 3px; background: linear-gradient(145deg,#111623,#272f43 48%,#090b11); font-style: normal; }
.lyric-template-thumb::before { position: absolute; inset: 7px 8px auto; height: 1px; content: ""; background: rgba(255,255,255,.12); box-shadow: 0 9px rgba(255,255,255,.07); }
.lyric-template-thumb b { position: relative; z-index: 1; max-width: 100%; overflow: hidden; color: #fff; font-size: 11px; line-height: 1.2; letter-spacing: 0; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.lyric-template-thumb.template-iox { background: #050505; }
.lyric-template-thumb.template-iox::before { display: none; }
.lyric-template-thumb.template-iox::after { position: absolute; inset: 50% auto auto 50%; width: max-content; content: "兄弟们"; color: #741319; font: 900 22px/1 "汉仪尚巍手书W", "STXingkai", "KaiTi", "Microsoft YaHei", cursive; transform: translate(-50%,-50%) scale(1.42); text-shadow: 0 2px 0 #36080c; }
.lyric-template-thumb.template-iox b { z-index: 1; color: #f7f2e9; font: 800 16px/1 "汉仪尚巍手书W", "STXingkai", "KaiTi", "Microsoft YaHei", cursive; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.lyric-template-thumb.template-songvoice { place-items: center; padding: 0 8px; background: #030405; }
.lyric-template-thumb.template-songvoice::before { top: 15px; right: auto; left: 22%; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,.68); box-shadow: 22px 17px rgba(255,255,255,.32), 96px -7px rgba(255,255,255,.42), 158px 11px rgba(255,255,255,.2); }
.lyric-template-thumb.template-songvoice b { color: rgba(250,249,244,.96); font: 500 16px/1.2 "Ink Free", "Segoe Print", "STXingkai", "KaiTi", cursive; letter-spacing: .08em; text-shadow: 0 1px 3px rgba(255,255,255,.12); }
.lyric-template-thumb.template-semanticbrush { place-items: center; padding: 0 7px; background: #030303; }
.lyric-template-thumb.template-semanticbrush::before { position: absolute; inset: 50% 5px auto; height: auto; content: "WO FANG KAI SHOU WEI LE NI"; color: rgba(220,0,10,.5); background: none; box-shadow: none; font: 600 5px/1 "Times New Roman", serif; letter-spacing: .24em; text-align: center; transform: translateY(-50%); white-space: nowrap; }
.lyric-template-thumb.template-semanticbrush::after { position: absolute; inset: 50% auto auto 50%; width: max-content; content: "放开手"; color: #f1efeb; font: 900 23px/1 "方正字迹-童体毛笔字体", "汉仪尚巍手书W", "STXingkai", "KaiTi", cursive; transform: translate(-50%,-50%); text-shadow: 0 1px 2px rgba(0,0,0,.9); }
.lyric-template-thumb.template-semanticbrush b { z-index: 1; color: #ed000b; font: 700 13px/1 "SimSun", serif; transform: translateY(1px); text-shadow: 0 1px 1px #650006; }
.lyric-template-thumb.template-firstday { place-items: center; padding: 0 8px; background: linear-gradient(135deg,#2497f4 0 49.5%,#050608 50.5%); }
.lyric-template-thumb.template-firstday::before { inset: 7px; height: auto; background: radial-gradient(circle, rgba(255,255,255,.28) 1px, transparent 1.5px) 0 0/9px 9px; box-shadow: none; opacity: .62; }
.lyric-template-thumb.template-firstday::after { position: absolute; top: 7px; right: 11px; width: 12px; height: 12px; content: ""; border: 1px solid rgba(255,255,255,.72); transform: rotate(45deg); }
.lyric-template-thumb.template-firstday b { z-index: 1; color: #fff; font: 900 20px/1 "华康海报体W12", "中国龙综艺体", "Arial Black", "Microsoft YaHei", sans-serif; letter-spacing: 0; text-shadow: 2px 2px #050608, 10px 0 rgba(255,255,255,.18), -10px 0 rgba(36,151,244,.24); transform: skewX(-7deg); }
.lyric-template-thumb.template-greenlight { place-items: center; padding: 0 8px; background: #000; }
.lyric-template-thumb.template-greenlight::before { inset: 8px 15px; height: auto; background: repeating-linear-gradient(90deg, transparent 0 22px, rgba(67,255,24,.82) 23px 27px, transparent 28px 34px); box-shadow: none; opacity: .44; transform: skewX(-8deg); }
.lyric-template-thumb.template-greenlight::after { position: absolute; inset: 50% auto auto 50%; width: max-content; content: "绿光  绿光  绿光"; color: transparent; font: 900 11px/1 var(--font-sans); letter-spacing: 0; -webkit-text-stroke: 1px rgba(255,255,255,.55); transform: translate(-50%,-50%) skewX(-8deg); }
.lyric-template-thumb.template-greenlight b { z-index: 1; color: #43ff19; font: 950 20px/1 "Arial Black", "Microsoft YaHei", sans-serif; letter-spacing: 0; text-shadow: 3px 0 #fff; transform: skewX(-8deg) scaleX(.88); }
.lyric-template-thumb.template-beyond { place-items: center; padding: 0 7px; background: #f1dfbf url("/static/beyond-background.jpg") center/cover; }
.lyric-template-thumb.template-beyond::before { position: absolute; inset: 8px 16px; height: auto; content: ""; border: 2px solid #bb473a; border-radius: 48%; background: #23484a; transform: rotate(-4deg); }
.lyric-template-thumb.template-beyond::after { position: absolute; top: 10px; right: 14px; content: "★"; color: #d47c4f; font-size: 13px; text-shadow: 1px 1px #f4e5c7; }
.lyric-template-thumb.template-beyond b { z-index: 1; color: #f1dfbf; font: 900 12px/1 "Microsoft YaHei", sans-serif; letter-spacing: 0; text-shadow: 1px 2px #172d36, 2px 3px #bd4637; transform: rotate(-3deg); }
.background-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 244px; overflow-y: auto; padding-right: 2px; }
.background-video-list { display: contents; }
.background-brightness-control { display: grid; gap: 7px; margin: 2px 0 4px; color: var(--muted); font-size: var(--font-label); }
.background-brightness-control > span { display: flex; align-items: center; justify-content: space-between; }
.background-brightness-control > span strong:first-child { color: var(--muted); font-weight: 600; }
.background-brightness-control > span strong:last-child { color: var(--text); font: var(--font-meta) Consolas, monospace; }
.background-brightness-control input { width: 100%; min-width: 0; }
.background-card { display: grid; min-width: 0; grid-template-columns: 44px minmax(0,1fr); align-items: center; gap: 8px; min-height: 58px; padding: 7px; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: #0d1016; text-align: left; }
.background-card:hover { border-color: var(--line-strong); }
.background-card.active { border-color: #6576d4; color: #fff; background: #171b2a; }
.background-card strong, .background-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.background-card strong { font-size: var(--font-label); }
.background-card small { margin-top: 3px; color: var(--subtle); font: var(--font-meta) Consolas, monospace; }
.background-video-item { position: relative; min-width: 0; }
.background-video-item .background-card { width: 100%; height: 100%; padding-right: 26px; }
.background-video-remove { position: absolute; z-index: 1; top: 5px; right: 5px; display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #4a5263; border-radius: 3px; color: #c9cfda; background: #151a23; font-size: 14px; line-height: 1; }
.background-video-remove:hover { border-color: #d56d84; color: #fff; background: #4a202b; }
.bg-thumb.video-upload { position: relative; background: #0a0e17; }
.bg-thumb.video-upload::before { position: absolute; top: 8px; left: 13px; width: 14px; height: 14px; border: 1px solid #8193e9; border-radius: 2px; content: ""; }
.bg-thumb.video-upload::after { position: absolute; top: 12px; left: 19px; width: 0; height: 0; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-left: 6px solid #8193e9; content: ""; }
.bg-thumb { width: 44px; height: 34px; border-radius: 3px; background: radial-gradient(circle at 50% 55%,#657fff 0 8%,#2d2d52 9% 28%,#070811 70%); }
.bg-thumb.starfield { background: radial-gradient(circle at 20% 30%,#fff 0 1px,transparent 2px),radial-gradient(circle at 75% 65%,#7f8fff 0 1px,transparent 2px),#080b15; }
.bg-thumb.tunnel { background: repeating-radial-gradient(ellipse,#657fff 0 1px,transparent 2px 7px),#070811; }
.bg-thumb.topography { background: repeating-linear-gradient(12deg,transparent 0 5px,#665b9b 6px,transparent 7px),#080a10; }
.bg-thumb.ripples { background: repeating-radial-gradient(ellipse at 50% 100%,#557fbd 0 1px,transparent 2px 8px),#07101a; }
.bg-thumb.prism { background: linear-gradient(135deg,#101320,#604dd0,#d4557b,#131624); }
.bg-thumb.embers { background: radial-gradient(circle at 30% 70%,#eea34c 0 2px,transparent 3px),radial-gradient(circle at 70% 35%,#db5d4b 0 2px,transparent 3px),#140b0a; }
.bg-thumb.orbit { background: radial-gradient(circle,#6d7ba9 0 7px,#171b26 8px 11px,transparent 12px),#080a0f; }
.bg-thumb.vinyl { background: repeating-radial-gradient(circle,#222838 0 2px,#090b10 3px 5px); }
.bg-thumb.void { background: #030405; }
.phrase-editor { display: block; width: 100%; min-height: 76px; max-height: 150px; resize: vertical; padding: 8px 9px; border: 1px solid var(--line); border-radius: 4px; outline: 0; color: #d9dee8; background: #0d1016; font: var(--font-label)/1.55 "Microsoft YaHei UI", sans-serif; }
.phrase-editor.prompter-editor { min-height: 48px; resize: none; overflow-x: auto; overflow-y: hidden; white-space: pre; }
.phrase-editor:focus { border-color: #6478df; }
.phrase-editor::placeholder { color: var(--subtle); }
.phrase-editor.empty { border-color: #9a7538; background: #19150e; box-shadow: inset 3px 0 rgba(227,184,90,.72); }
.phrase-editor.empty::placeholder { color: #d1ad68; }
.energy-control, .detail-control-grid label { display: grid; gap: 7px; color: var(--muted); font-size: var(--font-label); }
.energy-control { margin-top: 10px; }
.energy-control > div, .detail-control-grid label > span { display: flex; min-width: 0; justify-content: space-between; gap: 6px; }
.energy-control strong, .detail-control-grid strong { color: #e0e4ec; font: var(--font-meta) Consolas, monospace; }
input[type="range"] { width: 100%; height: 4px; margin: 0; accent-color: var(--blue); }
.detail-control-grid { display: grid; min-width: 0; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 9px; margin-top: 12px; }
.detail-control-grid label, .detail-control-grid input { min-width: 0; }
.toggle-row { position: relative; display: flex; min-width: 0; min-height: 42px; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: var(--font-label); }
.toggle-row > span { display: grid; min-width: 0; gap: 2px; }
.toggle-row strong, .toggle-row small { overflow-wrap: anywhere; }
.toggle-row small { color: var(--subtle); font-size: var(--font-meta); }
.toggle-row input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.toggle-row > i { position: relative; width: 34px; height: 19px; flex: 0 0 34px; border: 1px solid var(--line); border-radius: 10px; background: #252b35; }
.toggle-row > i::after { position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #a3aab7; content: ""; transition: transform .16s ease; }
.toggle-row input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 2px; }
.toggle-row input:checked + i { border-color: #6478e4; background: #566be0; }
.toggle-row input:checked + i::after { background: #fff; transform: translateX(15px); }
.route-status { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: var(--font-meta); }
.route-status.detected { color: #96a5e9; }
.route-status.detected i { background: var(--blue); }
.route-status.error { color: #e98295; }
.ndi-source-card { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: #0d1016; }
.ndi-source-copy { display: grid; min-width: 0; flex: 1; gap: 3px; }
.ndi-source-copy > span { color: #a6b5ee; font: 700 var(--font-meta) Consolas, monospace; }
.ndi-source-copy strong { overflow: hidden; font-size: var(--font-label); text-overflow: ellipsis; white-space: nowrap; }
.ndi-source-copy small { color: var(--subtle); font-size: var(--font-meta); }
.ndi-button { min-width: 58px; flex-direction: column; gap: 2px; padding: 5px 8px; }
.ndi-button i { font: 700 var(--font-meta) Consolas, monospace; font-style: normal; }
.ndi-button span { font-size: var(--font-meta); }
.route-diagram { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; color: var(--subtle); font-size: var(--font-meta); }
.route-diagram span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 7px; color: var(--muted); font-size: var(--font-meta); }
.export-menu { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 12px; color: var(--muted); font-size: var(--font-label); }
.export-menu > div { display: flex; gap: 5px; }
.export-menu button { min-width: 38px; padding: 7px; border: 1px solid var(--line); border-radius: 4px; color: #d5dae4; background: #171b24; font-size: var(--font-meta); }

.custom-select-native { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.custom-select { position: relative; min-width: 158px; }
.font-control .custom-select, .motion-grid .custom-select { width: 100%; min-width: 0; }
.custom-select-trigger { position: relative; display: grid; width: 100%; min-width: 0; min-height: 48px; grid-template-columns: 28px minmax(0,1fr) 18px; align-items: center; gap: 9px; padding: 7px 9px; border: 1px solid #3b4454; border-radius: var(--radius); color: #eef1f6; background: #0c1017; font-size: var(--font-ui); text-align: left; transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease; }
.custom-select-trigger:hover { border-color: #566176; background: #121720; }
.custom-select.open .custom-select-trigger { border-color: #7187f4; background: #141a27; box-shadow: 0 0 0 2px rgba(113,135,244,.14); }
.custom-select-copy, .motion-option-copy { display: grid; min-width: 0; gap: 2px; }
.custom-select-copy strong, .custom-select-copy small, .motion-option-copy strong, .motion-option-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.custom-select-copy strong { font-size: var(--font-label); }
.custom-select-copy small { color: var(--subtle); font-size: var(--font-meta); }
.select-chevron { color: var(--muted); font-size: 15px; line-height: 1; text-align: center; transition: transform .16s ease; }
.custom-select.open .select-chevron { color: #aebcff; transform: rotate(180deg); }
.select-visual { position: relative; flex: 0 0 auto; width: 28px; height: 24px; overflow: hidden; border: 1px solid #3a4353; border-radius: 3px; background: #080b10; }
.select-visual::before, .select-visual::after { position: absolute; content: ""; }
.select-resolution::before { inset: 5px 4px; border: 1px solid #8193e9; }
.select-display::before { inset: 4px 4px 7px; border: 1px solid #8fa1ee; }
.select-display::after { bottom: 3px; left: 9px; width: 8px; height: 1px; background: #8fa1ee; }
.select-font::before { inset: 0; display: grid; place-items: center; color: #aab8f3; content: "Aa"; font: 700 var(--font-meta)/22px Georgia, serif; }
.motion-glyph::before { top: 11px; left: 5px; width: 16px; height: 2px; background: #8699ef; box-shadow: 0 -5px #d26a85, 0 5px #6e78bd; }
.custom-select-menu { position: fixed; z-index: 240; display: none; max-width: calc(100vw - 24px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 7px; border: 1px solid #4b566b; border-radius: 6px; background: #151a23; box-shadow: 0 18px 54px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.025); }
.custom-select-menu.open { display: grid; gap: 4px; animation: select-menu-in .14s ease-out both; }
.custom-select-menu.opens-up { transform-origin: bottom center; }
@keyframes select-menu-in { from { opacity: 0; transform: translateY(-4px); } }
.custom-select-menu.opens-up.open { animation-name: select-menu-in-up; }
@keyframes select-menu-in-up { from { opacity: 0; transform: translateY(4px); } }
.custom-select-menu-header { position: sticky; z-index: 1; top: -7px; display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; margin: -7px -7px 3px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #171c26; }
.custom-select-menu-header strong { overflow: hidden; font-size: var(--font-label); text-overflow: ellipsis; white-space: nowrap; }
.custom-select-menu-header span { flex: 0 0 auto; color: var(--subtle); font: var(--font-meta) Consolas, monospace; }
.custom-select-option { display: grid; width: 100%; min-width: 0; min-height: 52px; grid-template-columns: 30px minmax(0,1fr) 20px; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; border-radius: 4px; color: var(--muted); background: transparent; text-align: left; }
.custom-select-option:hover, .custom-select-option:focus-visible { border-color: #3e485b; color: #fff; background: #202633; outline: 0; }
.custom-select-option.selected { border-color: #5367ba; color: #fff; background: #252d43; }
.custom-select-option strong { font-size: var(--font-ui); }
.custom-select-option small { color: var(--subtle); font-size: var(--font-meta); }
.motion-option-check { display: grid; width: 19px; height: 19px; place-items: center; border: 1px solid #59657a; border-radius: 50%; color: transparent; font-size: var(--font-meta); }
.custom-select-option.selected .motion-option-check { border-color: #7f93f2; color: #fff; background: #6178e5; }

.secondary-view { overflow-y: auto; padding: 18px 22px 28px; }
.secondary-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.secondary-heading span { color: #96a7e8; font: 700 var(--font-meta) Consolas, monospace; }
.secondary-heading h1 { margin: 4px 0 0; font-size: 24px; }
.projects-heading-actions { display: flex; align-items: center; gap: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.project-search { display: block; }
.project-search input { width: 220px; height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: var(--radius); outline: 0; color: #fff; background: #0c0f15; font-size: var(--font-ui); }
.project-search input:focus { border-color: #6178e5; box-shadow: 0 0 0 2px rgba(97,120,229,.16); }
.project-search input::placeholder { color: var(--subtle); }
.project-delete { color: #bd8795; }
.project-delete:hover { border-color: #a84d69; color: #ff8ca8; }
.projects-grid, .package-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.project-item, .package-item { overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.project-item:hover { border-color: var(--line-strong); }
.project-visual { position: relative; aspect-ratio: 16/8; overflow: hidden; background: #07090d; }
.project-visual canvas { width: 100%; height: 100%; }
.project-visual > span { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; font-size: 16px; font-weight: 700; text-align: center; }
.project-details { display: flex; align-items: center; justify-content: space-between; gap: 9px; padding: 12px; }
.project-details > div:last-child { display: flex; align-items: center; gap: 6px; }
.project-details h3 { margin: 0 0 5px; font-size: 12px; }
.project-details p { margin: 0; color: var(--muted); font: var(--font-meta) Consolas, monospace; }
.package-item { padding: 18px; }
.package-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: var(--font-label); }
.package-label em { padding: 3px 5px; border-radius: 3px; color: #c5ceff; background: #252c48; font-size: var(--font-meta); font-style: normal; }
.package-item h3 { margin: 18px 0 6px; font-size: 31px; }
.package-item h3 span { color: var(--muted); font-size: 15px; }
.package-item p, .package-item li { color: var(--muted); font-size: var(--font-label); }
.package-item ul { min-height: 48px; padding-left: 18px; }
.balance-display { display: grid; gap: 2px; text-align: right; }
.balance-display strong { font-size: 24px; }
.list-section { margin-top: 22px; }
.data-list { overflow: hidden; }
.data-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.data-row:last-child { border-bottom: 0; }
.data-row div { display: grid; gap: 3px; }
.data-row strong { font-size: var(--font-ui); }
.data-row span, .data-row time { color: var(--muted); font-size: var(--font-meta); }
.data-row em { color: #aebcf0; font-size: var(--font-label); font-style: normal; }
.referral-hero { display: grid; grid-template-columns: 210px 1fr; gap: 24px; padding: 22px; }
.referral-rate { display: grid; gap: 6px; padding-right: 24px; border-right: 1px solid var(--line); }
.referral-rate span { color: var(--muted); font-size: var(--font-label); }
.referral-rate strong { font-size: 44px; }
.referral-rate em { color: var(--muted); font-size: 18px; font-style: normal; }
.invite-link-box { display: grid; align-content: center; gap: 7px; }
.invite-link-box label, .invite-link-box small { color: var(--muted); font-size: var(--font-label); }
.invite-link-box > div, .server-input-row { display: flex; gap: 8px; }
.invite-link-box input, .server-input-row input { min-width: 0; flex: 1; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); outline: 0; background: #0c0f15; font-size: var(--font-ui); }
.stat-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 12px 0; }
.stat-grid > div { display: grid; gap: 6px; padding: 15px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.stat-grid span { color: var(--muted); font-size: var(--font-label); }
.stat-grid strong { font-size: 20px; }
.account-layout { display: grid; grid-template-columns: minmax(300px,1fr) minmax(320px,1.4fr); gap: 12px; }
.profile-block { display: grid; grid-template-columns: 50px minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 18px; }
.profile-avatar { display: grid; width: 50px; height: 50px; place-items: center; border-radius: 4px; background: #293148; font-size: 18px; font-weight: 700; }
.profile-block h2 { margin: 0 0 4px; font-size: 14px; }
.profile-block p { margin: 0; color: var(--muted); font-size: var(--font-label); }
.account-values { display: grid; grid-template-columns: repeat(3,1fr); padding: 18px; }
.account-values > div { display: grid; gap: 7px; padding: 0 14px; border-right: 1px solid var(--line); }
.account-values > div:last-child { border-right: 0; }
.account-values span { color: var(--muted); font-size: var(--font-meta); }
.account-values strong { font-size: 15px; }
.desktop-settings { margin-top: 12px; padding: 18px; }
.about-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.about-grid > div { display: grid; min-width: 0; gap: 7px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.about-grid span { color: var(--muted); font-size: var(--font-meta); }
.about-grid strong { overflow: hidden; font-size: var(--font-label); text-overflow: ellipsis; white-space: nowrap; }
.settings-heading-actions { display: flex; align-items: center; gap: 8px; }
.button.compact { min-height: 30px; padding: 5px 9px; font-size: var(--font-meta); }
.empty-state { display: grid; min-height: 180px; grid-column: 1/-1; place-content: center; gap: 8px; border: 1px dashed var(--line); color: var(--muted); text-align: center; }

.modal-backdrop { position: fixed; z-index: 300; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(3,4,7,.78); }
.confirm-backdrop { z-index: 350; }
.auth-modal { position: relative; width: min(420px,100%); padding: 25px; border-color: var(--line-strong); background: #12151c; box-shadow: 0 24px 80px rgba(0,0,0,.58); }
.detection-modal { width: min(390px,100%); padding: 26px; border-color: var(--line-strong); background: #12151c; box-shadow: 0 24px 80px rgba(0,0,0,.58); text-align: center; }
.detection-modal h2 { margin: 10px 0 7px; font-size: 19px; }
.detection-modal p { min-height: 42px; margin: 0 0 18px; color: var(--muted); font-size: var(--font-label); line-height: 1.65; }
.detection-spinner { width: 34px; height: 34px; margin: 0 auto 14px; border: 3px solid rgba(255,255,255,.12); border-top-color: #7f93ff; border-radius: 50%; animation: spin .8s linear infinite; contain: layout paint; transform: translateZ(0); will-change: transform; }
.detection-spinner.manual-spin { animation: none !important; }
.detection-modal.complete .detection-spinner { position: relative; border-color: #48735d; background: #203e31; animation: none; }
.detection-modal.complete .detection-spinner::after { position: absolute; top: 7px; left: 9px; width: 9px; height: 5px; border-bottom: 2px solid #8ae0b1; border-left: 2px solid #8ae0b1; content: ""; transform: rotate(-45deg); }
.detection-modal.error .detection-spinner { border-color: #6f3d48; background: #3a2027; animation: none; }
.detection-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); gap: 8px; }
.detection-actions .button { min-height: 38px; }
.detection-modal.complete .detection-actions, .detection-modal.error .detection-actions { grid-template-columns: 1fr; }
.confirm-modal { width: min(430px,100%); padding: 25px; border-color: var(--line-strong); background: #12151c; box-shadow: 0 24px 80px rgba(0,0,0,.62); }
.confirm-mark { display: grid; width: 34px; height: 34px; margin-bottom: 13px; place-items: center; border: 1px solid #754354; border-radius: 50%; color: #ff9bad; background: #2d1821; font: 700 18px/1 Consolas, monospace; }
.confirm-modal h2 { margin: 10px 0 7px; font-size: 19px; }
.confirm-modal p { min-height: 42px; margin: 0 0 19px; color: var(--muted); font-size: var(--font-label); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.confirm-actions { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.2fr); gap: 8px; }
.confirm-actions .button { min-height: 38px; }
.button.danger { border-color: #713c4b; color: #ffe7eb; background: #3a1c26; }
.button.danger:hover:not(:disabled) { border-color: #a14d63; background: #512330; }
.modal-close { position: absolute; top: 13px; right: 13px; width: 28px; height: 28px; border-radius: 4px; color: var(--muted); background: #1b202a; font-size: 16px; }
.modal-kicker { color: #9cace8; font: 700 var(--font-meta) Consolas, monospace; }
.auth-modal h2 { margin: 10px 0 5px; font-size: 20px; }
.auth-modal > p { margin: 0 0 16px; color: var(--muted); font-size: var(--font-label); }
.auth-tabs { margin-bottom: 14px; }
.auth-modal form { display: grid; gap: 11px; }
.auth-modal form label { display: grid; gap: 6px; color: var(--muted); font-size: var(--font-label); }
.auth-modal form input { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); outline: 0; background: #0c0f15; font-size: var(--font-ui); }
.auth-modal form input:focus { border-color: #6478d8; }
.form-error { min-height: 16px; margin: 0; color: #f18498; font-size: var(--font-meta); }
.demo-login { display: flex; width: 100%; justify-content: space-between; margin-top: 12px; padding: 10px; border-radius: 4px; color: var(--muted); background: transparent; font-size: var(--font-meta); }
.demo-login:hover { background: #191e28; }
.demo-login b { color: #9cabdf; }
.toast-region { position: fixed; z-index: 400; right: 18px; bottom: 18px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 240px; max-width: calc(100vw - 36px); padding: 11px 13px; border: 1px solid #3c465a; border-radius: 4px; color: #e8ebf2; background: #171c25; box-shadow: var(--shadow); font-size: var(--font-label); transition: opacity .18s ease, transform .18s ease; }
.toast.error { border-color: #6b3743; background: #25151b; }

@media (max-width: 1360px) {
  .studio-shell { grid-template-columns: 248px minmax(0,1fr) 276px; }
  .source-rail, .style-rail { padding: 12px; }
  #lyricsInput { --lyrics-editor-min-height: 180px; }
  .toolbar-caption, .output-pulse { display: none; }
  .background-grid { grid-template-columns: 1fr; }
  .topbar { padding: 28px 14px 0; }
  .topbar { grid-template-columns: minmax(150px,1fr) minmax(230px,280px) minmax(230px,1fr); gap: 10px; }
  html.desktop-app .topbar-status { padding-right: 14px; }
  .topbar-status { gap: 6px; }
}
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 64px minmax(0,1fr); }
  .app-content { overflow-y: auto; }
  .studio-shell { grid-template-columns: 240px minmax(0,1fr); height: auto; min-height: 100%; overflow: visible; }
  .style-rail { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; overflow: visible; }
  .style-rail > .rail-heading, .style-rail > .export-menu { grid-column: 1/-1; }
  .style-rail > .phrase-panel { grid-column: 1/-1; }
  .style-rail > section { padding: 10px; border: 1px solid var(--line); }
  .stage-workspace { min-height: 820px; overflow: visible; }
}
@media (max-width: 760px) {
  .app-shell { display: block; min-height: calc(100dvh - var(--window-chrome-height)); overflow-y: auto; }
  .topbar { position: sticky; top: 0; z-index: 50; grid-template-columns: auto minmax(140px,1fr) auto; gap: 8px; min-height: 78px; padding: 28px 10px 0; }
  html.desktop-app .topbar-status { padding-right: 10px; }
  .brand-divider, .brand-identity, .credit-chip, .output-pulse, .account-button { display: none; }
  .workspace-mode-switch { min-height: 38px; }
  .workspace-mode-switch button { min-height: 30px; gap: 5px; padding: 4px 7px; font-size: 11px; }
  .workspace-mode-switch button i { width: 14px; height: 12px; }
  .side-nav { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4,1fr); padding: 5px 8px; border-top: 1px solid var(--line); border-right: 0; }
  .nav-button { min-height: 48px; gap: 3px; }
  .nav-button img { width: 18px; height: 18px; }
  .nav-settings { margin-top: 0; }
  .app-content { padding: 8px 8px 66px; overflow: visible; }
  .studio-shell { display: block; }
  .source-rail, .style-rail { display: block; margin-bottom: 8px; overflow: visible; }
  .stage-workspace { min-height: 850px; margin-bottom: 8px; }
  .stage-toolbar { align-items: stretch; flex-direction: column; }
  .toolbar-actions { justify-content: space-between; }
  .transport { grid-template-columns: 28px 28px 38px minmax(70px,1fr) minmax(104px,126px) 44px 44px; }
  .transport > span { display: none; }
  .song-taskbar { grid-template-columns: 26px minmax(100px,1fr) 26px; }
  .song-taskbar-heading, .song-task-actions { grid-column: 1/-1; }
  .song-task-actions { justify-content: flex-end; }
  .projects-grid, .package-grid, .account-layout, .referral-hero { grid-template-columns: 1fr; }
  .secondary-heading { align-items: stretch; flex-direction: column; }
  .projects-heading-actions { justify-content: space-between; }
  .project-search { flex: 1; }
  .project-search input { width: 100%; }
  .about-grid { grid-template-columns: 1fr; }
  .account-values { grid-template-columns: 1fr; gap: 12px; }
  .account-values > div { padding: 0; border-right: 0; }
  .custom-select-menu-header { padding: 9px 10px; }
  .custom-select-option { min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .detection-spinner { animation-duration: .8s !important; animation-iteration-count: infinite !important; }
  .stage-prompter-track { transition-duration: .62s !important; }
  .stage-prompter-track.no-transition { transition: none !important; }
  .stage-prompter-line { transition-duration: .35s !important; }
}
