/* ============================================================
   喷薄素材工坊 — Design System（结构重建版 · 参照 kodlo.ai）
   ------------------------------------------------------------
   编辑刊物风 / 纸墨双色：米白画布 #f4f3ee × 近黑墨色，
   品牌酸橙 #cbf990 作唯一强调色。
   三字体系统：Space Grotesk（展示标题）/ Inter（正文）/
   Geist Mono（等宽工程标注：眉题、表头、徽章、meta）。
   中文回落为本地 OPPO Sans 4.0（static/fonts-oppo.css，84 片 woff2 分片按需加载）。
   结构语言（本轮重建核心）：
   · 报头 = 2px 墨色顶规线 + 发丝底线（masthead）
   · 分区 = 无盒平铺：透明背景 + 顶部发丝线 + 角部十字定位标
   · 栏排 = 多列之间以竖向发丝栏线分隔，无槽距
   · 装置 = "01" 自动编号（导航 / 步骤）、mono 大写字距标注、
     扁平无影、近直角（0–3px）、hover 反色、1px 焦点描边
   ============================================================ */

/* ---------- 中文主字体：OPPO Sans 4.0（fonts-oppo.css 分片加载，见 base.html 引入顺序） ---------- */

/* ---------- Tokens ---------- */
:root {
  /* 墨色（文字 / 主按钮 / 强边框） */
  --ink: #0a0e0b;
  --ink-hover: #22281f;
  --ink-2: rgba(10, 14, 11, .74);
  --ink-3: rgba(10, 14, 11, .56);
  --muted: rgba(10, 14, 11, .46);
  /* 纸面层次 */
  --canvas: #f4f3ee;
  --paper: #faf9f4;
  --wash: #edebe2;
  /* 线（发丝） */
  --line: rgba(10, 14, 11, .13);
  --line-strong: rgba(10, 14, 11, .26);
  /* 品牌强调（唯一彩色） */
  --brand: #0a0e0b;
  --brand-hover: #22281f;
  --lime: #cbf990;
  --lime-hover: #baf378;
  --lime-soft: #e7f5c4;
  --lime-faint: #eff5e0;
  --lime-border: #c8dd9e;
  /* 状态（编辑部式克制） */
  --ok: #33663e;      --ok-bg: #e9efe0;   --ok-line: rgba(51, 102, 62, .30);
  --err: #96382c;     --err-bg: #f5e7e0;  --err-line: rgba(150, 56, 44, .32);
  --warn: #8a6114;    --warn-bg: #f3ecd7; --warn-line: rgba(138, 97, 20, .34);
  --teal: #2d6a5f;    --teal-bg: #e2efe7; --teal-line: rgba(45, 106, 95, .30);
  --violet: #5b4a8a;  --violet-bg: #eae6f4; --violet-line: rgba(91, 74, 138, .32);
  --apricot: #9a5a2e; --apricot-bg: #f6e8dc; --apricot-line: rgba(154, 90, 46, .32);
  --dot-ok: #3e8e52;
  --dot-err: #c94f3d;
  /* radius（刊物式近直角：控件 2 / 菜单 2 / 面层 3 / 弹窗 2 / 大面 4） */
  --r-sm: 2px;  --r-md: 2px;  --r-lg: 3px;  --r-xl: 2px;  --r-2xl: 4px;  --r-full: 9999px;
  /* shadow（扁平，仅浮层保留） */
  --shadow-sm: 0 1px 2px rgba(10, 14, 11, .04);
  --shadow-md: 0 2px 12px rgba(10, 14, 11, .06);
  --shadow-lg: 0 14px 40px -12px rgba(10, 14, 11, .16);
  /* layout */
  --container: 1440px;
  --container-narrow: 880px;
  --topbar-h: 56px;
  --font: 'Inter', 'OPPO Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
          'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', 'OPPO Sans', 'PingFang SC', 'Hiragino Sans GB',
          'Microsoft YaHei', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, 'JetBrains Mono', Consolas,
          'OPPO Sans', 'PingFang SC', 'Microsoft YaHei', monospace;
}

/* ---------- Reset & base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-feature-settings: "ss01", "cv11";
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 {
  margin: 0; font-family: var(--font-display); font-weight: 500;
  color: var(--ink); letter-spacing: -.01em;
}
h1 { font-size: 26px; line-height: 1.18; letter-spacing: -.02em; }
h2 { font-size: 15px; line-height: 1.3; }
h3 { font-size: 13.5px; line-height: 1.35; }
p { margin: 0; }
code {
  font-family: var(--font-mono); font-size: .9em;
  background: var(--wash); border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
::selection { background: var(--lime); color: var(--ink); }
/* kodlo 式全局细滚动条 */
* { scrollbar-width: thin; scrollbar-color: rgba(128, 128, 128, .5) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, .5); border-radius: 9999px;
  border: 2px solid transparent; background-clip: padding-box; min-height: 40px;
}
::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }

/* 键盘焦点：1px currentColor 描边（kodlo） */
:where(a, button):focus-visible {
  outline: 1px solid currentColor; outline-offset: 2px; border-radius: 2px;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-block; font-family: var(--font-mono);
  font-size: 10px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink); opacity: .55; margin-bottom: 5px;
}
.eyebrow::before { content: "— "; }
.lead { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.caption { font-size: 11px; color: var(--muted); line-height: 1.5; }
.muted { color: var(--muted); }
.err-text { color: var(--err); }

/* ---------- Layout：画布 + 报头（masthead） ---------- */
.page {
  max-width: var(--container);
  margin: 0 auto;
  padding: 2px 36px 80px;
}
.page-narrow { max-width: var(--container-narrow); }
.page-head {
  margin: 0 0 30px;
  padding: 16px 0 18px;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--line);
}
.page-head h1 { font-size: 26px; }
.page-head h1 .icon { width: 20px; height: 20px; }
.page-head .lead { margin-top: 6px; }
.page-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Topbar：编号导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  height: var(--topbar-h);
  background: rgba(244, 243, 238, .88);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
}
/* 滚动后导航浮现发丝底线：未滚动时让位报头墨线，全页只保留一条强横线 */
.topbar.scrolled {
  background: rgba(244, 243, 238, .94);
  border-bottom-color: var(--line);
}
.topbar-inner {
  max-width: var(--container);
  height: 100%; margin: 0 auto; padding: 0 36px;
  display: flex; align-items: center; gap: 20px;
}
.logo { display: flex; align-items: center; gap: 9px; text-decoration: none !important; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 2px;
  background: var(--ink); color: var(--lime);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: 0;
}
.logo-text {
  font-family: var(--font-display); font-weight: 600; font-size: 14.5px;
  color: var(--ink); letter-spacing: -.01em;
}
.logo-text em { font-style: normal; color: var(--ink-3); font-weight: 500; }
.topnav { display: flex; align-items: center; gap: 4px; flex: 1; counter-reset: navitem; }
/* 直接子代限定：下拉面板内的链接不参与编号与顶栏样式 */
.topnav > a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  padding: 6px 10px; border-radius: 2px; text-decoration: none !important;
  transition: color .15s, background .15s;
}
/* 编号装置：01 / 02 / 03 …（mono 微字） */
.topnav > a::before {
  counter-increment: navitem;
  content: "0" counter(navitem);
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .08em; color: var(--ink); opacity: .45;
}
.topnav > a:hover { color: var(--ink); background: var(--wash); }
.topnav > a.active {
  color: var(--canvas); font-weight: 600; background: var(--ink);
}
.topnav > a.active::before { color: var(--lime); opacity: .95; }
.topnav-sep { width: 1px; height: 16px; background: var(--line-strong); margin: 0 8px; }
.topnav-tag {
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  background: var(--ink); color: var(--lime);
  padding: 3px 7px; border-radius: 2px; margin-left: 4px;
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
}
.user-chip .avatar, .user-drop-btn .avatar {
  width: 26px; height: 26px; border-radius: var(--r-full);
  background: var(--wash); color: var(--ink);
  border: 1px solid var(--line-strong);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
}

