:root {
  --bg: #101832;
  --panel: rgba(255,255,255,0.08);
  --panel-strong: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.18);
  --text: #ffffff;
  --muted: #aeb7d0;
  --accent: #f5b942;
  --accent-2: #ff7d6b;
  --ok: #38d39f;
  --danger: #f87171;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(900px 520px at 10% 0%, rgba(139,92,246,0.22), transparent 65%),
    radial-gradient(700px 460px at 100% 0%, rgba(245,185,66,0.18), transparent 60%),
    linear-gradient(180deg, #111936 0%, #162044 100%);
}
button, input, select, textarea { font: inherit; }
.video-app {
  width: min(1500px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 34px 0 70px;
}
.hero {
  padding: 24px 0 18px;
}
.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: #ffd98a;
  text-decoration: none;
  font-weight: 800;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 900;
  letter-spacing: 4px;
  font-size: 13px;
}
h1, h2 {
  margin: 0;
  line-height: 1.15;
}
h1 { font-size: clamp(38px, 5vw, 68px); }
h2 { font-size: 28px; }
.hero p:last-child {
  max-width: 900px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}
.panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.06));
  box-shadow: 0 14px 42px rgba(0,0,0,0.22);
  padding: 22px;
  margin: 18px 0;
}
.workflow-tabs {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 8px 0 18px;
  flex-wrap: wrap;
}
.workflow-tab {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  padding: 12px 20px;
  cursor: pointer;
  font-weight: 900;
}
.workflow-tab > span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 11px;
}
.workflow-tab.active {
  border-color: rgba(245,185,66,0.85);
  color: #151826;
  background: linear-gradient(135deg, #ffd76a, #ff8c6a);
  box-shadow: 0 10px 24px rgba(245,185,66,0.18);
}
.soft-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.08);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}
.storyboard-generator {
  display: grid;
  gap: 20px;
  border-color: rgba(245,185,66,.3);
  background:
    radial-gradient(720px 320px at 0 0, rgba(245,185,66,.13), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,.11), rgba(255,255,255,.055));
}
.generator-intro,
.generator-plan-head,
.generator-selection-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.generator-intro > div:first-child { max-width: 850px; }
.generator-intro h2 { margin-bottom: 8px; }
.generator-intro p:last-child,
.generator-plan-head p:last-child { margin: 0; color: var(--muted); line-height: 1.6; }
.generator-flow { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.generator-flow b { padding: 8px 10px; border: 1px solid rgba(245,185,66,.28); border-radius: 999px; color: #ffe3a5; background: rgba(245,185,66,.08); font-size: 11px; }
.generator-flow i { color: rgba(255,255,255,.38); font-style: normal; }
.generator-source-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); gap: 16px; align-items: stretch; }
.generator-source-field,
.generator-settings { display: grid; gap: 10px; min-width: 0; }
.generator-source-field { position: relative; }
.generator-source-field textarea { min-height: 390px; resize: vertical; }
.generator-source-field > small { position: absolute; right: 12px; bottom: 10px; color: var(--muted); font-size: 10px; }
.generator-settings { align-content: start; padding: 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; background: rgba(3,7,20,.22); }
.generator-style-picker { display: grid; gap: 10px; }
.generator-style-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.generator-style-heading > span,
.generator-style-custom > span { color: var(--text); font-weight: 850; }
.generator-style-heading small { color: var(--muted); font-size: 10px; font-weight: 700; text-align: right; }
.generator-style-presets { display: flex; flex-wrap: wrap; gap: 7px; }
.generator-style-presets button {
  appearance: none;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(8,13,35,.56);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background .18s ease, transform .18s ease;
}
.generator-style-presets button:hover { color: var(--text); border-color: rgba(255,194,85,.58); transform: translateY(-1px); }
.generator-style-presets button.active { color: #1b1730; border-color: transparent; background: linear-gradient(135deg,#ffc14d,#ff8174); box-shadow: 0 8px 18px rgba(255,145,87,.2); }
.generator-style-custom { display: grid; gap: 6px; }
.generator-auto-characters { display: flex !important; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid rgba(111,222,209,.22); border-radius: 10px; background: rgba(45,180,169,.08); cursor: pointer; }
.generator-auto-characters input { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--accent); }
.generator-auto-characters > span { display: grid; gap: 2px; }
.generator-auto-characters b { color: #aef6e6; font-size: 11px; }
.generator-auto-characters small { color: var(--muted); font-size: 9px; font-weight: 700; }
.generator-setting-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.generator-settings label,
.generator-source-field { color: #f3f5ff; font-size: 12px; font-weight: 850; }
.generator-settings label { display: grid; gap: 6px; }
.generator-plan-btn { width: 100%; min-height: 48px; }
.generator-plan-btn.is-replan { border: 1px solid rgba(255,255,255,.18); color: #c3cce0; background: rgba(255,255,255,.055); box-shadow: none; font-size: 11px; }
.generator-plan-btn.is-replan:hover { color: #fff; border-color: rgba(255,194,85,.42); background: rgba(255,194,85,.08); }
.generator-status { min-height: 20px; margin: 0; color: #ffd98a; font-size: 11px; font-weight: 800; line-height: 1.45; }
.generator-plan { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.11); }
.generator-plan-head { align-items: center; }
.generator-plan-head h3 { margin: 0 0 6px; font-size: 22px; }
.generator-plan-actions { display: grid; justify-items: end; gap: 7px; min-width: 250px; }
.generator-next-btn { min-width: 250px; min-height: 52px; border-radius: 13px; font-size: 14px; }
.generator-reset-link { appearance: none; border: 0; padding: 4px 6px; color: #919bb5; background: transparent; font-size: 10px; font-weight: 800; cursor: pointer; }
.generator-reset-link:hover { color: #fff; text-decoration: underline; }
.generator-plan-actions .generator-select-btn {
  color: #99f6e4;
  border-color: rgba(94, 234, 212, 0.42);
  background: rgba(20, 184, 166, 0.13);
}
.generator-plan-actions .generator-clear-select-btn {
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.3);
  background: rgba(148, 163, 184, 0.08);
}
.generator-plan-actions .generator-upgrade-btn { color: #251605; background: linear-gradient(135deg,#ffd166,#ff8b69); box-shadow: 0 8px 20px rgba(255,145,87,.2); }
.generator-steps { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; background: rgba(5,9,24,.28); }
.generator-steps > i { color: rgba(255,255,255,.25); font-style: normal; font-weight: 900; }
.generator-step { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; border-radius: 9px; color: #7f8aa6; font-size: 11px; font-weight: 900; }
.generator-step b { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid currentColor; border-radius: 50%; font-size: 10px; }
.generator-step.is-active { color: #211806; background: linear-gradient(135deg,#ffd166,#ff9a70); box-shadow: 0 7px 18px rgba(255,145,87,.16); }
.generator-step.is-done { color: #8ff0c8; background: rgba(56,211,159,.09); }
.generator-step.is-done b::after { content: '✓'; }
.generator-step.is-done b { font-size: 0; }
.generator-characters { display: grid; gap: 10px; padding: 13px; border: 1px solid rgba(255,194,85,.28); border-radius: 12px; background: linear-gradient(135deg,rgba(255,194,85,.07),rgba(255,125,111,.04)); }
.generator-characters-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.generator-characters-head > div { display: grid; gap: 3px; }
.generator-characters-head strong { color: #ffe4a7; font-size: 15px; }
.generator-characters-head small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.generator-characters-head .generator-character-actions { display: flex; grid-auto-flow: column; gap: 8px; }
.generator-skip-characters-btn { border-color: rgba(255, 190, 92, .55); color: #ffe0a2; }
.generator-skip-note { margin: -2px 0 0; color: var(--muted); font-size: 10px; }
.generator-characters.is-skipping-characters { border-color: rgba(255, 190, 92, .55); }
.generator-character-status { margin: 0; color: #8ff0c8; font-size: 10px; font-weight: 800; }
.generator-character-list { display: grid; gap: 10px; }
.generator-character-card { display: grid; grid-template-columns: minmax(210px,.54fr) minmax(0,1.46fr); gap: 12px; padding: 11px; border: 1px solid rgba(255,255,255,.11); border-radius: 11px; background: rgba(4,8,23,.32); }
.generator-character-copy { display: grid; gap: 8px; align-content: start; }
.generator-character-copy > div { display: flex; align-items: center; gap: 8px; }
.generator-character-copy strong { color: var(--text); font-size: 15px; }
.generator-character-copy span { padding: 3px 7px; border-radius: 999px; color: #b9c4de; background: rgba(255,255,255,.08); font-size: 9px; font-weight: 800; }
.generator-character-copy textarea { min-height: 104px; resize: vertical; }
.generator-character-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.generator-provider-label { display: block; padding: 6px 8px; border-radius: 7px; color: #dce9ff; background: rgba(71,111,214,.18); font-size: 10px; text-align: center; }
.generator-provider-label.is-minimax { color: #ffe0bd; background: rgba(249,115,22,.16); }
.generator-character-option { display: grid; gap: 6px; min-width: 0; padding: 6px; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: var(--muted); background: rgba(6,10,28,.48); cursor: pointer; }
.generator-character-option:disabled { cursor: default; opacity: .72; }
.generator-character-option.ready:hover { border-color: rgba(255,194,85,.58); }
.generator-character-option.selected { border-color: #63e2ba; box-shadow: 0 0 0 2px rgba(99,226,186,.13); background: rgba(50,184,145,.1); }
.generator-character-image { display: grid; place-items: center; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 7px; background: rgba(0,0,0,.25); }
.generator-character-image img { width: 100%; height: 100%; object-fit: cover; }
.generator-character-image i { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; color: #ffe1a2; font-style: normal; font-size: 13px; font-weight: 900; }
.generator-character-option small { min-height: 16px; font-size: 9px; font-weight: 800; text-align: center; }
.generator-character-option em { display: block; min-height: 13px; overflow: hidden; color: rgba(190,200,224,.62); font-size: 8px; font-style: normal; font-weight: 700; line-height: 1.35; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.generator-selection-summary { padding: 10px 12px; border: 1px solid rgba(56,211,159,.2); border-radius: 9px; background: rgba(56,211,159,.07); }
.generator-selection-summary > div:first-child { display: grid; gap: 3px; }
.generator-selection-summary strong { color: #8ff0c8; font-size: 12px; }
.generator-selection-summary span { color: var(--muted); font-size: 10px; font-weight: 760; }
.generator-selection-tools { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.generator-selection-tools button { appearance: none; border: 1px solid rgba(255,255,255,.14); border-radius: 7px; padding: 6px 10px; color: #c7d0e5; background: rgba(255,255,255,.055); font-size: 9px; font-weight: 900; cursor: pointer; }
.generator-selection-tools button:hover:not(:disabled) { color: #fff; border-color: rgba(255,209,102,.48); }
.generator-selection-tools button:disabled { opacity: .4; cursor: default; }
.generator-selection-summary.needs-coverage-upgrade { border-color: rgba(248,113,113,.46); background: rgba(127,29,29,.22); }
.generator-selection-summary.needs-coverage-upgrade strong { color: #fecaca; }
.generator-selection-summary.needs-coverage-upgrade span { color: #ffd4a8; }
.generator-shot-list { display: grid; gap: 10px; }
.generator-shot-card { display: grid; grid-template-columns: 34px minmax(210px,.58fr) minmax(0,1.42fr); gap: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 12px; background: rgba(5,9,24,.28); }
.generator-shot-card:not(.is-selected) { opacity: .55; }
.generator-shot-check { display: grid; align-content: start; justify-content: center; padding-top: 3px; }
.generator-shot-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.generator-shot-visual { display: grid; gap: 8px; align-content: start; }
.generator-coverage-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; padding: 7px 9px; border: 1px solid rgba(245,185,66,.24); border-radius: 8px; color: #ffe3a5; background: rgba(245,185,66,.08); }
.generator-coverage-label b { font-size: 10px; white-space: nowrap; }
.generator-coverage-label span { overflow: hidden; color: #bfc9e1; font-size: 9px; font-weight: 800; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.generator-shot-generate:not(:disabled) { color: #161629; border-color: transparent; background: linear-gradient(135deg,#64ddc6,#64c8e7); box-shadow: 0 8px 18px rgba(65,199,202,.18); }
.generator-shot-generate:not(:disabled):hover { filter: brightness(1.06); transform: translateY(-1px); }
.generator-shot-generate:disabled { opacity: .48; cursor: not-allowed; }
.generator-shot-image { display: grid; place-items: center; min-height: 150px; overflow: hidden; border: 1px dashed rgba(255,255,255,.2); border-radius: 10px; color: var(--muted); background: rgba(0,0,0,.22); font-size: 10px; font-weight: 800; text-align: center; }
.generator-shot-image img { width: 100%; height: 170px; object-fit: cover; }
.generator-shot-meta { display: grid; grid-template-columns: minmax(0,1fr) 84px; gap: 7px; }
.generator-shot-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.generator-shot-fields label { display: grid; gap: 5px; min-width: 0; color: var(--muted); font-size: 9px; font-weight: 850; }
.generator-shot-fields label.wide { grid-column: 1 / -1; }
.generator-shot-fields textarea { min-height: 70px; resize: vertical; }
.generator-shot-state { min-height: 18px; color: #ffc77f; font-size: 9px; font-weight: 850; }
.generator-shot-card.is-complete { border-color: rgba(56,211,159,.34); }
.generator-shot-card.is-generating { border-color: rgba(245,185,66,.42); }
.generator-board-card { display: grid; gap: 12px; padding: 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(5,9,24,.3); }
.generator-board-card:not(.is-selected) { opacity: .62; }
.generator-board-card.is-complete { border-color: rgba(56,211,159,.36); }
.generator-board-card.is-generating { border-color: rgba(245,185,66,.46); }
.generator-board-head { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 9px 11px; border: 1px solid rgba(245,185,66,.25); border-radius: 10px; background: linear-gradient(90deg,rgba(245,185,66,.1),rgba(255,125,107,.05)); }
.generator-board-head label { display: flex; align-items: center; gap: 8px; color: #ffe2a4; font-size: 11px; font-weight: 900; }
.generator-board-head input { width: 18px; height: 18px; accent-color: var(--accent); }
.generator-board-head strong { overflow: hidden; color: #fff; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.generator-board-head > span { color: #b9c5dd; font-size: 10px; font-weight: 850; }
.generator-board-layout { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(0,1.1fr); gap: 14px; align-items: start; }
.generator-board-visual { position: sticky; top: 14px; display: grid; gap: 9px; }
.generator-board-image { display: grid; place-items: center; min-height: 330px; overflow: hidden; border: 1px dashed rgba(255,255,255,.22); border-radius: 12px; color: var(--muted); background: linear-gradient(145deg,rgba(7,11,29,.95),rgba(17,25,49,.82)); text-align: center; }
.generator-board-image img { width: 100%; max-height: 720px; object-fit: contain; background: #0b1020; }
.generator-board-image span { display: grid; gap: 8px; padding: 24px; }
.generator-board-image b { color: #ffe1a0; font-size: 20px; }
.generator-board-image small { color: #aeb8d1; font-size: 11px; line-height: 1.6; }
.generator-board-generate:not(:disabled) { color: #161629; border-color: transparent; background: linear-gradient(135deg,#66dfcc,#61c8ea); }
.generator-board-shots { display: grid; gap: 9px; }
.generator-board-shot { display: grid; gap: 8px; padding: 10px; border: 1px solid rgba(255,255,255,.11); border-radius: 10px; background: rgba(7,11,28,.46); }
.generator-board-shot:not(.is-selected) { opacity: .55; }
.generator-board-shot-head { display: grid; grid-template-columns: 22px auto minmax(150px,1fr) 86px; align-items: center; gap: 8px; }
.generator-board-shot-head input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.generator-board-shot-head b { color: #ffd486; font-size: 10px; white-space: nowrap; }
.generator-board-duration { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; }
.generator-board-duration input { min-width: 0; }
.generator-board-shot-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.generator-board-shot-fields > label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; }
.generator-board-shot-fields > label:first-child { grid-column: 1 / -1; }
.generator-board-shot-fields textarea { min-height: 60px; resize: vertical; }
.generator-board-shot-fields details { grid-column: 1 / -1; padding: 7px 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; }
.generator-board-shot-fields summary { color: #aeb8d1; font-size: 9px; font-weight: 850; cursor: pointer; }
.generator-board-shot-fields details[open] { display: grid; gap: 7px; }
.generator-board-shot-fields details label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 850; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.usage-panel {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(56,211,159,0.24);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(56,211,159,0.12), rgba(128,229,255,0.08)),
    rgba(7,10,22,0.48);
  box-shadow: 0 14px 42px rgba(0,0,0,0.18);
}
.usage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.usage-head h2 {
  font-size: 19px;
}
.usage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.usage-purchase-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  text-decoration: none;
  white-space: nowrap;
  color: #102016;
  border-color: rgba(139, 231, 209, 0.7);
  background: linear-gradient(135deg, #8be7d1, #f4c84a);
  box-shadow: 0 8px 18px rgba(139, 231, 209, 0.14);
}
.usage-purchase-link:hover {
  filter: brightness(1.06);
}
#byteplusUsageStatus {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.minimax-usage {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(251,146,60,.42);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(92,39,15,.34), rgba(21,15,35,.42));
}
.minimax-usage-head,
.minimax-ledger-row,
.usage-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.service-kicker { color: #ffbd7c; font-size: 9px; font-weight: 950; letter-spacing: .18em; }
.minimax-usage-head h3 { margin-top: 3px; color: #fff0da; font-size: 17px; }
.minimax-console-link { color: #ffd1a6; font-size: 11px; font-weight: 900; text-decoration: none; }
.minimax-console-link:hover { color: #fff; }
.minimax-usage-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.minimax-stat {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(4,8,20,.34);
}
.minimax-stat span { color: #d7c5b9; font-size: 10px; font-weight: 850; }
.minimax-stat strong { color: #ffe0bd; font-size: clamp(16px, 1.7vw, 22px); line-height: 1.1; overflow-wrap: anywhere; }
.minimax-stat small { color: var(--muted); font-size: 9px; font-weight: 760; line-height: 1.3; }
.minimax-stat.is-balance strong { color: #83f5be; }
.minimax-ledger-row { align-items: flex-end; }
.minimax-ledger-row > p { flex: 1 1 460px; color: rgba(224,231,255,.68); font-size: 9.5px; font-weight: 760; line-height: 1.45; }
.minimax-balance-form { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.minimax-balance-form label { color: #d7c5b9; font-size: 9px; font-weight: 850; }
.minimax-balance-form > span { display: flex; align-items: center; gap: 3px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 7px; color: #ffd1a6; background: rgba(0,0,0,.2); font-weight: 900; }
.minimax-balance-form input { width: 72px; border: 0; padding: 0; color: #fff; background: transparent; font: inherit; outline: 0; }
.minimax-balance-form button { border: 1px solid rgba(251,146,60,.55); border-radius: 7px; padding: 6px 9px; color: #2a1204; background: #ffb363; font-size: 9px; font-weight: 950; cursor: pointer; }
.minimax-balance-form button:disabled { opacity: .55; cursor: wait; }
.usage-subhead { padding: 2px 2px 0; }
.usage-subhead strong { color: #d8fff0; font-size: 12px; }
.usage-subhead span { color: var(--muted); font-size: 9px; font-weight: 800; }
.usage-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.usage-protection {
  display: flex;
  align-items: center;
  gap: 8px 14px;
  flex-wrap: wrap;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid rgba(56,211,159,0.28);
  border-radius: 9px;
  color: #d9ffed;
  background: rgba(20,86,65,0.2);
  font-size: 11px;
  font-weight: 850;
}
.usage-protection strong { color: #7fffc5; }
.usage-protection span { color: rgba(235,255,246,0.86); }
.usage-protection small {
  flex: 1 1 320px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
.usage-protection.is-blocking {
  border-color: rgba(255,112,120,0.52);
  background: rgba(118,35,44,0.22);
}
.usage-protection.is-blocking strong { color: #ffb4ba; }
.seedance-rate-guide {
  display: grid;
  gap: 8px;
  padding: 10px 11px;
  border: 1px solid rgba(244, 200, 74, 0.32);
  border-radius: 9px;
  background: rgba(63, 47, 15, 0.18);
}
.seedance-rate-guide-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.seedance-rate-guide-head strong { color: #ffe49a; font-size: 12px; }
.seedance-rate-guide-head small,
.seedance-rate-footnote {
  color: rgba(224,231,255,0.68);
  font-size: 10px;
  font-weight: 760;
}
.seedance-rate-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}
.seedance-rate-card {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px 9px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 8px;
  background: rgba(4,8,20,0.3);
}
.seedance-rate-card strong { color: #f7f8ff; font-size: 11px; }
.seedance-rate-card b { color: #9effc9; font-size: 16px; line-height: 1.05; }
.seedance-rate-card small { color: var(--muted); font-size: 9px; font-weight: 760; line-height: 1.3; }
.seedance-rate-card.minimax-rate-card {
  border-color: rgba(251,146,60,.38);
  background: linear-gradient(145deg, rgba(94,41,16,.36), rgba(4,8,20,.3));
}
.seedance-rate-card.minimax-rate-card b { color: #ffc17f; }
.seedance-rate-empty { color: var(--muted); font-size: 11px; font-weight: 800; }
.seedance-rate-hint {
  display: inline-flex;
  align-items: center;
  flex: 1 1 290px;
  min-height: 30px;
  color: #ffe7a5;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.25;
}
.usage-stat {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px 11px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 11px;
  background: rgba(4,8,20,0.32);
}
.usage-stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}
.usage-stat strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: clamp(18px, 2.1vw, 25px);
  line-height: 1;
}
.usage-stat small {
  min-height: 1.2em;
  color: rgba(224,231,255,0.72);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}
.usage-stat.compact strong {
  color: #bfffe2;
  font-size: clamp(16px, 1.75vw, 21px);
}
.pack-add-toggle {
  justify-self: start;
  border: 0;
  padding: 2px 0;
  color: #ffd56a;
  background: transparent;
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.pack-add-toggle:hover { color: #fff0b7; }
.pack-add-form {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) auto auto;
  gap: 5px;
  align-items: center;
}
.pack-add-form label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 3px 6px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 6px;
  background: rgba(0,0,0,0.22);
}
.pack-add-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: #fff;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}
.pack-add-form b { color: var(--muted); font-size: 10px; }
.pack-add-form button {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  padding: 5px 7px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  font-size: 10px;
  font-weight: 900;
  cursor: pointer;
}
.pack-add-form button[type="submit"] {
  border-color: rgba(56,211,159,0.45);
  color: #bfffe2;
}
.usage-note {
  margin: 0;
  color: rgba(224,231,255,0.68);
  font-size: 11px;
  font-weight: 760;
  line-height: 1.35;
}
.head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
#characterStatus {
  color: var(--muted);
  font-weight: 800;
  font-size: 13px;
}
.field-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.9fr 0.6fr 0.7fr 0.7fr 0.6fr;
  gap: 12px;
}
label {
  display: grid;
  gap: 8px;
  color: var(--text);
  font-weight: 800;
}
label span {
  font-size: 14px;
}
input, select, textarea {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: rgba(8,12,28,0.72);
  color: var(--text);
  padding: 12px 13px;
  outline: none;
}
textarea {
  resize: vertical;
  min-height: 92px;
}
.full-field {
  margin-top: 14px;
}
.character-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}
.character-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: rgba(7,10,22,0.45);
}
.character-preview {
  height: 168px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(255,255,255,0.26);
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  cursor: pointer;
}
.character-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.character-preview span {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
  padding: 10px;
}
.character-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.character-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px auto;
  align-items: end;
  gap: 10px;
}
.compact-empty {
  padding: 18px;
}
.shot-list {
  display: grid;
  gap: 16px;
}
.reference-video-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.75fr) minmax(0, 1.25fr);
  gap: 18px;
  align-items: start;
}
.reference-upload {
  display: grid;
  gap: 10px;
}
.reference-upload p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-weight: 700;
}
.reference-video-file-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.reference-video-file-actions button {
  min-height: 43px;
}
.reference-extract-character {
  border-color: rgba(103,232,249,.36);
  color: #b9f7ff;
}
.reference-extract-status {
  min-height: 20px;
  color: #9eead9;
  font-size: 9.5px;
  font-weight: 780;
  line-height: 1.55;
}
.reference-video-drop {
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(255,255,255,0.28);
  border-radius: 14px;
  background: rgba(0,0,0,0.22);
  overflow: hidden;
  cursor: pointer;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}
.reference-video-drop.drag-over {
  border-color: rgba(245,185,66,0.85);
  background: rgba(245,185,66,0.12);
}
.reference-video-drop video {
  width: 100%;
  max-height: 440px;
  object-fit: contain;
  background: #050816;
}
.reference-fields {
  display: grid;
  gap: 13px;
}
.reference-image-option {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid rgba(103,232,249,.2);
  border-radius: 14px;
  background: rgba(103,232,249,.035);
}
.reference-image-switch { margin: 0; }
.reference-image-switch small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.reference-image-panel {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.09);
}
.reference-image-panel[hidden] { display: none; }
.reference-image-drop {
  min-height: 76px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(103,232,249,.38);
  border-radius: 12px;
  color: #b9f7ff;
  background: rgba(5,12,28,.34);
  cursor: pointer;
  font-size: 11px;
  font-weight: 850;
}
.reference-image-drop.drag-over {
  border-color: #67e8f9;
  background: rgba(103,232,249,.1);
}
.reference-image-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.reference-image-thumb {
  position: relative;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  background: rgba(0,0,0,.18);
}
.reference-image-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
}
.reference-image-thumb figcaption {
  overflow: hidden;
  padding: 6px 7px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reference-image-thumb button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 23px;
  height: 23px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  color: white;
  background: rgba(5,8,20,.82);
  cursor: pointer;
}
.reference-image-index {
  position: absolute;
  top: 5px;
  left: 5px;
  min-width: 23px;
  height: 23px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #0a1720;
  background: #67e8f9;
  font-size: 9px;
  font-weight: 950;
}
.reference-image-rule {
  margin: 0;
  color: #9eead9;
  font-size: 9.5px;
  font-weight: 800;
  line-height: 1.55;
}
.reference-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.reference-seconds {
  max-width: 420px;
}
.reference-density-control {
  max-width: 420px;
}
.reference-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.reference-action-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.reference-action-card {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(4,8,20,.25));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.reference-action-proxy { border-top-color: rgba(245,185,66,.55); }
.reference-action-direct { border-top-color: rgba(103,232,249,.48); }
.reference-action-head {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.reference-step-num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245,185,66,.35);
  border-radius: 10px;
  color: #1c1304;
  background: linear-gradient(135deg, #ffd56f, #ff937e);
  font-size: 13px;
  font-weight: 950;
}
.reference-action-direct .reference-step-num {
  border-color: rgba(103,232,249,.38);
  color: #061a25;
  background: linear-gradient(135deg, #8be7d1, #67e8f9);
}
.reference-action-head strong,
.reference-action-head small { display: block; }
.reference-action-head strong { color: #f7f8ff; font-size: 14px; }
.reference-action-head small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  line-height: 1.45;
}
.reference-mode-tag {
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.04);
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.reference-create-proxy {
  width: 100%;
  min-height: 44px;
}
.reference-provider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}
.reference-provider-head strong { color: #eef2ff; font-size: 11px; }
.reference-provider-head span { color: var(--muted); font-size: 9px; font-weight: 800; }
.reference-provider-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.reference-provider-grid .provider-btn {
  position: relative;
  min-width: 0;
  min-height: 54px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  padding: 9px 8px;
  overflow: hidden;
  color: #e8edff;
  background: rgba(255,255,255,.055);
  border-color: rgba(255,255,255,.16);
  box-shadow: none;
}
.reference-provider-grid .provider-btn::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: var(--provider-color, #aab4d4);
}
.reference-provider-grid .provider-btn span {
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 850;
}
.reference-provider-grid .provider-btn strong {
  color: inherit;
  font-size: 11px;
  line-height: 1.1;
}
.reference-provider-grid .provider-standard { --provider-color: #aab4d4; }
.reference-provider-grid .provider-mini { --provider-color: #67e8f9; color: #b9f7ff; }
.reference-provider-grid .provider-minimax { --provider-color: #fb923c; color: #ffe1b3; }
.reference-provider-grid .provider-btn:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--provider-color) 58%, transparent);
  background: color-mix(in srgb, var(--provider-color) 10%, transparent);
  transform: translateY(-1px);
}
.reference-rate-note {
  flex: none;
  min-height: 0;
  padding: 9px 10px;
  border-radius: 10px;
  color: #eadcae;
  background: rgba(245,185,66,.065);
  font-size: 9.5px;
  font-weight: 780;
  line-height: 1.5;
}
.reference-video-status {
  min-height: 28px;
  display: flex;
  align-items: center;
  padding: 6px 9px;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(0,0,0,.13);
  font-size: 10px;
  font-weight: 850;
}
@media (max-width: 900px) {
  .reference-action-flow { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .reference-action-card { padding: 13px; }
  .reference-action-head { grid-template-columns: 32px minmax(0, 1fr); }
  .reference-mode-tag { display: none; }
  .reference-provider-grid { grid-template-columns: 1fr; }
  .reference-provider-grid .provider-btn { min-height: 46px; }
  .reference-image-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.normal-video-panel {
  max-width: 1180px;
}
.normal-video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
  gap: 18px;
  align-items: start;
}
.normal-video-fields,
.normal-video-controls {
  display: grid;
  gap: 13px;
}
.normal-video-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.normal-text-mode,
.normal-seconds-control {
  grid-column: 1 / -1;
}
.normal-seconds-control {
  max-width: none;
}
.normal-video-actions {
  align-items: flex-start;
}
.normal-preview-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(126, 232, 224, 0.34);
  border-radius: 12px;
  background: rgba(4, 11, 22, 0.38);
}
.normal-preview-panel[hidden] {
  display: none;
}
.normal-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.normal-preview-head > div {
  display: grid;
  gap: 4px;
}
.normal-preview-head strong {
  color: #f6d994;
}
.normal-preview-head span,
#normalVideoPreviewStatus {
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.45;
}
#normalVideoPreviewStatus {
  max-width: 250px;
  text-align: right;
}
.normal-preview-image-button {
  display: grid;
  place-items: center;
  min-height: 190px;
  max-height: 560px;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  background: #050816;
  cursor: zoom-in;
}
.normal-preview-image-button img {
  display: block;
  width: 100%;
  max-height: 540px;
  object-fit: contain;
}
.normal-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.normal-reference-switch {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 9px;
  font-weight: 900;
  color: #dce9ff;
  cursor: pointer;
}
.normal-reference-switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}
.normal-reference-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(128, 229, 255, 0.26);
  border-radius: 12px;
  background: rgba(4, 10, 22, 0.26);
}
.normal-reference-panel-head,
.normal-reference-characters {
  display: grid;
  gap: 5px;
}
.normal-reference-panel-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
.normal-reference-panel-head strong,
.normal-reference-characters strong {
  color: #f6d994;
}
.normal-reference-panel-head span,
.normal-reference-characters > span {
  color: var(--muted);
  font-size: .86rem;
  line-height: 1.45;
}
.normal-reference-drop {
  min-height: 84px;
  display: grid;
  place-items: center;
  padding: 14px;
  border: 1px dashed rgba(255,255,255,.28);
  border-radius: 10px;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
  text-align: center;
}
.normal-reference-drop.drag-over {
  border-color: var(--accent);
  color: #ffe5aa;
  background: rgba(245,185,66,.12);
}
.normal-reference-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}
.normal-reference-thumb {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}
.normal-reference-thumb img,
.normal-reference-thumb video {
  display: block;
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  background: #07101f;
}
.normal-reference-kind {
  position: absolute;
  top: 5px;
  left: 5px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  padding: 2px 6px;
  color: #dff7ff;
  background: rgba(4,10,22,.86);
  font-size: .64rem;
  font-weight: 900;
}
.normal-reference-thumb .normal-reference-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(0,0,0,.7);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.normal-reference-thumb figcaption {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  overflow: hidden;
  padding: 5px 6px;
  color: var(--muted);
  font-size: .73rem;
}
.normal-reference-thumb figcaption span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.normal-reference-thumb .normal-reference-token {
  position: static;
  width: auto;
  height: auto;
  min-width: 0;
  border: 1px solid rgba(245,185,66,.7);
  border-radius: 6px;
  padding: 2px 5px;
  color: #ffe5aa;
  background: rgba(245,185,66,.12);
  cursor: pointer;
  font-size: .67rem;
  font-weight: 900;
  line-height: 1.4;
  white-space: nowrap;
}
#normalVideoStatus {
  color: var(--muted);
  font-weight: 900;
  line-height: 1.55;
}
@media (max-width: 700px) {
  .normal-preview-head {
    display: grid;
  }
  #normalVideoPreviewStatus {
    max-width: none;
    text-align: left;
  }
}
#referenceVideoStatus {
  color: var(--muted);
  font-weight: 900;
}
.proxy-frame-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(128, 229, 255, 0.22);
  border-radius: 14px;
  background: rgba(4, 10, 22, 0.28);
}
.proxy-frame-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.proxy-frame-head strong {
  font-size: 1rem;
}
.proxy-frame-head span {
  color: var(--muted);
  font-weight: 850;
  text-align: right;
}
.proxy-frame-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.proxy-cancel-btn {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 119, 119, .48);
  border-radius: 999px;
  color: #ffd1d1;
  background: rgba(255, 119, 119, .12);
  cursor: pointer;
  font-weight: 950;
}
.proxy-cancel-btn:hover:not(:disabled) {
  border-color: rgba(255, 119, 119, .8);
  background: rgba(255, 119, 119, .2);
}
.proxy-cancel-btn:disabled {
  opacity: .48;
  cursor: not-allowed;
}
.proxy-frame-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 10px;
}
.proxy-frame-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px;
  background: rgba(8,11,24,0.72);
}
.proxy-frame-card.failed {
  border-color: rgba(255,119,119,0.52);
}
.proxy-frame-card.canceled {
  border-color: rgba(255,255,255,0.16);
  opacity: .68;
}
.proxy-frame-thumb {
  width: 100%;
  height: 118px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  background: #050816;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
  overflow: hidden;
}
.proxy-frame-thumb > span {
  display: -webkit-box;
  max-height: 5.6em;
  padding: 10px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  text-align: left;
  word-break: break-word;
}
.proxy-frame-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.proxy-frame-body {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 9px;
}
.proxy-frame-card strong,
.proxy-frame-card span {
  display: block;
  overflow-wrap: anywhere;
}
.proxy-frame-card strong {
  color: var(--text);
  font-size: 0.88rem;
}
.proxy-frame-card span {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}
.proxy-frame-status {
  display: block !important;
  white-space: normal;
}
.proxy-frame-error { min-width: 0; font-size: 12px; color: var(--muted); }
.proxy-frame-error summary { cursor: pointer; }
.proxy-frame-error p { max-height: 180px; overflow: auto; overflow-wrap: anywhere; white-space: pre-wrap; }
.proxy-reference-preview { padding: 8px; border: 1px solid #64748b; border-radius: 8px; background: transparent; color: var(--text); font-size: 12px; cursor: pointer; }
.proxy-frame-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.image-provider-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
}
.image-provider-actions[hidden] { display: none !important; }
.image-provider-actions > button { flex: 1 1 190px; }
.minimax-image-btn {
  border-color: rgba(255, 164, 54, .62) !important;
  background: linear-gradient(135deg, rgba(222, 87, 14, .92), rgba(255, 164, 16, .94)) !important;
  color: #fff7e7 !important;
}
.generator-board-provider-actions { margin-top: 10px; }
.generator-board-provider-actions > button { min-width: 0; }
.proxy-frame-actions button {
  width: 100%;
  min-width: 0;
  padding: 8px 6px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  overflow-wrap: anywhere;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-weight: 900;
  cursor: pointer;
}
.proxy-frame-actions button:hover:not(:disabled) {
  border-color: rgba(255,199,65,0.55);
  background: rgba(255,199,65,0.16);
}
.proxy-frame-actions button.danger {
  border-color: rgba(255,119,119,0.32);
  color: #ffd1d1;
}
.proxy-frame-actions button.danger:hover:not(:disabled) {
  border-color: rgba(255,119,119,0.75);
  background: rgba(255,119,119,0.18);
}
.proxy-frame-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.shot-card {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 14px;
  background: rgba(7,10,22,0.45);
}
.shot-media {
  display: grid;
  gap: 10px;
}
.shot-preview {
  min-height: 168px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(255,255,255,0.26);
  border-radius: 12px;
  background: rgba(0,0,0,0.22);
  cursor: pointer;
  text-align: center;
  line-height: 1.6;
}
.character-preview.drag-over,
.shot-preview.drag-over {
  border-color: rgba(245,185,66,0.85);
  background: rgba(245,185,66,0.12);
}
.shot-preview span {
  color: var(--muted);
  font-weight: 800;
}
.shot-preview small {
  color: rgba(255,255,255,0.56);
}
.background-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.background-thumb {
  position: relative;
  height: 92px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(0,0,0,0.22);
}
.background-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.background-thumb button {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,0.62);
  cursor: pointer;
  font-weight: 900;
}
.background-empty {
  grid-column: 1 / -1;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.16);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  font-weight: 800;
}
.shot-fields {
  display: grid;
  gap: 12px;
}
.character-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  align-items: center;
}
.reference-character-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 22px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
}
.reference-character-item.selected {
  border-color: rgba(245,185,66,.65);
  background: rgba(245,185,66,.08);
}
.reference-character-item .character-pick {
  border: 0;
  background: transparent;
}
.reference-character-delete {
  position: absolute;
  top: 50%;
  right: 5px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  color: rgba(255,255,255,.55);
  background: rgba(5,8,20,.42);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}
.reference-character-delete:hover {
  color: #fff;
  background: rgba(239,68,68,.8);
}
.character-pick {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 6px 10px 6px 6px;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  cursor: pointer;
  font-weight: 900;
}
.character-pick.selected {
  border-color: rgba(245,185,66,0.9);
  background: rgba(245,185,66,0.18);
  color: #ffd98a;
}
.character-pick img {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  object-fit: cover;
  background: rgba(0,0,0,0.26);
}
.pick-empty {
  color: var(--muted);
  font-weight: 800;
}
.shot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.shot-title {
  color: #ffd98a;
  font-weight: 900;
  font-size: 18px;
}
.primary-btn, .secondary-btn, .ghost-btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 900;
}
.primary-btn {
  color: #211604;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 12px 28px rgba(255,125,107,0.24);
}
.secondary-btn, .ghost-btn {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
}
.secondary-btn.mini-btn {
  color: #061a25;
  border-color: rgba(103,232,249,0.54);
  background: linear-gradient(135deg, #8be7d1, #67e8f9);
}

.secondary-btn.full-btn {
  border-color: rgba(251, 146, 60, .7);
  color: #ffe1b3;
  background: rgba(154, 52, 18, .2);
}

.secondary-btn.full-btn:hover:not(:disabled) {
  border-color: #fb923c;
  background: rgba(234, 88, 12, .32);
}
.reference-provider-grid .provider-btn.provider-mini {
  color: #b9f7ff;
  border-color: rgba(103,232,249,.22);
  background: rgba(103,232,249,.065);
}
.reference-provider-grid .provider-btn.provider-minimax {
  color: #ffe1b3;
  border-color: rgba(251,146,60,.24);
  background: rgba(251,146,60,.06);
}
.reference-provider-grid .provider-btn.provider-mini:hover:not(:disabled),
.reference-provider-grid .provider-btn.provider-minimax:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--provider-color) 58%, transparent);
  background: color-mix(in srgb, var(--provider-color) 10%, transparent);
}
.danger-btn {
  color: #fff;
  background: rgba(248,113,113,0.16);
  border-color: rgba(248,113,113,0.42);
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.actions-panel {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 18px;
  background: linear-gradient(180deg, transparent, rgba(16,24,50,0.96) 30%);
}
.actions-panel.direct-import-mode {
  border: 1px solid rgba(94, 234, 212, 0.34);
  border-radius: 16px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(16, 24, 50, 0.96));
}
.actions-panel.direct-import-mode #statusText {
  color: #99f6e4;
}
#statusText {
  color: var(--muted);
  font-weight: 800;
}
.job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
  align-items: start;
}
.job-card {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(7,10,22,0.72);
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
}
.job-image {
  position: relative;
  height: 260px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(45deg, rgba(255,255,255,0.035) 25%, transparent 25% 50%, rgba(255,255,255,0.035) 50% 75%, transparent 75%),
    rgba(0,0,0,0.28);
  background-size: 22px 22px;
}
.job-image.clickable {
  cursor: zoom-in;
}
.job-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-open-hint {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0,0,0,0.68);
  font-size: 11px;
  font-weight: 900;
  opacity: .92;
  transition: opacity .18s ease;
  pointer-events: none;
}
.job-image.clickable:hover .image-open-hint {
  opacity: 1;
}
.job-body {
  position: relative;
  z-index: 1;
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(7,10,22,0.86);
}
.job-body strong {
  font-size: 15px;
}
.job-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.job-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.job-actions a,
.job-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(255,255,255,0.12);
  padding: 6px 10px;
  cursor: pointer;
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  text-decoration: none;
}
.job-actions a:hover,
.job-actions button:hover {
  border-color: rgba(245,185,66,0.64);
  background: rgba(245,185,66,0.16);
  color: #ffe7a6;
}
.job-actions .sora-btn {
  grid-column: 1 / -1;
  border-color: rgba(56,211,159,0.62);
  color: #062116;
  background: linear-gradient(135deg, #6ee7b7, #f5b942);
  box-shadow: 0 8px 20px rgba(56,211,159,0.18);
}
.job-actions .vidu-btn {
  grid-column: 1 / -1;
  border-color: rgba(96,165,250,0.68);
  color: #06162f;
  background: linear-gradient(135deg, #93c5fd, #67e8f9);
  box-shadow: 0 8px 20px rgba(96,165,250,0.18);
}
.job-actions .seedance-btn {
  grid-column: 1 / -1;
  border-color: rgba(196,181,253,0.72);
  color: #1c103c;
  background: linear-gradient(135deg, #c4b5fd, #f0abfc);
  box-shadow: 0 8px 20px rgba(196,181,253,0.18);
}
.job-actions .seedance-mini-btn {
  grid-column: 1 / -1;
  border-color: rgba(103,232,249,0.72);
  color: #061a25;
  background: linear-gradient(135deg, #8be7d1, #67e8f9);
  box-shadow: 0 8px 20px rgba(103,232,249,0.18);
}

.job-actions .seedance-full-btn {
  grid-column: 1 / -1;
  border-color: rgba(251, 146, 60, .7);
  color: #fff3df;
  background: linear-gradient(110deg, #c2410c, #f59e0b);
}
.video-seconds-control {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(196,181,253,0.35);
  border-radius: 12px;
  background: rgba(8,12,28,0.58);
}
.video-seconds-control span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #e9ddff;
  font-size: 12px;
  font-weight: 900;
}
.video-seconds-control output {
  color: #fff0a6;
  font-size: 15px;
}
.video-seconds-control input {
  padding: 0;
  height: 22px;
  accent-color: #c4b5fd;
  cursor: pointer;
}
.job-actions [data-restore-job] {
  grid-column: 1 / -1;
}
.video-result-panel {
  margin-top: 18px;
}
.video-preview-panel {
  display: grid;
  grid-template-columns: minmax(360px, .95fr) minmax(260px, 1fr);
  gap: 16px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(185, 255, 223, .18);
  border-radius: 16px;
  background: rgba(5, 10, 26, .32);
}
.video-preview-screen {
  min-height: 260px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #050713;
  overflow: hidden;
}
.video-preview-screen video {
  width: 100%;
  max-height: 520px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #050713;
}
.video-preview-empty {
  padding: 24px;
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}
.video-preview-info {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
}
.video-preview-info strong {
  color: #f8fbff;
  font-size: 22px;
  overflow-wrap: anywhere;
}
.video-preview-info span {
  color: var(--muted);
  font-weight: 850;
  overflow-wrap: anywhere;
}
.video-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.video-preview-actions a {
  padding: 9px 14px;
  border: 1px solid rgba(185, 255, 223, .24);
  border-radius: 999px;
  color: #b9ffdf;
  background: rgba(185, 255, 223, .08);
  font-weight: 900;
  text-decoration: none;
}
.video-preview-actions a:hover {
  border-color: rgba(185, 255, 223, .55);
  background: rgba(185, 255, 223, .14);
}
.video-job-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 12px;
}
.video-result-card {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  overflow: hidden;
}
.video-result-card.active {
  border-color: rgba(185, 255, 223, .7);
  box-shadow: 0 0 0 2px rgba(185, 255, 223, .12);
}
.video-result-thumb {
  position: relative;
  width: 100%;
  min-height: 96px;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: #050713;
  overflow: hidden;
  cursor: pointer;
  font-weight: 900;
}
.video-result-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(.78);
  transition: filter .16s ease;
}
.video-result-thumb i {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 5px 9px;
  border-radius: 999px;
  color: #f8fbff;
  background: rgba(0, 0, 0, .55);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}
.video-result-thumb.ready:hover img {
  filter: brightness(.96);
}
.video-result-thumb:disabled {
  cursor: default;
  opacity: 1;
}
.result-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.result-pager[hidden] {
  display: none;
}
.result-pager button {
  min-width: 104px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.12);
  cursor: pointer;
  font-weight: 900;
}
.result-pager button:not(:disabled):hover {
  border-color: rgba(245,185,66,0.68);
  color: #ffe7a6;
  background: rgba(245,185,66,0.16);
}
.result-pager button:disabled {
  opacity: .42;
  cursor: not-allowed;
}
.result-pager span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.video-result-media video,
.video-result-media .sora-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: none;
  border-radius: 10px;
  background: #050713;
  object-fit: contain;
}
.video-result-media .sora-placeholder {
  height: auto;
  min-height: 90px;
  font-size: 13px;
}
.video-result-body {
  display: grid;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}
.video-result-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  min-width: 0;
}
.video-result-title strong {
  color: #f8fbff;
  font-size: 14px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.video-result-title span,
.video-result-body > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.video-result-body > .error {
  display: block;
  max-width: 100%;
  max-height: 96px;
  overflow: auto;
  padding: 8px 10px;
  border: 1px solid rgba(248,113,113,0.28);
  border-radius: 10px;
  color: #fecaca;
  background: rgba(248,113,113,0.08);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.42;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.video-result-card .sora-actions {
  gap: 10px;
}
.video-result-card .sora-actions a,
.video-result-card .sora-actions button {
  font-size: 12px;
}
.sora-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.vidu-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.seedance-list {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}
.sora-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(56,211,159,0.28);
  border-radius: 12px;
  background: rgba(56,211,159,0.08);
}
.vidu-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(96,165,250,0.34);
  border-radius: 12px;
  background: rgba(96,165,250,0.08);
}
.seedance-item {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid rgba(196,181,253,0.36);
  border-radius: 12px;
  background: rgba(196,181,253,0.09);
}
.sora-item video {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 360px;
  border-radius: 10px;
  background: #050713;
  object-fit: contain;
}
.vidu-item video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  border-radius: 10px;
  background: #050713;
  object-fit: contain;
}
.seedance-item video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 300px;
  border-radius: 10px;
  background: #050713;
  object-fit: contain;
}
.seedance-token-ledger {
  color: rgba(235, 226, 255, 0.82);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.sora-placeholder {
  height: 150px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  background: rgba(0,0,0,0.24);
  font-weight: 900;
}
.sora-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.sora-actions a,
.sora-actions button {
  padding: 0;
  border: 0;
  color: #b9ffdf;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-decoration: none;
}
.sora-progress {
  display: grid;
  gap: 6px;
  min-width: 0;
}
.sora-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.sora-progress-head span {
  color: #d8f7e7;
  font-size: 12px;
  font-weight: 900;
  min-width: 0;
  overflow-wrap: anywhere;
}
.sora-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}
.sora-progress-bar i {
  display: block;
  height: 100%;
  min-width: 14px;
  border-radius: inherit;
  background: linear-gradient(90deg, #38d39f, #f5b942);
}
.vidu-progress-bar i {
  background: linear-gradient(90deg, #60a5fa, #67e8f9);
}
.seedance-progress-bar i {
  background: linear-gradient(90deg, #a78bfa, #f0abfc);
}
.sora-progress code {
  color: rgba(216,247,231,0.72);
  font-size: 11px;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}
.sora-debug {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 6px;
  min-width: 0;
  overflow: hidden;
}
.sora-debug summary {
  color: #b9ffdf;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  overflow-wrap: anywhere;
}
.sora-debug div {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  max-height: 150px;
  max-width: 100%;
  overflow: auto;
}
.sora-debug p {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  color: rgba(255,255,255,0.82);
  font-size: 12px;
  line-height: 1.45;
}
.sora-debug time {
  color: rgba(185,255,223,0.78);
  font-variant-numeric: tabular-nums;
}
.sora-debug p span {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.cancel-sora-btn {
  justify-self: start;
  border: 1px solid rgba(248,113,113,0.55);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(248,113,113,0.14);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.cancel-sora-btn:hover {
  background: rgba(248,113,113,0.22);
}
.cancel-vidu-btn {
  justify-self: start;
  border: 1px solid rgba(248,113,113,0.55);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(248,113,113,0.14);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.cancel-vidu-btn:hover {
  background: rgba(248,113,113,0.22);
}
.cancel-seedance-btn {
  justify-self: start;
  border: 1px solid rgba(248,113,113,0.55);
  border-radius: 999px;
  color: #fecaca;
  background: rgba(248,113,113,0.14);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}
.cancel-seedance-btn:hover {
  background: rgba(248,113,113,0.22);
}
.resume-sora-btn {
  justify-self: start;
  border: 1px solid rgba(110,231,183,0.58);
  border-radius: 999px;
  color: #062116;
  background: linear-gradient(135deg, #6ee7b7, #f5b942);
  padding: 7px 12px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 950;
}
.resume-sora-btn:hover {
  filter: brightness(1.06);
}
@media (max-width: 760px) {
  .video-preview-panel {
    grid-template-columns: 1fr;
  }
  .video-job-grid {
    grid-template-columns: 1fr;
  }
  .video-result-card {
    grid-template-columns: 1fr;
  }
}
.image-preview-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 16px;
  background: rgba(5,8,18,0.82);
  backdrop-filter: blur(10px);
}
.image-preview-mask[hidden] {
  display: none !important;
}
.image-preview-dialog {
  width: min(1480px, 98vw);
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  background: #111936;
  box-shadow: 0 28px 80px rgba(0,0,0,0.45);
}
.image-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.14);
}
.image-preview-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.image-preview-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}
.image-preview-actions a,
.image-preview-actions button {
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 999px;
  color: #fff;
  background: rgba(255,255,255,0.1);
  padding: 7px 12px;
  cursor: pointer;
  font-weight: 900;
  text-decoration: none;
}
.image-preview-body {
  flex: 1;
  min-height: 0;
  padding: 12px;
  background: rgba(0,0,0,0.28);
  overflow: hidden;
}
.image-preview-scroll {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: start center;
  overflow: auto;
}
.image-preview-body img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: none;
  border-radius: 8px;
  background: #fff;
}
.image-preview-mask.fit-page .image-preview-scroll {
  place-items: center;
}
.image-preview-mask.fit-page .image-preview-body img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
body.preview-open {
  overflow: hidden;
}
.empty {
  grid-column: 1 / -1;
  padding: 28px;
  color: var(--muted);
  border: 1px dashed rgba(255,255,255,0.18);
  border-radius: 12px;
  text-align: center;
  font-weight: 800;
}
@media (max-width: 920px) {
  .video-app { width: min(100% - 24px, 720px); }
  .field-grid,
  .character-list,
  .shot-card,
  .reference-video-layout,
  .reference-grid,
  .normal-video-layout,
  .normal-video-grid {
    grid-template-columns: 1fr;
  }
  .generator-source-grid,
  .generator-shot-card,
  .generator-character-card,
  .generator-board-layout { grid-template-columns: 1fr; }
  .generator-board-visual { position: static; }
  .generator-board-shot-head { grid-template-columns: 22px 1fr 80px; }
  .generator-board-shot-head > input[type="text"] { grid-column: 2 / -1; }
  .generator-board-shot-fields { grid-template-columns: 1fr; }
  .generator-board-shot-fields > label:first-child,
  .generator-board-shot-fields details { grid-column: auto; }
  .generator-shot-check { justify-content: start; }
  .generator-intro,
  .generator-plan-head,
  .generator-selection-summary { align-items: stretch; flex-direction: column; }
  .generator-flow { flex-wrap: wrap; white-space: normal; }
  .generator-plan-actions { width: 100%; min-width: 0; justify-items: stretch; }
  .generator-next-btn { width: 100%; min-width: 0; }
  .generator-steps { grid-template-columns: 1fr; }
  .generator-steps > i { display: none; }
  .generator-selection-tools { justify-content: flex-start; }
  .generator-characters-head { align-items: flex-start; flex-direction: column; }
  .section-head,
  .head-actions,
  .usage-head {
    align-items: stretch;
    flex-direction: column;
  }
  .usage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .minimax-usage-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .minimax-ledger-row { align-items: stretch; flex-direction: column; }
  .minimax-balance-form { justify-content: flex-start; }
  .seedance-rate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .character-card,
  .character-row {
    grid-template-columns: 1fr;
  }
  .job-grid {
    grid-template-columns: 1fr;
  }
  .job-image {
    height: 360px;
  }
  .job-actions {
    grid-template-columns: 1fr;
  }
  .image-preview-mask {
    padding: 8px;
  }
  .image-preview-dialog {
    height: calc(100vh - 16px);
  }
}
@media (max-width: 540px) {
  .generator-style-heading { align-items: flex-start; flex-direction: column; }
  .generator-style-heading small { text-align: left; }
  .generator-setting-grid,
  .generator-shot-fields { grid-template-columns: 1fr; }
  .generator-shot-fields label.wide { grid-column: auto; }
  .minimax-usage-grid { grid-template-columns: 1fr; }
  .minimax-usage-head { align-items: flex-start; flex-direction: column; }
  .seedance-rate-grid {
    grid-template-columns: 1fr;
  }
  .seedance-rate-guide-head {
    align-items: flex-start;
    flex-direction: column;
  }
}
