:root {
  color-scheme: light;
  --ink: #141917;
  --muted: #66706b;
  --line: #dfe4e1;
  --surface: #ffffff;
  --canvas: #f4f6f5;
  --dark: #101412;
  --accent: #168363;
  --accent-strong: #0d684e;
  --amber: #d89628;
  --danger: #c23c36;
  --shadow: 0 10px 32px rgba(18, 31, 25, .08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; color: var(--ink); background: var(--canvas); letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; stroke-width: 1.8; }

.landing { min-height: 100vh; color: #f7fbff; background: #030814; }
.landing-nav { position: absolute; z-index: 12; top: 0; left: 0; right: 0; height: 72px; padding: 0 max(28px, 6vw); border-bottom: 1px solid rgba(126, 167, 205, .12); display: flex; align-items: center; justify-content: space-between; background: rgba(3, 8, 20, .78); backdrop-filter: blur(16px); }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; color: #f8fbff; text-decoration: none; }
.landing-brand-mark { width: 34px; height: 34px; border: 1px solid rgba(81, 204, 255, .42); border-radius: 7px; display: grid; place-items: center; color: #73dcff; background: #0c2637; box-shadow: 0 0 20px rgba(63, 190, 245, .14); }
.landing-brand-mark svg { width: 17px; height: 17px; }
.landing-brand strong { font-size: 14px; }
.landing-nav-actions { display: flex; align-items: center; gap: 9px; }
.landing-nav-actions button { min-height: 36px; padding: 0 15px; border-radius: 6px; font-size: 12px; font-weight: 700; }
.landing-login { border: 1px solid rgba(137, 165, 194, .28); color: #d7e4ef; background: rgba(10, 20, 38, .56); }
.landing-register { border: 1px solid #58c9ee; color: #03121c; background: #62d3f4; box-shadow: 0 8px 24px rgba(56, 193, 235, .18); }
.landing-hero { position: relative; min-height: calc(100svh - 24px); padding: 124px max(28px, 6vw) 38px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; isolation: isolate; }
.particle-canvas { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; }
.hero-glow { position: absolute; z-index: -3; inset: 0; background: #030814; }
.hero-content { width: min(900px, 100%); margin: 2vh auto 54px; text-align: center; }
.hero-badge { width: fit-content; min-height: 34px; margin: 0 auto 24px; padding: 0 13px; border: 1px solid rgba(72, 198, 241, .34); border-radius: 18px; display: flex; align-items: center; gap: 7px; color: #8edfff; background: rgba(8, 32, 50, .76); font-size: 11px; font-weight: 700; }
.hero-badge svg { width: 14px; height: 14px; fill: #f0bd4f; color: #f0bd4f; }
.hero-content h1 { margin: 0; color: #f7fbff; font-size: 58px; line-height: 1.12; letter-spacing: 0; }
.hero-content h1 span { color: #6bd8ff; background: linear-gradient(90deg, #58d5ff, #8d7dff); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-copy { margin: 20px auto 0; color: #a8b7c7; font-size: 16px; line-height: 1.8; }
.hero-actions { margin-top: 28px; display: grid; justify-items: center; gap: 13px; }
.hero-primary { min-height: 50px; padding: 0 22px; border: 1px solid #76dcfb; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; color: #04151e; background: #5bcef3; box-shadow: 0 12px 34px rgba(45, 188, 234, .22); font-weight: 800; }
.hero-primary:hover { background: #84ddf8; transform: translateY(-1px); }
.hero-primary svg { width: 18px; height: 18px; }
.hero-secondary { min-height: 30px; padding: 0 6px; border: 0; display: inline-flex; align-items: center; gap: 5px; color: #8fa5b9; background: transparent; font-size: 12px; }
.hero-secondary:hover { color: #dceaf5; }
.hero-secondary svg { width: 13px; height: 13px; }
.capability-preview { width: min(1220px, 100%); margin: 0 auto; }
.landing-section-title { text-align: center; }
.landing-section-title > p, .landing-cta > div > p { margin: 0 0 8px; color: #56d1f7; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.landing-section-title h2 { margin: 0; font-size: 27px; }
.landing-section-title > span { display: block; margin-top: 8px; color: #8194a7; font-size: 12px; }
.capability-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.capability-card { min-width: 0; min-height: 98px; padding: 17px; border: 1px solid rgba(126, 158, 189, .2); border-radius: 8px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 20px; align-items: center; gap: 13px; color: #f4f8fb; background: rgba(12, 23, 42, .82); text-align: left; transition: border-color .18s, background .18s, transform .18s; }
.capability-card:hover { border-color: rgba(91, 205, 243, .58); background: rgba(14, 31, 52, .94); transform: translateY(-2px); }
.capability-card > span:nth-child(2) { min-width: 0; }
.capability-card strong { display: block; font-size: 14px; }
.capability-card small { display: block; margin-top: 6px; overflow: hidden; color: #91a2b3; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.capability-card > svg { width: 16px; height: 16px; color: #63798e; }
.capability-icon { width: 48px; height: 48px; border-radius: 8px; display: grid; place-items: center; }
.capability-icon svg { width: 22px; height: 22px; }
.capability-icon.is-violet { color: #a590ff; background: #251d4d; }
.capability-icon.is-cyan { color: #55dcf5; background: #073a48; }
.capability-icon.is-pink { color: #f18dc4; background: #451b3a; }
.workflow-band { padding: 96px max(28px, 6vw); color: #121a20; background: #f3f6f7; }
.workflow-inner { width: min(1120px, 100%); margin: 0 auto; }
.landing-section-title.is-dark > p { color: #087e92; }
.landing-section-title.is-dark > span { color: #6b777d; }
.workflow-grid { margin-top: 42px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid #d5dcdf; }
.workflow-grid article { position: relative; min-height: 230px; padding: 34px 34px 28px; border-right: 1px solid #d5dcdf; }
.workflow-grid article:last-child { border-right: 0; }
.workflow-grid article > span { position: absolute; top: 22px; right: 26px; color: #c2cace; font-size: 34px; font-weight: 800; }
.workflow-grid article > svg { width: 28px; height: 28px; color: #088e9f; }
.workflow-grid h3 { margin: 40px 0 9px; font-size: 18px; }
.workflow-grid p { margin: 0; color: #6b777d; font-size: 13px; line-height: 1.75; }
.landing-cta { min-height: 280px; padding: 60px max(28px, 8vw); display: flex; align-items: center; justify-content: space-between; gap: 30px; background: #0d1518; }
.landing-cta h2 { margin: 0; font-size: 32px; }
.landing-footer { min-height: 76px; padding: 0 max(28px, 8vw); border-top: 1px solid #263136; display: flex; align-items: center; justify-content: space-between; color: #9eacb2; background: #0d1518; }
.landing-footer span { color: #f4f8fa; font-weight: 800; }
.landing-footer small { font-size: 11px; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; background: var(--dark); color: #f6faf8; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; color: #0d3026; background: #8ee1bf; border-radius: 8px; font-size: 13px; font-weight: 800; }
.brand strong { display: block; font-size: 15px; }
.brand span { display: block; margin-top: 3px; color: #8f9994; font-size: 11px; }
.nav-list { display: grid; gap: 6px; }
.nav-item { width: 100%; height: 44px; padding: 0 12px; border: 0; border-radius: 6px; display: flex; align-items: center; gap: 11px; color: #aeb8b3; background: transparent; text-align: left; transition: .18s ease; }
.nav-item:hover { color: #fff; background: #1c231f; }
.nav-item.is-active { color: #f7fffb; background: #25342d; }
.nav-item.is-active svg { color: #77dbb3; }
.sidebar-account { margin-top: auto; padding: 14px 8px; border-top: 1px solid #29312d; display: flex; align-items: center; gap: 8px; }
.sidebar-account[hidden] { display: none; }
.sidebar-account div { min-width: 0; flex: 1; }
.sidebar-account span { display: block; color: #87928c; font-size: 10px; }
.sidebar-account strong { display: block; margin-top: 3px; overflow: hidden; color: #eff8f3; font-size: 12px; text-overflow: ellipsis; }
.sidebar-account .icon-button { width: 34px; height: 34px; flex: 0 0 34px; }
.sidebar-account .icon-button svg { width: 17px; height: 17px; }
.sidebar-foot { padding: 12px 10px 2px; border-top: 1px solid #29312d; color: #a3ada8; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #7e8984; }
.status-dot.is-ok { background: #5fd29e; box-shadow: 0 0 0 4px rgba(95, 210, 158, .12); }
.status-dot.is-error { background: #e9655d; }

.workspace { min-width: 0; }
.workspace-topbar { min-height: 56px; padding: 0 18px; border-bottom: 1px solid rgba(107, 186, 195, .2); display: flex; align-items: center; gap: 20px; background: rgba(8, 21, 34, .96); position: sticky; top: 0; z-index: 8; }
.mobile-header { display: none; }
.view { display: none; min-height: 100vh; padding: 34px clamp(22px, 4vw, 64px) 40px; }
.view.is-active { display: block; }
.view-header { max-width: 1320px; margin: 0 auto 26px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.view-header h1 { margin: 0; font-size: clamp(25px, 3vw, 36px); line-height: 1.15; letter-spacing: 0; }
.view-header p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.compact-select { min-width: 230px; display: grid; gap: 6px; }
.compact-select span { color: var(--muted); font-size: 12px; }

select, input, textarea { width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); outline: none; transition: border-color .16s, box-shadow .16s; }
select, input { height: 42px; padding: 0 12px; }
textarea { padding: 12px; resize: vertical; line-height: 1.6; }
select:focus, input:focus, textarea:focus { border-color: #53a58a; box-shadow: 0 0 0 3px rgba(22, 131, 99, .1); }

.chat-layout { max-width: 1080px; height: calc(100vh - 145px); min-height: 560px; margin: 0 auto; position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); }
.chat-thread { height: 100%; padding: 24px 7% 126px; overflow-y: auto; }
.welcome-message { min-height: 72%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.welcome-icon { width: 50px; height: 50px; border: 1px solid #b9dccc; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: #eef8f3; }
.welcome-message h2 { margin: 17px 0 7px; font-size: 24px; }
.welcome-message p { margin: 0; color: var(--muted); }
.suggestions { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.suggestions button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: #44504a; background: #fff; font-size: 13px; }
.suggestions button:hover { border-color: #9ac9b7; color: var(--accent-strong); }
.message { margin: 0 auto 22px; max-width: 760px; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; }
.message-avatar { width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; background: #e9eeeb; color: #45514b; font-size: 12px; font-weight: 800; }
.message.assistant .message-avatar { color: #0d6249; background: #dff3ea; }
.message-content { min-width: 0; padding-top: 4px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.message-meta { margin-bottom: 4px; font-size: 12px; font-weight: 700; }
.typing::after { content: ""; display: inline-block; width: 6px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--accent); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.composer { position: absolute; left: 6%; right: 6%; bottom: 22px; min-height: 58px; padding: 9px 58px 9px 14px; border: 1px solid #cfd7d3; border-radius: 8px; background: #fff; box-shadow: 0 8px 28px rgba(26, 44, 35, .12); }
.composer textarea { max-height: 160px; min-height: 38px; padding: 7px 0; border: 0; box-shadow: none; resize: none; }
.send-button { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border: 0; border-radius: 6px; display: grid; place-items: center; color: #fff; background: var(--accent); }
.send-button:disabled { cursor: not-allowed; opacity: .5; }

.creator-layout { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(340px, 430px) minmax(0, 1fr); gap: 22px; align-items: start; }
.control-panel, .result-stage { min-height: 640px; border: 1px solid var(--line); background: var(--surface); }
.control-panel { padding: 22px; border-radius: 8px; display: grid; align-content: start; gap: 17px; }
.result-stage { border-radius: 8px; overflow: hidden; position: sticky; top: 24px; display: grid; place-items: center; background: #e9eeeb; }
.field { display: grid; gap: 8px; }
.field > label, .field > span:first-child { font-size: 13px; font-weight: 700; }
.field-meta { display: flex; justify-content: space-between; color: #87908c; font-size: 11px; }
.model-note { display: none; padding: 10px 12px; border-left: 3px solid var(--amber); background: #fff8ea; color: #6d5a35; font-size: 12px; line-height: 1.55; }
.model-note:not(:empty) { display: block; }
.dynamic-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }
.dynamic-fields .field.is-wide { grid-column: 1 / -1; }
.segmented { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 5px; }
.segment { min-height: 38px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 5px; background: #fff; color: #56615b; font-size: 12px; }
.segment.is-selected { border-color: var(--accent); color: var(--accent-strong); background: #edf8f3; box-shadow: inset 0 0 0 1px var(--accent); }
.toggle-row { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: space-between; }
.toggle { width: 38px; height: 22px; padding: 2px; border: 0; border-radius: 12px; background: #bdc5c1; }
.toggle::after { content: ""; display: block; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .16s; }
.toggle.is-on { background: var(--accent); }
.toggle.is-on::after { transform: translateX(16px); }
.upload-sections { display: grid; gap: 14px; }
.upload-block { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.upload-head { padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; background: #f7f9f8; }
.upload-head strong { display: block; font-size: 12px; }
.upload-head div span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.upload-count { color: var(--accent); font-size: 11px; }
.drop-zone { margin: 10px; min-height: 72px; border: 1px dashed #bdc8c2; border-radius: 5px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #65716b; background: #fbfcfb; font-size: 12px; }
.drop-zone:hover { border-color: var(--accent); color: var(--accent); }
.drop-zone small { color: #909995; }
.file-list { padding: 0 10px 10px; display: grid; gap: 6px; }
.file-item { min-height: 34px; padding: 5px 7px; border: 1px solid #e5e9e7; border-radius: 5px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 11px; }
.file-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-item button { width: 25px; height: 25px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.file-item.is-uploading { color: var(--muted); }
.primary-button { min-height: 46px; padding: 0 16px; border: 0; border-radius: 6px; display: flex; align-items: center; justify-content: center; gap: 9px; color: #fff; background: var(--accent); font-weight: 700; }
.primary-button:hover { background: var(--accent-strong); }
.primary-button:disabled { cursor: progress; opacity: .58; }
.stage-empty { padding: 40px; text-align: center; color: #64706a; }
.stage-empty > svg { width: 40px; height: 40px; color: #7f8d86; }
.stage-empty h2 { margin: 15px 0 7px; color: #3e4843; font-size: 17px; }
.stage-empty p { margin: 0; font-size: 13px; }
.task-state { width: min(450px, 80%); text-align: center; }
.task-state .spinner { width: 42px; height: 42px; margin: 0 auto 18px; border: 3px solid #cad4cf; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.task-state h2 { margin: 0 0 7px; font-size: 18px; }
.task-state p { margin: 0; color: var(--muted); font-size: 13px; }
.media-result { width: 100%; height: 100%; display: grid; place-items: center; background: #111513; }
.media-result img, .media-result video { max-width: 100%; max-height: calc(100vh - 170px); object-fit: contain; }
.result-actions { position: absolute; right: 14px; bottom: 14px; display: flex; gap: 7px; }
.result-actions a { width: 38px; height: 38px; border-radius: 6px; display: grid; place-items: center; color: #fff; background: rgba(10, 14, 12, .82); }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { max-width: 360px; padding: 12px 14px; border-radius: 6px; color: #fff; background: #222925; box-shadow: var(--shadow); font-size: 13px; animation: toast-in .2s ease; }
.toast.is-error { background: #852f2b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.access-dialog { width: min(410px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 8px; overflow-y: auto; box-shadow: 0 24px 70px rgba(0, 0, 0, .24); }
.access-dialog::backdrop { background: rgba(9, 12, 11, .65); }
.access-dialog form { padding: 30px; }
.dialog-close { position: absolute; z-index: 2; top: 14px; right: 14px; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 5px; display: grid; place-items: center; color: #7b8781; background: transparent; }
.dialog-close:hover { color: #25312b; background: #f0f3f1; }
.dialog-close svg { width: 18px; height: 18px; }
.access-dialog form[hidden] { display: none; }
.dialog-icon { width: 44px; height: 44px; border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: #e8f5ef; }
.access-dialog h2 { margin: 20px 0 7px; }
.access-dialog p { color: var(--muted); }
.access-dialog .field { margin: 16px 0 0; }
.access-dialog .primary-button { width: 100%; margin-top: 12px; }
.form-error { min-height: 18px; margin: 0; color: var(--danger) !important; font-size: 12px; }
.auth-switch { width: 100%; margin-top: 12px; padding: 8px; border: 0; color: var(--accent-strong); background: transparent; font-size: 13px; }
.auth-switch:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .landing-nav { height: 60px; padding: 0 16px; }
  .landing-brand-mark { width: 31px; height: 31px; }
  .landing-brand strong { font-size: 13px; }
  .landing-nav-actions { gap: 6px; }
  .landing-nav-actions button { min-height: 32px; padding: 0 11px; font-size: 11px; }
  .landing-hero { min-height: calc(100svh - 18px); padding: 92px 16px 25px; }
  .hero-content { margin: 0 auto 34px; }
  .hero-badge { margin-bottom: 17px; }
  .hero-content h1 { font-size: 36px; }
  .hero-copy { max-width: 520px; margin-top: 14px; font-size: 13px; }
  .hero-actions { margin-top: 20px; gap: 8px; }
  .hero-primary { min-height: 45px; }
  .landing-section-title h2 { font-size: 22px; }
  .landing-section-title > span { margin-top: 5px; }
  .capability-grid { margin-top: 16px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .capability-grid::-webkit-scrollbar { display: none; }
  .capability-card { flex: 0 0 calc(100vw - 52px); min-height: 88px; scroll-snap-align: center; }
  .workflow-band { padding: 72px 20px; }
  .workflow-grid { grid-template-columns: 1fr; }
  .workflow-grid article { min-height: 178px; border-right: 0; border-bottom: 1px solid #d5dcdf; }
  .workflow-grid article:last-child { border-bottom: 0; }
  .workflow-grid h3 { margin-top: 28px; }
  .landing-cta { min-height: 300px; padding: 55px 24px; align-items: flex-start; flex-direction: column; justify-content: center; }
  .landing-cta h2 { font-size: 27px; }
  .landing-footer { padding: 22px 20px; align-items: flex-start; flex-direction: column; justify-content: center; gap: 7px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 30; width: 236px; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.is-open { transform: translateX(0); box-shadow: 16px 0 50px rgba(0, 0, 0, .2); }
  .mobile-header { height: 60px; padding: 0 16px; display: flex; align-items: center; gap: 10px; background: var(--dark); color: #fff; }
  .mobile-header .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }
  .mobile-header .icon-button { margin-left: auto; }
  .icon-button { width: 38px; height: 38px; border: 0; border-radius: 5px; display: grid; place-items: center; color: #fff; background: #242c28; }
  .view { min-height: calc(100vh - 60px); padding: 24px 14px; }
  .view-header { align-items: start; flex-direction: column; }
  .compact-select { width: 100%; }
  .chat-layout { height: calc(100vh - 220px); min-height: 500px; }
  .chat-thread { padding-left: 16px; padding-right: 16px; }
  .composer { left: 10px; right: 10px; bottom: 10px; }
  .creator-layout { grid-template-columns: 1fr; }
  .control-panel, .result-stage { min-height: auto; }
  .result-stage { position: relative; top: 0; min-height: 420px; aspect-ratio: 4 / 3; }
}

@media (max-width: 520px) {
  .hero-content h1 { font-size: 34px; }
  .hero-content h1 span { display: block; margin-top: 3px; }
  .hero-copy { max-width: 330px; }
  .hero-badge { font-size: 10px; }
  .capability-preview .landing-section-title > p { display: none; }
  .capability-preview .landing-section-title h2 { font-size: 20px; }
  .view-header h1 { font-size: 27px; }
  .suggestions { display: grid; width: 100%; }
  .dynamic-fields { grid-template-columns: 1fr; }
  .dynamic-fields .field.is-wide { grid-column: auto; }
  .control-panel { padding: 16px; }
  .result-stage { min-height: 360px; aspect-ratio: 3 / 4; }
}

/* High-signal workspace treatment: dark instrument panels with restrained cyan telemetry. */
body.is-workspace { background: #07131a; color: #e8f4f5; }
body.is-workspace .workspace { background-color: #07131a; background-image: linear-gradient(rgba(86, 201, 213, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(86, 201, 213, .045) 1px, transparent 1px); background-size: 32px 32px; }
body.is-workspace .view-header h1 { color: #f1fbfc; text-shadow: 0 0 22px rgba(76, 220, 225, .24); }
body.is-workspace .view-header p:not(.eyebrow), body.is-workspace .compact-select span { color: #8ea8ae; }
body.is-workspace .eyebrow { color: #57d7df; }
body.is-workspace .chat-layout, body.is-workspace .control-panel, body.is-workspace .result-stage { border-color: rgba(98, 194, 206, .25); background: rgba(10, 29, 38, .9); box-shadow: 0 18px 60px rgba(0, 0, 0, .3), 0 0 0 1px rgba(93, 229, 232, .04); }
body.is-workspace select, body.is-workspace input, body.is-workspace textarea, body.is-workspace .composer { border-color: rgba(107, 186, 195, .3); color: #e8f4f5; background: #091b24; }
body.is-workspace select:focus, body.is-workspace input:focus, body.is-workspace textarea:focus { border-color: #51d7df; box-shadow: 0 0 0 3px rgba(81, 215, 223, .12), 0 0 24px rgba(81, 215, 223, .1); }
body.is-workspace .welcome-message p, body.is-workspace .stage-empty, body.is-workspace .task-state p, body.is-workspace .message-meta { color: #8ea8ae; }
body.is-workspace .welcome-icon { border-color: rgba(83, 220, 226, .45); color: #5ce4e9; background: rgba(59, 202, 211, .1); box-shadow: 0 0 30px rgba(40, 190, 202, .15); }
body.is-workspace .suggestions button, body.is-workspace .segment, body.is-workspace .toggle-row, body.is-workspace .upload-block { border-color: rgba(107, 186, 195, .25); color: #b9d7da; background: #0b202a; }
body.is-workspace .suggestions button:hover, body.is-workspace .segment:hover { border-color: #52dbe2; color: #72eff1; }
body.is-workspace .segment.is-selected { border-color: #45d8df; color: #8af6f4; background: rgba(41, 181, 193, .15); box-shadow: inset 0 0 0 1px #45d8df, 0 0 18px rgba(69, 216, 223, .12); }
body.is-workspace .model-note { border-left-color: #ecba68; background: rgba(125, 83, 23, .22); color: #e4c58c; }
body.is-workspace .upload-head { background: #0d2630; }
body.is-workspace .drop-zone { border-color: rgba(107, 186, 195, .35); color: #9fc5c9; background: rgba(5, 18, 24, .56); }
body.is-workspace .primary-button, body.is-workspace .send-button { color: #031518; background: #55e1d3; box-shadow: 0 0 22px rgba(85, 225, 211, .18); }
body.is-workspace .primary-button:hover, body.is-workspace .send-button:hover { background: #84f0df; box-shadow: 0 0 30px rgba(85, 225, 211, .3); }
body.is-workspace .text-button { border-color: rgba(107, 186, 195, .35); color: #b8d9dc; background: #0b202a; }
body.is-workspace .text-button:hover { border-color: #55e1d3; color: #7df2e5; }
.account-balance { min-width: 60px; text-align: right; }
.account-balance strong { color: #73e8d9 !important; }
.estimate-label { margin-left: auto; color: rgba(3, 21, 24, .72); font-size: 11px; font-weight: 700; }
.video-job { min-height: 170px; width: 100%; border-bottom: 1px solid rgba(107, 186, 195, .16); display: grid; place-items: center; padding: 18px; }
.video-job:last-child { border-bottom: 0; }
.video-job .task-state { width: min(460px, 88%); }
.progress-track { width: 100%; height: 7px; margin-top: 18px; overflow: hidden; border-radius: 10px; background: rgba(124, 183, 191, .18); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #55e1d3; box-shadow: 0 0 16px rgba(85, 225, 211, .55); transition: width .4s ease; }
.progress-value { display: block; margin-top: 8px; color: #73e8d9; font-size: 12px; }
.is-video-view .app-shell { grid-template-columns: 1fr; }
.is-video-view .sidebar, .is-video-view .mobile-header { display: none; }
.is-video-view .workspace-topbar { height: 56px; padding: 0 20px; border-bottom: 1px solid rgba(107, 186, 195, .2); display: flex; align-items: center; gap: 30px; background: rgba(8, 21, 34, .96); }
.topbar-brand { display: inline-flex; align-items: center; gap: 9px; color: #eafafa; text-decoration: none; white-space: nowrap; }
.topbar-mark { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(92, 222, 227, .55); border-radius: 8px; color: #72ebeb; background: #143847; font-size: 10px; font-weight: 800; }
.topbar-brand strong { font-size: 13px; }
.workspace-top-nav { min-width: 0; flex: 1; display: flex; justify-content: center; gap: 3px; }
.top-nav-item { min-height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; color: #83a5aa; background: transparent; font-size: 11px; }
.top-nav-item svg { width: 14px; height: 14px; }
.top-nav-item:hover:not(:disabled), .top-nav-item.is-active { color: #e7ffff; border-color: rgba(83, 211, 220, .22); background: rgba(42, 153, 166, .2); }
.top-nav-item:disabled { cursor: default; opacity: .45; }
.topbar-account { display: flex; align-items: center; gap: 9px; }
.topbar-account > span { padding: 7px 11px; border: 1px solid rgba(73, 224, 202, .28); border-radius: 8px; color: #78ead9; background: rgba(33, 132, 125, .13); font-size: 10px; white-space: nowrap; }
.topbar-account .icon-button { width: 30px; height: 30px; border: 1px solid rgba(107, 186, 195, .25); color: #8cb8bc; background: transparent; }
.is-video-view .view#view-video { padding: 0 20px 28px; }
.is-video-view .view#view-video .view-header { max-width: 1540px; margin: 0 auto; padding: 22px 4px 16px; }
.is-video-view .view#view-video .view-header h1 { font-size: 31px; }
.is-video-view .view#view-video .view-header p:not(.eyebrow) { font-size: 12px; }
.view#view-video .result-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)); align-content: start; align-items: stretch; justify-items: stretch; gap: 14px; padding: 14px; overflow-y: auto; }
.view#view-video .creator-layout { max-width: 1540px; grid-template-columns: 248px minmax(300px, 360px) minmax(0, 1fr); gap: 14px; }
.video-model-rail { min-height: 640px; padding: 16px 12px; border: 1px solid rgba(107, 186, 195, .22); border-radius: 10px; overflow: hidden auto; background: rgba(7, 25, 34, .9); }
.rail-brand { display: flex; align-items: center; gap: 9px; padding: 3px 5px 18px; border-bottom: 1px solid rgba(107, 186, 195, .16); }
.rail-brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(101, 231, 232, .45); border-radius: 8px; color: #77ebec; background: #133541; font-size: 11px; font-weight: 800; }
.rail-brand strong, .rail-brand small { display: block; }
.rail-brand strong { color: #e8fbfc; font-size: 13px; }
.rail-brand small { margin-top: 3px; color: #6e9ca2; font-size: 10px; }
.rail-heading { padding: 16px 5px 9px; display: flex; justify-content: space-between; color: #85aeb3; font-size: 11px; }
.rail-heading strong { color: #5bdae0; font-size: 10px; }
.video-model-list { display: grid; gap: 7px; }
.video-model-item { width: 100%; min-height: 75px; padding: 9px; border: 1px solid rgba(107, 186, 195, .16); border-radius: 9px; display: grid; grid-template-columns: 31px minmax(0, 1fr) 14px; align-items: center; gap: 8px; color: #a8c8cc; background: rgba(12, 35, 46, .74); text-align: left; transition: border-color .16s, background .16s, transform .16s; }
.video-model-item:hover { border-color: rgba(94, 221, 225, .55); transform: translateX(2px); }
.video-model-item.is-selected { border-color: #805ce5; background: linear-gradient(135deg, rgba(80, 62, 164, .48), rgba(30, 55, 91, .72)); box-shadow: inset 0 0 0 1px rgba(160, 127, 255, .2), 0 0 18px rgba(107, 84, 220, .12); }
.model-avatar { width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(89, 220, 228, .35); border-radius: 7px; color: #6de6e9; background: #123947; }
.model-avatar svg { width: 15px; height: 15px; }
.model-copy { min-width: 0; }
.model-copy strong, .model-copy small, .model-copy em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-copy strong { color: #e2f7f8; font-size: 11px; }
.model-copy small { margin-top: 4px; color: #75aab0; font-size: 9px; }
.model-copy em { margin-top: 3px; color: #b08aff; font-size: 9px; font-style: normal; }
.model-chevron { width: 13px; color: #587e84; }
.view#view-video .control-panel { min-height: 640px; }
.view#view-video #video-form > .field:first-child { display: none; }
.view#view-video .result-stage > .stage-empty { grid-column: 1 / -1; min-height: 100%; display: grid; place-content: center; }
.view#view-video .video-job { min-height: 250px; padding: 0; overflow: hidden; border: 1px solid rgba(107, 186, 195, .25); border-radius: 10px; background: rgba(7, 26, 35, .92); box-shadow: inset 0 1px 0 rgba(130, 230, 231, .07), 0 14px 34px rgba(0, 0, 0, .18); display: block; }
.job-head { min-height: 64px; padding: 12px 14px; border-bottom: 1px solid rgba(107, 186, 195, .16); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.job-title, .job-head-actions { display: flex; align-items: center; gap: 9px; min-width: 0; }
.job-title > div { min-width: 0; }
.job-title strong, .job-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-title strong { color: #eafafa; font-size: 13px; }
.job-title small { margin-top: 4px; color: #79aeb4; font-size: 10px; }
.job-icon { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid rgba(80, 219, 224, .35); border-radius: 7px; color: #63e4e5; background: rgba(44, 179, 192, .13); }
.job-icon svg { width: 14px; height: 14px; }
.job-status { min-width: 45px; padding: 4px 7px; border: 1px solid rgba(84, 220, 215, .25); border-radius: 999px; color: #7de5dd; background: rgba(70, 186, 183, .1); text-align: center; font-size: 10px; }
.job-remove { width: 25px; height: 25px; padding: 0; border: 0; color: #75959a; background: transparent; }
.job-remove:hover { color: #ff8e8e; }
.job-body { min-height: 185px; display: grid; place-items: center; padding: 14px; }
.job-body .task-state { width: 100%; }
.job-body .media-result { min-height: 210px; border-radius: 7px; }
.job-body .media-result video { max-height: 260px; width: 100%; }
.job-body .stage-empty { padding: 20px; }
@media (max-width: 1100px) { .view#view-video .creator-layout { grid-template-columns: 210px minmax(280px, 340px) minmax(0, 1fr); } }
@media (max-width: 860px) { .view#view-video .creator-layout { grid-template-columns: 1fr; } .video-model-rail { min-height: auto; max-height: 190px; } .video-model-list { display: flex; overflow-x: auto; padding-bottom: 4px; } .video-model-item { flex: 0 0 220px; } .view#view-video .result-stage { grid-template-columns: 1fr; } }

/* Video production desk: full-width model rail + shared controls + three task columns. */
.is-video-view .topbar-brand, .is-video-view #view-video .view-header > div, .is-video-view .rail-brand { display: none; }
.is-video-view .workspace-topbar { padding-left: 18px; padding-right: 18px; }
.is-video-view .workspace-top-nav { justify-content: center; }
.is-video-view .view#view-video { padding: 0; }
.is-video-view .view#view-video .view-header { width: 100%; max-width: none; min-height: 54px; margin: 0; padding: 9px 20px; border-bottom: 1px solid rgba(107, 186, 195, .18); align-items: center; justify-content: flex-end; }
.is-video-view .task-add-button { min-height: 34px; color: #eaffff; border-color: rgba(80, 219, 224, .4); background: rgba(21, 94, 112, .28); }
.is-video-view .video-workbench { width: 100%; max-width: none; min-height: calc(100vh - 110px); margin: 0; grid-template-columns: 300px minmax(0, 1fr); gap: 0; align-items: stretch; }
.is-video-view .video-model-rail { min-height: calc(100vh - 110px); max-height: calc(100vh - 110px); padding: 10px; border-width: 0 1px 0 0; border-radius: 0; background: rgba(7, 23, 34, .93); }
.is-video-view .rail-heading { padding-top: 5px; }
.is-video-view .video-model-item { min-height: 76px; }
.video-main-area { min-width: 0; display: grid; grid-template-rows: auto 1fr; align-content: start; }
.is-video-view .video-shared-controls { min-height: 58px; padding: 9px 14px; border-width: 0 0 1px; border-radius: 0; display: flex; align-items: flex-end; gap: 12px; overflow-x: auto; background: rgba(9, 27, 39, .9); box-shadow: none; }
.is-video-view .video-shared-controls > .field:first-child, .is-video-view .video-hidden-prompt, .is-video-view .video-hidden-uploads, .is-video-view .video-hidden-submit { display: none; }
.is-video-view .video-shared-controls .model-note { min-width: 240px; max-width: 300px; margin: 0; padding: 8px 10px; flex: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-video-view .video-shared-controls .dynamic-fields { display: flex; align-items: flex-end; gap: 9px; }
.is-video-view .video-shared-controls .dynamic-fields .field { width: 150px; min-width: 150px; }
.is-video-view .video-shared-controls .dynamic-fields .field.is-wide { width: 230px; min-width: 230px; }
.is-video-view .video-shared-controls .dynamic-fields label { font-size: 10px; color: #84aeb3; }
.is-video-view .video-shared-controls .segmented { display: flex; }
.is-video-view .video-shared-controls .segment { min-width: 52px; min-height: 34px; }
.is-video-view .view#view-video .result-stage { width: 100%; min-height: calc(100vh - 169px); padding: 16px; border: 0; border-radius: 0; position: static; display: block; overflow: auto; background: transparent; box-shadow: none; }
.video-draft-grid { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(280px, 1fr)); gap: 14px; align-items: start; }
.video-draft-card { min-width: 0; padding: 14px; border: 1px solid rgba(98, 185, 205, .3); border-radius: 9px; background: rgba(11, 31, 47, .93); box-shadow: 0 15px 38px rgba(0, 0, 0, .18); }
.draft-head { min-height: 34px; display: flex; align-items: center; justify-content: space-between; }
.draft-head > div { display: flex; align-items: center; gap: 8px; }
.draft-head strong { color: #eefcfd; font-size: 13px; }
.draft-icon { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid rgba(74, 204, 222, .35); border-radius: 7px; color: #57dce4; background: rgba(27, 121, 145, .2); }
.draft-icon svg { width: 13px; height: 13px; }
.draft-status { padding: 4px 7px; border: 1px solid rgba(119, 170, 189, .18); border-radius: 12px; color: #90abb2; background: rgba(109, 143, 158, .08); font-size: 9px; }
.draft-cost { margin: 5px 0 12px; color: #f2c33f; font-size: 10px; font-weight: 700; }
.draft-label { display: block; margin-bottom: 6px; color: #78aab1; font-size: 10px; }
.video-draft-prompt { min-height: 88px; resize: vertical; font-size: 12px; }
.draft-upload { margin-top: 12px; padding: 10px; border: 1px dashed rgba(89, 175, 194, .25); border-radius: 8px; background: rgba(4, 17, 28, .35); }
.draft-upload > div { display: flex; justify-content: space-between; color: #7faab0; font-size: 9px; }
.draft-upload > div strong { color: #9fc9cd; }
.draft-upload label { min-height: 35px; margin-top: 8px; padding: 0 10px; border: 1px solid rgba(134, 93, 213, .45); border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; color: #c6a9ff; background: rgba(102, 66, 170, .22); font-size: 10px; }
.draft-upload label svg { width: 14px; height: 14px; }
.draft-upload small { margin-top: 8px; display: block; overflow: hidden; color: #5f858c; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.draft-upload.is-disabled { opacity: .65; }
.draft-generate { width: 100%; min-height: 40px; margin-top: 12px; border: 0; border-radius: 7px; display: flex; align-items: center; justify-content: center; gap: 7px; color: #fff; background: linear-gradient(90deg, #119fc1, #00a779); font-size: 12px; font-weight: 750; box-shadow: 0 7px 20px rgba(0, 177, 171, .14); }
.draft-generate:hover { filter: brightness(1.1); }
.draft-generate svg { width: 15px; height: 15px; }
.video-draft-grid > .video-job { min-height: 320px; }
@media (max-width: 1200px) { .video-draft-grid { grid-template-columns: repeat(2, minmax(280px, 1fr)); } }
@media (max-width: 860px) { .is-video-view .workspace-topbar { display: flex; overflow-x: auto; } .is-video-view .workspace-top-nav { justify-content: flex-start; } .is-video-view .video-workbench { grid-template-columns: 1fr; } .is-video-view .video-model-rail { min-height: auto; max-height: 190px; border-width: 0 0 1px; } .video-draft-grid { grid-template-columns: 1fr; } .is-video-view .video-shared-controls .model-note { display: none; } }
/* Final video desk alignment */
.is-video-view #view-video .view-header > div { display:block; min-width:0; }
.is-video-view .view#view-video .view-header { min-height:74px; padding:13px 24px; align-items:center; justify-content:space-between; }
.is-video-view .view#view-video .view-header h1 { margin:0; font-size:25px; }
.is-video-view .view#view-video .view-header p:not(.eyebrow) { margin-top:4px; font-size:11px; }
.is-video-view .video-workbench { grid-template-columns:360px minmax(0,1fr); min-width:0; }
.is-video-view .video-model-rail { min-width:0; }
.is-video-view .video-main-area { min-width:0; min-height:0; grid-template-rows:auto minmax(0,1fr); }
.is-video-view .video-shared-controls { min-width:0; min-height:70px; padding:11px 18px; display:flex; align-items:center; gap:14px; overflow-x:auto; }
.is-video-view .video-shared-controls .model-note { display:none; }
.is-video-view .video-shared-controls .dynamic-fields { min-width:0; flex:1 1 auto; display:flex; align-items:flex-end; gap:12px; }
.is-video-view .video-shared-controls .dynamic-fields .field { width:180px; min-width:180px; }
.is-video-view .video-shared-controls .dynamic-fields .field.is-wide { width:240px; min-width:240px; }
.is-video-view .view#view-video .result-stage { min-width:0; min-height:0; padding:18px; overflow:auto; }
.is-video-view .video-draft-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; align-items:start; }
.is-video-view .video-draft-card { min-width:0; }
@media (max-width:1200px) { .is-video-view .video-workbench { grid-template-columns:320px minmax(0,1fr); } .is-video-view .video-draft-grid { grid-template-columns:repeat(2,minmax(260px,1fr)); } }
@media (max-width:860px) { .is-video-view .video-workbench { grid-template-columns:1fr; } .is-video-view .video-draft-grid { grid-template-columns:1fr; } }
/* Beat the legacy creator-layout selectors on the video route. */
.is-video-view #view-video .creator-layout.video-workbench { grid-template-columns:360px minmax(0,1fr); }
.is-video-view #view-video .video-main-area { grid-column:auto; min-width:0; min-height:0; grid-template-rows:auto minmax(0,1fr); }
.is-video-view #view-video .video-shared-controls { min-height:70px; height:auto; padding:11px 18px; display:flex; align-items:center; gap:14px; overflow-x:auto; }
.is-video-view #view-video .video-shared-controls .model-note { display:none; }
.is-video-view #view-video .video-shared-controls .dynamic-fields { min-width:0; flex:1 1 auto; display:flex; align-items:flex-end; gap:12px; }
.is-video-view #view-video .video-shared-controls .dynamic-fields .field { width:180px; min-width:180px; }
.is-video-view #view-video .video-shared-controls .dynamic-fields .field.is-wide { width:240px; min-width:240px; }
.is-video-view #view-video .result-stage { min-width:0; min-height:0; width:auto; padding:18px; position:static; display:block; overflow:auto; }
.is-video-view #view-video .video-draft-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; }
@media (max-width:1200px) { .is-video-view #view-video .creator-layout.video-workbench { grid-template-columns:320px minmax(0,1fr); } .is-video-view #view-video .video-draft-grid { grid-template-columns:repeat(2,minmax(260px,1fr)); } }
@media (max-width:860px) { .is-video-view #view-video .creator-layout.video-workbench { grid-template-columns:1fr; } .is-video-view #view-video .video-draft-grid { grid-template-columns:1fr; } }
