:root {
  --ink: #17201f;
  --ink-2: #39423f;
  --muted: #707a76;
  --line: #dedfd8;
  --line-strong: #c9ccc3;
  --paper: #f6f5ef;
  --panel: #fffef9;
  --panel-2: #eeeee7;
  --sidebar: #18201f;
  --sidebar-2: #222b29;
  --accent: #f0662f;
  --accent-dark: #cf4c1d;
  --accent-soft: #fff0e8;
  --green: #27745f;
  --green-soft: #e8f4ef;
  --yellow: #b67b17;
  --yellow-soft: #fff6dd;
  --red: #b74236;
  --blue: #3b6c86;
  --shadow: 0 12px 35px rgba(23, 32, 31, .08);
  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-width: 236px;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--paper); }
button, input, textarea, select { font: inherit; }
button { color: inherit; }
button, [role="button"] { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(240, 102, 47, .28); outline-offset: 2px; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; width: var(--sidebar-width); background: var(--sidebar); color: #eef1eb; padding: 22px 14px 14px; display: flex; flex-direction: column; border-right: 1px solid #303a37; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 21px; }
.brand strong { font-size: 20px; letter-spacing: .1em; }
.brand small { display: block; margin-top: 2px; color: #87918d; font-size: 9px; letter-spacing: .18em; }
.brand-mark { width: 31px; height: 31px; border: 1px solid #66706c; border-radius: 7px; padding: 5px; display: flex; align-items: flex-end; gap: 3px; transform: rotate(-2deg); }
.brand-mark span { flex: 1; background: var(--accent); border-radius: 1px; }
.brand-mark span:nth-child(1) { height: 43%; }
.brand-mark span:nth-child(2) { height: 100%; }
.brand-mark span:nth-child(3) { height: 68%; }
.new-project { width: 100%; height: 43px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 700; cursor: pointer; margin-bottom: 15px; box-shadow: inset 0 -2px rgba(0,0,0,.13); }
.new-project:hover { background: #ff7540; }
.new-project span { font-size: 19px; margin-right: 7px; }
.main-nav { overflow-y: auto; scrollbar-width: none; }
.nav-label { color: #68726e; font-size: 10px; letter-spacing: .13em; margin: 18px 10px 7px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 10px; height: 40px; border: 0; border-radius: 7px; background: transparent; color: #abb3b0; cursor: pointer; padding: 0 10px; text-align: left; font-size: 13px; transition: .16s ease; }
.nav-item:hover { color: white; background: #222c29; }
.nav-item.active { color: white; background: #2b3532; box-shadow: inset 3px 0 var(--accent); }
.nav-icon { width: 18px; color: #7f8985; text-align: center; font-size: 15px; }
.nav-item.active .nav-icon { color: var(--accent); }
.speed-tag { margin-left: auto; font-size: 9px; background: var(--accent); color: white; border-radius: 999px; padding: 2px 6px; }
.sidebar-bottom { margin-top: auto; }
.usage-mini { margin: 12px 4px; border: 1px solid #313c38; background: #202825; border-radius: 9px; padding: 12px; }
.usage-mini div:first-child { display: flex; justify-content: space-between; color: #aab2af; font-size: 11px; }
.usage-mini strong { color: white; }
.usage-mini small { color: #747e7a; font-size: 9px; }
.usage-bar { height: 4px; background: #35403c; margin: 9px 0 7px; border-radius: 99px; overflow: hidden; }
.usage-bar i { display: block; height: 100%; width: 68%; background: var(--accent); }
.profile { width: 100%; border: 0; background: transparent; color: white; display: flex; align-items: center; gap: 9px; padding: 8px 4px; text-align: left; cursor: pointer; }
.profile > span:nth-child(2) { min-width: 0; flex: 1; }
.profile strong, .profile small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile strong { font-size: 11px; }
.profile small { color: #707b77; font-size: 9px; margin-top: 3px; }
.profile b { color: #707b77; letter-spacing: 2px; }
.avatar { width: 31px; height: 31px; border-radius: 50%; background: #d5e0d7; color: #34453f; display: grid; place-items: center; font-size: 12px; }

.main-area { min-width: 0; flex: 1; margin-left: var(--sidebar-width); }
.topbar { height: 65px; background: rgba(255,254,249,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 0 26px; display: flex; align-items: center; position: sticky; top: 0; z-index: 12; }
.breadcrumb { display: flex; align-items: baseline; gap: 9px; }
.breadcrumb span { font-size: 11px; color: var(--muted); }
.breadcrumb span::after { content: '/'; margin-left: 9px; color: #b3b8b3; }
.breadcrumb strong { font-size: 14px; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button, .ghost-button, .mobile-menu { height: 34px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; cursor: pointer; }
.icon-button { width: 34px; position: relative; }
.has-dot::after { content: ''; position: absolute; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; right: 6px; top: 6px; }
.ghost-button { padding: 0 12px; color: var(--muted); font-size: 11px; }
.save-state-dot { width: 6px; height: 6px; background: var(--green); display: inline-block; border-radius: 50%; margin-right: 6px; }
.mobile-menu { display: none; width: 36px; margin-right: 12px; }
.page-root { padding: 28px; max-width: 1580px; margin: 0 auto; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 24px; }
.page-heading h1 { margin: 4px 0 6px; font-size: 27px; letter-spacing: -.03em; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.eyebrow { color: var(--accent-dark); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.primary-button, .secondary-button, .quiet-button, .danger-button { min-height: 36px; border-radius: 7px; cursor: pointer; font-size: 12px; font-weight: 700; padding: 0 14px; border: 1px solid transparent; }
.primary-button { background: var(--accent); color: white; box-shadow: inset 0 -1px rgba(0,0,0,.1); }
.primary-button:hover { background: var(--accent-dark); }
.primary-button:disabled { opacity: .5; cursor: not-allowed; }
.secondary-button { background: var(--panel); border-color: var(--line-strong); }
.secondary-button:hover, .quiet-button:hover { background: var(--panel-2); }
.quiet-button { background: transparent; border-color: transparent; color: var(--ink-2); }
.danger-button { background: #fff3f1; border-color: #e7b7b1; color: var(--red); }
.button-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--panel); margin-bottom: 22px; }
.metric { padding: 18px 20px; border-right: 1px solid var(--line); position: relative; }
.metric:last-child { border-right: 0; }
.metric small { color: var(--muted); font-size: 10px; }
.metric strong { font-family: Georgia, serif; font-size: 28px; display: block; margin: 8px 0 4px; font-weight: 500; }
.metric em { font-style: normal; font-size: 10px; color: var(--green); }
.metric .micro-chart { position: absolute; right: 14px; bottom: 14px; width: 54px; height: 24px; opacity: .72; }

.dashboard-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .72fr); gap: 22px; }
.section-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.section-header { min-height: 55px; border-bottom: 1px solid var(--line); padding: 0 17px; display: flex; align-items: center; justify-content: space-between; }
.section-header h2 { font-size: 13px; margin: 0; }
.section-header p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.project-list { padding: 5px 12px; }
.project-row { display: grid; grid-template-columns: 58px minmax(140px, 1.2fr) 90px 130px 92px 76px; align-items: center; gap: 13px; min-height: 72px; border-bottom: 1px solid #ecece5; font-size: 11px; }
.project-row:last-child { border-bottom: 0; }
.project-thumb { width: 52px; height: 52px; border-radius: 7px; background: linear-gradient(145deg,#d9d4c7,#7b867f); position: relative; overflow: hidden; }
.project-thumb::before { content: ''; position: absolute; width: 24px; height: 35px; background: rgba(255,255,255,.65); border-radius: 12px 12px 4px 4px; left: 15px; top: 10px; }
.project-thumb.orange { background: linear-gradient(145deg,#f8d6bd,#a5512e); }
.project-thumb.green { background: linear-gradient(145deg,#b9d2bd,#365948); }
.project-thumb.dark { background: linear-gradient(145deg,#7e8783,#202a28); }
.project-title strong { display: block; font-size: 12px; margin-bottom: 5px; }
.project-title small { color: var(--muted); }
.status-pill, .mini-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; border-radius: 999px; padding: 0 8px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pill.green { color: var(--green); background: var(--green-soft); }
.status-pill.orange { color: var(--accent-dark); background: var(--accent-soft); }
.status-pill.gray { color: #737b78; background: #eeefeb; }
.status-pill.red { color: var(--red); background: #fff0ee; }
.progress-cell { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.progress-line { height: 4px; flex: 1; min-width: 55px; border-radius: 99px; background: #e6e7e1; overflow: hidden; }
.progress-line i { display: block; height: 100%; background: var(--accent); }
.row-menu { border: 0; background: transparent; cursor: pointer; color: var(--muted); }
.quick-stack { display: grid; gap: 12px; }
.quick-card { padding: 16px; border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); cursor: pointer; text-align: left; transition: .18s ease; }
.quick-card:hover { transform: translateY(-2px); border-color: #bdc0b7; box-shadow: var(--shadow); }
.quick-card .quick-icon { width: 34px; height: 34px; border-radius: 7px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-dark); margin-bottom: 18px; font-weight: 900; }
.quick-card strong { display: block; font-size: 13px; }
.quick-card p { color: var(--muted); font-size: 10px; line-height: 1.6; margin: 6px 0 12px; }
.quick-card span:last-child { color: var(--accent-dark); font-size: 10px; font-weight: 800; }
.activity-list { padding: 8px 16px 14px; }
.activity { display: grid; grid-template-columns: 20px 1fr auto; gap: 8px; padding: 10px 0; border-bottom: 1px solid #ecece6; font-size: 10px; }
.activity:last-child { border-bottom: 0; }
.activity i { width: 18px; height: 18px; border-radius: 50%; background: var(--green-soft); color: var(--green); font-style: normal; display: grid; place-items: center; }
.activity span { color: var(--muted); }

.workspace { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; min-height: 680px; }
.workspace-toolbar { height: 58px; border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 16px; gap: 13px; }
.project-chip { display: flex; align-items: center; gap: 8px; padding-right: 14px; border-right: 1px solid var(--line); }
.project-chip span { width: 29px; height: 29px; border-radius: 6px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent-dark); }
.project-chip strong { font-size: 11px; display: block; }
.project-chip small { color: var(--muted); font-size: 9px; }
.stepper { flex: 1; display: flex; justify-content: center; gap: 7px; }
.step { display: flex; align-items: center; gap: 6px; color: #8c9490; font-size: 10px; }
.step b { width: 22px; height: 22px; border: 1px solid var(--line-strong); border-radius: 50%; display: grid; place-items: center; background: white; }
.step::after { content: ''; width: 28px; height: 1px; background: var(--line); margin-left: 3px; }
.step:last-child::after { display: none; }
.step.active { color: var(--ink); font-weight: 800; }
.step.active b { background: var(--ink); color: white; border-color: var(--ink); }
.step.done b { background: var(--green-soft); color: var(--green); border-color: #a6cabc; }
.workspace-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 620px; }
.workspace-main { padding: 22px; min-width: 0; }
.workspace-side { border-left: 1px solid var(--line); background: #faf9f4; padding: 18px; }
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.panel-title h2 { font-size: 15px; margin: 0 0 4px; }
.panel-title p { color: var(--muted); font-size: 10px; margin: 0; line-height: 1.5; }
.upload-zone { min-height: 260px; border: 1px dashed #bbc0b8; border-radius: 10px; display: grid; place-items: center; text-align: center; background: linear-gradient(180deg,#fbfaf5,#f4f3ec); cursor: pointer; padding: 30px; }
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-icon { width: 51px; height: 51px; border-radius: 50%; background: white; border: 1px solid var(--line); display: grid; place-items: center; margin: auto auto 13px; font-size: 22px; }
.upload-zone h3 { margin: 0 0 7px; font-size: 14px; }
.upload-zone p { color: var(--muted); font-size: 10px; margin: 0 0 16px; }
.file-card { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; margin-top: 14px; background: white; }
.file-card .file-thumb { width: 58px; height: 64px; border-radius: 5px; background: linear-gradient(145deg,#736860,#d5b8a6); position: relative; }
.file-card .file-thumb::after { content: '▶'; position: absolute; inset: 0; display: grid; place-items: center; color: white; }
.file-card > div:nth-child(2) { flex: 1; }
.file-card strong { display: block; font-size: 11px; }
.file-card small { color: var(--muted); font-size: 9px; }
.callout { border: 1px solid #e2d4b5; background: var(--yellow-soft); border-radius: 8px; padding: 12px; font-size: 10px; line-height: 1.7; color: #69542d; }
.callout strong { display: block; color: #493a20; }
.speed-board { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 14px 0; }
.speed-stat { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 12px; }
.speed-stat small { color: var(--muted); font-size: 9px; display: block; }
.speed-stat strong { font-family: Georgia, serif; font-size: 22px; display: block; margin-top: 5px; }
.settings-group { margin-bottom: 17px; }
.settings-group label, .field-label { display: block; font-size: 10px; font-weight: 800; margin-bottom: 7px; }
.segmented { display: flex; border: 1px solid var(--line-strong); padding: 3px; border-radius: 8px; background: #ecece6; }
.segmented button { flex: 1; height: 30px; border: 0; border-radius: 5px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.segmented button.active { background: white; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); font-weight: 800; }
.select, .input, .textarea { width: 100%; border: 1px solid var(--line-strong); background: white; border-radius: 7px; color: var(--ink); }
.select, .input { height: 36px; padding: 0 10px; font-size: 10px; }
.textarea { min-height: 120px; padding: 11px; resize: vertical; font-size: 11px; line-height: 1.8; }
.field-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; margin-top: 5px; }
.voice-row { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: white; cursor: pointer; }
.voice-row.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.voice-wave { flex: 1; height: 22px; display: flex; align-items: center; gap: 2px; }
.voice-wave i { width: 2px; background: #9aa39f; border-radius: 4px; }
.voice-wave i:nth-child(3n+1) { height: 40%; }.voice-wave i:nth-child(3n+2) { height: 90%; }.voice-wave i:nth-child(3n) { height: 60%; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 10px; }
.toggle { position: relative; width: 35px; height: 19px; border-radius: 99px; background: #c8cbc5; border: 0; cursor: pointer; }
.toggle::after { content: ''; position: absolute; width: 15px; height: 15px; top: 2px; left: 2px; border-radius: 50%; background: white; transition: .18s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on { background: var(--green); }.toggle.on::after { transform: translateX(16px); }
.model-option { border: 1px solid var(--line); border-radius: 8px; background: white; padding: 11px; margin-bottom: 8px; cursor: pointer; }
.model-option.selected { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.model-option > div:first-child { display: flex; justify-content: space-between; gap: 8px; }
.model-option strong { font-size: 11px; }
.model-option p { color: var(--muted); font-size: 9px; margin: 7px 0 0; line-height: 1.5; }
.mini-pill { background: #eef0eb; color: var(--muted); }
.mini-pill.green { color: var(--green); background: var(--green-soft); }
.mini-pill.orange { color: var(--accent-dark); background: var(--accent-soft); }

.copy-layout { display: grid; grid-template-columns: minmax(310px,.78fr) minmax(0,1.52fr); gap: 18px; }
.copy-source, .copy-results { min-width: 0; }
.copy-source { border-right: 1px solid var(--line); padding-right: 18px; }
.copy-actions { display: flex; gap: 7px; margin-bottom: 12px; }
.script-editor { border: 1px solid var(--line); border-radius: 9px; background: #fbfaf5; padding: 15px; min-height: 415px; font-family: "Microsoft YaHei UI", sans-serif; font-size: 11px; line-height: 1.95; overflow: auto; }
.script-editor [contenteditable] { outline: none; }
.script-editor b { color: var(--accent-dark); }
.fidelity-control { margin-top: 13px; border-top: 1px solid var(--line); padding-top: 13px; }
.range-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.range-row input { accent-color: var(--accent); width: 100%; }
.range-value { font-size: 10px; font-weight: 800; min-width: 54px; text-align: right; }
.copy-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.copy-option { border: 1px solid var(--line); border-radius: 9px; background: white; overflow: hidden; min-width: 0; transition: .18s ease; }
.copy-option.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.copy-option-head { padding: 12px; border-bottom: 1px solid var(--line); background: #faf9f4; }
.copy-option-head > div { display: flex; align-items: center; justify-content: space-between; }
.copy-option-head strong { font-size: 11px; }
.copy-option-head p { font-size: 9px; color: var(--muted); margin: 6px 0 0; }
.copy-option-body { padding: 12px; font-size: 10px; line-height: 1.85; height: 300px; overflow: auto; white-space: pre-line; }
.copy-option-foot { padding: 9px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.copy-option-foot span { color: var(--muted); font-size: 9px; }
.diff-strip { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 11px; }
.diff-strip span { padding: 5px 8px; border-radius: 5px; background: var(--panel-2); font-size: 9px; }

.video-workspace { display: grid; grid-template-rows: 1fr 178px; height: 730px; }
.video-upper { display: grid; grid-template-columns: minmax(360px,1fr) 370px; min-height: 0; }
.stage { background: #101514; padding: 17px; display: grid; place-items: center; position: relative; overflow: hidden; }
.stage-frame { height: min(510px, 66vh); aspect-ratio: 9/16; border-radius: 8px; background: linear-gradient(145deg,#b6b29d,#414d48); position: relative; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.stage-frame::before { content: ''; position: absolute; width: 44%; height: 48%; border-radius: 48% 48% 35% 35%; background: linear-gradient(#e8d2bf,#b98c79); left: 28%; top: 16%; box-shadow: 0 110px 0 25px #ede5d6; }
.stage-frame::after { content: ''; position: absolute; width: 22%; height: 34%; background: #e9e5d7; border: 2px solid #b5a993; border-radius: 40% 40% 8px 8px; right: 9%; bottom: 8%; }
.stage-overlay { position: absolute; inset: 0; background: linear-gradient(transparent 68%,rgba(0,0,0,.7)); display: flex; align-items: flex-end; justify-content: center; padding: 20px; color: white; font-size: 12px; text-align: center; }
.stage-tools { position: absolute; left: 17px; top: 17px; display: flex; gap: 6px; }
.stage-tools button { border: 1px solid #4b5753; background: rgba(16,21,20,.78); color: white; border-radius: 6px; height: 29px; padding: 0 9px; font-size: 9px; cursor: pointer; }
.stage-version { position: absolute; right: 17px; top: 17px; background: rgba(16,21,20,.78); color: white; border: 1px solid #4b5753; border-radius: 6px; padding: 7px 9px; font-size: 9px; }
.inspector { border-left: 1px solid var(--line); min-width: 0; overflow: auto; background: #faf9f4; }
.inspector-head { padding: 15px; border-bottom: 1px solid var(--line); }
.inspector-head > div { display: flex; align-items: center; justify-content: space-between; }
.inspector-head h3 { margin: 0; font-size: 12px; }
.inspector-head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.inspector-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 10px; overflow-x: auto; }
.inspector-tabs button { flex: 1; min-width: 50px; height: 37px; border: 0; border-bottom: 2px solid transparent; background: transparent; font-size: 9px; color: var(--muted); cursor: pointer; }
.inspector-tabs button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 800; }
.inspector-body { padding: 15px; }
.reference-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin: 8px 0 12px; }
.reference-card { aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--line); background: linear-gradient(145deg,#d9d3c4,#5d6d66); position: relative; overflow: hidden; }
.reference-card.product { background: linear-gradient(145deg,#f2eee3,#a0957e); }
.reference-card.add { display: grid; place-items: center; background: transparent; color: var(--muted); font-size: 20px; border-style: dashed; cursor: pointer; }
.continuity-score { display: grid; grid-template-columns: 1fr auto; gap: 8px; border: 1px solid #bdd6cb; background: var(--green-soft); border-radius: 7px; padding: 9px; font-size: 9px; color: #315f51; margin: 10px 0; }
.timeline { border-top: 1px solid var(--line); background: #202725; color: white; min-width: 0; }
.timeline-head { height: 38px; border-bottom: 1px solid #39413e; display: flex; align-items: center; padding: 0 12px; gap: 10px; }
.timeline-head strong { font-size: 10px; }
.timeline-head span { color: #89938f; font-size: 9px; }
.timeline-head .button-row { margin-left: auto; }
.timeline-head button { height: 25px; border: 1px solid #45504c; background: #2b3431; color: #d9dfdc; border-radius: 5px; font-size: 8px; cursor: pointer; }
.shot-track { display: flex; gap: 5px; padding: 10px 12px; overflow-x: auto; height: 137px; }
.shot-card { min-width: 132px; border: 1px solid #44504c; border-radius: 6px; background: #29312f; overflow: hidden; cursor: pointer; }
.shot-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.shot-thumb { height: 78px; background: linear-gradient(145deg,#a9ad9c,#495751); position: relative; }
.shot-card:nth-child(2n) .shot-thumb { background: linear-gradient(145deg,#dbc3aa,#715a4c); }
.shot-card:nth-child(3n) .shot-thumb { background: linear-gradient(145deg,#9fb7a1,#304b3b); }
.shot-thumb span { position: absolute; left: 5px; top: 5px; border-radius: 4px; background: rgba(0,0,0,.65); color: white; font-size: 8px; padding: 3px 5px; }
.shot-meta { padding: 7px; display: flex; justify-content: space-between; color: #bbc3c0; font-size: 8px; }
.shot-meta strong { color: white; }
.version-dots { display: flex; gap: 3px; }
.version-dots i { width: 5px; height: 5px; border-radius: 50%; background: #5e6965; }
.version-dots i.active { background: var(--accent); }

.knowledge-layout { display: grid; grid-template-columns: 255px minmax(0,1fr); gap: 16px; }
.product-list { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.product-list-head { padding: 13px; border-bottom: 1px solid var(--line); display: flex; gap: 7px; }
.search-input { flex: 1; min-width: 0; height: 34px; border: 1px solid var(--line); border-radius: 6px; padding: 0 9px; font-size: 10px; }
.product-item { padding: 12px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; cursor: pointer; }
.product-item.active { background: var(--accent-soft); box-shadow: inset 3px 0 var(--accent); }
.product-cover { width: 42px; height: 51px; border-radius: 5px; background: linear-gradient(145deg,#eee9da,#a49b83); position: relative; }
.product-cover::after { content: ''; position: absolute; width: 15px; height: 35px; border-radius: 6px 6px 3px 3px; background: #f7f5eb; left: 14px; top: 8px; }
.product-item strong { font-size: 10px; display: block; margin: 5px 0; }
.product-item small { color: var(--muted); font-size: 8px; }
.knowledge-detail { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); overflow: hidden; }
.knowledge-hero { padding: 17px 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid var(--line); }
.knowledge-hero .product-cover { width: 58px; height: 67px; }
.knowledge-hero h2 { font-size: 16px; margin: 0 0 5px; }
.knowledge-hero p { font-size: 9px; color: var(--muted); margin: 0; }
.knowledge-hero .button-row { margin-left: auto; }
.tabbar { display: flex; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tabbar button { height: 42px; border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 0 13px; font-size: 10px; color: var(--muted); cursor: pointer; }
.tabbar button.active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 800; }
.knowledge-content { padding: 20px; }
.knowledge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.knowledge-section { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.knowledge-section.full { grid-column: 1 / -1; }
.knowledge-section-head { padding: 11px 13px; background: #faf9f4; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.knowledge-section-head strong { font-size: 10px; }
.knowledge-section-body { padding: 12px; }
.fact-row { display: grid; grid-template-columns: 95px 1fr auto; gap: 9px; padding: 8px 0; border-bottom: 1px solid #eeeeea; font-size: 9px; align-items: start; }
.fact-row:last-child { border-bottom: 0; }
.fact-row > span:first-child { color: var(--muted); }
.fact-row button { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.rule-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rule-tag { padding: 6px 8px; border-radius: 5px; background: #fff0ee; color: #8b443b; font-size: 9px; }
.rule-tag.safe { background: var(--green-soft); color: var(--green); }
.evidence-row { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #eeeeea; padding: 8px 0; font-size: 9px; }
.evidence-row:last-child { border-bottom: 0; }
.evidence-row span:nth-child(2) { flex: 1; }
.evidence-icon { width: 27px; height: 31px; display: grid; place-items: center; background: var(--panel-2); border-radius: 5px; }

.placeholder-page { min-height: calc(100vh - 130px); display: grid; justify-items: center; align-content: center; text-align: center; }
.placeholder-page h1 { margin: 8px 0; font-size: 25px; }
.placeholder-page p { color: var(--muted); font-size: 11px; max-width: 440px; line-height: 1.8; margin: 0 0 18px; }
.placeholder-graphic { width: 140px; height: 95px; position: relative; margin-bottom: 20px; }
.placeholder-graphic span { position: absolute; width: 80px; height: 55px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
.placeholder-graphic span:nth-child(1) { left: 0; top: 28px; transform: rotate(-8deg); }
.placeholder-graphic span:nth-child(2) { left: 30px; top: 13px; }
.placeholder-graphic span:nth-child(3) { right: 0; top: 0; transform: rotate(8deg); border-color: #e4a889; }

.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { width: 300px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); display: flex; align-items: flex-start; gap: 10px; animation: toastIn .2s ease; font-size: 10px; line-height: 1.5; }
.toast i { width: 20px; height: 20px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-style: normal; flex: none; }
.toast strong { display: block; font-size: 11px; margin-bottom: 2px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }
.app-dialog { border: 0; border-radius: 12px; padding: 0; width: min(520px, calc(100vw - 30px)); box-shadow: 0 30px 90px rgba(0,0,0,.3); background: var(--panel); }
.app-dialog::backdrop { background: rgba(13,18,17,.55); backdrop-filter: blur(3px); }
.dialog-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { margin: 0; font-size: 15px; }
.dialog-close { width: 30px; height: 30px; border: 0; background: transparent; cursor: pointer; font-size: 18px; }
.dialog-body { padding: 20px; }
.dialog-foot { padding: 13px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.generation-progress { margin: 18px 0; }
.generation-progress .bar { height: 7px; border-radius: 99px; background: #e8e9e3; overflow: hidden; }
.generation-progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s ease; }
.generation-progress > div:first-child { display: flex; justify-content: space-between; font-size: 10px; margin-bottom: 8px; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric:nth-child(2) { border-right: 0; }.metric:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .dashboard-layout { grid-template-columns: 1fr; }
  .dashboard-side { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
  .copy-grid { grid-template-columns: 1fr; }
  .copy-option-body { height: 220px; }
  .video-upper { grid-template-columns: minmax(330px,1fr) 320px; }
}

@media (max-width: 860px) {
  :root { --sidebar-width: 248px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; box-shadow: 20px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .mobile-menu { display: block; }
  .page-root { padding: 18px; }
  .workspace-body, .copy-layout, .knowledge-layout { grid-template-columns: 1fr; }
  .workspace-side { border: 0; border-top: 1px solid var(--line); }
  .copy-source { border: 0; padding: 0; }
  .video-workspace { height: auto; grid-template-rows: auto 170px; }
  .video-upper { grid-template-columns: 1fr; }
  .inspector { border: 0; border-top: 1px solid var(--line); max-height: 480px; }
  .project-row { grid-template-columns: 58px 1fr 80px; }
  .project-row > *:nth-child(4), .project-row > *:nth-child(5), .project-row > *:nth-child(6) { display: none; }
  .knowledge-grid { grid-template-columns: 1fr; }.knowledge-section.full { grid-column: auto; }
}

@media (max-width: 560px) {
  .topbar { padding: 0 12px; }.ghost-button { display: none; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .metric-grid { grid-template-columns: 1fr; }.metric { border-right: 0; border-bottom: 1px solid var(--line); }.metric:last-child { border-bottom: 0; }
  .dashboard-side { grid-template-columns: 1fr; }
  .copy-grid { grid-template-columns: 1fr; }
  .stepper .step span { display: none; }.step::after { width: 12px; }
  .workspace-toolbar { padding: 0 10px; }.project-chip { display: none; }
  .speed-board { grid-template-columns: 1fr; }
  .knowledge-hero { align-items: flex-start; flex-wrap: wrap; }.knowledge-hero .button-row { margin-left: 0; width: 100%; }
}