/* ---------- 顶部下拉面板：系统设置 / 用户菜单 ---------- */
.nav-drop, .user-drop { position: relative; display: inline-flex; }
.nav-drop-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font); font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  padding: 6px 10px; border: none; border-radius: 2px;
  background: transparent; cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-drop-toggle::before {
  counter-increment: navitem;
  content: "0" counter(navitem);
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .08em; color: var(--ink); opacity: .45;
}
.nav-drop-toggle:hover { color: var(--ink); background: var(--wash); }
.nav-drop-toggle.active {
  color: var(--canvas); font-weight: 600; background: var(--ink);
}
.nav-drop-toggle.active::before { color: var(--lime); opacity: .95; }
.nav-drop-toggle.active .nav-caret { color: var(--canvas); }
/* svg 默认 fill 为黑色：补 icon 描边样式让 color 生效（选中态可变白） */
.nav-caret {
  width: 12px; height: 12px; color: var(--muted);
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .15s, color .15s;
}
.nav-drop.open .nav-caret { transform: rotate(180deg); }
.nav-panel, .user-panel {
  display: none; position: absolute; z-index: 1100;
  min-width: 196px; padding: 6px;
  background: var(--paper); border: 1px solid var(--ink); border-radius: 2px;
  box-shadow: var(--shadow-lg);
}
.nav-panel { top: calc(100% + 12px); left: 0; }
.user-panel { top: calc(100% + 12px); right: 0; width: 224px; }
.nav-drop.open .nav-panel, .user-drop.open .user-panel {
  display: block; animation: sel-in .13s ease;
}
.nav-panel-label {
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  padding: 7px 9px 5px;
}
.nav-panel a, .up-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 9px; border: none; border-radius: 2px;
  font-family: var(--font); font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  text-align: left; text-decoration: none !important; cursor: pointer;
  background: transparent;
  transition: color .15s, background .15s;
}
.nav-panel a:hover, .up-item:hover { background: var(--wash); color: var(--ink); }
.nav-panel a.active { background: var(--lime-faint); color: var(--ink); }
.nav-panel a .icon, .up-item .icon { width: 14px; height: 14px; color: var(--ink-3); }
.nav-panel a.active .icon, .up-item:hover .icon { color: var(--ink); }
.user-drop-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border: 1px solid transparent; border-radius: var(--r-full);
  background: transparent; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.user-drop-btn:hover, .user-drop.open .user-drop-btn {
  border-color: var(--line-strong); background: var(--wash);
}
.up-head {
  display: flex; flex-direction: column; gap: 3px;
  padding: 8px 9px 10px; margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.up-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.up-meta {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

/* ---------- Buttons：近直角 / hover 反色 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px;
  font-family: var(--font); font-size: 12.5px; font-weight: 600; letter-spacing: .05em;
  color: var(--ink-2); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 2px;
  cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
  user-select: none;
}
.btn:hover { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.btn:active { background: var(--ink-hover); }
.btn:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:hover { background: transparent; border-color: var(--line-strong); color: var(--ink-2); }
.btn.primary { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.btn.primary:hover { background: var(--ink-hover); border-color: var(--ink-hover); color: var(--canvas); }
.btn.primary:disabled:hover { background: var(--ink); border-color: var(--ink); color: var(--canvas); }
.btn.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.lime:hover { background: var(--lime-hover); border-color: var(--lime-hover); color: var(--ink); }
.btn.danger { color: var(--err); border-color: var(--err-line); background: transparent; }
.btn.danger:hover { background: var(--err-bg); border-color: var(--err); color: var(--err); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--wash); border-color: transparent; color: var(--ink); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 12px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 13px; }
/* 表格内纯图标操作按钮：正方形、hover 提示靠 title */
.btn.sm.icon-only { width: 30px; padding: 0; gap: 0; }
.btn.sm.icon-only .icon { width: 14px; height: 14px; }
.btn.block { display: flex; width: 100%; }
.btn .spin { width: 13px; height: 13px; border-width: 2px; }

/* ---------- Forms：mono 标注 + 36px 控件 + 近直角 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.field > label, .field-label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
input[type="text"], input[type="password"], input[type="number"], input[type="search"],
input[type="url"], input[type="email"], input[type="tel"], input[type="date"],
input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea {
  font-family: var(--font); font-size: 13px; color: var(--ink); caret-color: var(--ink);
  width: 100%; min-height: 36px; padding: 6px 11px;
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 2px;
  outline: none; transition: border-color .15s, background .15s;
}
textarea { min-height: 68px; resize: vertical; line-height: 1.55; padding: 8px 11px; }
textarea.code { font-family: var(--font-mono); font-size: 12.5px; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); background: #fff; }
input:disabled, select:disabled, textarea:disabled { background: var(--wash); color: var(--muted); cursor: not-allowed; }
/* Chrome 自动填充时保持纸面底色与墨色文字 */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  -webkit-text-fill-color: var(--ink);
  transition: background-color 999999s ease-out 0s;
}
select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230a0e0b' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row .grow { flex: 1; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--ink); width: 14px; height: 14px; }
input[type="checkbox"]:not(:disabled), input[type="radio"]:not(:disabled) { cursor: pointer; }
.hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }

