:root {
  --bg: #070910;
  --panel: #10141f;
  --paper: #dbe7ff;
  --ink: #eef3ff;
  --muted: #9aa8c7;
  --faint: #6e7c9e;
  --line: rgba(150, 176, 255, 0.24);
  --danger: #ff9eb8;
  --grad: linear-gradient(115deg, #3b82f6 0%, #7c3aed 55%, #c026d3 100%);
  color-scheme: dark;
}

.top-actions { display: flex; align-items: center; gap: 24px; flex-shrink: 0; padding-bottom: 4px; }
.settings-trigger { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; transition: color .18s, background .18s, border-color .18s; }
.settings-trigger:hover { color: var(--ink); background: #ffffff08; border-color: var(--line); }
.settings-trigger:focus-visible { outline: 2px solid #8b9eff; outline-offset: 3px; }
#historySettings { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid rgba(150,176,255,.2); border-radius: 22px; color: var(--ink); background: #10141f; box-shadow: 0 32px 100px #0009; overflow: auto; }
#historySettings::backdrop { background: #03050bb8; backdrop-filter: blur(6px); }
.settings-header { display: flex; align-items: center; justify-content: space-between; padding: 26px 28px 22px; border-bottom: 1px solid #ffffff0d; }
#historySettings .settings-eyebrow { margin: 0 0 5px; font-size: 10px; font-weight: 600; letter-spacing: .18em; color: var(--faint); }
#historySettings h2 { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: .04em; }
.settings-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.settings-close:hover { background: #ffffff09; color: var(--ink); }
.settings-body { padding: 24px 28px 20px; }
#historySettings h3 { margin: 0; font-size: 14px; font-weight: 650; }
#historySettings .settings-description { margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.settings-section + .settings-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid #ffffff0d; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 68px; font-size: 13px; }
.settings-row small { display: block; margin-top: 5px; font-size: 11px; font-weight: 400; line-height: 1.6; color: var(--faint); }
.settings-field { display: flex; align-items: center; justify-content: flex-end; gap: 9px; color: var(--muted); flex-shrink: 0; }
#historySettings input[type=number], #historySettings select { min-height: 38px; padding: 8px 10px; border: 1px solid #ffffff16; border-radius: 9px; background: #080c16; color: var(--ink); font: inherit; font-size: 13px; }
#historySettings input[type=number] { width: 80px; }
#historySettings input:focus-visible, #historySettings select:focus-visible, #historySettings button:focus-visible { outline: 2px solid #8399ff; outline-offset: 3px; }
#historySettings button { font: inherit; }
.settings-auto { cursor: pointer; }
.settings-switch { position: relative; display: inline-flex; flex-shrink: 0; }
.settings-switch input { position: absolute; width: 38px; height: 22px; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.settings-switch > span { width: 38px; height: 22px; border: 1px solid #ffffff14; border-radius: 99px; background: #2a3041; transition: background .2s; }
.settings-switch > span::after { content: ''; display: block; width: 16px; height: 16px; margin: 2px; border-radius: 50%; background: #a3aec6; transition: transform .2s, background .2s; }
.settings-switch input:checked + span { background: #6552c9; border-color: transparent; }
.settings-switch input:checked + span::after { transform: translateX(16px); background: white; }
.settings-switch input:focus-visible + span { outline: 2px solid #8399ff; outline-offset: 3px; }
#historySettings .settings-hint { margin: 10px 0 0; color: var(--faint); font-size: 11px; line-height: 1.7; }
.settings-secondary, .settings-danger { padding: 8px 13px; border: 1px solid #ffffff18; border-radius: 9px; background: #ffffff04; color: var(--muted); font-size: 12px !important; white-space: nowrap; cursor: pointer; }
.settings-secondary:hover { background: #ffffff0a; color: var(--ink); }
.settings-danger { color: #e5a1b2; border-color: #e5a1b22b; }
.settings-danger:hover { background: #e5a1b210; border-color: #e5a1b25c; }
.settings-danger:disabled { opacity: .4; cursor: default; }
#historySettings .settings-note { margin: 18px 0 0; padding: 12px 14px; background: #ffffff03; border-radius: 10px; color: var(--faint); font-size: 11px; line-height: 1.8; }
.settings-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 28px; border-top: 1px solid #ffffff0d; background: #0c101a; }
#historyMessage { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.settings-primary { padding: 10px 20px; flex-shrink: 0; border: 1px solid #ffffff18; border-radius: 10px; background: #6650bf; color: white; font-size: 13px !important; font-weight: 600 !important; cursor: pointer; }
.settings-primary:hover { background: #7760d2; }
.app-confirm { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 48px); padding: 0; overflow: auto; border: 1px solid rgba(150,176,255,.22); border-radius: 18px; background: var(--panel); color: var(--ink); box-shadow: 0 28px 90px #0009; }
.app-confirm::backdrop { background: #03050baa; backdrop-filter: blur(4px); }
.confirm-content { padding: 26px 26px 22px; }
.confirm-content h2 { margin: 0 0 14px; font-size: 18px; font-weight: 650; line-height: 1.5; }
.confirm-content p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.9; overflow-wrap: anywhere; }
.confirm-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid #ffffff0d; background: #0c101a; }
.app-confirm button:focus-visible { outline: 2px solid #8399ff; outline-offset: 3px; }
.app-confirm .settings-danger { background: #78394d; border-color: #c9748c55; color: #ffe2eb; }
.app-confirm .settings-danger:hover { background: #91465e; }
.history-delete { display: block; margin-top: 6px; font-size: 12px; text-decoration: underline; cursor: pointer; }
.creative-panel { margin: 20px 0; border: 1px solid var(--line); border-radius: 14px; background: #0b1020; font-size: 13px; }
.creative-panel summary { display: flex; justify-content: space-between; gap: 12px; padding: 16px; cursor: pointer; font-weight: 600; }
.creative-panel summary span { font-size: 11px; color: var(--faint); font-weight: 400; }
.creative-body { padding: 0 18px 16px; }
.creative-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; }
.creative-inline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.creative-panel select, .creative-panel input:not([type=checkbox]), .preset-library input:not([type=file]), .preset-library select, .preset-library textarea { border: 1px solid #ffffff20; border-radius: 9px; padding: 9px 10px; background: #080c16; color: var(--ink); font: inherit; min-width: 0; }
.creative-panel select { max-width: 220px; }
.creative-panel #subjectMotion { width: 100%; font-size: 12px; }
.creative-label { display: block; margin: 12px 0 8px; font-size: 12px; }
.creative-hint { margin: 0 0 10px; font-size: 11px; line-height: 1.8; color: var(--faint); }
.creative-check { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; cursor: pointer; }
.creative-check input { accent-color: #8064dc; margin: 3px 0; }
.creative-check small { display: block; margin-top: 5px; font-size: 11px; line-height: 1.7; color: var(--faint); }
.preset-summary { display: flex; gap: 12px; align-items: center; padding: 10px; background: #ffffff04; border-radius: 10px; }
.preset-summary img { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.preset-summary p { margin: 0; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.preset-library { width: min(600px, calc(100% - 32px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--ink); }
.preset-library::backdrop { background: #03050bb8; backdrop-filter: blur(5px); }
.preset-library h2 { margin: 0; font-size: 19px; }
.preset-library h3 { margin: 20px 0 14px; font-size: 14px; }
.preset-library textarea { width: 100%; margin-top: 12px; resize: vertical; }
.preset-library .creative-inline input { flex: 1; }
.preset-item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #ffffff0d; }
.preset-item img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; }
.preset-select { flex: 1; min-width: 0; text-align: left; border: 0; background: transparent; padding: 6px 0; color: var(--ink); cursor: pointer; }
.preset-select strong, .preset-select small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preset-select small { margin-top: 5px; color: var(--faint); }
#presetMessage { color: var(--danger); font-size: 12px; }
.creative-result-label { color: #b9a5ff; font-size: 12px; margin: 0; }
.thumb { position: relative; }
.preview-badge { position: absolute; top: 7px; left: 7px; padding: 3px 7px; border-radius: 6px; color: #e9e2ff; background: #251f43df; font-size: 10px; }
#promotePreview { border-color: #9e86ee; color: #d3c3ff; }
.output-settings { padding: 16px 18px; margin: 20px 0 12px; }
.output-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.output-heading h3 { margin: 0; font-size: 13px; font-weight: 650; }
.output-heading > span { font-size: 11px; color: var(--faint); }
.output-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.output-mode { display: flex; align-items: center; gap: 12px; margin-right: auto; color: var(--muted); font-size: 12px; }
.output-toggle { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
.output-toggle input { accent-color: #8064dc; margin: 0; width: 15px; height: 15px; }
.output-settings .creative-hint { margin: 12px 0 0; }
.reference-library-button { display: block; margin: 0; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.locks > .frame { min-width: 0; }
.reference-actions { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; min-height: 34px; margin-top: 6px; }
.reference-actions .folder-pick { margin: 0; padding: 5px 9px; border-radius: 8px; font-size: 11px; font-weight: 400; letter-spacing: normal; }
.reference-library-button:hover { border-color: #a791e5; color: var(--ink); }
.reference-library-button:focus-visible { outline: 2px solid #8399ff; outline-offset: 3px; }
.reference-saved-note { margin: 7px 0 0; font-size: 11px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
#referenceSaveName { width: 100%; }
#referenceLibraryMessage { color: var(--danger); font-size: 12px; }
.run-plan { margin: 12px 0 18px; padding: 16px 18px; border: 1px solid #ffffff15; border-radius: 13px; background: #0a0e19; }
.run-plan-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.run-plan h3 { margin: 0; font-size: 13px; font-weight: 650; }
#planState { color: var(--faint); font-size: 11px; }
#planFields { display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr); gap: 10px 12px; margin: 16px 0; font-size: 12px; }
#planFields dt { color: var(--faint); }
#planFields dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.plan-warnings { margin: 12px 0; padding: 12px 12px 12px 28px; border-radius: 9px; background: #e7be6810; color: #d7c29b; font-size: 11px; line-height: 1.8; }
#effectivePrompt summary { color: var(--muted); font-size: 11px; cursor: pointer; }
#planPrompt { margin: 12px 0 0; padding: 12px; max-height: 180px; overflow: auto; border-radius: 8px; background: #ffffff03; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--muted); font: inherit; font-size: 12px; line-height: 1.8; }
.draft-route { margin: 8px 0 0; font-size: 11px; color: var(--faint); }
.engine-purpose { display: block; margin-bottom: 5px; color: #b7a5ed; font-size: 10px; font-weight: 500; }
.engine-capability { display: block; margin-top: 8px; color: var(--faint); font-size: 10px; line-height: 1.6; }
.engine-card.on .engine-purpose, .engine-card.on .engine-capability { color: #ffffffba; }
.job-panel { flex: 0 0 auto; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: #0c1120; }
.gpu-status { margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.7; }
#jobManager summary { font-size: 11px; color: #c5cce0; cursor: pointer; }
#jobRows { max-height: 210px; overflow: auto; }
.job-row { padding: 12px 0; border-bottom: 1px solid #ffffff0d; }
.job-row:last-child { border: 0; }
.job-row strong { font-size: 11px; font-weight: 600; }
.job-row p { margin: 6px 0; color: var(--muted); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.job-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.job-actions button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: #c6b7ed; font-size: 10px; cursor: pointer; }
.job-actions button:hover { border-color: #9e86ee; }
.job-actions button:disabled { opacity: .4; cursor: default; }
#jobMessage { margin: 8px 0; color: var(--danger); font-size: 11px; }
.job-empty { font-size: 11px; color: var(--faint); }
.stage-actions { flex-wrap: wrap; }
.history-head { flex-wrap: wrap; gap: 10px; }
.compare-history-controls { display: flex; gap: 6px; }
.compare-history-controls button, .compare-playback button { border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; background: transparent; color: var(--muted); font-size: 11px; cursor: pointer; }
.compare-history-controls button[aria-pressed=true] { color: #c9b8f3; border-color: #9e86ee; }
.compare-hint { margin: 4px 0 10px; color: #b9a4e8; font-size: 11px; line-height: 1.7; }
.card.compare-picking { position: relative; cursor: crosshair; }
.card.compare-selected { outline: 2px solid #aa8cf3; outline-offset: -2px; }
.card.compare-selected::after { content: attr(data-compare-slot); position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: #7453bd; color: white; font-size: 13px; font-weight: 700; }
.comparison-dialog, .finish-dialog { width: min(1100px,calc(100% - 32px)); max-height: calc(100dvh - 40px); padding: 0; overflow: auto; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); color: var(--ink); }
.finish-dialog { width: min(520px,calc(100% - 32px)); }
.comparison-dialog::backdrop, .finish-dialog::backdrop { background: #03050bc9; backdrop-filter: blur(5px); }
.comparison-dialog h2, .finish-dialog h2 { margin: 0; font-size: 19px; }
.comparison-body { padding: 20px 24px; }
.compare-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.compare-columns h3 { margin: 0 0 12px; font-size: 14px; }
.compare-columns video { display: block; width: 100%; height: min(35vh,340px); background: #060913; border-radius: 12px; object-fit: contain; }
.compare-metadata { font-size: 11px; color: var(--muted); line-height: 1.7; }
.compare-playback { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; padding: 18px 0 12px; }
.compare-playback label { color: var(--muted); font-size: 12px; }
.compare-playback input[type=checkbox] { accent-color: #916ade; }
.compare-playback input[type=range] { flex: 1; min-width: 120px; accent-color: #916ade; }
.comparison-body details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
#compareConditions { margin-top: 14px; }
#compareConditions pre { margin: 0; padding: 12px; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; border-radius: 10px; background: #080c16; color: var(--muted); font: inherit; font-size: 12px; line-height: 1.8; }
#compareMessage, #finishMessage { color: var(--danger); font-size: 12px; }
.finish-dialog .settings-body > p { font-size: 12px; line-height: 1.8; color: var(--muted); }
@media (max-width: 700px) { .compare-columns { grid-template-columns: 1fr; } .comparison-body { padding: 18px; } }
@media (max-width: 600px) { #planFields { grid-template-columns: auto minmax(0,1fr); } }
.asset-presets { margin-bottom: 16px; padding: 0 12px; border: 1px solid #ffffff12; border-radius: 12px; background: #ffffff03; }
.asset-presets .creative-row { padding: 10px 0; font-size: 12px; }
.asset-presets select { max-width: 220px; min-width: 100px; border: 1px solid #ffffff18; background: #0b1020; color: var(--ink); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 12px; }
.asset-presets .preset-summary { margin: 0 0 12px; }
.options-selection { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; min-height: 28px; }
#selectedPromptOptions { display: flex; flex: 1; flex-wrap: wrap; gap: 7px; min-width: 0; }
.option-chip { display: inline-flex; padding: 5px 10px; border: 1px solid #9e86ee4d; border-radius: 8px; background: #8064dc12; color: #cdbff3; font-size: 11px; cursor: pointer; }
.option-chip:hover { border-color: #b4a0f1; background: #8064dc26; }
.options-empty { font-size: 11px; color: var(--faint); padding: 5px 0; }
#clearPromptOptions { flex-shrink: 0; border: 0; padding: 5px 0; background: transparent; color: var(--faint); font-size: 11px; cursor: pointer; }
#clearPromptOptions:hover { color: var(--ink); }
#sampleTabs button[data-selected]:not([data-selected="0"])::after { content: attr(data-selected); display: inline-grid; place-items: center; min-width: 15px; height: 15px; margin-left: 5px; border-radius: 5px; background: #8064dc45; color: #d6caff; font-size: 10px; }
.option-chip:focus-visible, #clearPromptOptions:focus-visible, .output-settings select:focus-visible, .asset-presets select:focus-visible { outline: 2px solid #8399ff; outline-offset: 3px; }
@media (max-width: 600px) {
  .creative-panel summary { flex-wrap: wrap; }
  .creative-row { flex-wrap: wrap; }
  .creative-panel select { max-width: 100%; }
  .creative-body { padding: 0 14px 14px; }
  .asset-presets .creative-row { flex-wrap: wrap; gap: 8px; }
  .asset-presets .creative-inline { width: 100%; }
  .asset-presets select { flex: 1; max-width: none; }
  .output-mode { width: 100%; }
  .output-mode select { flex: 1; }
}
@media (max-width: 600px) {
  .top-actions { gap: 12px; }
  .top { align-items: center; }
  .settings-header { padding: 20px; }
  .settings-body { padding: 20px; }
  .settings-footer { padding: 16px 20px; }
  .settings-row { gap: 12px; }
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
  font-weight: 400;
}

button, textarea { font: inherit; color: inherit; }

.shell {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 16px;
  align-items: start;
}

.controls { display: contents; }

.kind-top { grid-column: 1; grid-row: 1; min-width: 0; }
.control-main { grid-column: 1; grid-row: 2; min-width: 0; align-self: start; height: auto; }

.side {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  grid-column: 2;
  grid-row: 2;
  height: calc(100vh - 32px);
  max-height: calc(100vh - 32px);
}

.stage-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-wrap h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  margin: 0 4px 20px;
}

.mark {
  margin: 0;
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.35;
  padding: 2px 0 4px;
}

.tag {
  margin: 8px 0 0;
  color: var(--muted);
  letter-spacing: 0.08em;
  font-size: 13px;
}

.engine {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.engine.down { color: var(--danger); }
.engine.ok { color: #b9c8ff; }

.stage-frame {
  padding: 2px;
  border-radius: 24px;
  background: var(--grad);
}

.stage-frame.live {
  background: linear-gradient(115deg, #3b82f6 0%, #7c3aed 28%, #c026d3 50%, #3b82f6 72%, #7c3aed 100%);
  background-size: 280% 280%;
  animation: stageGlow 2.6s linear infinite;
}

@keyframes stageGlow {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-width: 0;
  border-radius: 22px;
  overflow: hidden;
  background: #243156;
  border: 0;
}

.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.stage-empty p {
  margin: 0;
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: #6e7c9e;
}

#player, #still {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0c0b0a;
}

.veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  background: rgba(8, 12, 24, 0.72);
}

.veil p {
  margin: 0;
  letter-spacing: 0.12em;
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
}

.veil .busy-thumbnail {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .24;
  filter: blur(2px) saturate(.75);
  pointer-events: none;
}
.veil > p, .veil > .meter { position: relative; z-index: 1; }
.veil > p { text-shadow: 0 2px 14px #070910; }

#progressFigure {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
}

#progressFigure .unit {
  font-size: 0.42em;
  font-weight: 800;
  margin-left: 0.08em;
}

.meter {
  width: min(360px, 86%);
  height: 10px;
  border-radius: 999px;
  background: rgba(238, 243, 255, 0.18);
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: 999px;
  background: var(--grad);
  animation: slide 1.4s ease-in-out infinite;
}

.meter.known span {
  animation: none;
}

@keyframes slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.stage-error {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  margin: 0;
  text-align: center;
  color: var(--danger);
  letter-spacing: 0.04em;
}

.stage-actions {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

#saveResult { margin-left: auto; }

.stage-actions button,
.pill,
.clear,
.menu button,
.strip button.card {
  background: rgba(20, 19, 17, 0.72);
  color: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.stage-actions button:hover,
.pill:hover,
.menu button:hover { border-color: rgba(243, 230, 200, 0.4); }

.frames-panel {
  margin-bottom: 16px;
  padding: 24px 24px 20px;
  background: #0b1020;
  border: 1px solid rgba(150, 176, 255, 0.28);
  border-radius: 22px;
}

.frames-head p {
  margin: 0;
}

.frames-head p:first-child {
  color: #f4f7ff;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.frames-head p:last-child {
  margin-top: 6px;
  margin-bottom: 12px;
  color: #9aa8c7;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.55;
}

.composer {
  margin-top: 0;
  padding: 24px 24px 20px;
  background: #0b1020;
  border: 1px solid rgba(150, 176, 255, 0.28);
  border-radius: 22px;
}

.prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.prompt-label {
  display: block;
  margin-bottom: 0;
  color: #f4f7ff;
  font-size: 22px;
  letter-spacing: 0.04em;
}

.auto-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #c5d2ef;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  cursor: pointer;
  user-select: none;
}

.auto-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.auto-switch .knob {
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: #1a2236;
  border: 1px solid rgba(150, 176, 255, 0.4);
  position: relative;
}

.auto-switch .knob::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #9aa8c7;
}

.auto-switch input:checked + .knob {
  background: var(--grad);
  border-color: transparent;
}

.auto-switch input:checked + .knob::after {
  transform: translateX(18px);
  background: #fff;
}

.auto-switch input:focus-visible + .knob {
  outline: 2px solid #c4b5fd;
  outline-offset: 2px;
}

.look-status {
  margin: 0 0 10px;
  color: #d8b4fe;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.ref-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.folder-pick {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.ref-strip {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  overflow-x: auto;
  --fade-left: 0px;
  --fade-right: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent 100%);
}

.ref-strip img {
  width: 54px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 auto;
}

textarea {
  width: 100%;
  resize: none;
  overflow: hidden;
  min-height: 0;
  height: 4.8em;
  border: 0;
  padding: 0 0 8px;
  background: transparent;
  font-size: 15px;
  line-height: 1.7;
  letter-spacing: 0.02em;
  outline: none;
}

textarea::placeholder { color: #b3a898; }

.samples {
  margin: 28px 0 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(150, 176, 255, 0.28);
}

.samples-head { margin-bottom: 12px; }

.samples-title {
  margin: 0;
  color: #f4f7ff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.samples-help {
  margin: 6px 0 0 !important;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em !important;
  line-height: 1.5;
}

.sample-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.sample-tabs button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  letter-spacing: 0.12em;
  font-size: 13px;
  cursor: pointer;
}

.sample-tabs button.on {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
}

.samples, .composer, .fields, .frames, .locks {
  min-width: 0;
  max-width: 100%;
}

.sample-row {
  display: flex;
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 8px;
  --fade-left: 0px;
  --fade-right: 0px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-left), #000 calc(100% - var(--fade-right)), transparent 100%);
}

.sample {
  flex: 0 0 176px;
  display: block;
  padding: 0 0 10px;
  text-align: left;
  color: inherit;
  background: #10141f;
  border: 1px solid rgba(150, 176, 255, 0.28);
  border-radius: 14px;
  cursor: pointer;
}

.sample[hidden] { display: none; }

.sample.on { border-color: #c4b5fd; }

.sample-stage {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 13px 13px 0 0;
  background:
    radial-gradient(ellipse at 50% 28%, rgba(124, 58, 237, 0.32), transparent 58%),
    linear-gradient(180deg, #1c2744 0%, #10141f 100%);
}

.sample-title {
  display: block;
  margin: 8px 10px 0;
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.sample-result {
  display: block;
  margin: 3px 10px 0;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.shot { width: 100%; height: 100%; display: block; color: #eef3ff; }
.shot path,
.shot line,
.shot circle,
.shot ellipse,
.shot rect {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.shot .head { fill: currentColor; stroke: none; }
.shot .foot { stroke-width: 2.8; }
.shot .fill { fill: currentColor; stroke: none; }
.shot .dim { opacity: 0.34; stroke-width: 1.6; }
.shot .bokeh { fill: currentColor; stroke: none; opacity: 0.16; }
.shot .finder { color: #b7c6ff; opacity: 0.95; stroke-width: 1.8; }

.shot-in .figure,
.shot-out .figure,
.shot-close .figure,
.shot-wide .figure {
  transform-box: view-box;
  transform-origin: 80px 78px;
}
.shot-in .figure { animation: grow 2.8s ease-in-out infinite alternate; }
.shot-out .figure { animation: shrink 2.8s ease-in-out infinite alternate; }
.shot-close .figure { transform-origin: 80px 48px; animation: push 3s ease-in-out infinite alternate; }
.shot-wide .figure { transform: scale(0.4); }
.shot-wide .sky { animation: breeze 6s linear infinite; }

.shot-truck .far { animation: slide-far 3.2s ease-in-out infinite alternate; }
.shot-truck .near { animation: slide-near 3.2s ease-in-out infinite alternate; }
.shot-pan .world { animation: pan 3.4s ease-in-out infinite alternate; }
.shot-tilt .world { animation: rise 3.2s ease-in-out infinite alternate; }
.shot-low .world,
.shot-hero .world { animation: lift 3.6s ease-in-out infinite alternate; }
.shot-orbit .cam {
  transform-box: view-box;
  transform-origin: 80px 50px;
  animation: spin 4.8s linear infinite;
}
.shot-hand .world {
  transform-box: view-box;
  transform-origin: 80px 45px;
  animation: wobble 0.72s linear infinite;
}
.shot-lock .figure { animation: walk 2.6s ease-in-out infinite alternate; }
.shot-follow .ticks { animation: rush 1.05s linear infinite; }
.shot-follow .figure {
  transform-box: view-box;
  transform-origin: 80px 78px;
  animation: bob 0.42s ease-in-out infinite;
}
.shot-top .grid { animation: drift 4.2s linear infinite; }
.shot-left .figure { animation: settle 2.8s ease-in-out infinite alternate; }
.shot-fg .bokeh,
.shot-bg .bokeh {
  transform-box: fill-box;
  transform-origin: center;
  animation: breathe 3s ease-in-out infinite alternate;
}
.shot-blink .eyes { transform-box: fill-box; transform-origin: center; animation: blink 2.8s infinite; }
.shot-talk .mouth { transform-box: fill-box; transform-origin: center; animation: talk 0.45s ease-in-out infinite; }
.shot-smile .mouth { transform-box: fill-box; transform-origin: center; animation: smile 2.4s ease-in-out infinite alternate; }
.shot-wave .arm { transform-box: view-box; transform-origin: 80px 42px; animation: wave 0.7s ease-in-out infinite alternate; }
.shot-walk .leg-a { animation: step 0.55s ease-in-out infinite alternate; }
.shot-walk .leg-b { animation: step 0.55s ease-in-out infinite alternate-reverse; }
.shot-run .figure { animation: run 0.32s linear infinite; }
.shot-nod .figure { transform-box: view-box; transform-origin: 80px 78px; animation: person-nod 1.3s ease-in-out infinite; }
.shot-turn .head { animation: turn 2.4s ease-in-out infinite alternate; }
.shot-crouch .figure { transform-box: view-box; transform-origin: 80px 78px; animation: crouch 2.2s ease-in-out infinite alternate; }
.shot-approach .figure { transform-box: view-box; transform-origin: 80px 78px; animation: approach 2.8s ease-in-out infinite alternate; }
.shot-leave .figure { transform-box: view-box; transform-origin: 80px 78px; animation: leave 2.8s ease-in-out infinite alternate; }

.shot-eye .nod {
  transform-box: view-box;
  transform-origin: 80px 78px;
  animation: nod 3.2s ease-in-out infinite alternate;
}

@keyframes grow { from { transform: scale(0.36); } to { transform: scale(1.08); } }
@keyframes shrink { from { transform: scale(1.12); } to { transform: scale(0.34); } }
@keyframes push { from { transform: scale(0.9); } to { transform: scale(1.1); } }
@keyframes breeze { to { transform: translate(-28px, 0); } }
@keyframes slide-far { from { transform: translate(12px, 0); } to { transform: translate(-12px, 0); } }
@keyframes slide-near { from { transform: translate(26px, 0); } to { transform: translate(-26px, 0); } }
@keyframes pan { from { transform: translate(28px, 0); } to { transform: translate(-28px, 0); } }
@keyframes rise { from { transform: translate(0, 18px); } to { transform: translate(0, -20px); } }
@keyframes lift { from { transform: translate(0, 3px); } to { transform: translate(0, -4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes wobble {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(1.6px, -1.1px) rotate(0.45deg); }
  50% { transform: translate(-1.4px, 0.8px) rotate(-0.35deg); }
  75% { transform: translate(1px, 1.2px) rotate(0.25deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}
@keyframes walk { from { transform: translate(-18px, 0); } to { transform: translate(18px, 0); } }
@keyframes rush { to { transform: translate(-20px, 0); } }
@keyframes bob {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(0, -2.5px); }
}
@keyframes drift { to { transform: translate(-16px, -16px); } }
@keyframes settle { from { transform: translate(-8px, 0); } to { transform: translate(-27px, 0); } }
@keyframes breathe { from { transform: scale(0.9); } to { transform: scale(1.12); } }
@keyframes nod { from { transform: translate(0, 1px); } to { transform: translate(0, -2px); } }
@keyframes blink { 0%, 42%, 100% { transform: scaleY(1); } 48%, 54% { transform: scaleY(0.08); } }
@keyframes talk { from { transform: scaleY(0.35); } to { transform: scaleY(1); } }
@keyframes smile { from { transform: scaleY(0.7); } to { transform: scaleY(1.15); } }
@keyframes wave { from { transform: rotate(18deg); } to { transform: rotate(-28deg); } }
@keyframes step { from { transform: translate(0, 0); } to { transform: translate(0, -6px); } }
@keyframes run { 0% { transform: translate(0, 0); } 50% { transform: translate(2px, -3px); } 100% { transform: translate(0, 0); } }
@keyframes person-nod { 0%, 100% { transform: rotate(0deg); } 40% { transform: rotate(8deg); } }
@keyframes turn { from { transform: translate(-6px, 0); } to { transform: translate(8px, 0); } }
@keyframes crouch { from { transform: scaleY(1); } to { transform: scaleY(0.72); } }
@keyframes approach { from { transform: scale(0.45); } to { transform: scale(1.05); } }
@keyframes leave { from { transform: scale(1.05); } to { transform: scale(0.4); } }

@media (prefers-reduced-motion: reduce) {
  .shot * { animation: none !important; }
  .shot-wide .figure { transform: scale(0.4); }
  .shot-left .figure { transform: translate(-27px, 0); }
  .stage-frame.live { animation: none; }
}

.kind-top { margin: 0; }

.fields {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  background: #080c18;
  border: 1px solid rgba(150, 176, 255, 0.2);
  border-radius: 16px;
}

.field {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 12px;
  align-items: start;
}

.field-label {
  padding-top: 8px;
  color: #f4f7ff;
  font-size: 15px;
  letter-spacing: 0.12em;
}

.segment { display: flex; flex-wrap: wrap; gap: 8px; }

.engines {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.segment button, .engine-card {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  border-radius: 12px;
  cursor: pointer;
}

.segment button {
  min-width: 64px;
  padding: 8px 12px;
  border-radius: 999px;
}

.segment button.on, .engine-card.on {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
}

.segment button:disabled {
  opacity: 0.4;
  cursor: default;
}

.engine-card {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  width: 100%;
  height: 100%;
  min-height: 118px;
  padding: 12px;
  text-align: left;
}

.engine-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.engine-art {
  flex: 0 0 84px;
  width: 84px;
  height: 64px;
  align-self: center;
  border-radius: 8px;
  overflow: hidden;
  background: #070910;
}

.engine-art img { display: block; width: 100%; height: 100%; object-fit: cover; }

.engine-card b { display: block; font-weight: 800; letter-spacing: 0.02em; font-size: 16px; }

.engine-card small {
  display: block;
  margin-top: 4px;
  color: rgba(238, 243, 255, 0.82);
  font-size: 12px;
  line-height: 1.45;
}

.engine-card small.wait {
  color: var(--faint);
  font-size: 11px;
}

.engine-card.on small { color: rgba(255, 255, 255, 0.82); }
.engine-card.on small.wait { color: rgba(255, 255, 255, 0.62); }
.engine-card:disabled { opacity: 0.55; cursor: default; }

.path-note {
  margin: 0;
  flex: 1;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.5;
}

.frames, .locks {
  display: grid;
  gap: 16px;
  align-items: start;
}

.frames {
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 16px;
  row-gap: 8px;
}
.frames > .frame { display: contents; }
#startWell, #startWell + small { grid-column: 1; }
#endWell, #endWell + small { grid-column: 3; }
#startWell, #endWell { grid-row: 1; }
#startWell + small, #endWell + small { grid-row: 2; margin-top: 0; }
.frames-panel.single .between,
.frames-panel.single .frames .frame:last-child { display: none; }
.frames-panel.single .frames { grid-template-columns: 1fr; }
.locks { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }

.locks-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 18px;
  padding: 2px 2px 0;
  border: 0;
  background: transparent;
  color: #c5d2ef;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  cursor: pointer;
}

.locks-toggle .chevron {
  width: 8px;
  height: 8px;
  margin-right: 4px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(2px) rotate(-135deg);
}

.locks-toggle[aria-expanded="false"] .chevron {
  transform: translateY(-2px) rotate(45deg);
}

.frame small, .between {
  display: block;
  margin-top: 8px;
  text-align: center;
  color: var(--faint);
  letter-spacing: 0.08em;
  font-size: 12px;
}

.between {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  justify-self: center;
  margin: 0;
  letter-spacing: 0;
  font-size: 14px;
  line-height: 1;
  color: #d5def6;
}

.well {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background: #0c1220;
  border: 1px dashed rgba(160, 186, 255, 0.38);
  overflow: hidden;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.well:focus-visible { outline: 1px solid var(--paper); }

.well.drop {
  border-style: solid;
  border-color: #d8b4fe;
  background: #1c2748;
}

.well-label {
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  color: rgba(219, 231, 255, 0.82);
  font-weight: 800;
}

.well img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.clear {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0 !important;
  border-radius: 50%;
  font-size: 0;
  line-height: 0;
}

.clear::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 10px;
  height: 10px;
  margin: auto;
  background:
    linear-gradient(currentColor, currentColor) center / 10px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 10px no-repeat;
  transform: rotate(45deg);
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.pills { display: flex; flex-wrap: wrap; gap: 8px; }

.pillwrap { position: relative; }

.pill[aria-pressed="true"] {
  background: rgba(243, 230, 200, 0.12);
  color: var(--paper);
}

.menu {
  position: absolute;
  left: 0;
  bottom: calc(100% + 8px);
  display: flex;
  gap: 4px;
  padding: 6px;
  background: #26221c;
  border: 1px solid var(--line);
  border-radius: 14px;
  z-index: 2;
}

.menu button[aria-checked="true"] {
  background: var(--paper);
  color: #1c1814;
  border-color: transparent;
}

.go {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 60;
  border: 0;
  background: var(--grad);
  color: #fff;
  border-radius: 999px;
  padding: 18px 42px;
  letter-spacing: 0.14em;
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Sans", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(8, 10, 24, 0.45);
}

.go:disabled { opacity: 0.45; cursor: default; }
.go.stop {
  background: transparent;
  color: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.go-cost {
  display: inline-flex;
  align-items: center;
  margin-left: 10px;
  font-size: 15px;
  font-weight: 700;
  color: #f0e6c8;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.go-cost[hidden] { display: none !important; }
.production-main .composer .bar .go-cost {
  position: static;
  margin: 0;
}

.form-error {
  position: fixed;
  right: 28px;
  bottom: 104px;
  z-index: 60;
  margin: 0;
  max-width: min(320px, calc(100vw - 56px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #241018;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.5;
  box-shadow: 0 12px 28px rgba(8, 10, 24, 0.45);
}

.history {
  margin: 0;
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  border-radius: 22px;
  background: #0b1020;
  border: 0;
  overflow: hidden;
  max-height: min(420px, 52vh);
}
.history .strip {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
}
.history-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #ffffff12;
  flex: 0 0 auto;
}
.history-more[hidden] { display: none !important; }
.history-more-note {
  margin: 0;
  font-size: 11px;
  color: var(--muted, #a9b7d0);
}
.history-more-link {
  font-size: 12px;
  color: #c5d2ef;
  text-decoration: none;
  border: 1px solid #6f8fd055;
  border-radius: 999px;
  padding: 6px 11px;
  background: #121a28;
}
.history-more-link:hover {
  border-color: #9eb0d8;
  color: #eef3ff;
  background: #1a2436;
}

.history h2, .prompt-label, .frames-head p:first-child, .field-label {
  font-weight: 900;
}

.history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.history h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.history-view { display: flex; gap: 6px; }

.history-view button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}

.history-view button.on {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
}

.camera-grid {
  display: grid;
  gap: 8px;
  flex: 1;
}

.camera-grid label {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.camera-read, .clip-row p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.draft-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
}

.draft-row .segment { flex: 0 0 auto; }

#draft {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

#draft:disabled { opacity: 0.55; cursor: default; }

.writer-note {
  margin: 0;
  flex: 1 1 220px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.file-pick {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.clip-row { margin-top: 16px; }

input[type="range"] { width: 100%; accent-color: #7c3aed; }

.strip {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding-right: 4px;
  --fade-top: 0px;
  --fade-bottom: 0px;
  --fade-clear: 0px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent calc(100% - var(--fade-clear)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--fade-top), #000 calc(100% - var(--fade-bottom)), transparent calc(100% - var(--fade-clear)), transparent 100%);
}

.strip,
.sample-row,
.ref-strip,
.history-tip {
  scrollbar-width: thin;
  scrollbar-color: #7c3aed transparent;
}

.strip::-webkit-scrollbar,
.sample-row::-webkit-scrollbar,
.ref-strip::-webkit-scrollbar,
.history-tip::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.strip::-webkit-scrollbar-thumb,
.sample-row::-webkit-scrollbar-thumb,
.ref-strip::-webkit-scrollbar-thumb,
.history-tip::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, #3b82f6, #c026d3);
}

.strip::-webkit-scrollbar-track,
.sample-row::-webkit-scrollbar-track,
.ref-strip::-webkit-scrollbar-track,
.history-tip::-webkit-scrollbar-track {
  background: transparent;
}

.strip .empty {
  color: var(--faint);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.card {
  width: 100%;
  flex: 0 0 auto;
  text-align: left;
  border-radius: 14px !important;
  padding: 0 !important;
  overflow: hidden;
  background: #1a1815 !important;
}

.history.thumbs .strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 12px;
}

.history.thumbs .card {
  position: relative;
  width: auto;
  min-width: 0;
  height: 0;
  align-self: start;
  padding: 0 0 56.25% !important;
  aspect-ratio: auto;
}

.history.list .card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  align-items: center;
  min-height: 88px;
  border: 0;
  background: transparent !important;
  box-shadow: none;
}

.card .thumb {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #100e0c center / cover no-repeat;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.history.thumbs .card .thumb {
  position: absolute;
  inset: 0;
}

.history.list .card .thumb {
  width: 120px;
  height: 68px;
}

.card .thumb video, .card .thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.when {
  font-size: 11px;
  line-height: 1.3;
  color: #9eb0d4;
  letter-spacing: 0.03em;
}

.history.thumbs .copy {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.history.thumbs .when {
  position: absolute;
  left: 8px;
  bottom: 6px;
  z-index: 2;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(7, 9, 16, 0.78);
  color: #eef3ff;
}

.history.thumbs .bubble { display: none; }

.history.list .copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.history.list .when {
  padding: 8px 12px 0;
}

.history.list .bubble {
  min-width: 0;
  max-height: calc(1.5em * 3 + 16px);
  overflow: hidden;
  margin: 0;
  padding: 8px 12px;
  color: #d5def6;
  font-size: 13px;
  line-height: 1.5;
  line-break: strict;
}

.history-tip {
  position: fixed;
  z-index: 40;
  width: min(340px, calc(100vw - 24px));
  height: auto;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: #161d33;
  border: 1px solid rgba(158, 182, 255, 0.5);
  color: #eef3ff;
  font-size: 14px;
  line-height: 1.7;
  line-break: strict;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .kind-top, .control-main, .side { grid-column: 1; grid-row: auto; }
  .side { position: static; height: auto; max-height: none; }
  .stage { height: auto; aspect-ratio: 16 / 9; }
  .history { flex: none; height: min(520px, 70vh); }
  .frames { grid-template-columns: 1fr; grid-template-rows: none; }
  #startWell, #endWell, #startWell + small, #endWell + small { grid-column: 1; grid-row: auto; }
  .between { display: none; }
  .field { grid-template-columns: 1fr; gap: 6px; }
  .bar { align-items: stretch; flex-direction: column; }
  .engines { grid-template-columns: 1fr; }
  .go { width: auto; }
  .stage-empty p { font-size: 15px; }
}
.production-actions{display:flex;align-items:center;gap:8px;min-width:0}.production-actions>span{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#aebbd5;font-size:12px}.production-actions button{border:1px solid #34405d;border-radius:9px;background:#11182b;color:#e6ecff;padding:7px 12px;cursor:pointer}.production-dialog input{display:block;width:100%;margin-top:8px}.production-row{display:flex;gap:8px;margin-bottom:10px}.production-row button:first-child{flex:1;text-align:left;overflow-wrap:anywhere}.production-row button{border:1px solid #34405d;border-radius:9px;background:#11182b;color:#e6ecff;padding:10px;cursor:pointer}@media(max-width:700px){.production-actions>span{display:none}.top-actions{flex-wrap:wrap}}
.profile-control{position:relative;display:flex;align-items:center;gap:5px;min-width:0}.profile-control button{font:inherit;color:#dce6ff;border:1px solid #303d59;background:#0d1527;border-radius:9px;cursor:pointer}.profile-control button:hover{background:#1a2540;border-color:#566c99}.profile-control button:disabled{opacity:.45;cursor:default}#profileToggle{display:flex;align-items:center;gap:10px;padding:8px 11px;min-width:140px;max-width:300px;font-size:12px}#profileName{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;text-align:left}#profileDirty{font-size:10px;color:#dfbd80;white-space:nowrap}#profileSave{display:grid;place-items:center;width:35px;height:35px}#profileMenu{position:absolute;z-index:80;right:0;top:calc(100% + 9px);width:300px;max-width:calc(100vw - 30px);padding:10px;background:#101729;border:1px solid #34415e;border-radius:13px;box-shadow:0 15px 45px #0009}.profile-menu-heading{font-size:11px;color:#91a3c4;padding:2px 8px 9px;margin:0}#profileList{max-height:270px;overflow:auto}#profileMenu button{display:block;width:100%;border:0;border-radius:7px;text-align:left;padding:9px 10px;font-size:12px;background:transparent;overflow-wrap:anywhere}#profileMenu button:hover{background:#222e49}#profileMenu .profile-option[aria-pressed=true]{background:#253250;color:#fff}#profileMenu .profile-option[aria-pressed=true]:before{content:'✓ ';color:#a99bff}.profile-menu-actions{border-top:1px solid #29354d;margin-top:7px;padding-top:7px}#profileMenu #profileDelete{color:#f1a4ac}#profileStatus{font-size:11px;color:#aebbd5;margin:6px 8px;line-height:1.6}.profile-dialog input{display:block;width:100%;margin-top:8px}@media(max-width:700px){#profileToggle{min-width:100px;max-width:190px}.top-actions{flex-wrap:wrap}}
.stage-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px}.stage-heading h2{margin:0}.generation-time{color:#92a0ba;font-size:11px;font-weight:400;white-space:nowrap;font-variant-numeric:tabular-nums;letter-spacing:.03em}
.veil .busy-status{position:relative;z-index:1;text-align:center;text-shadow:0 2px 14px #070910}.veil .phase-detail{font-size:11px;color:#acb9d3;letter-spacing:.02em;margin-top:5px;line-height:1.5}.phase-trail{position:relative;z-index:1;display:flex;align-items:center;gap:0;list-style:none;margin:0;padding:0;font-size:10px;line-height:1.6;letter-spacing:.02em;color:#8290aa}.phase-trail li{white-space:nowrap;display:flex;align-items:center}.phase-trail li+li:before{content:'›';color:#627089;margin:0 8px}.phase-trail .phase-current{color:#f2efff;font-weight:600}.phase-trail .phase-current span{border-bottom:1px solid #a792ff;padding-bottom:2px}.phase-trail .phase-complete{color:#bac6db}

/* Two-column choices beside one selected-model detail panel. */
.model-browser { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(210px,1fr); align-items:start; gap:12px; min-width:0; }
.model-browser .engines { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.model-browser .engine-card { display:flex; align-items:center; flex-wrap:wrap; justify-content:flex-start; gap:6px; min-height:68px; height:100%; padding:10px; border-radius:11px; }
.model-browser .engine-copy { display:contents; }
.model-browser .engine-card .engine-copy b { display:inline; font-size:12px; line-height:1.4; letter-spacing:0; }
.model-browser .engine-art { order:-1; flex:0 0 25px; width:25px; height:31px; border-radius:5px; align-self:center; }
.model-browser .engine-description, .model-browser .engine-purpose, .model-browser .engine-capability, .model-browser .engine-timing-source { display:none; }
.model-browser .engine-timing { color:#aebfdd; font-size:10px; font-weight:400; line-height:1.4; white-space:nowrap; }
.model-browser .engine-card.on .engine-timing { color:#ffffffd9; }
.model-browser .engine-card .wait { flex-basis:100%; margin:0; font-size:10px; }
.engine-detail { min-width:0; padding:10px; border:1px solid var(--line); border-radius:12px; background:#0b1020; }
.engine-detail-image { display:block; width:100%; aspect-ratio:16/9; max-height:142px; object-fit:cover; border-radius:8px; }
.engine-detail h3 { margin:10px 0 7px; font-size:15px; line-height:1.4; }
.engine-detail-description { margin:0; color:#c8d3e9; font-size:11px; line-height:1.75; white-space:pre-line; overflow-wrap:anywhere; }
.engine-detail-time { margin-top:11px; padding-top:9px; border-top:1px solid #ffffff15; display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.engine-detail-time span { color:var(--faint); font-size:10px; }
.engine-detail-time strong { font-size:14px; color:#d9cfff; font-variant-numeric:tabular-nums; }
.engine-detail-source { margin:5px 0 0; color:var(--faint); font-size:9px; line-height:1.5; }
.engine-timing-note { margin:8px 0 0; color:var(--faint); font-size:10px; line-height:1.5; }
.engine-tooltip { position:fixed; z-index:1000; width:285px; max-width:calc(100vw - 20px); padding:12px 14px; border:1px solid #536080; border-radius:10px; background:#172139; color:#edf2ff; box-shadow:0 9px 30px #0007; font-size:12px; font-weight:400; line-height:1.85; white-space:pre-line; pointer-events:none; }
@media(max-width:600px) { .model-browser { grid-template-columns:minmax(0,1.25fr) minmax(150px,1fr); gap:8px; } .model-browser .engine-card { padding:8px; min-height:65px; gap:4px; } .model-browser .engine-art { display:none; } .model-browser .engine-copy b { font-size:11px; } }
@media(max-width:420px) { .model-browser { grid-template-columns:1fr; } .engine-detail { display:grid; grid-template-columns:100px minmax(0,1fr); gap:6px 10px; } .engine-detail-image { grid-row:1/4; aspect-ratio:1; } .engine-detail h3 { margin:0; } .engine-detail-description { grid-column:2; } .engine-detail-time, .engine-detail-source { grid-column:1/-1; } }

/* Keep all summary metadata; only the long description belongs in the tooltip. */
.model-browser .engine-card { display:grid; grid-template-columns:60px minmax(0,1fr); grid-template-rows:auto auto auto; align-content:center; align-items:center; gap:5px 9px; min-height:114px; padding:10px; }
.model-browser .engine-title { grid-column:1 / -1; grid-row:1; display:flex; align-items:baseline; flex-wrap:wrap; gap:4px 7px; min-width:0; }
.model-browser .engine-card .engine-title b { font-size:16px; line-height:1.3; font-weight:800; letter-spacing:0; }
.model-browser .engine-title .engine-timing { font-size:10px; }
.model-browser .engine-art { display:block; grid-column:1; grid-row:2 / 4; width:60px; height:56px; order:initial; align-self:center; border-radius:7px; }
.model-browser .engine-purpose { display:block; grid-column:2; grid-row:2; margin:0; color:#b7a5ed; font-size:10px; line-height:1.5; font-weight:500; }
.model-browser .engine-capability { display:block; grid-column:2; grid-row:3; margin:0; color:var(--faint); font-size:10px; line-height:1.5; }
.model-browser .engine-card.on .engine-purpose, .model-browser .engine-card.on .engine-capability { color:#ffffffba; }
.model-browser .engine-card .wait { grid-column:1 / -1; grid-row:4; }
.engine-detail-image { max-height:180px; }
.engine-detail h3 { font-size:17px; }
.field > .engine-timing-note { grid-column:2; width:100%; }
@media(max-width:830px) { .field > .engine-timing-note { grid-column:1 / -1; } }
@media(max-width:600px) { .model-browser { grid-template-columns:1fr; } .model-browser .engine-card { min-height:112px; } .model-browser .engine-card .engine-title b { font-size:15px; } .engine-detail { display:block; } .engine-detail-image { aspect-ratio:16/9; } }

.model-browser .engine-card > .engine-timing-source { display:block; grid-column:1 / -1; grid-row:4; text-align:right; font-size:9px; line-height:1.3; color:var(--faint); }
.model-browser .engine-card > .engine-timing-source:empty { display:none; }
.model-browser .engine-card.on > .engine-timing-source { color:#ffffffa8; }

/* Fixed model-card tracks keep thumbnails, titles and metadata aligned. */
.model-browser .engine-card { height:124px; min-height:124px; grid-template-rows:24px 30px 30px; align-content:start; align-items:start; gap:6px 9px; padding:10px; }
.model-browser .engine-title { min-height:24px; align-items:baseline; flex-wrap:wrap; gap:6px; width:100%; }
.model-browser .engine-title .studio-model-credits{flex-shrink:0;font-size:12px;color:#d7dbe6}
.model-browser .engine-title .engine-timing { margin-left:auto; text-align:right; flex-shrink:0; }
.model-browser .engine-art { height:60px; align-self:start; }
.model-browser .engine-purpose, .model-browser .engine-capability { line-height:15px; height:30px; min-width:0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.model-browser .engine-card > .engine-timing-source { display:none; }
.model-browser .engine-card .wait { grid-row:3; grid-column:2; font-size:9px; }
@media(max-width:600px) { .model-browser .engine-card { height:124px; min-height:124px; } }

/* Detail reads as an information column rather than another selectable card. */
.model-browser { align-items:stretch; }
.model-browser .engines { align-self:stretch; align-content:start; }
.model-browser .engine-detail { display:flex; flex-direction:column; align-self:stretch; padding:0 0 0 15px; border:0; border-left:1px solid #34405a; border-radius:0; background:transparent; box-shadow:none; }
.engine-detail-heading { margin:0 0 10px; color:#9ba9c6; font-size:11px; font-weight:600; line-height:20px; letter-spacing:.06em; }
.engine-detail-heading::before { content:'i'; display:inline-grid; place-items:center; width:14px; height:14px; margin-right:6px; border:1px solid #62718e; border-radius:50%; font-size:10px; font-weight:500; font-style:normal; letter-spacing:0; }
.model-browser .engine-detail-description { margin-bottom:14px; }
.model-browser .engine-detail-time { margin-top:auto; padding-top:12px; }
.model-browser .engine-detail-source:last-child { margin-bottom:0; }
@media(max-width:600px) { .model-browser .engine-detail { padding:12px 0 0; border-left:0; border-top:1px solid #34405a; } .model-browser .engine-detail-time { margin-top:8px; } }

/* Shared sliding selectors: one track and one moving selection. */
.slide-segment { position:relative; isolation:isolate; display:inline-flex; flex-wrap:nowrap; gap:0; padding:4px; border:1px solid #2b3754; border-radius:14px; background:#080d19; touch-action:pan-y; max-width:100%; }
.slide-segment::before { content:""; position:absolute; z-index:-1; left:var(--slide-left,4px); top:var(--slide-top,4px); height:34px; width:var(--slide-width,50px); border-radius:10px; background:linear-gradient(110deg,#427bff,#a42be5); transition:left .18s ease,width .18s ease; pointer-events:none; }
.slide-segment button,.slide-segment button.on { min-width:48px; min-height:34px; margin:0; padding:7px 13px; border:0; border-radius:10px; background:transparent; box-shadow:none; font-size:13px; white-space:nowrap; }
.slide-segment button:not(.on) { color:#aebbd3; }
.slide-segment button:focus-visible { outline:2px solid #d6caff; outline-offset:-2px; }
.resolution-options { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
#resolutionHint { color:#8d9cb9; font-size:11px; }
.aspect-options { display:flex; align-items:center; justify-content:flex-start; gap:clamp(28px,4vw,56px); padding-right:24px; min-width:0; flex:1; }
#aspectSegment { flex-wrap:wrap; }
#aspectSegment button { min-width:42px; padding:7px 8px; font-size:12px; }
#aspectPreview { width:140px; height:122px; flex:0 0 140px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; }
#aspectShape { display:block; border:1px solid #9b8cfa; background:linear-gradient(140deg,#3e72ec26,#a637da26); border-radius:3px; transition:width .18s,height .18s; }
#aspectRead { font-size:11px; color:#a9b8d5; }
@media(max-width:750px) { .aspect-options{align-items:center;gap:20px;padding-right:8px;} #aspectSegment{display:grid;grid-template-columns:repeat(5,1fr);} .slide-segment::before{height:34px;bottom:auto;top:var(--slide-top,4px);} #aspectPreview{width:104px;flex-basis:104px;} }
@media(prefers-reduced-motion:reduce){.slide-segment::before,#aspectShape{transition:none;}}

.fields .field .slide-segment { flex:0 1 auto; width:max-content; }

.aspect-picker { min-width:0; flex:0 1 auto; }
.aspect-directions { display:flex; justify-content:space-between; color:#8899b9; font-size:10px; padding:0 10px 5px; }
.fields .field #aspectSegment { display:flex; flex-wrap:nowrap; width:max-content; max-width:100%; overflow-x:auto; scrollbar-width:thin; }
#aspectSegment button { flex:0 0 40px; min-width:40px; padding:7px 3px; font-size:11px; }

.finish-options { min-width:0; }
.finish-toggles { display:flex; align-items:center; gap:22px; min-height:34px; }
.finish-options .creative-hint { margin:6px 0 0; font-size:11px; line-height:1.6; }

#videoType { min-width:180px; width:max-content; max-width:100%; padding:9px 32px 9px 12px; border:1px solid #2b3754; border-radius:10px; background:#080d19; color:#e6edff; }

/* Motion indicates a pending operation; numeric progress stays measured. */
.meter span { position:relative; overflow:hidden; transition:width .4s ease; }
.meter.known span::after { content:""; position:absolute; inset:0; background:linear-gradient(105deg,transparent 25%,#ffffff80 50%,transparent 75%); transform:translateX(-100%); animation:progress-sheen 1.8s linear infinite; }
@keyframes progress-sheen { to { transform:translateX(100%); } }
.veil .activity-note { display:flex; align-items:center; justify-content:center; gap:9px; margin:0; color:#aebcda; font-size:11px; line-height:1.5; letter-spacing:.02em; }
.activity-dots { display:inline-flex; gap:4px; flex-shrink:0; }
.activity-dots i { width:4px; height:4px; border-radius:50%; background:#b7a0ff; animation:activity-pulse 1.2s ease-in-out infinite; }
.activity-dots i:nth-child(2) { animation-delay:.16s; }
.activity-dots i:nth-child(3) { animation-delay:.32s; }
@keyframes activity-pulse { 0%,75%,100% {opacity:.3;transform:translateY(0);} 35% {opacity:1;transform:translateY(-2px);} }
.veil.reconnecting .meter span,.veil.reconnecting .meter span::after,.veil.reconnecting .activity-dots i { animation-play-state:paused; }
@media(prefers-reduced-motion:reduce) { .meter span,.meter.known span::after,.activity-dots i {animation:none;transition:none;} }

/* Leave the native player control strip unobstructed. */
.result-popup-trigger { position:absolute; inset:0 0 58px; z-index:2; width:100%; border:0; border-radius:0; background:transparent; padding:0; cursor:zoom-in; }
.result-popup-trigger:hover { background:transparent; }
.result-popup-trigger:focus-visible { outline:2px solid #b494ff; outline-offset:-5px; }
.result-viewer { width:min(1200px,94vw); max-width:94vw; max-height:94vh; padding:0; overflow:hidden; border:1px solid #3a4665; border-radius:16px; background:#080c16; color:#edf2ff; box-shadow:0 24px 90px #0009; }
.result-viewer::backdrop { background:#030610d9; }
.result-viewer header { display:flex; justify-content:space-between; align-items:center; padding:10px 16px; font-size:13px; }
.viewer-close { width:34px; height:34px; border:0; border-radius:8px; background:#ffffff0b; color:inherit; font-size:24px; cursor:pointer; }
.result-viewer video { display:block; width:100%; height:auto; max-height:calc(94vh - 54px); object-fit:contain; background:#000; }

/* Original ratio is separate from the fixed-ratio scale. */
.aspect-options { flex-direction:column; align-items:stretch; gap:8px; padding-right:0; }
.aspect-topline { display:flex; align-items:center; justify-content:space-between; min-height:110px; padding-right:24px; }
.aspect-guide { color:#8c9cbc; font-size:11px; }
#aspectPreview { height:110px; flex-basis:140px; }
.aspect-picker { width:100%; }
#aspectSegment button[data-value="original"] { position:relative; flex-basis:88px; min-width:88px; margin-right:14px; font-size:12px; }
#aspectSegment button[data-value="original"]::after { content:""; position:absolute; right:-8px; top:6px; bottom:6px; width:1px; background:#4b5670; pointer-events:none; }
@media(max-width:750px){.aspect-options{gap:8px;padding-right:0;} .aspect-topline{padding-right:12px;} }

.negative-settings{margin:12px 0;color:#b2c0db;font-size:12px;} .negative-settings summary{cursor:pointer;} .negative-settings textarea{display:block;min-height:70px;margin:10px 0 6px;padding:10px;border:1px solid #2b3754;border-radius:10px;background:#080d19;font-size:13px;} .negative-settings small{color:#899ab8;line-height:1.6;}

.engine-capabilities { padding-left:17px; margin:10px 0 14px; color:#b9c9e4; font-size:12px; line-height:1.75; }
.engine-detail-warning { color:#d7b480; font-size:11px; line-height:1.65; margin:0 0 12px; }
.stage-actions { flex-wrap:wrap; }
/* Ratio preview belongs to its own field, independent of model-panel height. */
.fields #aspectPreview{position:static;inset:auto;align-self:center}
