:root {
  --ink: #15202e;
  --ink-soft: #5c6877;
  --muted: #8792a0;
  --line: #e6eaf0;
  --surface: #ffffff;
  --canvas: #f5f7fa;
  --sidebar: #101823;
  --sidebar-soft: #1b2634;
  --sidebar-muted: #8490a0;
  --accent: #ef7b62;
  --accent-deep: #db604b;
  --accent-light: #fff0eb;
  --green: #3d9a76;
  --green-light: #e8f7f0;
  --purple: #7b68d2;
  --purple-light: #f0edff;
  --blue: #5b88d7;
  --blue-light: #ebf2ff;
  --shadow: 0 14px 42px rgba(25, 39, 55, .07);
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { color: var(--ink); background: var(--canvas); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .6; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; min-width: 248px; color: #f5f7fb; background: var(--sidebar); padding: 26px 16px 18px; display: flex; flex-direction: column; }
.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 11px 29px; }
.brand-mark { display: flex; gap: 3px; align-items: end; height: 23px; }
.brand-mark span { width: 5px; border-radius: 4px; background: #f4a38c; display: block; }
.brand-mark span:nth-child(1) { height: 12px; opacity: .75; }
.brand-mark span:nth-child(2) { height: 20px; }
.brand-mark span:nth-child(3) { height: 15px; opacity: .86; }
.brand-title { font-size: 16px; font-weight: 700; letter-spacing: .07em; }
.brand-subtitle { color: #738094; font-size: 8px; letter-spacing: .17em; margin-top: 4px; }
.project-switcher { width: 100%; border-radius: 11px; background: var(--sidebar-soft); color: #f7f9fc; display: flex; align-items: center; gap: 9px; padding: 10px 10px; text-align: left; margin-bottom: 29px; }
.project-switcher:hover { background: #263445; }
.project-switcher-icon { width: 27px; height: 27px; border-radius: 8px; display: grid; place-items: center; color: #f7a48d; background: rgba(239, 123, 98, .16); font-size: 19px; font-weight: 300; }
.project-switcher-copy { min-width: 0; display: flex; flex-direction: column; flex: 1; }
.project-switcher-copy small { color: var(--sidebar-muted); font-size: 10px; margin-bottom: 4px; }
.project-switcher-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.chevron { color: #718096; font-size: 17px; }
.side-nav { flex: 1; }
.nav-caption { color: #697587; font-size: 10px; letter-spacing: .14em; padding: 0 12px 10px; }
.nav-caption-secondary { margin-top: 27px; }
.nav-item { width: 100%; background: transparent; border-radius: 9px; color: #aab4c2; display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; text-align: left; position: relative; transition: .2s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-item.is-active { color: #fff; background: #273445; box-shadow: inset 3px 0 0 var(--accent); }
.nav-item em { margin-left: auto; color: #788595; font-style: normal; font-size: 10px; }
.nav-item.is-active em { color: #e8a18f; }
.nav-icon { width: 17px; height: 17px; display: inline-block; position: relative; opacity: .85; flex: 0 0 17px; }
.icon-grid::before { content: ""; position: absolute; inset: 2px; border: 1.4px solid currentColor; border-radius: 3px; box-shadow: 5px 0 0 -1px var(--sidebar), 5px 0 0 0 currentColor, 0 5px 0 -1px var(--sidebar), 0 5px 0 0 currentColor, 5px 5px 0 -1px var(--sidebar), 5px 5px 0 0 currentColor; width: 5px; height: 5px; }
.icon-spark::before { content: "✦"; position: absolute; font-size: 20px; top: -5px; left: 0; }
.icon-person::before { content: ""; position: absolute; left: 5px; top: 1px; width: 6px; height: 6px; border: 1.4px solid currentColor; border-radius: 50%; }
.icon-person::after { content: ""; position: absolute; left: 2px; bottom: 1px; width: 12px; height: 7px; border: 1.4px solid currentColor; border-radius: 9px 9px 4px 4px; }
.icon-script::before { content: ""; position: absolute; inset: 1px 3px; border: 1.4px solid currentColor; border-radius: 2px; }
.icon-script::after { content: "—\A—\A—"; white-space: pre; position: absolute; font-size: 7px; line-height: 4px; top: 4px; left: 6px; }
.icon-video::before { content: ""; position: absolute; left: 1px; top: 3px; width: 10px; height: 10px; border: 1.4px solid currentColor; border-radius: 3px; }
.icon-video::after { content: ""; position: absolute; right: 0; top: 6px; border-left: 5px solid currentColor; border-top: 3px solid transparent; border-bottom: 3px solid transparent; }
.icon-library::before { content: ""; position: absolute; inset: 2px 1px; border: 1.4px solid currentColor; border-radius: 3px; box-shadow: inset 0 4px 0 -3px currentColor; }
.icon-sliders::before { content: "☷"; position: absolute; font-size: 19px; top: -5px; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.075); padding: 16px 10px 0; color: #6d7a8b; font-size: 10px; }
.connection-state { display: flex; align-items: center; gap: 7px; color: #9aa7b7; margin-bottom: 14px; }
.pulse-dot { width: 6px; height: 6px; background: #57c596; border-radius: 50%; box-shadow: 0 0 0 4px rgba(87,197,150,.1); }
.sidebar-footline { display: flex; align-items: center; justify-content: space-between; }
.kbd { border: 1px solid #303c4b; border-radius: 4px; padding: 2px 5px; color: #7d8a9b; }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 70px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.78); display: flex; align-items: center; justify-content: space-between; padding: 0 39px; }
.topbar-left { display: flex; align-items: center; gap: 11px; color: #7f8a97; font-size: 11px; letter-spacing: .04em; }
.topbar-kicker { font-size: 10px; color: #a0a8b3; letter-spacing: .1em; }
.topbar-kicker span { color: #6a7480; }
.topbar-slash { color: #c6ccd3; }
.topbar-left > span:last-child { color: #5b6775; letter-spacing: 0; }
.topbar-actions { display: flex; align-items: center; gap: 19px; }
.ghost-button, .primary-button { border-radius: 8px; padding: 9px 14px; font-size: 12px; transition: .2s ease; }
.ghost-button { color: #677383; background: transparent; border: 1px solid var(--line); }
.ghost-button:hover { color: var(--ink); background: #fff; border-color: #d7dde5; }
.button-icon { font-size: 15px; margin-right: 5px; }
.avatar-button { width: 31px; height: 31px; border-radius: 50%; color: #fff; background: #26354a; font-size: 11px; font-weight: 700; }
.mobile-menu { display: none; color: var(--ink); background: transparent; font-size: 20px; }
.page-content { max-width: 1390px; margin: 0 auto; padding: 39px 44px 60px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.eyebrow { color: var(--accent-deep); font-size: 10px; letter-spacing: .15em; font-weight: 700; margin-bottom: 9px; }
.page-heading h1 { margin: 0; font-size: 28px; letter-spacing: -.035em; line-height: 1.2; }
.page-heading p { color: var(--ink-soft); margin: 9px 0 0; line-height: 1.6; }
.heading-actions { display: flex; gap: 9px; align-items: center; }
.primary-button { color: #fff; background: var(--accent); box-shadow: 0 7px 17px rgba(239,123,98,.2); }
.primary-button:hover { background: var(--accent-deep); transform: translateY(-1px); }
.primary-button span { font-size: 16px; margin-left: 7px; vertical-align: -1px; }
.soft-button { color: var(--accent-deep); background: var(--accent-light); border-radius: 8px; padding: 9px 13px; font-size: 12px; }
.soft-button:hover { background: #ffe5de; }
.hero-panel { min-height: 218px; border-radius: var(--radius); background: linear-gradient(110deg, #243344 0%, #182432 66%, #273649 100%); color: #fff; padding: 32px 36px; position: relative; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 31px; }
.hero-panel::after { content: ""; position: absolute; right: 8%; top: -88px; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 28px rgba(255,255,255,.025), 0 0 0 57px rgba(255,255,255,.018); }
.hero-panel::before { content: "✦"; position: absolute; right: 17%; bottom: 21px; color: rgba(255,255,255,.18); font-size: 27px; }
.hero-panel > * { position: relative; z-index: 1; }
.hero-label { color: #eea494; font-size: 10px; letter-spacing: .17em; margin-bottom: 13px; }
.hero-panel h2 { font-size: 26px; margin: 0; letter-spacing: -.03em; max-width: 630px; }
.hero-panel p { color: #b4c0ce; max-width: 560px; line-height: 1.7; margin: 12px 0 21px; }
.hero-panel .primary-button { background: #ee836a; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 14px; }
.section-title h2 { font-size: 17px; letter-spacing: -.02em; margin: 0; }
.section-title small { color: var(--muted); font-size: 11px; }
.workflow-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 31px; }
.workflow-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 18px 17px 16px; min-height: 150px; cursor: pointer; transition: .2s ease; }
.workflow-card:hover { border-color: #ccd4dd; box-shadow: var(--shadow); transform: translateY(-2px); }
.workflow-index { color: #abb4be; font-size: 10px; letter-spacing: .1em; }
.workflow-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; margin: 12px 0 10px; font-size: 17px; }
.workflow-card:nth-child(1) .workflow-icon { background: var(--accent-light); color: var(--accent); }
.workflow-card:nth-child(2) .workflow-icon { background: var(--purple-light); color: var(--purple); }
.workflow-card:nth-child(3) .workflow-icon { background: var(--blue-light); color: var(--blue); }
.workflow-card:nth-child(4) .workflow-icon { background: var(--green-light); color: var(--green); }
.workflow-card h3 { font-size: 13px; margin: 0 0 7px; }
.workflow-card p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 0; }
.status-pill { position: absolute; top: 17px; right: 14px; color: #9aa3ae; font-size: 10px; }
.status-pill.done { color: var(--green); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); gap: 22px; }
.content-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 21px 22px; }
.card-title { font-size: 13px; font-weight: 700; margin: 0 0 17px; }
.next-step { display: flex; align-items: center; gap: 14px; background: #fff8f5; border: 1px solid #f9dfd7; border-radius: 11px; padding: 14px; }
.next-step-icon { width: 35px; height: 35px; border-radius: 10px; background: #ffe5dc; display: grid; place-items: center; color: var(--accent-deep); font-size: 16px; }
.next-step-copy { min-width: 0; flex: 1; }
.next-step-copy strong { display: block; font-size: 12px; margin-bottom: 4px; }
.next-step-copy span { display: block; color: var(--muted); font-size: 11px; }
.mini-action { color: var(--accent-deep); background: transparent; font-size: 11px; white-space: nowrap; }
.empty-project { border: 1px dashed #d9dfe7; border-radius: 11px; padding: 18px; color: var(--muted); line-height: 1.6; font-size: 12px; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.metric { background: #fafbfc; border-radius: 10px; padding: 13px; }
.metric b { display: block; font-size: 19px; margin-bottom: 5px; letter-spacing: -.04em; }
.metric span { color: var(--muted); font-size: 10px; }
.stage-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 22px; align-items: start; }
.form-card { border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 25px; }
.form-card h2 { margin: 0 0 7px; font-size: 16px; }
.form-card > .card-intro { color: var(--ink-soft); line-height: 1.6; font-size: 12px; margin: 0 0 23px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.field { margin-bottom: 17px; }
.field.full { grid-column: 1 / -1; }
.field-label { display: block; color: #556171; font-size: 11px; font-weight: 700; margin-bottom: 7px; }
.hint { color: var(--muted); font-size: 10px; font-weight: 400; margin-left: 6px; }
.text-input, .select-input, .text-area { width: 100%; color: var(--ink); border: 1px solid #dfe4ea; border-radius: 8px; background: #fbfcfd; outline: none; padding: 10px 12px; transition: .2s ease; }
.text-input:focus, .select-input:focus, .text-area:focus { border-color: #ef9b89; background: #fff; box-shadow: 0 0 0 3px rgba(239,123,98,.1); }
.text-area { min-height: 112px; line-height: 1.65; resize: vertical; }
.text-area.tall { min-height: 185px; }
.field-note { color: var(--muted); font-size: 10px; line-height: 1.5; margin-top: 6px; }
.file-input-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop { min-height: 63px; border: 1px dashed #d5dce4; border-radius: 9px; background: #fbfcfd; padding: 10px 12px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: .2s ease; }
.file-drop:hover { border-color: #ee9c8b; background: #fffaf8; }
.file-drop-icon { width: 31px; height: 31px; border-radius: 8px; display: grid; place-items: center; color: var(--accent-deep); background: var(--accent-light); font-size: 19px; }
.file-drop-copy { display: grid; gap: 3px; min-width: 0; flex: 1; }
.file-drop-copy strong { color: #4f5b68; font-size: 11px; }
.file-drop-copy small { color: var(--muted); font-size: 10px; }
.file-name { color: #9aa4af; font-size: 10px; max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-preview { display: flex; align-items: center; gap: 9px; color: #7c8793; margin-top: 8px; font-size: 10px; }
.reference-preview img { width: 34px; height: 34px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.reference-preview[hidden] { display: none; }
.form-footer { display: flex; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 4px; }
.form-footer small { color: var(--muted); font-size: 10px; }
.script-editor-card { margin-top: 22px; }
.editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 21px; }
.editor-heading h2 { margin: 0 0 7px; }
.editor-heading .card-intro { margin-bottom: 0; }
.editor-status { color: var(--green); background: var(--green-light); border-radius: 5px; padding: 5px 8px; font-size: 10px; white-space: nowrap; }
.editable-scenes { display: grid; gap: 13px; margin-top: 3px; }
.editable-scene { border: 1px solid #e2e7ed; border-radius: 11px; background: #fbfcfd; padding: 17px; }
.editable-scene-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.editable-scene-label { color: #4f80cf; font-size: 12px; }
.danger-button { color: #b66a62; background: transparent; font-size: 10px; padding: 4px 0; }
.danger-button:hover { color: #9c4039; }
.editable-scene .field { margin-bottom: 11px; }
.editable-scene .text-area { min-height: 72px; }
.editor-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.guide-card { border-radius: var(--radius); padding: 23px; color: #fff; background: #202e3e; min-height: 220px; position: relative; overflow: hidden; }
.guide-card::after { content: ""; width: 185px; height: 185px; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; position: absolute; right: -84px; bottom: -88px; box-shadow: 0 0 0 19px rgba(255,255,255,.025), 0 0 0 39px rgba(255,255,255,.02); }
.guide-card > * { position: relative; z-index: 1; }
.guide-card .eyebrow { color: #efa08c; }
.guide-card h3 { font-size: 15px; margin: 0 0 10px; }
.guide-card p { color: #acb8c6; line-height: 1.7; font-size: 11px; margin: 0 0 19px; }
.guide-list { display: grid; gap: 11px; }
.guide-item { display: flex; gap: 10px; align-items: flex-start; color: #c4ced9; font-size: 11px; line-height: 1.5; }
.guide-item i { color: #f39a83; font-style: normal; font-size: 12px; }
.output-card { margin-top: 22px; }
.output-card h3 { margin: 0 0 13px; font-size: 13px; }
.story-result { border: 1px solid #f1d9d2; background: #fffaf8; border-radius: 11px; padding: 18px; }
.story-result h3 { font-size: 18px; margin: 0 0 7px; }
.story-result .logline { color: #67727f; line-height: 1.65; margin: 0 0 14px; font-size: 12px; }
.explainer-result { border: 1px solid #f1d9d2; background: #fffaf8; border-radius: 11px; padding: 18px; }
.explainer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.explainer-header h3 { font-size: 18px; margin: 0 0 7px; }
.explainer-result .logline { color: #67727f; line-height: 1.65; margin: 0; font-size: 12px; }
.template-badge { color: #9c5b4c; background: #ffe7df; border-radius: 5px; padding: 5px 8px; font-size: 10px; white-space: nowrap; }
.explainer-meta { display: flex; flex-wrap: wrap; gap: 7px; margin: 15px 0 19px; }
.explainer-meta span { color: #9c5b4c; background: #ffeae4; border-radius: 4px; padding: 5px 8px; font-size: 10px; }
.explainer-result h4 { color: #4f5b68; font-size: 12px; margin: 18px 0 9px; }
.data-grid { display: grid; gap: 9px; }
.data-item { border: 1px solid #f1ded8; border-radius: 9px; background: #fff; padding: 12px; }
.data-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.data-item-head strong { color: #3d4a58; font-size: 12px; }
.data-status { color: #9b6c60; font-size: 10px; white-space: nowrap; }
.data-value { color: #bd6959; font-size: 15px; font-weight: 700; margin: 8px 0 7px; }
.data-item p { color: #67727f; line-height: 1.55; margin: 4px 0 0; font-size: 11px; }
.data-item p b { color: #4f5b68; }
.recommendation-list { display: grid; gap: 8px; }
.recommendation-item { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e5eaf0; border-radius: 9px; background: #fff; padding: 11px; }
.recommendation-priority { color: #4f80cf; background: #edf4ff; border-radius: 4px; padding: 4px 6px; font-size: 10px; white-space: nowrap; }
.recommendation-item strong { color: #4f5b68; font-size: 11px; line-height: 1.5; }
.recommendation-item p { color: var(--muted); font-size: 10px; line-height: 1.5; margin: 4px 0 0; }
.narration-block { color: #536070; white-space: pre-wrap; line-height: 1.7; font-size: 12px; background: #fff; border: 1px solid #e5eaf0; border-radius: 9px; padding: 13px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { color: #bd6959; background: #ffeae4; border-radius: 4px; padding: 4px 7px; font-size: 10px; }
.character-preview { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(0, 1fr); gap: 19px; align-items: start; }
.character-image { background: #f0f2f4; border-radius: 11px; min-height: 285px; overflow: hidden; display: grid; place-items: center; }
.character-image img { display: block; width: 100%; height: auto; max-height: 500px; object-fit: contain; }
.image-placeholder { color: #9da7b2; text-align: center; padding: 32px 20px; }
.image-placeholder .placeholder-icon { font-size: 31px; display: block; margin-bottom: 10px; color: #c0c7cf; }
.image-placeholder p { font-size: 11px; line-height: 1.6; margin: 0; }
.character-facts { display: grid; gap: 10px; }
.fact-row { border-bottom: 1px solid var(--line); padding: 0 0 11px; }
.fact-row:last-child { border-bottom: 0; }
.fact-row small { color: var(--muted); display: block; font-size: 10px; margin-bottom: 5px; }
.fact-row span { color: #3b4653; font-size: 12px; line-height: 1.6; }
.script-list { display: grid; gap: 11px; }
.scene-row { display: grid; grid-template-columns: 47px minmax(0, 1fr) 85px; gap: 13px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; align-items: start; }
.scene-no { color: var(--blue); font-size: 12px; font-weight: 700; }
.scene-main h4 { font-size: 12px; margin: 0 0 6px; }
.scene-main p { color: var(--ink-soft); line-height: 1.55; margin: 0; font-size: 11px; }
.scene-time { text-align: right; color: var(--muted); font-size: 10px; }
.script-raw { white-space: pre-wrap; max-height: 520px; overflow: auto; color: #536070; font-size: 12px; line-height: 1.7; background: #fafbfc; padding: 15px; border-radius: 9px; }
.video-output { display: grid; grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 13px; }
.video-tile { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: #fff; }
.video-tile video { width: 100%; aspect-ratio: 9 / 16; background: #1b2634; display: block; object-fit: cover; }
.video-meta { padding: 11px; }
.video-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; margin-bottom: 5px; }
.video-meta small { color: var(--muted); font-size: 10px; display: block; line-height: 1.45; }
.video-meta a { color: var(--accent-deep); display: inline-block; margin-top: 8px; font-size: 10px; text-decoration: none; }
.job-banner { display: flex; align-items: center; gap: 12px; color: #71534c; background: #fff4f0; border: 1px solid #f7d6cc; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; }
.job-banner .spinner { width: 15px; height: 15px; border-width: 2px; flex: 0 0 15px; }
.job-banner-copy { min-width: 0; flex: 1; }
.job-banner-copy strong { display: block; font-size: 11px; margin-bottom: 2px; }
.job-banner-copy span { display: block; color: #a2776b; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { width: 105px; height: 5px; border-radius: 99px; background: #f6dcd5; overflow: hidden; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }
.settings-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-bottom: 22px; }
.provider-card { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 19px; }
.provider-card .provider-label { color: var(--muted); font-size: 10px; letter-spacing: .12em; margin-bottom: 10px; }
.provider-card h3 { font-size: 13px; margin: 0 0 12px; }
.provider-meta { display: grid; gap: 7px; }
.provider-meta div { display: flex; justify-content: space-between; gap: 8px; font-size: 10px; }
.provider-meta span:first-child { color: var(--muted); }
.provider-meta span:last-child { color: #4d5a68; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.configured { color: var(--green) !important; }
.config-note { color: var(--ink-soft); line-height: 1.7; font-size: 12px; }
.library-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.library-empty { border: 1px dashed #d9dfe7; padding: 38px 24px; text-align: center; border-radius: 12px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.loading-state { min-height: 50vh; display: grid; place-items: center; align-content: center; gap: 13px; color: var(--muted); font-size: 12px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #f1d7d0; border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-stack { position: fixed; right: 23px; bottom: 22px; z-index: 30; display: grid; gap: 8px; width: min(360px, calc(100vw - 30px)); }
.toast { color: #fff; background: #202e3e; border-radius: 9px; box-shadow: var(--shadow); padding: 12px 14px; font-size: 11px; line-height: 1.5; animation: toast-in .25s ease; }
.toast.error { background: #9c4e45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.modal-backdrop { position: fixed; inset: 0; display: grid; place-items: center; background: rgba(16,24,35,.46); z-index: 20; padding: 20px; }
.modal-backdrop[hidden] { display: none; }
.modal-card { width: min(430px, 100%); border-radius: 16px; background: #fff; padding: 27px; box-shadow: 0 22px 80px rgba(0,0,0,.22); position: relative; }
.modal-close { position: absolute; top: 13px; right: 15px; color: #8b96a3; background: transparent; font-size: 22px; }
.modal-eyebrow { color: var(--accent-deep); letter-spacing: .14em; font-size: 10px; font-weight: 700; margin-bottom: 9px; }
.modal-card h2 { font-size: 19px; margin: 0 0 8px; }
.modal-card p { color: var(--ink-soft); font-size: 12px; line-height: 1.6; margin: 0 0 21px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 21px; }
.hint-block { border-left: 3px solid var(--accent); color: #6c7783; background: #fff9f7; padding: 11px 13px; font-size: 11px; line-height: 1.6; border-radius: 0 7px 7px 0; }
.option-row { display: flex; flex-wrap: wrap; gap: 7px; }
.option-chip { border: 1px solid var(--line); border-radius: 7px; padding: 7px 10px; color: #697584; background: #fff; font-size: 11px; }
.option-chip.is-selected { border-color: #f2a493; color: var(--accent-deep); background: var(--accent-light); }
.empty-mini { color: var(--muted); font-size: 11px; line-height: 1.7; padding: 7px 0; }
.workflow-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.icon-report::before { content: "▧"; position: absolute; font-size: 18px; top: -3px; left: 1px; }
.report-drop { min-height: 78px; }
.report-editor-card { margin-top: 22px; }
.report-editor-card .card-intro { color: var(--ink-soft); font-size: 12px; line-height: 1.6; margin: 0 0 14px; }
.report-textarea { min-height: 265px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.report-status { color: var(--accent-deep); background: var(--accent-light); border-radius: 5px; padding: 5px 8px; font-size: 10px; white-space: nowrap; }
.report-file-list { display: grid; gap: 8px; margin-top: 16px; }
.report-file { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 10px 12px; }
.report-file-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 7px; color: var(--accent-deep); background: var(--accent-light); font-size: 9px; font-weight: 700; }
.report-file > div { min-width: 0; flex: 1; }
.report-file strong { display: block; color: #4f5b68; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-file small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.report-file-state { color: var(--green); font-size: 10px; white-space: nowrap; }
.warning-block { color: #8f6657; background: #fff7ed; border: 1px solid #f7dfc0; border-radius: 9px; padding: 11px 13px; margin-top: 12px; font-size: 11px; line-height: 1.6; }
.button-group { display: flex; align-items: center; gap: 8px; }
.analysis-summary { display: flex; align-items: stretch; gap: 16px; border: 1px solid #f1d9d2; background: #fffaf8; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 22px; }
.analysis-summary > div:first-child { min-width: 0; flex: 1; }
.summary-label { display: block; color: var(--accent-deep); font-size: 10px; letter-spacing: .1em; margin-bottom: 7px; }
.analysis-summary strong { display: block; color: #3d4a58; font-size: 20px; margin-bottom: 8px; }
.analysis-summary p { color: var(--ink-soft); font-size: 12px; line-height: 1.6; margin: 0; }
.vehicle-facts { display: grid; align-content: center; grid-template-columns: repeat(2, minmax(105px, 1fr)); gap: 8px; min-width: 300px; }
.vehicle-facts span { color: #7b5b53; background: #ffeae4; border-radius: 5px; padding: 7px 9px; font-size: 10px; }
.analysis-list { display: grid; gap: 10px; }
.analysis-item { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 14px; }
.analysis-item-head { display: flex; align-items: center; gap: 10px; }
.analysis-item-head > div { min-width: 0; flex: 1; }
.analysis-index { color: var(--blue); font-size: 12px; font-weight: 700; }
.analysis-item-head strong { display: block; color: #3d4a58; font-size: 12px; }
.analysis-item-head small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.analysis-status { border-radius: 4px; padding: 4px 6px; font-size: 10px; white-space: nowrap; }
.status-good { color: #378a68; background: #eaf8f0; }
.status-warn { color: #9a6b34; background: #fff4de; }
.status-bad { color: #a14f48; background: #ffebea; }
.analysis-value { color: var(--accent-deep); font-size: 14px; font-weight: 700; margin: 10px 0 7px 22px; }
.analysis-item p { color: var(--ink-soft); line-height: 1.55; font-size: 11px; margin: 4px 0 0 22px; }
.analysis-item p b { color: #4f5b68; }
.recommendations-card { margin-top: 22px; }
.recommendations-card h2 { font-size: 15px; margin: 0 0 15px; }
.script-textarea { min-height: 285px; }
.compact-guide { margin-top: 18px; min-height: auto; }
.locked-spec { border: 1px solid #dfe4ea; border-radius: 8px; background: #f3f5f7; color: #5e6c79; padding: 10px 12px; font-size: 12px; }
.avatar-preview { display: flex; align-items: center; gap: 10px; min-height: 92px; border-radius: 10px; background: #f2f4f6; padding: 10px; margin-bottom: 17px; color: var(--muted); font-size: 10px; }
.avatar-preview img { width: 64px; height: 82px; object-fit: cover; border-radius: 7px; background: #dce1e6; }
.avatar-preview .image-placeholder { display: flex; align-items: center; gap: 9px; padding: 6px 12px; text-align: left; }
.avatar-preview .image-placeholder .placeholder-icon { margin: 0; font-size: 24px; }
.video-form { margin-top: 22px; }
.final-video-card { margin-top: 22px; }
.video-spec { color: var(--green); background: var(--green-light); border-radius: 5px; padding: 5px 8px; font-size: 10px; }
.final-video { width: min(100%, 360px); aspect-ratio: 9 / 16; display: block; background: #1b2634; border-radius: 10px; object-fit: cover; }
.final-video-meta { padding: 11px 0 0; }
.download-button { display: inline-block; margin-top: 10px; text-decoration: none; }
.library-final { display: flex; align-items: center; gap: 18px; }
.library-final video { width: 135px; aspect-ratio: 9 / 16; background: #1b2634; border-radius: 8px; object-fit: cover; }
.library-final strong { color: #3d4a58; font-size: 13px; }
.library-final p { color: var(--muted); font-size: 10px; }
.library-final a { color: var(--accent-deep); font-size: 11px; text-decoration: none; }
.library-report-card { margin-top: 22px; }
.library-file { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.library-file:last-child { border-bottom: 0; }
.library-file > span { color: var(--accent-deep); background: var(--accent-light); border-radius: 4px; padding: 4px 6px; font-size: 9px; }
.library-file strong { min-width: 0; flex: 1; color: #536070; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.library-file a { color: var(--accent-deep); font-size: 10px; text-decoration: none; }
.large-empty { padding: 42px 25px; text-align: center; line-height: 2; }

@media (max-width: 1050px) {
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-columns, .stage-layout { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; transform: translateX(-100%); transition: .25s ease; box-shadow: 20px 0 45px rgba(0,0,0,.18); }
  .sidebar.is-open { transform: translateX(0); }
  .main-area { width: 100%; }
  .topbar { height: 61px; padding: 0 18px; }
  .mobile-menu { display: block; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .ghost-button { padding: 7px 8px; font-size: 11px; }
  .page-content { padding: 27px 17px 42px; }
  .page-heading { display: block; margin-bottom: 22px; }
  .page-heading h1 { font-size: 24px; }
  .heading-actions { margin-top: 17px; }
  .hero-panel { padding: 25px 23px; min-height: 260px; }
  .hero-panel h2 { font-size: 22px; }
  .workflow-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .workflow-card { padding: 14px 13px; min-height: 142px; }
  .workflow-card h3 { font-size: 12px; }
  .workflow-card p { font-size: 10px; }
  .stage-layout { gap: 14px; }
  .form-card { padding: 18px; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
  .field.full { grid-column: auto; }
  .character-preview { grid-template-columns: 1fr; }
  .character-image { min-height: 220px; max-height: 390px; }
  .scene-row { grid-template-columns: 37px minmax(0, 1fr); }
  .scene-time { grid-column: 2; text-align: left; }
  .form-footer { align-items: flex-start; flex-direction: column; }
  .workflow-grid-three { grid-template-columns: 1fr; }
  .analysis-summary { display: block; }
  .vehicle-facts { min-width: 0; margin-top: 15px; }
  .button-group { width: 100%; flex-wrap: wrap; }
  .button-group button { flex: 1; }
  .library-final { align-items: flex-start; }
  .topbar-kicker { display: none; }
}