/* ---------- Cards：无盒平铺分区（透明 + 顶规线 + 角标） ---------- */
.card {
  position: relative;
  background: transparent; border: none; border-top: 1px solid var(--line-strong);
  border-radius: 0; padding: 16px 0 22px;
}
/* kodlo 角部十字定位标（对角两枚） */
.card::before, .card::after,
.panel::before, .panel::after {
  content: ""; position: absolute; width: 9px; height: 9px;
  pointer-events: none; color: var(--ink); opacity: .3;
  background:
    linear-gradient(currentColor, currentColor) center / 9px 1px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1px 9px no-repeat;
}
.card::before, .panel::before { top: -5px; left: -5px; }
.card::after, .panel::after { bottom: -5px; right: -5px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.card h3 { display: flex; align-items: center; gap: 8px; }
/* 卡内直连标题：与 card-head 同样的发丝下线 */
.card > h3 {
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* Studio steps："01" mono 编号（去方块） */
.step { position: relative; }
.step-head {
  display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px;
  padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.step-head h2 { font-size: 14.5px; }
.step-head p { margin-top: 3px; font-size: 12px; color: var(--muted); }
.step-no {
  flex: 0 0 auto; min-width: 20px; width: auto; height: auto;
  border: none; background: transparent; border-radius: 0;
  color: var(--ink); opacity: .55; padding: 2px 0 0;
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  display: inline-flex; align-items: flex-start; justify-content: flex-start;
}
.step-no::before { content: "0"; }
.step.done .step-no { opacity: 1; color: var(--ink); }
.step.done .step-no::after { content: " ✓"; font-size: 10px; }

/* ---------- Studio 栏排：发丝栏线分隔，无槽距 ---------- */
.studio-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.studio-grid {
  display: grid; grid-template-columns: 320px minmax(0, 1fr) 360px;
  gap: 0; align-items: start;
}
.video-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 0; align-items: start;
}
.studio-grid > *, .video-grid > * { padding-right: 22px; min-width: 0; }
.studio-grid > :last-child, .video-grid > :last-child { padding-right: 0; }
.studio-grid > * + *, .video-grid > * + * {
  border-left: 1px solid var(--line);
  padding-left: 22px;
}
.studio-side {
  position: sticky; top: calc(var(--topbar-h) + 20px);
  display: flex; flex-direction: column; gap: 8px;
}

/* 风格快选 / 产品图缩略 / 生成前提示 */
.style-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.style-chip {
  font-family: var(--font); font-size: 11.5px; font-weight: 500; line-height: 1;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line-strong);
  border-radius: 2px; padding: 6px 10px; cursor: pointer;
  transition: color .15s, background .15s, border-color .15s;
}
.style-chip:hover { color: var(--canvas); background: var(--ink); border-color: var(--ink); }
.style-chip.active { color: var(--ink); background: var(--lime); border-color: var(--ink); font-weight: 600; }
/* 人物替换开关（iOS 风格小拨杆） */
.char-head { display: flex; align-items: center; justify-content: space-between; }
.char-head .sf-label { margin-bottom: 0; }
.char-opt {
  font-style: normal; font-family: var(--font-mono); font-size: 9px;
  letter-spacing: .08em; color: var(--muted); margin-left: 6px;
}
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch-ui {
  width: 32px; height: 18px; background: var(--wash);
  border: 1px solid var(--line-strong); border-radius: 999px;
  position: relative; transition: background .15s, border-color .15s;
}
.switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink-3); transition: transform .15s, background .15s;
}
.switch input:checked + .switch-ui { background: var(--lime); border-color: var(--ink); }
.switch input:checked + .switch-ui::after { transform: translateX(14px); background: var(--ink); }
.switch input:focus-visible + .switch-ui { outline: 1px solid var(--ink); outline-offset: 2px; }
.char-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.thumb-row { display: flex; flex-wrap: wrap; gap: 10px; }
.dz-mini { padding: 14px 12px; gap: 4px; }
.ready-hint { font-size: 12px; color: var(--warn); line-height: 1.5; margin-top: 8px; }

/* ---------- Dropzone / 上传 ---------- */
.dropzone {
  border: 1.5px dashed var(--line-strong); border-radius: 2px;
  background: transparent; padding: 24px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--ink); background: var(--paper); }
.dropzone.has-file { padding: 0; border-style: solid; }
.dropzone.uploading { pointer-events: none; opacity: .82; }
.dz-icon {
  width: 36px; height: 36px; border-radius: 2px;
  background: var(--ink); border: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--lime); font-size: 17px;
}
.dz-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.dz-hint { font-size: 11.5px; color: var(--muted); }

/* 上传预览：媒体在上，信息与操作在下（纵向） */
.upload-preview { display: flex; flex-direction: column; gap: 10px; }
.upload-preview > video,
.upload-preview > img {
  width: 100%; height: auto; max-height: 300px; object-fit: contain;
  border-radius: var(--r-md); border: 1px solid var(--line-strong);
  background: var(--wash);
}
.upload-preview > video { background: #000; }
.upload-meta { font-size: 12.5px; color: var(--ink-2); line-height: 1.7; min-width: 0; }
.upload-meta b { font-size: 13px; }
.upl-info-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.upl-info-row > span { flex: 1 1 auto; min-width: 0; overflow-wrap: break-word; overflow-wrap: anywhere; }

/* 上传进度条 */
.upl-progress { width: 100%; max-width: 360px; margin-top: 12px; }
.upl-bar { height: 4px; background: var(--wash); border: 1px solid var(--line); overflow: hidden; }
.upl-fill { height: 100%; width: 0%; background: var(--ink); transition: width .15s ease; }
.upl-row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 6px; font-size: 11.5px; color: var(--ink-2); min-width: 0;
}
.upl-row > span { min-width: 0; flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.upl-row > b { flex-shrink: 0; font-variant-numeric: tabular-nums; }

/* 产品图缩略卡片：图在上，文件名/大小/移除在下 */
.pthumb { display: flex; flex-direction: column; gap: 4px; width: 104px; }
.pthumb-img {
  width: 104px; height: 104px; object-fit: cover; display: block;
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--wash);
}
.pthumb-name {
  font-size: 10.5px; color: var(--ink-2); line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pthumb-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pthumb-size { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pthumb-del {
  border: 0; background: none; padding: 0;
  font-size: 10.5px; color: var(--err); cursor: pointer;
}
.pthumb-del:hover { text-decoration: underline; }
.pthumb.uploading .pthumb-img {
  display: flex; align-items: center; justify-content: center;
}
.pthumb.uploading .pthumb-name { color: var(--muted); }
.pthumb-pct { font-size: 10.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.upl-bar.mini { height: 3px; margin-top: 2px; }

/* ---------- 图片叠加（bbox 可拖拽编辑） ---------- */
.analysis-stack { display: flex; flex-direction: column; gap: 12px; margin-top: 4px; }
.overlay-box {
  position: relative; border-radius: 0; overflow: hidden;
  border: 1px solid var(--line-strong); background: var(--wash);
  max-width: 640px;
  touch-action: none;
}
.overlay-box img { width: 100%; height: auto; display: block; }
.bbox-rect {
  position: absolute; cursor: move;
  border: 1.5px solid #cbf990;
  background: rgba(203, 249, 144, .14);
  box-shadow: 0 0 0 1px rgba(10, 14, 11, .35) inset;
}
.bbox-center {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 18px; transform: translate(-50%, -50%);
  pointer-events: none;
}
.bbox-center::before, .bbox-center::after {
  content: ""; position: absolute; background: #01370b;
}
.bbox-center::before { left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -0.75px; }
.bbox-center::after { top: 0; bottom: 0; left: 50%; width: 1.5px; margin-left: -0.75px; }
.bh {
  position: absolute; width: 12px; height: 12px;
  background: #01370b; border: 2px solid #cbf990; border-radius: 50%;
}
.bh[data-h="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
.bh[data-h="n"]  { left: 50%; top: -6px; margin-left: -6px; cursor: ns-resize; }
.bh[data-h="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
.bh[data-h="e"]  { right: -6px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.bh[data-h="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.bh[data-h="s"]  { left: 50%; bottom: -6px; margin-left: -6px; cursor: ns-resize; }
.bh[data-h="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.bh[data-h="w"]  { left: -6px; top: 50%; margin-top: -6px; cursor: ew-resize; }
.canvas-tip {
  position: absolute; left: 8px; bottom: 8px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .05em;
  color: var(--canvas); background: rgba(10, 14, 11, .72);
  padding: 4px 8px; border-radius: 2px; pointer-events: none;
}

/* 构图测量调整面板 */
.adj-panel {
  border: 1px solid var(--line); background: var(--paper);
  padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.adj-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adj-item { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.adj-item > label {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  display: flex; justify-content: space-between; gap: 8px;
}
.adj-item > label b { font-weight: 600; color: var(--ink); letter-spacing: 0; text-transform: none; }
.adj-item input[type="range"] {
  width: 100%; height: 18px; margin: 0; padding: 0; min-height: 0;
  background: transparent; border: none; border-radius: 0;
  accent-color: var(--ink); cursor: pointer;
}
.adj-item input[type="range"]:focus { box-shadow: none; background: transparent; }
.margin-inputs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.margin-inputs input {
  width: 100%; min-height: 30px; padding: 4px 6px;
  font-family: var(--font-mono); font-size: 12px; text-align: center;
}

/* measurement chips */
.chip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chip {
  background: transparent; border: 1px solid var(--line); border-radius: 0;
  padding: 7px 10px; min-width: 0;
}
.chip .chip-label {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.chip .chip-value { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 2px; word-break: break-all; }

/* JSON 编辑 */
.json-fold { border: 1px solid var(--line); border-radius: 0; background: var(--paper); margin-top: 12px; }
.json-fold summary {
  cursor: pointer; padding: 9px 12px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  user-select: none; list-style: none; display: flex; align-items: center; gap: 8px;
}
.json-fold summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.json-fold[open] summary::before { transform: rotate(90deg); }
.json-fold .fold-body { padding: 0 12px 12px; }
.code-editor {
  font-family: var(--font-mono);
  font-size: 12px; line-height: 1.6; min-height: 220px;
  background: var(--ink); color: var(--lime); border: 1px solid var(--ink); border-radius: 0;
  white-space: pre; overflow-x: auto;
}
.code-editor:focus { box-shadow: 0 0 0 3px var(--lime-soft); }

/* 校验结果 */
.issue-list { display: flex; flex-direction: column; gap: 6px; }
.issue {
  display: flex; gap: 8px; align-items: flex-start;
  font-size: 12.5px; padding: 8px 11px; border-radius: 0; line-height: 1.45;
}
.issue.err  { background: var(--err-bg);  border: 1px solid var(--err-line);  color: var(--err); }
.issue.warn { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn); }
.issue.ok   { background: var(--ok-bg);   border: 1px solid var(--ok-line);   color: var(--ok); }
.issue b { font-weight: 700; }

/* ---------- Segmented / 模式卡 ---------- */
.seg {
  display: inline-flex; background: var(--wash); border: 1px solid var(--line-strong);
  border-radius: 2px; padding: 3px; gap: 3px;
}
.seg button {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font); font-size: 12.5px; font-weight: 600; color: var(--muted);
  padding: 5px 13px; border-radius: 1px; transition: background .15s, color .15s;
}
.seg button.active { background: var(--ink); color: var(--canvas); }
.mode-cards { display: grid; gap: 8px; }
.mode-card {
  display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 0; padding: 10px 12px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.mode-card:hover { border-color: var(--line-strong); background: var(--paper); }
.mode-card input { grid-row: span 2; }
.mode-card b { font-size: 13px; color: var(--ink); }
.mode-card span { font-size: 11.5px; color: var(--muted); grid-column: 2; line-height: 1.45; }
.mode-card.checked { border-color: var(--ink); background: var(--lime-faint); box-shadow: 0 0 0 1px var(--ink) inset; }

/* ---------- 生成状态 ---------- */
.gen-status { margin-top: 12px; font-size: 12.5px; }
.progress-note {
  display: flex; align-items: center; gap: 9px;
  background: var(--lime-faint); border: 1px solid var(--lime-border);
  color: var(--ink-2); border-radius: 0; padding: 9px 12px; font-weight: 500;
}
.result-img {
  width: 100%; border-radius: 0; border: 1px solid var(--line-strong);
  background: repeating-conic-gradient(var(--wash) 0% 25%, var(--paper) 0% 50%) 0 0/16px 16px;
}
.result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* ---------- 徽章 / pill ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 0; white-space: nowrap;
  background: var(--wash); border: 1px solid var(--line); color: var(--ink-2);
}
.badge.ok   { background: var(--ok-bg);   border-color: var(--ok-line);   color: var(--ok); }
.badge.err  { background: var(--err-bg);  border-color: var(--err-line);  color: var(--err); }
.badge.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.badge.info { background: var(--lime-faint); border-color: var(--lime-border); color: var(--ink-2); }
.badge.lime { background: var(--lime); border-color: var(--lime); color: var(--ink); }
/* 模型类型标签（constants.MODEL_TYPES） */
.badge.type-image   { background: var(--apricot-bg); border-color: var(--apricot-line); color: var(--apricot); }
.badge.type-video   { background: var(--violet-bg);  border-color: var(--violet-line);  color: var(--violet); }
.badge.type-video_understanding { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.badge.type-vision  { background: var(--teal-bg);    border-color: var(--teal-line);    color: var(--teal); }
.badge.type-text    { background: var(--wash);       border-color: var(--line-strong);  color: var(--ink-2); }

/* 模型列表：名称列元数据行（model_id · Provider） */
.model-meta {
  display: flex; align-items: center; gap: 5px;
  margin-top: 3px; font-size: 11.5px; line-height: 1.2;
}
.model-meta .mi  { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.model-meta .sep { color: var(--muted); }
.model-meta .icon { width: 11px; height: 11px; color: var(--ink-3); flex: none; }
.model-meta .mp  { color: var(--ink-3); font-weight: 500; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th {
  text-align: left; font-family: var(--font-mono);
  font-size: 9.5px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  padding: 8px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: rgba(10, 14, 11, .025); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.sel { background: var(--lime-faint) !important; }
td .btn + .btn { margin-left: 4px; }

/* ---------- Panels（admin 兼容，与 card 同为平铺分区） ---------- */
.panel {
  position: relative;
  background: transparent; border: none; border-top: 1px solid var(--line-strong);
  border-radius: 0; padding: 16px 0 22px; margin-bottom: 20px;
}
.panel > h2, .panel > h3 {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* ---------- 统计（admin 兼容，平铺） ---------- */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 16px 0 24px; }
.stat {
  position: relative;
  background: transparent; border: none; border-top: 1px solid var(--line-strong);
  border-radius: 0; padding: 12px 0 4px;
}
.stat .num {
  font-family: var(--font-display); font-size: 30px; font-weight: 500;
  color: var(--ink); line-height: 1.1; letter-spacing: -.02em;
}
.stat .label {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-top: 5px;
}

/* ---------- 健康检查（admin 兼容） ---------- */
.check-card { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; }
.check-card + .check-card { border-top: 1px dashed var(--line); }
.check-dot { width: 9px; height: 9px; border-radius: var(--r-full); flex: 0 0 auto; background: var(--line-strong); }
.check-dot.ok { background: var(--dot-ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.check-dot.err { background: var(--dot-err); box-shadow: 0 0 0 3px var(--err-bg); }
.check-detail { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }

/* ---------- admin 表单盒（兼容旧模板 details.form-box） ---------- */
.form-box { border: 1px solid var(--line); border-radius: 0; background: var(--paper); margin-bottom: 12px; }
.form-box > summary {
  cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 13px; color: var(--ink);
  user-select: none; list-style: none;
}
.form-box > summary::-webkit-details-marker { display: none; }
.form-box > summary::before { content: "＋ "; }
.form-box[open] > summary::before { content: "− "; }
.form-box .inner { padding: 2px 14px 14px; border-top: 1px solid var(--line); }

/* pre.json / code */
pre.json, pre.code {
  background: var(--ink); color: var(--lime); border-radius: 0;
  padding: 14px; font-size: 12px; line-height: 1.6; overflow: auto;
  font-family: var(--font-mono);
  max-height: 420px;
}

/* 运行日志查看器（管理后台 /logs） */
pre.log-view {
  background: var(--ink); color: var(--canvas); border-radius: 0;
  padding: 14px; font-size: 12px; line-height: 1.65; overflow: auto;
  font-family: var(--font-mono);
  max-height: 60vh; margin-top: 12px;
  white-space: pre-wrap; word-break: break-all;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(14px);
  background: var(--ink); color: var(--canvas);
  font-size: 12.5px; font-weight: 500; padding: 10px 18px; border-radius: 2px;
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 1000; max-width: min(560px, 90vw);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--err); border-color: var(--err); }

/* ---------- 认证页（登录 / 注册）：下划线输入框 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 28px 20px;
  background:
    radial-gradient(900px 480px at 85% -10%, rgba(203, 249, 144, .30), transparent 60%),
    var(--canvas);
}
.auth-card {
  width: 100%; max-width: 860px;
  display: grid; grid-template-columns: 1fr 1fr;
  background: var(--paper); border: 1px solid var(--ink);
  border-radius: 0; overflow: hidden;
}
.auth-brand {
  background: var(--ink); color: var(--canvas); padding: 30px 32px 34px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-brand::after {
  content: ""; position: absolute; right: -80px; bottom: -80px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(203, 249, 144, .22), transparent);
}
.ab-meta {
  display: flex; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 9px; font-weight: 500;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--canvas); opacity: .55;
  margin-bottom: auto; padding-bottom: 20px;
}
.auth-brand .ab-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand .ab-logo .logo-mark { background: rgba(203, 249, 144, .14); border: 1px solid rgba(203, 249, 144, .45); }
.auth-brand .ab-logo span:last-child {
  color: var(--canvas); font-family: var(--font-display); font-weight: 600; font-size: 15px; letter-spacing: -.01em;
}
.auth-brand h2 {
  color: var(--canvas); font-size: 22px; font-weight: 500; line-height: 1.24;
  letter-spacing: -.01em; margin-bottom: 10px;
}
.auth-brand p { color: rgba(244, 243, 238, .62); font-size: 12.5px; line-height: 1.65; }
.auth-points { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.auth-points span { display: flex; gap: 9px; align-items: flex-start; font-size: 12.5px; color: rgba(244, 243, 238, .88); }
.auth-points i {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 0; font-style: normal;
  background: var(--lime); color: var(--ink); font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  display: inline-flex; align-items: center; justify-content: center; margin-top: 2px;
}
.auth-form { padding: 40px 36px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h1 { font-size: 22px; margin-bottom: 5px; }
.auth-form .sub { font-size: 12.5px; color: var(--muted); margin-bottom: 22px; }
.auth-form .field { margin-bottom: 18px; }
/* 编辑刊物式下划线输入框：无盒、无圆角、仅发丝底线 */
.auth-form input, .auth-form select {
  border: 0; border-bottom: 1px solid var(--line-strong);
  border-radius: 0; background: transparent;
  padding: 6px 0; min-height: 38px;
  transition: border-color .15s;
}
.auth-form input:hover, .auth-form select:hover { border-bottom-color: var(--ink-3); background: transparent; }
.auth-form input:focus, .auth-form select:focus { border-bottom-color: var(--ink); background: transparent; }
.auth-form input:disabled, .auth-form select:disabled { background: transparent; }
.auth-form input:-webkit-autofill, .auth-form input:-webkit-autofill:hover, .auth-form input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
  -webkit-text-fill-color: var(--ink);
}
.auth-error {
  background: var(--err-bg); border: 1px solid var(--err-line); color: var(--err);
  font-size: 12.5px; border-radius: 0; padding: 8px 11px; margin-bottom: 14px;
}
.auth-foot { margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.auth-foot a { font-weight: 600; }
.form-error { color: var(--err); font-size: 12.5px; }

/* ---------- 403 ---------- */
.denied-card { max-width: 520px; margin: 48px auto; text-align: center; padding: 44px 36px; }
.denied-code {
  font-family: var(--font-display); font-size: 46px; font-weight: 500;
  color: var(--ink); letter-spacing: -.03em; line-height: 1;
}
.denied-card h1 { margin: 12px 0 8px; }
.denied-card p { color: var(--muted); }
.denied-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; }

/* ---------- 画廊 ---------- */
.gallery-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.gallery-toolbar select, .gallery-toolbar input { width: auto; min-width: 150px; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.g-card {
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 0;
  overflow: hidden; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.g-card:hover { border-color: var(--ink); box-shadow: var(--shadow-md); }
.g-img {
  width: 100%; aspect-ratio: 1; object-fit: cover; background: var(--wash);
}
.g-img.failed {
  display: flex; align-items: center; justify-content: center;
  color: var(--err); font-size: 12.5px; background: var(--err-bg);
}
.g-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.g-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.g-title { font-size: 12.5px; font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-time { font-size: 11px; color: var(--muted); }
.stars { display: inline-flex; gap: 2px; }
.stars button {
  border: 0; background: none; cursor: pointer; padding: 0 1px;
  font-size: 15px; color: var(--line-strong); line-height: 1;
}
.stars button.on { color: #d9a514; }
.stars button:hover { transform: scale(1.15); }
.fav-btn { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--line-strong); padding: 2px; }
.fav-btn.on { color: #c2483a; }
.empty-state {
  text-align: center; padding: 52px 20px; color: var(--muted);
  border: 1.5px dashed var(--line-strong); border-radius: 0; background: transparent;
}
.empty-state .dz-icon { margin: 0 auto 12px; }

/* ---------- 视频 ---------- */
.video-result video {
  width: 100%; max-height: 480px; border-radius: 0;
  background: #000; border: 1px solid var(--line-strong);
}
.v-list { display: flex; flex-direction: column; gap: 8px; }
.v-item {
  display: flex; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 0; padding: 9px 11px;
  cursor: pointer; background: transparent; transition: border-color .15s, background .15s;
}
.v-item:hover { border-color: var(--ink); background: var(--paper); }
.v-item .v-info { min-width: 0; flex: 1; }
.v-item .v-name { font-size: 12.5px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v-item .v-time { font-size: 11px; color: var(--muted); }

/* ---------- Modal（浮层保留纸面盒） ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(10, 14, 11, .52); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal {
  background: var(--paper); border: 1px solid var(--ink);
  border-radius: 2px;
  width: 100%; max-width: 680px; max-height: 88vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modal-in .18s ease;
}
.modal.modal-lg { max-width: 900px; }
.modal.modal-sm { max-width: 400px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}

/* ---------- 全局确认弹窗（confirmDialog，替代原生 confirm） ---------- */
.confirm-modal { max-width: 380px; }
.confirm-body {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 18px 16px 4px;
}
.confirm-ic {
  width: 34px; height: 34px; border-radius: 0;
  background: var(--err-bg); border: 1px solid var(--err-line);
  color: var(--err);
  display: inline-flex; align-items: center; justify-content: center;
}
.confirm-ic .icon { width: 16px; height: 16px; }
.confirm-body h3 { font-size: 14px; }
.confirm-msg { font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.confirm-modal .modal-foot { margin-top: 14px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--line-strong);
}
.modal-head h3 { font-size: 14px; }
.modal-close {
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  width: 30px; height: 30px; border-radius: 0;
  color: var(--muted); line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.modal-body { padding: 14px 16px; overflow-y: auto; }
.modal-body h4 {
  margin: 14px 0 6px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.modal-body h4:first-child { margin-top: 0; }
.kv-table { width: 100%; font-size: 12.5px; }
.kv-table td { padding: 6px 8px; border-bottom: 1px dashed var(--line); }
.kv-table td:first-child { color: var(--muted); width: 130px; }
.kv-table td:last-child { word-break: break-all; }
.prompt-block {
  background: var(--wash); border: 1px solid var(--line); border-radius: 0;
  padding: 10px 12px; font-size: 12.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  max-height: 220px; overflow-y: auto;
}

/* ---------- 详情两栏图片 ---------- */
.detail-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-imgs figure { margin: 0; }
.detail-imgs figcaption { font-size: 11px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.detail-imgs img { width: 100%; border-radius: 0; border: 1px solid var(--line); background: var(--wash); }

/* ---------- Spinner ---------- */
.spin, .spinner {
  display: inline-block; width: 16px; height: 16px; flex: 0 0 auto;
  border: 2px solid var(--line-strong); border-top-color: var(--ink);
  border-radius: 50%; animation: spin .7s linear infinite;
}
.spinner.lg { width: 26px; height: 26px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 旧版布局兼容（M0 admin 类名，保持盒状纸面） ---------- */
.layout { display: flex; min-height: calc(100vh - var(--topbar-h)); max-width: var(--container); margin: 0 auto; padding: 20px 36px 48px; gap: 20px; align-items: flex-start; }
.sidebar { flex: 0 0 220px; background: var(--paper); border: 1px solid var(--line); border-radius: 0; padding: 14px 12px; position: sticky; top: calc(var(--topbar-h) + 16px); }
.brand { font-weight: 600; font-family: var(--font-display); font-size: 15px; padding: 4px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.brand-sub { display: block; font-size: 10px; font-weight: 500; font-family: var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: block; padding: 8px 10px; border-radius: 2px; font-size: 13px; color: var(--ink-2); text-decoration: none !important; }
.nav a:hover { background: var(--wash); color: var(--ink); }
.nav a.active { background: var(--wash); color: var(--ink); font-weight: 600; }
.sidebar-footer { border-top: 1px solid var(--line); margin-top: 14px; padding: 12px 8px 2px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.content { flex: 1; min-width: 0; }

/* ---------- Tabs（admin 子导航，安静下划线风格） ---------- */
.tabs {
  display: flex; gap: 2px; flex-wrap: wrap; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.tabs a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 7px 10px; margin-bottom: -1px;
  border-bottom: 2px solid transparent; text-decoration: none !important;
  transition: color .15s, border-color .15s;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

/* ---------- 角色绑定（双列卡片 + 迷你表格行） ---------- */
.role-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 20px 32px; align-items: start;
}
.bind-head, .bind-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 64px 36px;
  gap: 8px; align-items: center;
}
.bind-head {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); padding-bottom: 4px;
}
.bind-row { padding: 5px 0; }
.bind-row + .bind-row { border-top: 1px solid var(--line); }
.icon-btn { width: 36px; height: 36px; padding: 0; color: var(--muted); }
.icon-btn:hover { color: var(--err); background: var(--err-bg); border-color: var(--err-line); }

/* ---------- 注册模型表单（分组） ---------- */
.mf-template-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.mf-template-row > label {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); flex: 0 0 auto;
}
.mf-section { padding: 14px 0 4px; }
.mf-section + .mf-section { border-top: 1px solid var(--line); margin-top: 12px; }
.mf-section-title {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 12px;
}

/* ---------- 工具类 ---------- */
.hidden, [hidden] { display: none !important; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-14 { margin-top: 14px; } .mt-18 { margin-top: 18px; }
.mb-8 { margin-bottom: 8px; } .mb-14 { margin-bottom: 14px; } .mb-18 { margin-bottom: 18px; }
.w-auto { width: auto; }
.right { margin-left: auto; }
.divider { height: 1px; background: var(--line); margin: 12px 0; }
.loading-block { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; padding: 6px 0; }

/* ---------- Icons（内联 SVG sprite，stroke 风格） ---------- */
.icon {
  width: 16px; height: 16px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn .icon { width: 14px; height: 14px; }
.btn.sm .icon { width: 13px; height: 13px; }
/* 顶部导航以 mono 编号为装置，图标让位（页面标题/卡片/按钮仍保留 icon） */
.topnav > a .icon { display: none; }
.tabs a .icon { width: 14px; height: 14px; opacity: .8; }
.page-title { display: flex; align-items: center; gap: 8px; }
.page-title .icon { width: 18px; height: 18px; color: var(--ink); }
/* 标题直连图标：图标与文字左右排列（svg 全局 reset 为 block，非 flex 标题需转 flex） */
h1:has(> .icon), h2:has(> .icon), h3:has(> .icon) {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
/* 中文字形在行盒中天然偏上，按盒居中会显得文字偏高：图标上移 1px 光学校正 */
h1:has(> .icon) > .icon, h2:has(> .icon) > .icon, h3:has(> .icon) > .icon {
  transform: translateY(-1px);
}
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-head .icon { width: 16px; height: 16px; color: var(--ink-3); }
.panel h3 { display: flex; align-items: center; gap: 8px; }
.panel h3 .icon { width: 15px; height: 15px; color: var(--ink-3); }
.dz-icon .icon { width: 18px; height: 18px; }
.modal-close .icon { width: 14px; height: 14px; }
.stat .stat-ic {
  width: 26px; height: 26px; border-radius: 0;
  background: var(--ink); border: none;
  color: var(--lime); display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 8px;
}

/* ---------- 行对齐工具类 ----------
   .row-end：按钮与带 label 的输入框底部对齐（label 在上时按钮不再垂直悬空）
   .inline-check：行内 checkbox 保持 36px 控件高度，与输入框/按钮等高对齐 */
.row-end { align-items: flex-end; }
.row-end .field { margin-bottom: 0; }
.inline-check {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  margin: 0; cursor: pointer; white-space: nowrap;
}
.inline-flex { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1366px) {
  .studio-grid { grid-template-columns: 280px minmax(0, 1fr) 320px; }
}
@media (max-width: 1280px) {
  .overlay-box { max-width: 100%; }
  .chip-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
  .studio-grid, .video-grid { grid-template-columns: 1fr; gap: 20px; }
  .studio-grid > *, .video-grid > * { padding-right: 0; }
  .studio-grid > * + *, .video-grid > * + * { border-left: none; padding-left: 0; }
  .studio-side { position: static; }
  .overlay-box { max-width: 100%; }
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .auth-card { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .topbar-inner { padding: 0 14px; gap: 8px; overflow-x: auto; }
  .logo-text { display: none; }
  .logo .topnav-tag { display: none; }
  /* 下拉面板改为顶栏下方通栏浮层：逃出 topbar-inner 横向滚动裁切 */
  .nav-panel, .user-panel { position: fixed; top: var(--topbar-h); left: 12px; right: 12px; width: auto; min-width: 0; }
  .user-panel { left: auto; width: min(240px, calc(100vw - 24px)); }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .page { padding: 16px 14px 56px; }
  .chip-grid { grid-template-columns: 1fr; }
  .adj-row2 { grid-template-columns: 1fr; }
  .detail-imgs { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .role-grid { grid-template-columns: 1fr; }
}

/* ---------- 自定义下拉（select 增强组件） ---------- */
.sel-wrap { position: relative; display: inline-flex; width: 100%; max-width: 100%; vertical-align: middle; }
.sel-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; min-height: 36px; padding: 6px 11px;
  font-family: var(--font); font-size: 12.5px; font-weight: 500; color: var(--ink);
  text-align: left; background: var(--paper);
  border: 1px solid var(--line-strong); border-radius: 2px;
  cursor: pointer; outline: none;
  transition: border-color .15s, background .15s, color .15s;
}
.sel-btn:hover { border-color: var(--ink-3); }
.sel-btn:focus-visible, .sel-wrap.open .sel-btn { border-color: var(--ink); background: #fff; }
.sel-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-caret { flex: 0 0 auto; color: var(--muted); transition: transform .15s; }
.sel-wrap.open .sel-caret { transform: rotate(180deg); }
.sel-menu {
  display: none; position: fixed; z-index: 1200;
  max-width: 360px; max-height: 280px; overflow-y: auto;
  padding: 4px; background: var(--paper); border: 1px solid var(--ink);
  border-radius: 2px; box-shadow: var(--shadow-lg);
}
.sel-wrap.open .sel-menu { display: block; animation: sel-in .13s ease; }
@keyframes sel-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.sel-opt {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 0;
  font-size: 12.5px; color: var(--ink-2); cursor: pointer; word-break: break-word;
}
.sel-opt:hover, .sel-opt.active { background: var(--wash); color: var(--ink); }
.sel-opt.selected { color: var(--ink); font-weight: 600; }
.sel-opt.selected::after { content: "✓"; margin-left: auto; font-size: 12px; }
.sel-opt.disabled { color: var(--muted); opacity: .55; cursor: not-allowed; }
.sel-opt.disabled:hover, .sel-opt.disabled.active { background: transparent; color: var(--muted); }
.sel-group {
  padding: 8px 10px 4px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.sel-wrap.disabled .sel-btn { background: var(--wash); color: var(--muted); cursor: not-allowed; }
/* 布局上下文：行内 / 工具栏 / 表格中的下拉保持自适应宽度 */
.row .sel-wrap, .gallery-toolbar .sel-wrap, td .sel-wrap { width: auto; }
.gallery-toolbar .sel-wrap { min-width: 160px; }
td .sel-btn { min-height: 30px; padding: 4px 9px; font-size: 12px; }

/* ---------- 表单输入细节打磨 ---------- */
input[type="text"]:not(:disabled):hover, input[type="password"]:not(:disabled):hover,
input[type="number"]:not(:disabled):hover, input[type="search"]:not(:disabled):hover,
input[type="url"]:not(:disabled):hover, input[type="email"]:not(:disabled):hover,
input:not([type]):not(:disabled):hover, textarea:not(:disabled):hover,
select:not(:disabled):hover { border-color: var(--ink-3); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }

/* ---------- 场景发散滑杆 ---------- */
.sf-label { display: flex; align-items: baseline; }
.sf-tier {
  margin-left: auto; font-family: var(--font-mono); font-size: 10px;
  font-weight: 500; letter-spacing: .06em; color: var(--ink-2);
}
.sf-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; padding: 0; margin: 0;
  background: transparent; border: none; cursor: pointer;
}
.sf-slider:focus { outline: none; }
.sf-slider:focus-visible { outline: 1px solid var(--ink); outline-offset: 2px; }
.sf-slider::-webkit-slider-runnable-track { height: 2px; background: var(--line-strong); }
.sf-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 12px; height: 12px; margin-top: -5px;
  background: var(--ink); border: none; border-radius: 0;
  transition: background .15s, box-shadow .15s;
}
.sf-slider:hover::-webkit-slider-thumb { background: var(--ink-hover); }
.sf-slider:active::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--lime-soft); }
.sf-slider::-moz-range-track { height: 2px; background: var(--line-strong); }
.sf-slider::-moz-range-thumb {
  width: 12px; height: 12px; background: var(--ink);
  border: none; border-radius: 0;
}
.sf-slider:hover::-moz-range-thumb { background: var(--ink-hover); }
.sf-scale {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); margin-top: 2px;
}

/* ---------- 仪表盘统计（图表 + 数字） ---------- */
.stat-sub {
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  letter-spacing: .04em; color: var(--muted); margin-top: 3px;
}
.dash-grid {
  display: grid; grid-template-columns: 1.45fr 1fr;
  gap: 20px 32px; align-items: start; margin-top: 20px;
}
.chart-card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 0; padding: 14px 16px 12px; min-width: 0;
}
/* 通栏卡片：跨满 dash-grid 两列（如 COS 占用构成的比例条） */
.chart-card.wide { grid-column: 1 / -1; }
.chart-eyebrow {
  display: flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
  margin-bottom: 10px;
}
.chart-eyebrow .icon { width: 13px; height: 13px; }
.chart-svg { width: 100%; height: auto; display: block; }
.chart-grid-line { stroke: var(--line); stroke-width: 1; }
.chart-axis { stroke: var(--line-strong); stroke-width: 1; }
.chart-date { font-family: var(--font-mono); font-size: 9px; fill: var(--muted); }
.chart-val { font-family: var(--font-mono); font-size: 9.5px; fill: var(--ink-3); }
.chart-bar-ok { fill: var(--ink); }
.chart-bar-ok:hover { opacity: .82; }
.chart-bar-bad { fill: var(--err); opacity: .5; }
.rank-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.rank-row + .rank-row { border-top: 1px solid var(--line); }
.rank-name {
  flex: 0 0 36%; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rank-track { flex: 1; height: 10px; background: var(--wash); overflow: hidden; }
.rank-fill { height: 100%; background: var(--ink); }
.rank-val { flex: 0 0 auto; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.cos-bar { display: flex; height: 12px; background: var(--wash); overflow: hidden; }
.cos-seg { height: 100%; min-width: 2px; }
.cos-legend {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 7px 18px; margin-top: 12px;
}
.cos-legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.cos-legend-item .n { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.cos-legend-item .bytes { margin-left: auto; font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.cos-dot { width: 8px; height: 8px; flex: 0 0 auto; }
.chart-empty { padding: 30px 0; text-align: center; color: var(--muted); font-size: 12.5px; }
/* COS 构成分段色板（墨阶 + lime + 状态色，循环取用） */
.cos-seg.c0, .cos-dot.c0 { background: var(--ink); }
.cos-seg.c1, .cos-dot.c1 { background: var(--ink-2); }
.cos-seg.c2, .cos-dot.c2 { background: var(--ink-3); }
.cos-seg.c3, .cos-dot.c3 { background: var(--lime); }
.cos-seg.c4, .cos-dot.c4 { background: var(--lime-soft); }
.cos-seg.c5, .cos-dot.c5 { background: var(--warn); }
.cos-seg.c6, .cos-dot.c6 { background: var(--ok); }
.cos-seg.c7, .cos-dot.c7 { background: var(--muted); }
@media (max-width: 1024px) { .dash-grid { grid-template-columns: 1fr; } }

/* ---------- 仿视频（分镜 / 关键帧审批 / 成片） ---------- */
.refv-preview video, #video-player {
  width: 100%; max-height: 320px; background: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r-sm);
}
.shot-list { display: flex; flex-direction: column; }
.shot-item {
  border-top: 1px solid var(--line); padding: 10px 2px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.shot-item:first-child { border-top: none; padding-top: 4px; }
.shot-item-top { display: flex; align-items: baseline; gap: 10px; }
.shot-no {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  letter-spacing: .12em; color: var(--ink); background: var(--lime);
  padding: 2px 6px 1px;
}
.shot-time {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .04em;
  color: var(--ink-3);
}
.shot-fields {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3px 18px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.55;
}
.shot-fields b {
  font-weight: 500; color: var(--ink-3); margin-right: 6px;
  font-size: 11px;
}
.analysis-summary { margin: 8px 0 10px; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.kf-progress {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .04em;
  color: var(--ink-2);
}
.kf-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.kf-card {
  background: var(--paper); border: 1px solid var(--line);
  padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 9px;
  min-width: 0;
}
.kf-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kf-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kf-imgs figure { margin: 0; min-width: 0; }
.kf-imgs img {
  width: 100%; height: 130px; object-fit: cover; display: block;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--wash);
}
.kf-cap {
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  margin-top: 4px;
}
.kf-empty {
  width: 100%; height: 130px; display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm);
  background: var(--wash); color: var(--muted); font-size: 12px;
}
.kf-empty.err { border-style: solid; border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.kf-actions { display: flex; gap: 8px; }
.kf-actions .btn { flex: 1; justify-content: center; }

/* ---------- 关键帧大图查看 / 任务进度条 / 转场选择 ---------- */
.kf-imgs figure.zoomable { cursor: zoom-in; }
.kf-imgs figure.zoomable:hover img { border-color: var(--ink-3); }

.lightbox-mask { z-index: 950; cursor: zoom-out; }
.lightbox {
  margin: 0; position: relative; max-width: min(1080px, 92vw);
  animation: modal-in .18s ease;
}
.lightbox img {
  display: block; max-width: 100%; max-height: 82vh;
  border: 1px solid var(--line-strong); background: var(--wash);
  box-shadow: var(--shadow-lg);
}
.lightbox figcaption {
  margin-top: 8px; text-align: center;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em;
  color: var(--ink-2);
}
.lightbox .lightbox-close { position: absolute; top: -12px; right: -12px; background: var(--paper); }

.job-progress { display: flex; align-items: center; gap: 10px; }
.job-progress-track {
  flex: 1; height: 4px; background: var(--wash); border: 1px solid var(--line);
  overflow: hidden;
}
.job-progress-track i {
  display: block; height: 100%; width: 0;
  background: var(--lime); transition: width .5s ease;
}
.job-progress.indeterminate .job-progress-track i {
  width: 100% !important;
  background: linear-gradient(90deg, var(--lime-faint) 0%, var(--lime) 50%, var(--lime-faint) 100%);
  background-size: 200% 100%;
  animation: progress-slide 1.4s linear infinite;
}
.job-progress-pct {
  font-family: var(--font-mono); font-size: 11px; color: var(--ink-2);
  min-width: 34px; text-align: right;
}
@keyframes progress-slide { from { background-position: 0 0; } to { background-position: 200% 0; } }

.tr-field { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.tr-field > span { white-space: nowrap; }
.direct-box summary {
  display: flex; align-items: center; gap: 7px; cursor: pointer;
  font-size: 12.5px; color: var(--ink-2); user-select: none;
  padding: 2px 0;
}
.direct-box summary .icon { width: 14px; height: 14px; }
.direct-box summary:hover { color: var(--ink); }
.direct-box[open] summary { margin-bottom: 10px; }
@media (max-width: 1280px) { .kf-grid { grid-template-columns: 1fr; } }

/* ---------- 大片库 ---------- */
.shot-actions {
  border-top: 1px solid var(--line);
  margin-top: 9px; padding-top: 9px;
  display: flex; flex-wrap: wrap; gap: 6px;
}
.shot-actions .btn { font-size: 12px; }
.up-file {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  border: 1px dashed var(--line-strong); border-radius: var(--r-sm);
  background: var(--wash); padding: 12px 14px;
  font-size: 13px; color: var(--ink-2);
  transition: border-color .15s ease, background .15s ease;
}
.up-file:hover { border-color: var(--ink-3); background: var(--paper); }
.up-file .icon { width: 18px; height: 18px; color: var(--ink-3); flex: 0 0 auto; }
.up-preview {
  display: block; width: 100%; max-height: 220px; object-fit: contain;
  margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--wash);
}
