/* 调色板 —— 2026-10-09 重做：深色（照 frameset）。页面 #0b0b0c、卡片 #151517、字 #e8e8e8，极少装饰；
   旧变量名（--tiff* / --hermes / --brown / --sand / --paper / --ikb）保留映射，旧页面的颜色都从这里来 */
:root {
  --bg: #0b0b0c; --bg2: #151517; --bg3: #1e1e21; --bg4: #27272b; --line: #2a2a2e; --line2: #45454c;
  --fg: #e8e8e8; --muted: #8b8b93; --accent: #9ab8ff; --on-accent: #0b0b0c;
  --tiff: #e8e8e8; --tiff-hi: #ffffff; --tiff-deep: #1e1e21; --tiff-ink: #e8e8e8;
  --tiff-page: var(--bg); --tiff-side: #111113; --tiff-pale: #1e1e21; --tiff-mist: #151517;
  --hermes: var(--tiff); --hermes-hi: var(--tiff-hi); --hermes-soft: var(--bg2);
  --brown: var(--tiff-deep); --brown-2: #a0a0a8; --sand: var(--bg3); --paper: var(--bg);
  --red: #f0665c; --amber: #e0b04a; --green: #4cc38a; --grey: #6b6b72; --lime: var(--tiff);
  --ikb: var(--tiff-deep); --ikb-hi: var(--brown-2); --ikb-deep: var(--tiff-ink);
  --sbw: 232px; --top-h: 56px; --r-xl: 18px; --r-lg: 14px; --r-md: 10px; --r-sm: 8px;
  --serif: "Didot", "Bodoni 72", "Playfair Display", "Times New Roman", "Songti SC", "Noto Serif CJK SC", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--fg); color-scheme: dark;
  font: 14px/1.5 -apple-system, "Inter", "PingFang SC", "Helvetica Neue", "Noto Sans CJK SC", sans-serif; }
a { color: var(--accent); text-decoration: none; }
button { font: inherit; }
.small { font-size: 12px; } .muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.inline { display: inline; }
::selection { background: rgba(255,255,255,.2); }

/* 壳子（2026-10-09）：顶栏（logo / 居中 TAB / 语言 + 用户）+ 下面一行（项目边栏只在 #/p/… 出现 | 主区） */
body { display: block; min-height: 100vh; }
.top { position: sticky; top: 0; z-index: 45; height: var(--top-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 20px;
  background: rgba(11,11,12,.9); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .logo { font-weight: 700; letter-spacing: .01em; color: var(--fg); font-size: 15px; justify-self: start; }
.tabs-main { display: flex; gap: 2px; justify-self: center; }
.tabs-main a { color: var(--muted); padding: 7px 14px; border-radius: 999px; font-weight: 500; font-size: 14px; }
.tabs-main a:hover { color: var(--fg); }
.tabs-main a.active { color: var(--fg); background: var(--bg3); }
.top-right { display: flex; gap: 8px; align-items: center; justify-self: end; min-width: 0; }
.lang-btn { background: transparent; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); padding: 5px 10px; cursor: pointer; font-size: 12px; display: inline-flex; gap: 5px; align-items: center; line-height: 1.2; }
.lang-btn b { font-weight: 500; } .lang-btn b.on { color: var(--fg); font-weight: 700; } .lang-btn .sep { opacity: .5; }
.lang-btn:hover { border-color: var(--line2); color: var(--fg); }
.user-wrap { position: relative; min-width: 0; }
.user-btn { background: transparent; border: 1px solid transparent; color: var(--fg); border-radius: 999px; padding: 3px 8px 3px 3px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; max-width: 260px; }
.user-btn:hover { background: var(--bg3); }
.user-btn #me { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.user-btn .chev { color: var(--muted); font-size: 10px; }
.user-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 180px; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; display: grid; gap: 2px; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 60; }
.user-menu[hidden] { display: none; }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; background: transparent; border: none; color: var(--fg); padding: 7px 10px; border-radius: 8px; cursor: pointer; font: inherit; }
.user-menu a:hover, .user-menu button:hover { background: var(--bg3); }
.user-menu .muted { padding: 4px 10px; }
.shell { display: flex; align-items: stretch; min-height: calc(100vh - var(--top-h)); }
.sidebar { width: var(--sbw); flex: none; background: var(--tiff-side); border-right: 1px solid var(--line); color: var(--fg);
  display: flex; flex-direction: column; padding: 12px 10px 10px; gap: 6px; position: sticky; top: var(--top-h); height: calc(100vh - var(--top-h)); overflow-y: auto; overflow-x: hidden; }
.sb-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; font-size: 14px; letter-spacing: .02em; }
.brand span { color: var(--muted); font-weight: 400; }
.sb-collapse, .iconbtn { background: transparent; border: none; color: var(--muted); cursor: pointer; padding: 4px 6px; border-radius: 8px; font-size: 14px; line-height: 1; }
.sb-collapse:hover, .iconbtn:hover { background: var(--bg3); color: var(--fg); }
.sb-nav { display: grid; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); color: var(--fg); font-weight: 500; font-size: 13.5px; }
.nav-item:hover { background: var(--bg3); }
.nav-item.active { background: var(--bg3); color: var(--fg); }
.nav-item.active .ico { background: var(--fg); color: var(--bg); }
.nav-item.dim { color: var(--muted); }
.nav-item .ico { width: 24px; height: 24px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  font-style: normal; font-size: 12px; color: var(--fg); background: var(--bg3); overflow: hidden; }
.ico.i-all { background: var(--bg3); color: var(--fg); }
.ico.i-plus { background: transparent; color: var(--fg); border: 1px dashed var(--muted); font-size: 14px; opacity: .7; }
.ico.i-price { background: transparent; color: var(--muted); font-size: 14px; }
.ico.i-user { background: var(--bg4); color: #fff; }
.ico img { width: 100%; height: 100%; object-fit: cover; }
.ico.i-user::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); }
.sb-section { display: grid; gap: 2px; margin-top: 10px; }
.sb-label { color: var(--muted); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; padding: 6px 8px 6px; }
.sb-label.row { display: flex; justify-content: space-between; align-items: center; }
.sb-tools { display: inline-flex; gap: 2px; }
.sb-films { display: grid; gap: 2px; }
.sb-films .nav-item { font-weight: 600; letter-spacing: .01em; text-transform: uppercase; font-size: 13px; }
.sb-films .nav-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-foot { margin-top: auto; display: grid; gap: 2px; position: relative; padding-top: 8px; border-top: 1px solid var(--line); }
.nav-item.pricing { color: var(--fg); }
.nav-item.pricing .pill { margin-left: auto; background: var(--bg4); color: var(--fg); font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.nav-item.pricing .pill:empty { display: none; }
.nav-item.user { cursor: pointer; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--bg); }
body.home .topbar, body.cases .topbar, body.ideas .topbar { display: none; }
.crumbs { font-weight: 500; font-size: 14px; letter-spacing: .01em; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--fg); }
.topbar-right { display: flex; gap: 8px; align-items: center; }
.view { padding: 20px 24px 60px; }
body.home .view { padding: 0 0 60px; }
body.cases .view, body.ideas .view { padding: 0 16px 60px; }
@media (max-width: 768px) {
  /* 五个 TAB 在手机宽度放不下时整行横向滚动，不按字换行（中间列要能收缩到 0） */
  .top { grid-template-columns: auto minmax(0, 1fr) auto; padding: 0 12px; gap: 6px; }
  .tabs-main { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs-main::-webkit-scrollbar { display: none; }
  .tabs-main a { padding: 6px 8px; font-size: 12.5px; white-space: nowrap; flex: none; }
  .user-btn #me { display: none; }
  .view { padding: 14px 16px 60px; }
  .sidebar { position: fixed; left: 0; z-index: 44; box-shadow: 0 0 40px rgba(0,0,0,.6); }
}

/* ── 首页（照 Cinema Studio 首页排版）────────────────────────────────── */
.homepg { max-width: 1440px; margin: 0 auto; padding: 0 28px; }
.hero { display: flex; flex-direction: column; align-items: center; padding: 34px 0 6px; }
.hero-covers { position: relative; height: 190px; width: min(600px, 100%); display: flex; align-items: center; justify-content: center; }
.hero-covers .hc:empty { display: none; }
.hero-covers .hc { position: absolute; width: 280px; aspect-ratio: 21/9; border-radius: var(--r-lg); overflow: hidden; background: var(--tiff-deep);
  border: 1px solid var(--line); box-shadow: 0 10px 30px rgba(61,43,31,.2); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.85); font-family: var(--serif); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.hero-covers .hc img { width: 100%; height: 100%; object-fit: cover; }
.hero-covers .hc.l { transform: translateX(-140px) scale(.92); opacity: .55; }
.hero-covers .hc.r { transform: translateX(140px) scale(.92); opacity: .55; }
.hero-covers .hc.c { z-index: 2; transform: translateY(-8px); border: 6px solid var(--bg3); box-shadow: 0 18px 40px rgba(0,0,0,.5); color: #fff; }
.hero h1 { font-size: 44px; letter-spacing: .06em; margin: 22px 0 0; text-transform: uppercase; font-weight: 500; color: var(--fg); text-align: center; font-family: var(--serif); }
.hero h1::after { content: "."; color: var(--muted); }

.gen-wrap { display: flex; gap: 12px; align-items: stretch; margin: 26px auto 0; max-width: 880px; }
.gen-mode { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: var(--bg2); border: none; border-radius: var(--r-lg); padding: 8px; box-shadow: 0 12px 40px rgba(11,60,58,.15); }
.gen-mode button { background: transparent; border: none; color: var(--muted); border-radius: var(--r-md); padding: 8px 10px; cursor: pointer; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 600; }
.gen-mode button .g { font-size: 14px; }
.gen-mode button.on { background: var(--tiff); color: var(--on-accent); }
.gen-box:focus-within { box-shadow: 0 0 0 1px var(--line2), 0 12px 40px rgba(0,0,0,.3); }
.gen-box { flex: 1; background: var(--bg2); border: none; box-shadow: 0 12px 40px rgba(11,60,58,.15); border-radius: var(--r-xl); padding: 14px 16px 12px; display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; align-items: end; }
.gen-box textarea { grid-column: 1 / -1; width: 100%; min-height: 54px; background: transparent; border: none; color: var(--fg); font: inherit; font-size: 15px; line-height: 1.45; resize: vertical; outline: none; }
.gen-box .subject { grid-column: 1 / -1; color: var(--fg); font-weight: 600; letter-spacing: .08em; font-size: 13px; }
.gen-box .subject input { background: transparent; border: none; color: var(--fg); font: inherit; letter-spacing: .08em; text-transform: uppercase; width: 100%; outline: none; }
.gen-tools { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gbtn { background: var(--sand); border: 1px solid transparent; border-radius: 999px; color: var(--fg); border-radius: 16px; padding: 6px 10px; cursor: pointer; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gbtn:hover { border-color: var(--accent); }
.gbtn.sq { width: 34px; height: 34px; padding: 0; justify-content: center; }
.gbtn .lbl { color: var(--muted); }
.gbtn .bar { width: 12px; height: 12px; background: linear-gradient(90deg, var(--lime) 0 30%, transparent 30% 45%, var(--lime) 45% 70%, transparent 70% 85%, var(--lime) 85%); border-radius: 8px; }
.gbtn.stepper { padding: 0; }
.gbtn.stepper b { font-weight: 500; padding: 0 6px; min-width: 32px; text-align: center; }
.gbtn.stepper button { background: transparent; border: none; color: var(--fg); cursor: pointer; padding: 6px 8px; font: inherit; }
.gen-go { background: var(--tiff); color: var(--on-accent); border: none; border-radius: var(--r-lg); padding: 12px 22px; font-weight: 800; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; display: grid; justify-items: center; gap: 2px; min-width: 120px; box-shadow: 0 8px 20px rgba(255,255,255,.08); }
.gen-go:hover { background: var(--tiff-hi); }
.gen-go .cost { font-weight: 600; font-size: 12px; }
.gen-note { grid-column: 1 / -1; color: var(--muted); font-size: 12px; min-height: 1em; }

.strip-banner { margin: 34px 0 0; border: none; border-radius: var(--r-lg); padding: 20px 24px; display: flex; align-items: center; gap: 20px; color: #fff;
  background: var(--tiff-deep); position: relative; overflow: hidden; box-shadow: 0 12px 40px rgba(11,60,58,.2); }
.strip-banner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--tiff); }
.strip-banner .sbt { font-weight: 500; font-family: var(--serif); text-transform: uppercase; letter-spacing: .08em; font-size: 20px; }
.strip-banner .sbt b { color: var(--tiff); font-weight: 700; }
.strip-banner .sbs { color: rgba(255,255,255,.85); font-size: 13px; margin-top: 2px; }
.strip-banner .laurel { margin: 0 auto; color: rgba(255,255,255,.55); font-size: 34px; letter-spacing: -6px; }
.strip-banner .acts { display: flex; gap: 8px; }
.btn.white { background: var(--tiff); color: var(--on-accent); border-color: var(--tiff); font-weight: 600; }
.btn.white:hover { background: var(--tiff-hi); border-color: var(--tiff-hi); }
.btn.lg { padding: 10px 18px; border-radius: 999px; }
.strip-banner .btn:not(.white) { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); }

.proj-head { display: flex; justify-content: space-between; align-items: baseline; margin: 34px 0 14px; }
.proj-head h2 { margin: 0; font-size: 20px; font-family: var(--serif); font-weight: 500; letter-spacing: .02em; }
.proj-head h2 a { color: var(--fg); } .proj-head h2 a::after { content: " ›"; color: var(--muted); }
.proj-head a.more { color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.proj-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pj { display: grid; gap: 8px; color: var(--fg); }
.pj .cov { aspect-ratio: 16/9; border-radius: var(--r-lg); background: var(--bg2); box-shadow: 0 8px 24px rgba(11,60,58,.12); border: 1px solid var(--line); overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.pj .cov img { width: 100%; height: 100%; object-fit: cover; }
.pj .cov .folder { width: 48px; height: 36px; border: 2px solid var(--tiff-hi); border-radius: 10px; position: relative; }
.pj .cov .folder::before { content: ""; position: absolute; top: -8px; left: -2px; width: 18px; height: 8px; border: 1.5px solid var(--tiff-hi); border-bottom: none; border-radius: 14px 4px 0 0; }
.pj .cov .tag { position: absolute; top: 10px; right: 10px; background: var(--tiff); color: var(--on-accent); font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.pj .cov .tag.red { background: var(--red); color: #fff; }
.pj .cov .tag.grey { background: var(--tiff-deep); color: #fff; }
.pj .ttl { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj .sub { color: var(--muted); font-size: 12px; }
.pj:hover .cov { border-color: var(--fg); }
.home-empty { color: var(--muted); padding: 20px 0; }
/* GENERATE 前先挑镜头：一部片 → 一个镜头，把首页写的提示词带进生成页 */
.shotpick { max-height: 50vh; overflow: auto; display: grid; gap: 4px; }
.shotpick label { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; }
.shotpick label:hover { border-color: var(--accent); }
.shotpick .sid { font-family: var(--mono); font-weight: 700; min-width: 40px; }
.shotpick .bt { color: var(--muted); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.btn { background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 12px; cursor: pointer; }
.btn:hover { border-color: var(--line2); }
.btn.ghost { background: transparent; }

/* stats header */
.stats { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 18px; }
.stat { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px; min-width: 120px; }
.stat .k { color: var(--muted); font-size: 12px; } .stat .v { font-size: 20px; font-weight: 600; }
.stat.v-green .v { color: var(--green); } .stat.v-grey .v { color: var(--grey); } .stat.v-red .v { color: var(--red); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.chip { font-size: 12px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg3); }
.chip.red { border-color: var(--red); color: var(--red); }
.chip.amber { border-color: var(--amber); color: var(--amber); }
.chip.green { border-color: var(--green); color: var(--green); }
.chip.grey { border-color: var(--grey); color: var(--muted); border-style: dashed; }
.chip.blue { border-color: var(--accent); color: var(--accent); }
.banner { border: 1px solid var(--red); background: rgba(229,72,77,.08); color: var(--fg);
  padding: 10px 14px; border-radius: 18px; margin-bottom: 14px; }
.banner.warn { border-color: var(--amber); background: rgba(224,164,42,.08); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 12px; margin: 6px 0 16px; }

/* acts + cards */
.act { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.act-label { font-weight: 700; font-size: 18px; } .act-label .sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; cursor: pointer;
  display: grid; gap: 6px; min-height: 118px; position: relative; }
.card:hover { border-color: var(--accent); }
.card .id { font-weight: 700; font-size: 16px; font-family: var(--mono); }
.card .beat { color: var(--fg); font-size: 13px; min-height: 2.6em; }
.card .meta { color: var(--muted); font-size: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.card.st-missing, .card.st-all_rejected, .card.st-invalid { border-color: var(--red); background: rgba(229,72,77,.06); }
.card.st-missing { border-style: dashed; }
.card.st-claimed_unverified { border-style: dashed; border-color: var(--grey); }
.card.st-pending, .card.st-generating_only { border-color: var(--amber); }
.card.st-accepted { border-color: var(--green); }
.card.st-accepted_no_local { border-color: var(--green); border-style: dashed; }
.badge { font-size: 11px; padding: 2px 9px; border-radius: 999px; font-weight: 600; }
.badge.red { background: rgba(229,72,77,.18); color: var(--red); }
.badge.amber { background: rgba(224,164,42,.18); color: var(--amber); }
.badge.green { background: rgba(63,185,80,.18); color: var(--green); }
.badge.grey { background: rgba(154,140,126,.2); color: var(--brown-2); }
.card .batch { position: absolute; top: 10px; right: 10px; color: var(--muted); font-size: 11px; }

/* projects list */
.plist { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.pcard { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 8px; }
.pcard h3 { margin: 0; font-size: 17px; }
.pcard .nums { display: flex; gap: 14px; }
.pcard .nums b { font-size: 18px; }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }

/* drawer */
.drawer-back { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 46; }
.drawer { position: fixed; top: calc(var(--top-h) + 10px); right: 10px; bottom: 10px; z-index: 47; border-radius: var(--r-xl); border: none; box-shadow: 0 24px 80px rgba(11,60,58,.35); width: min(760px, 96vw); background: var(--bg2);
  border-left: 1px solid var(--line); overflow: auto; padding: 20px 24px 40px; }
.drawer h2 { margin: 0 0 4px; font-family: var(--mono); }
.drawer h3 { margin: 18px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.drawer .close { position: absolute; top: 14px; right: 16px; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 13px; }
.kv .k { color: var(--muted); }
pre.prompt { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
ul.accept { padding-left: 18px; margin: 0; } ul.accept li { margin: 3px 0; }
table.takes { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.takes th, table.takes td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.takes th { color: var(--muted); font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.on { background: var(--green); } .dot.off { background: var(--red); } .dot.none { background: var(--grey); }
.findings li { color: var(--red); } .findings li.warn { color: var(--amber); }
.note { color: var(--amber); font-size: 12px; margin-top: 4px; }
.dialogue .line { font-family: var(--mono); font-size: 13px; }
.dialogue .who { color: var(--muted); margin-right: 8px; }

/* auth pages */
body.auth { display: block; }
.auth-card { max-width: 380px; margin: 12vh auto; background: var(--bg2); border: 1px solid var(--line);
  border-radius: 24px; padding: 26px 28px; }
.auth-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.auth-card h1 { font-size: 20px; margin: 6px 0 12px; }
.auth-card label { display: grid; gap: 4px; margin: 10px 0; color: var(--muted); font-size: 12px; }
.auth-card input { background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: 9px 10px; font: inherit; }
.auth-card button { width: 100%; margin-top: 12px; background: var(--fg); border: none; color: var(--bg); border-radius: 16px; padding: 10px; cursor: pointer; }
.auth-card .err { color: var(--red); min-height: 1.2em; margin: 0; font-size: 13px; }
.auth-card .hint { font-size: 13px; }
.auth-card .foot { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.lang-toggle { color: var(--muted); font-size: 13px; }

/* settings */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs a { padding: 8px 12px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--fg); border-bottom-color: var(--accent); }
.form { display: grid; gap: 12px; max-width: 720px; }
.form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.form input[type=text], .form input[type=password], .form select, .form textarea {
  background: var(--bg2); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; font: inherit; }
.form textarea { font-family: var(--mono); font-size: 12.5px; min-height: 72px; }
.form .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.form details { border: 1px solid var(--line); border-radius: 18px; padding: 10px 14px; }
.form details summary { cursor: pointer; color: var(--muted); }
.btn.primary { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.btn.danger { border-color: var(--red); color: var(--red); }
.result { font-size: 13px; padding: 8px 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--bg2); }
.result.ok { border-color: var(--green); } .result.err { border-color: var(--red); } .result.warn { border-color: var(--amber); }
.bcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 14px 16px; display: grid; gap: 10px; }
.bcard h3 { margin: 0; font-size: 15px; display: flex; gap: 10px; align-items: center; }
table.check { width: 100%; border-collapse: collapse; font-size: 13px; }
table.check td, table.check th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.dot.warn { background: var(--amber); }
table.check th:nth-child(2), table.check td:nth-child(2) { white-space: nowrap; width: 90px; }
table.check td:first-child { white-space: nowrap; }

/* create page */
.create { display: grid; grid-template-columns: 1.2fr 0.8fr 0.6fr; gap: 16px; align-items: start; }
.create h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.create textarea.prompt { width: 100%; min-height: 360px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 18px; padding: 12px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; resize: vertical; }
.pane { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 14px; display: grid; gap: 10px; }
.rule { font-size: 12px; color: var(--muted); border-left: 2px solid var(--line); padding-left: 8px; }
.cost { font-size: 18px; font-weight: 600; }
.kbd { font-family: var(--mono); font-size: 12px; }
/* modal */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.7); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: var(--bg2); border: none; box-shadow: 0 24px 80px rgba(11,60,58,.35); border-radius: var(--r-xl); padding: 20px 22px; width: min(560px, 94vw); display: grid; gap: 12px; }
.modal h2 { margin: 0; font-size: 17px; }
.modal textarea { width: 100%; min-height: 80px; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: 8px; font: inherit; }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; }
/* jobs tray */
/* 任务托盘固定在右下，任务一多就长高，会盖住剪辑页聊天框的【发送】
   （2026-09-03 浏览器走查抓到：.jt-head intercepts pointer events）。
   两手：托盘自身封顶可滚；剪辑页把托盘挪到左下，右栏的输入区始终点得到。 */
body:has(.edit) #jobs-tray { left: 16px; right: auto; }
.jobs-tray { position: fixed; right: 16px; bottom: 16px; width: 300px; max-height: 42vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 10px 12px; z-index: 40; display: grid; gap: 6px; font-size: 12.5px; }
.jobs-tray .jt-head { display: flex; justify-content: space-between; color: var(--muted); }
.jobs-tray .job { display: flex; justify-content: space-between; gap: 8px; }
.spin { display: inline-block; width: 10px; height: 10px; border: 2px solid var(--amber); border-right-color: transparent; border-radius: 50%; animation: sp 1s linear infinite; vertical-align: middle; }
@keyframes sp { to { transform: rotate(360deg); } }

/* media */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.mcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: grid; gap: 6px; padding-bottom: 10px; }
.mcard .th { aspect-ratio: 21/9; background: var(--bg3); display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--mono); overflow: hidden; }
.mcard .th img { width: 100%; height: 100%; object-fit: cover; }
.mcard .b { padding: 0 10px; display: grid; gap: 4px; font-size: 12.5px; }
.card .th { aspect-ratio: 21/9; background: var(--bg3); border-radius: 16px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); font-family: var(--mono); margin-bottom: 4px; }
.card .th img { width: 100%; height: 100%; object-fit: cover; }
.side { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.picker { max-height: 60vh; overflow: auto; display: grid; gap: 6px; }
.picker .el { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 16px; cursor: pointer; }
.picker .el img { width: 64px; height: 36px; object-fit: cover; border-radius: 14px; background: var(--bg3); }
video.prev { width: 100%; background: #000; border-radius: 18px; }

/* ── v0.3 选片 / 案例学习 / 资产库 ─────────────────────────────── */
.review { display: grid; grid-template-columns: 1fr 300px; gap: 16px; }
.review .vpair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.review .vcell { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 10px; }
.review .vcell.pinned { border-color: var(--accent); }
.review .vcell video { width: 100%; aspect-ratio: 21/9; background: #000; border-radius: 16px; }
.review .vhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.strip { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.strip .titem { flex: 0 0 auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 8px; min-width: 130px; }
.strip .titem.selA { border-color: var(--accent); }
.strip .titem.selB { border-color: var(--amber, #d9a441); }
.strip .titem img { width: 126px; aspect-ratio: 21/9; object-fit: cover; border-radius: 16px; display: block; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px dashed var(--line); cursor: pointer; }
.kb-tabs { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.kbcard { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 12px; margin-bottom: 10px; }
.kbcard .frag { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 8px 10px; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; word-break: break-word; margin: 8px 0; }
.kbcard .khead, .acard .khead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.kbgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; align-items: start; }
.mdbody { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; font-size: 12.5px; white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--bg2); border: 1px solid var(--accent); border-radius: 18px; padding: 8px 16px; z-index: 60; }
.acard { background: var(--bg2); border: 1px solid var(--line); border-radius: 20px; padding: 10px 12px; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.elthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.elthumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; }

/* ── v0.4 剪辑页 ────────────────────────────────────────────── */
.edit { display: grid; grid-template-columns: 1fr 380px; gap: 16px; }
.edit video.prev { width: 100%; aspect-ratio: 21/9; background: #000; border-radius: 18px; }
.tracks { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.trow { display: flex; align-items: center; gap: 8px; }
.tlabel { flex: 0 0 90px; font-size: 11px; color: var(--muted, #889); }
.tbar { flex: 1; display: flex; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; min-height: 26px; }
.tbar .blk { border-right: 1px solid var(--line); font-size: 10px; font-family: var(--mono); display: flex; align-items: center; justify-content: center; overflow: hidden; white-space: nowrap; }
.tbar .blk.st-ok { background: rgba(64, 160, 96, .25); }
.tbar .blk.st-no_local, .tbar .blk.st-file_missing { background: rgba(200, 64, 64, .3); }
.tbar .blk.a1 { background: transparent; }
.tbar .blk.mcue { background: rgba(80, 120, 220, .3); justify-content: flex-start; padding-left: 6px; }
.tbar .blk.mcue.ghost { background: transparent; border: 1px dashed var(--line); color: var(--muted, #889); }
.chat { height: 380px; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 10px; margin: 10px 0; display: flex; flex-direction: column; gap: 8px; }
.chat .ev { max-width: 100%; font-size: 13px; }
.chat .ev.me { align-self: flex-end; background: var(--bg4); color: var(--fg); border-radius: 18px 10px 2px 10px; padding: 6px 10px; }
.chat .ev.ai { background: var(--bg); border: 1px solid var(--line); border-radius: 18px; padding: 6px 10px; }
.chat .ev.tool { color: var(--muted, #889); font-size: 12px; }
.chat .ev.err { color: #e66; font-size: 12px; }
.chat .ev.askcard { border: 1px solid var(--accent); border-radius: 18px; padding: 8px 10px; }

/* ── F 批 · 元素闭环 ─────────────────────────────────────────────────── */
.atc { position: absolute; z-index: 40; background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; max-height: 220px; overflow: auto; min-width: 240px; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.atc div { padding: 5px 10px; cursor: pointer; font-family: var(--mono); font-size: 12.5px; }
.atc div.on, .atc div:hover { background: var(--bg3); }
.elchips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; align-items: center; }
.elchip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px 2px 2px; font-size: 12px; }
.elchip img { width: 22px; height: 22px; border-radius: 999px; object-fit: cover; background: var(--bg3); }
.elchip.green { border-color: var(--green); }
.elchip.red { border-color: var(--red); color: var(--red); }
.elchip.grey { border-color: var(--grey); border-style: dashed; color: var(--muted); }
.acard img.elth { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 16px; margin-bottom: 6px; background: var(--bg3); }
.mcard .th img.img { object-fit: contain; }
.modal img.elprev { max-height: 180px; max-width: 100%; object-fit: contain; border-radius: 16px; background: var(--bg3); justify-self: start; }
.modal input[type=text] { width: 100%; background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; padding: 7px 9px; font: inherit; }

/* ── G2 · 压力测试网格 / 本片资产 ─────────────────────────────────────── */
.sgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; max-height: 62vh; overflow: auto; }
.scell { border: 1px solid var(--line); border-radius: 16px; padding: 6px; display: grid; gap: 6px; }
.scell img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: var(--bg3); }
.scell.pass { border-color: var(--green); }
.scell.fail { border-color: var(--red); }
.btn.small { padding: 2px 8px; font-size: 12px; }
.modal textarea.mono { font-family: var(--mono); font-size: 12.5px; }

/* 工具箱（运镜 / 构图 / 风格）：库在 rules/camera-moves.yaml 与 presets/，这里做成可点的片段 */
.craftrow { display: grid; grid-template-columns: 76px 1fr; gap: 8px; align-items: start; margin: 6px 0; }
.craftrow .chips { gap: 6px; }
.chip.pick { cursor: pointer; border-style: dashed; }
.chip.pick:hover { border-style: solid; border-color: var(--accent); }
.chip.pick.on { border-style: solid; border-color: var(--accent); color: var(--accent); }
/* 小样网格：一屏看完一个镜头的所有 take */
.sheet { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.sheet .cell { background: var(--bg2); border: 1px solid var(--line); border-radius: 18px; padding: 8px; }
.sheet .cell img, .sheet .cell video { width: 100%; border-radius: 16px; background: #000; aspect-ratio: 21/9; object-fit: contain; }
.sheet .cell.accepted { border-color: #3a7; }
.sheet .cell.rejected { opacity: .55; }

/* ── 项目页（照 Cinema Studio 项目页：项目侧栏 / 顶栏 / 素材网格 / 浮动生成框）──── */
.sidebar[hidden] { display: none; }
.sidebar.proj .nav-item.back { padding: 4px 6px; color: var(--fg); }
.sidebar.proj .chev-l { font-size: 18px; line-height: 1; }
.sidebar.proj .pname { font-weight: 600; font-family: var(--serif); font-size: 14px; }
.sidebar.proj .pname .ico { border-radius: 50%; background: rgba(255,255,255,.08); }
.sidebar.proj .pname span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar.proj .nav-item .cnt { margin-left: auto; color: var(--muted); font-weight: 500; font-size: 12px; }
.ico.i-assets { background: rgba(255,255,255,.08); color: var(--tiff-ink); } .ico.i-doc { background: rgba(255,255,255,.08); color: var(--tiff-ink); font-size: 12px; }
body.proj .topbar { display: none; }
body.proj .view { padding: 0; }
.ptop { display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 22px; border-radius: 0 0 var(--r-lg) var(--r-lg); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.ptop .ttl { font-weight: 500; font-family: var(--serif); font-size: 16px; letter-spacing: .04em; text-transform: uppercase; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptop .btn { border-radius: 999px; padding: 8px 14px; background: var(--bg2); border-color: var(--line); }
.ptop .btn.lime { background: var(--tiff); color: var(--on-accent); border-color: var(--tiff); font-weight: 600; }
.ptop .btn.white { background: var(--bg2); color: var(--tiff-ink); border-color: var(--line); }
.ptop select.btn { appearance: none; -webkit-appearance: none; padding-right: 22px; }
.ptop .av { width: 26px; height: 26px; border-radius: 50%; background: var(--tiff-deep); color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.agrid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; padding: 12px 16px; padding-bottom: 300px; }
.tile { position: relative; aspect-ratio: 16/9; background: var(--brown); border-radius: var(--r-md); overflow: hidden; display: block; color: var(--fg); }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .ph { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: flex-start; color: rgba(255,255,255,.55); font-family: var(--mono); font-size: 11px; padding: 34px 12px 12px; word-break: break-all; }
.tile .play { position: absolute; left: 50%; top: 50%; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16px; padding-left: 3px; }
.tile .new { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: var(--tiff); color: var(--on-accent); font-size: 11px; font-weight: 600; border-radius: 999px; padding: 2px 8px; }
.tile .new::before { content: "●"; font-size: 8px; margin-right: 4px; vertical-align: middle; }
.tile .lbl { position: absolute; left: 8px; bottom: 6px; font-family: var(--mono); font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; opacity: 0; transition: opacity .15s; }
.tile:hover .lbl { opacity: 1; }
.tile.st-rejected { opacity: .5; }
.tile.st-accepted::after { content: ""; position: absolute; inset: 0; border: 2px solid var(--green); pointer-events: none; }
.gen-float { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); width: min(880px, calc(100vw - 52px)); z-index: 35; }
.gen-float .gen-wrap { margin: 0; max-width: none; }
.gen-float .gen-box { box-shadow: 0 16px 50px rgba(11,60,58,.35); background: var(--bg2); }
.gen-float .gen-box textarea { min-height: 40px; max-height: 40vh; }
.gen-float .gen-note { display: none; }
body.sb-min { --sbw: 64px; }
body.sb-min .sidebar .nav-item span, body.sb-min .sidebar .sb-label, body.sb-min .brand-name, body.sb-min .brand .chev, body.sb-min .sidebar .cnt, body.sb-min .sidebar .pill, body.sb-min .sidebar .sb-tools { display: none; }
.brief { max-width: 860px; margin: 0 auto; padding: 24px 28px; display: grid; gap: 16px; }
.brief h2 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }

/* ── 项目列表页：说明 / 项目卡（封面 + 一句话状态 + 三个入口）/ 两张表单卡 ─────── */
.phead { max-width: 1100px; margin: 8px auto 18px; }
.phead h1 { margin: 0 0 4px; font-family: var(--serif); font-weight: 500; font-size: 28px; letter-spacing: .04em; }
.phead p { margin: 0; max-width: 720px; }
.plist { max-width: 1100px; margin: 0 auto; grid-template-columns: repeat(auto-fill, minmax(460px, 1fr)); gap: 16px; }
.pcard.p { padding: 0; overflow: hidden; display: grid; grid-template-columns: 200px 1fr; gap: 0; border: none; box-shadow: 0 10px 30px rgba(11,60,58,.12); }
.pcard .pcov { background: var(--tiff-deep); color: #fff; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-family: var(--serif); letter-spacing: .1em; text-transform: uppercase; font-size: 12px; min-height: 150px; }
.pcard .pcov img { width: 100%; height: 100%; object-fit: cover; }
.pcard .pbody { padding: 16px 18px; display: grid; gap: 8px; align-content: start; }
.pcard .pbody h3 { font-family: var(--serif); font-weight: 500; font-size: 18px; letter-spacing: .03em; }
.pcard .pline { font-size: 13px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; }
.pill.green { background: rgba(28,127,87,.14); color: var(--green); } .pill.amber { background: rgba(183,134,15,.14); color: var(--amber); } .pill.red { background: rgba(209,72,63,.14); color: var(--red); }
.pcard details summary { cursor: pointer; }
.pforms { max-width: 1100px; margin: 26px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pform { background: var(--bg2); border-radius: var(--r-lg); padding: 18px 20px; display: grid; gap: 12px; box-shadow: 0 10px 30px rgba(11,60,58,.10); }
.pform h3 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 17px; }
.pform p { margin: -6px 0 0; }
.fld { display: grid; gap: 4px; }
.fld .fl { font-size: 12px; font-weight: 600; letter-spacing: .04em; }
.fld .fh { font-size: 12px; color: var(--muted); }
.fld input, .fld select { background: var(--tiff-mist); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; font: inherit; }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--line2); background: var(--bg2); }

/* ── 剪辑页：顶栏 / 预览 / 时间线（标尺 + 三轨）/ 剪辑助手 ────────────────────── */
.edbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.edbar h1 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: .04em; }
.edit { grid-template-columns: 1fr 400px; }
.preview { background: var(--tiff-deep); border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 21/9; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 16px 40px rgba(11,60,58,.25); }
.preview video.prev { width: 100%; height: 100%; border-radius: 0; }
.pv-empty { display: grid; gap: 8px; max-width: 520px; text-align: center; padding: 20px; }
.pv-empty b { font-family: var(--serif); font-weight: 500; font-size: 20px; letter-spacing: .04em; }
.pv-empty span { color: rgba(255,255,255,.75); font-size: 13px; }
.tl { background: var(--bg2); border-radius: var(--r-lg); padding: 14px 16px 12px; margin-top: 14px; box-shadow: 0 10px 30px rgba(11,60,58,.10); }
.tl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.legend { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.legend .sw { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-left: 8px; }
.legend .sw.ok { background: rgba(28,127,87,.35); } .legend .sw.bad { background: rgba(209,72,63,.35); } .legend .sw.mus { background: rgba(10,186,181,.4); }
.ruler { flex: 1; position: relative; height: 18px; border-bottom: 1px solid var(--line); }
.ruler .tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 10px; color: var(--muted); font-family: var(--mono); }
.ruler .tick::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 1px; height: 5px; background: var(--line); }
.tracks { margin-top: 6px; gap: 8px; }
.tlabel { flex: 0 0 116px; font-size: 12px; font-weight: 600; }
.tbar { background: var(--tiff-mist); border: none; border-radius: 12px; min-height: 46px; }
.tbar .blk { border-right: 2px solid var(--bg2); font-size: 11px; flex-direction: column; gap: 1px; border-radius: 0; }
.tbar .blk:first-child { border-radius: 12px 0 0 12px; } .tbar .blk:last-child { border-radius: 0 12px 12px 0; border-right: none; }
.tbar .blk span { font-weight: 700; } .tbar .blk em { font-style: normal; color: var(--muted); font-size: 10px; }
.tbar .blk.st-ok { background: rgba(28,127,87,.22); }
.tbar .blk.st-no_local, .tbar .blk.st-file_missing { background: rgba(209,72,63,.22); }
.tbar .blk.mcue { background: rgba(10,186,181,.35); border-radius: 12px; }
.tbar .blk.mcue.ghost { background: transparent; border: 1px dashed var(--grey); }
.pane.assistant { padding: 0; overflow: hidden; border: none; box-shadow: 0 10px 30px rgba(11,60,58,.12); gap: 0; }
.as-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--tiff-pale); }
.as-head .ico { width: 34px; height: 34px; }
.pane.assistant .chat { margin: 0; border: none; border-radius: 0; height: 420px; background: var(--tiff-mist); padding: 14px; }
.pane.assistant .chips { padding: 10px 14px 0; }
.pane.assistant > .row { padding: 10px 14px 14px; }
.pane.assistant #ed-msg { background: var(--tiff-mist); border: 1px solid transparent; border-radius: 999px; padding: 9px 14px; font: inherit; color: var(--fg); }
.pane.assistant #ed-msg:focus { outline: none; border-color: var(--line2); background: var(--bg2); }
.chat .ev.me { background: var(--bg4); }
.chat .ev.ai { background: var(--bg3); border: none; }
.pane.assistant { grid-template-rows: auto 1fr auto auto; align-content: stretch; }
.pane.assistant .chat { height: auto; min-height: 320px; }
.as-head .ico { border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.edit { align-items: stretch; }
.preview { max-height: 340px; }
.edit { align-items: start; }
.pane.assistant { position: sticky; top: 16px; height: calc(100vh - 32px); }
.preview { aspect-ratio: auto; height: 340px; width: 100%; }
.pane.assistant { height: calc(100vh - 150px); min-height: 520px; }
.btn[hidden] { display: none; }
.pv-empty #ed-fetch-hint { color: var(--tiff); font-weight: 600; }

/* ── 案例库（2026-10-09 重做，照 frameset）：整行搜索 + Filter 下拉 / 等高瀑布流 / 详情 ─────────── */
.cs-page { max-width: 1800px; margin: 0 auto; padding-top: 14px; }
.cs-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.cs-search { flex: 1; min-width: 0; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; color: var(--fg); padding: 11px 18px; font: inherit; font-size: 14px; outline: none; }
.cs-search:focus { border-color: var(--line2); }
.cs-fwrap { position: relative; }
.cs-fbtn { background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; color: var(--fg); padding: 10px 16px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.cs-fbtn:hover, .cs-fbtn.open { border-color: var(--line2); background: var(--bg3); }
.cs-fbtn .cnt { background: var(--fg); color: var(--bg); border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.cs-fbtn .cnt:empty { display: none; }
.cs-fpanel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; width: min(960px, calc(100vw - 32px)); background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.6);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.cs-fpanel[hidden] { display: none; }
.cs-fcol h4 { margin: 0 0 6px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.cs-fcol .opts { max-height: 300px; overflow-y: auto; overflow-x: hidden; display: grid; gap: 1px; align-content: start; }
.cs-fcol label { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 6px; cursor: pointer; font-size: 13px; min-width: 0; }
.cs-fcol label:hover { background: var(--bg3); }
.cs-fcol label input { accent-color: var(--fg); margin: 0; flex: none; }
.cs-fcol label .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-fcol label .c { color: var(--muted); font-size: 11px; font-family: var(--mono); }
.cs-fcol .none { color: var(--muted); font-size: 12px; padding: 4px 6px; }
.cs-sel { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; min-height: 22px; color: var(--muted); font-size: 12px; }
.cs-sel #cs-n { margin-left: auto; }
.cs-sel .chip { background: var(--bg3); border-color: var(--line); color: var(--fg); cursor: pointer; }
.cs-sel .chip:hover { border-color: var(--line2); }
.cs-sel .chip i { font-style: normal; color: var(--muted); margin-left: 4px; }
.cs-sel .clr { background: transparent; border: none; color: var(--muted); cursor: pointer; font: inherit; font-size: 12px; padding: 2px 6px; }
.cs-sel .clr:hover { color: var(--fg); }
/* 等高瀑布流：每项 flex-grow = 画幅比、基准宽 = 比 × 行高、aspect-ratio 锁比 → 同一行高度一致；
   末尾放一个 flex-grow 极大的占位把最后一行顶回去，不拉伸 */
.cs-wall { --row-h: 170px; display: flex; flex-wrap: wrap; gap: 6px; }
.cs-wall::after { content: ""; flex-grow: 1e4; }
.cs-item { position: relative; flex-grow: var(--ar); width: calc(var(--ar) * var(--row-h)); aspect-ratio: var(--ar); background: var(--bg3); border-radius: 6px; overflow: hidden; color: var(--fg); display: block; }
.cs-item img, .cs-item video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; background: var(--bg3); }
.cs-item .cs-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.cs-item .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 10px 10px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.8)); opacity: 0; transition: opacity .15s; display: grid; gap: 5px; }
.cs-item .ov b { font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; color: #fff; }
.cs-item .ov .chips { gap: 4px; margin: 0; }
.cs-item .ov .chip { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; font-size: 11px; padding: 1px 7px; backdrop-filter: blur(4px); }
.cs-item .play { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; display: flex; align-items: center; justify-content: center; padding-left: 2px; opacity: 0; transition: opacity .15s; }
.cs-item:hover .ov, .cs-item:hover .play, .cs-item:focus-visible .ov { opacity: 1; }
.cs-item img, .cs-item video { transition: transform .3s; } .cs-item:hover img, .cs-item:hover video { transform: scale(1.03); }
.cs-state { width: 100%; color: var(--muted); padding: 40px 0; text-align: center; }
@media (min-width: 1400px) { .cs-wall { --row-h: 190px; } }
@media (max-width: 1100px) { .cs-wall { --row-h: 160px; } .cs-fpanel { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 768px) { .cs-wall { --row-h: 130px; gap: 4px; } .cs-bar { flex-wrap: wrap; } .cs-search { flex-basis: 100%; } .cs-fpanel { grid-template-columns: repeat(2, minmax(0, 1fr)); right: auto; left: 0; } .cs-item .ov { opacity: 1; padding-top: 18px; } .cs-item .ov .chip.mono { display: none; } }

/* 详情：上半媒体（黑底居中）/ 下半按约定顺序：摘要 · Style · Camera moves · Recipe · Breakdown · Risks · 原帖（折叠）· Sources · Use this case（折叠） */
.cs-detail { max-width: 1000px; margin: 0 auto; padding-top: 12px; }
.cs-nav { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.cs-nav .sp { flex: 1; }
.cs-media { background: #000; border-radius: var(--r-lg); overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; }
.cs-video, .cs-main { display: block; width: 100%; max-height: 72vh; object-fit: contain; background: #000; }
.cs-strip { display: flex; gap: 6px; overflow-x: auto; padding: 8px; width: 100%; justify-content: center; }
.cs-strip img { height: 60px; border-radius: 6px; cursor: pointer; opacity: .5; border: 2px solid transparent; }
.cs-strip img.on, .cs-strip img:hover { opacity: 1; } .cs-strip img.on { border-color: var(--fg); }
.cs-nomedia { color: var(--muted); padding: 40px 16px; text-align: center; font-size: 13px; }
.cs-head { margin: 18px 0 6px; display: grid; gap: 8px; }
.cs-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.cs-head .sub { color: var(--muted); font-size: 14px; }
.cs-sum { margin: 0; font-size: 15px; line-height: 1.55; color: var(--fg); border-left: 2px solid var(--line2); padding-left: 12px; }
.cs-sec { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.cs-sec > h3, .cs-sec > summary > h3 { margin: 0 0 8px; font-size: 15px; font-weight: 600; display: inline-block; }
.cs-sec > summary { cursor: pointer; list-style: none; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cs-sec > summary::-webkit-details-marker { display: none; }
.cs-sec > summary::before { content: "›"; color: var(--muted); display: inline-block; transition: transform .15s; width: 10px; }
.cs-sec[open] > summary::before { transform: rotate(90deg); }
.cs-sec > summary > h3 { margin-bottom: 0; }
.cs-sec[open] > summary { margin-bottom: 8px; }
.cs-md { font-size: 13.5px; line-height: 1.6; color: var(--fg); }
.cs-md p { margin: 0 0 8px; } .cs-md ul, .cs-md ol { margin: 0 0 8px; padding-left: 20px; } .cs-md li { margin: 2px 0; }
.cs-md h4 { margin: 10px 0 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cs-md code { font-family: var(--mono); font-size: 12px; background: var(--bg3); border-radius: 4px; padding: 1px 5px; }
.cs-md pre { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; }
.cs-move { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 6px 0; font-size: 13px; }
.cs-move .frag { color: var(--muted); font-family: var(--mono); font-size: 12px; }
.cs-block { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-md); margin: 8px 0; overflow: hidden; }
.cs-bh { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.cs-bh b { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-code { margin: 0; padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.cs-note { color: var(--muted); font-size: 12px; }
.cs-apply { display: grid; gap: 10px; }
.cs-refs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.cs-ref { position: relative; display: inline-block; }
.cs-ref img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; display: block; background: var(--bg3); }
.cs-ref .iconbtn { position: absolute; top: -6px; right: -6px; background: var(--bg2); border: 1px solid var(--line); padding: 1px 6px; }
.cs-lint { margin: 2px 0 4px; }
.cs-saved { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cs-drafts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ── IDEAS：居中一列线程 + 底部输入 ─────────────────────────────────────────── */
div.ideas { max-width: 760px; margin: 0 auto; padding-top: 18px; display: flex; flex-direction: column; min-height: calc(100vh - var(--top-h) - 40px); }   /* div.：body 也带 .ideas 类，不能把 body 挤到 760（10-09 走查） */
.ideas h1 { margin: 0 0 2px; font-size: 20px; font-weight: 600; }
.ideas .lead { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.id-thread { flex: 1; display: flex; flex-direction: column; gap: 10px; padding-bottom: 12px; }
.id-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.55; word-break: break-word; }
.id-msg.user { align-self: flex-end; background: var(--bg4); color: var(--fg); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.id-msg.assistant { align-self: flex-start; background: var(--bg2); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.id-msg.assistant p { margin: 0 0 8px; } .id-msg.assistant p:last-child { margin-bottom: 0; }
.id-msg.assistant ul, .id-msg.assistant ol { margin: 0 0 8px; padding-left: 20px; }
.id-msg.assistant code { font-family: var(--mono); font-size: 12.5px; background: var(--bg3); border-radius: 4px; padding: 1px 5px; }
.id-msg.assistant pre { background: var(--bg3); border-radius: 8px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; white-space: pre-wrap; }
.id-msg.assistant h4 { margin: 8px 0 4px; font-size: 13px; }
.id-meta { color: var(--muted); font-size: 11px; margin-top: -4px; align-self: flex-start; padding-left: 6px; }
.id-thinking { color: var(--muted); font-size: 13px; align-self: flex-start; padding: 6px 10px; }
.id-empty { display: grid; gap: 8px; margin: 30px 0; }
.id-empty .hint { color: var(--muted); font-size: 13px; }
.id-ex { text-align: left; background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); padding: 10px 14px; cursor: pointer; font: inherit; font-size: 13.5px; }
.id-ex:hover { border-color: var(--line2); background: var(--bg3); }
.id-compose { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0 16px; display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: end; }
.id-compose textarea { width: 100%; min-height: 48px; max-height: 40vh; resize: vertical; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; color: var(--fg); padding: 12px 14px; font: inherit; font-size: 14px; outline: none; }
.id-compose textarea:focus { border-color: var(--line2); }
.id-compose .btn { padding: 11px 16px; }
.id-status { font-size: 13px; margin-bottom: 8px; }
@media (max-width: 768px) { div.ideas { padding-top: 10px; } .id-msg { max-width: 94%; } }

/* ── 导演 / 运镜库（2026-10-09 指挥官令）：16:9 卡片网格；详情复用案例详情的组件（cs-detail / cs-sec / cs-block / chips）──── */
body.lib .topbar { display: none; }
body.lib .view { padding: 0 16px 60px; }
.lb-page { max-width: 1800px; margin: 0 auto; padding-top: 14px; }
.lb-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin: 4px 0 10px; }
.lb-head h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.lb-h2 { margin: 26px 0 10px; font-size: 16px; font-weight: 600; display: flex; gap: 10px; align-items: center; }
.lb-h3 { margin: 18px 0 2px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.cs-sel #lb-n { margin-left: auto; }
.lb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.lb-card { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--bg3); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; color: var(--fg); }
.lb-card:hover { border-color: var(--line2); }
.lb-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.lb-card:hover img { transform: scale(1.03); }
/* 没图（或图 404 后）：深灰底 + 名字大字；有图：图铺满 + 底部渐变叠名字一行 + chips 一行 */
.lb-card .lb-ph { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; padding: 10px 16px 56px; font-family: var(--serif); font-size: 26px; line-height: 1.2; letter-spacing: .04em; color: rgba(255,255,255,.6); }
.lb-card.noimg { background: #1a1a1d; }
.lb-card.noimg .lb-ph { display: flex; }
.lb-card.noimg .ov b { display: none; }
.lb-card .ov { position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 12px 10px; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.82)); display: grid; gap: 4px; }
.lb-card .ov b { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-card .ov .sub { color: rgba(255,255,255,.7); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-card .ov .frag { font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-card .ov .chips { gap: 4px; margin: 0; flex-wrap: nowrap; overflow: hidden; }
.lb-card .ov .chip { background: rgba(255,255,255,.14); border-color: transparent; color: #fff; font-size: 11px; padding: 1px 7px; white-space: nowrap; flex: none; }
.lb-badge { position: absolute; top: 8px; right: 8px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.55); color: var(--amber); border: 1px solid var(--amber); border-radius: 999px; padding: 1px 7px; }
.lb-hero { border-radius: var(--r-lg); overflow: hidden; background: var(--bg3); aspect-ratio: 16 / 9; max-height: 56vh; }
.lb-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.lb-two .k { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.lb-gram { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; margin: 8px 0; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.55; }
.lb-gram .khead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.lb-gram .khead b { font-size: 15px; }
.lb-gram .src { color: var(--muted); font-size: 12px; }
.lb-gram .cs-block { margin: 0; }
.lb-info { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 8px 0 0; }
.lb-info .kbcard { margin: 0; }
.lb-cand { display: grid; grid-template-columns: 240px 1fr; gap: 6px 14px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.lb-cand .nm { font-weight: 600; color: var(--fg); }
.lb-cand .id { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.lb-cand .cn { color: var(--muted); font-size: 12px; }
.lb-cand .risk { color: var(--muted); font-size: 12px; margin-top: 2px; }
.lb-cand .chips { margin-top: 4px; }
.lb-used { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.lb-used a { display: flex; gap: 8px; align-items: center; background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 6px; color: var(--fg); min-width: 0; }
.lb-used a:hover { border-color: var(--line2); }
.lb-used img { width: 84px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; background: var(--bg3); flex: none; }
.lb-used .tx { display: grid; gap: 2px; min-width: 0; }
.lb-used .no { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.lb-used .t { font-size: 12.5px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lb-rel { cursor: pointer; }
.lb-rel .khead a { margin-left: auto; }
.lb-relbody:not(:empty) { margin-top: 8px; }
/* mdHtml 的最简表格（导演卡「机器参数」一节是表） */
.md-tw { overflow-x: auto; margin: 0 0 10px; }
.cs-md table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.cs-md th, .cs-md td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cs-md th { color: var(--muted); font-weight: 500; white-space: nowrap; }
@media (min-width: 1700px) { .lb-grid { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 900px) { .lb-info { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .lb-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } .lb-card .lb-ph { font-size: 18px; padding-bottom: 44px; } .lb-card .ov { padding: 20px 8px 8px; } .lb-two, .lb-cand { grid-template-columns: 1fr; } }

/* 浮动生成框：没有右侧全局边栏了，默认居中；项目页有左边栏时向右让出半个边栏宽 */
body.proj .gen-float { left: calc(50% + var(--sbw) / 2); width: min(880px, calc(100vw - var(--sbw) - 52px)); }

/* ── 顾问（10-10 管线第 4 步）：IDEAS 里的第二个模式；卡片复用 kbcard / cs-block / chip ──── */
.id-modes { display: flex; gap: 6px; margin-bottom: 10px; }
div.ideas.adv { max-width: 980px; }
.adv-form textarea { width: 100%; min-height: 70px; font: inherit; font-size: 14px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg2); color: var(--fg); resize: vertical; }
.adv-opts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0; }
.adv-opts select, .adv-opts input { width: auto; }
.adv-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.adv-out { display: flex; flex-direction: column; gap: 4px; padding-bottom: 40px; }
.adv-meta { margin: 6px 0; }
.adv-warn ul { margin: 4px 0 0 18px; padding: 0; }
.adv-sec { margin-top: 6px; }
.adv-card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; margin: 8px 0; }
.adv-card .khead { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.adv-line { display: flex; gap: 14px; align-items: center; }
.adv-big { font-size: 34px; font-weight: 700; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--bg4); }
.adv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.adv-beats { margin: 6px 0 0 18px; padding: 0; }
.adv-lint ul { margin: 4px 0 0 18px; padding: 0; }
.adv-risk { padding: 6px 0; border-top: 1px solid var(--line); }
.adv-refs .kbcard { margin: 6px 0; }
@media (max-width: 768px) { .adv-opts { flex-direction: column; align-items: stretch; } }

/* L1（10-10）顶栏：GPU 状态条 + 待批准徽标 */
.gpu-strip { font-size: 12px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.gpu-strip.green { border-color: var(--green); color: var(--green); }
.gpu-strip.amber { border-color: var(--amber); color: var(--amber); }
.gpu-strip.red { border-color: var(--red); background: var(--red); color: #fff; font-weight: 600; }
.gpu-strip.grey { border-style: dashed; }
.asks-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.asks-badge.on { border-color: var(--amber); color: var(--amber); }
.asks-badge.on b { background: var(--amber); color: var(--on-accent); border-radius: 999px; padding: 0 6px; }
.ask-card { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.ask-card.decided { opacity: .6; }
@media (max-width: 720px) { .gpu-strip { max-width: 38vw; } }

/* L4（10-10）项目页【粗剪】面板：派单 / 进度 / 滚动日志 / 报告 / 低清预览播放器；手机宽度下整块单列、不横向滚动 */
.pp { margin: 12px 20px 0; }
.pp .bcard h3 { flex-wrap: wrap; }
.pp-form { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }
.pp-form label { display: inline-flex; gap: 6px; align-items: center; }
.pp-form input[type=number] { width: 88px; }
.pp-form input.lbl { width: 110px; }
.pp-task { display: grid; gap: 6px; padding-top: 4px; border-top: 1px dashed var(--line); }
.pp-task .row { flex-wrap: wrap; }
.pp-bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.pp-bar > i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.pp-ask { border: 1px solid var(--amber); border-radius: 12px; padding: 8px 10px; display: grid; gap: 6px; }
.pp-err { color: var(--red); }
.pp-kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px 14px; font-size: 12px; }
.pp-kv b { display: block; font-size: 14px; font-weight: 600; word-break: break-word; }
.pp-log { max-height: 240px; overflow: auto; font-size: 11px; line-height: 1.45; white-space: pre-wrap; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin: 6px 0 0; }
.pp-player { display: grid; gap: 6px; }
.pp-player .row { flex-wrap: wrap; }
.pp-player video { width: 100%; max-height: 62vh; background: #000; border-radius: 12px; display: block; }
.pp-hist .chip { margin: 2px 4px 2px 0; }
.pp-scroll { overflow-x: auto; }
.pp-args { min-width: 220px; max-width: 420px; word-break: break-all; }
.pp-scroll td { vertical-align: top; }
@media (max-width: 768px) {
  .pp { margin: 10px 12px 0; }
  .ptop { flex-wrap: wrap; padding: 10px 12px; }
  .ptop .ttl { flex-basis: 100%; }
  .pp-form input.lbl { width: 90px; }
  .pp-player video { max-height: 40vh; }
  /* 手机：项目边栏是浮在内容上的抽屉（收起后 64 px）——粗剪面板让开它；底部生成框不再浮着盖住播放器，改成跟在页面末尾 */
  body.proj.sb-min .pp { margin-left: 76px; }
  body.proj .gen-float { position: static; transform: none; width: auto; margin: 12px 12px 24px 76px; }
}

/* L6（10-11）制作台：条目卡片网格；候选图横排，已认的描边 */
.mk-wrap { padding: 12px 20px 24px; display: grid; gap: 14px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.mk-item .row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.mk-tgs { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-tg { display: grid; gap: 4px; justify-items: start; }
.mk-tg img { width: 160px; border-radius: 8px; }
.mk-cands { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.mk-cand { flex: 0 0 220px; display: grid; gap: 4px; border: 2px solid transparent; border-radius: 10px; padding: 4px; }
.mk-cand.on { border-color: var(--green, #4caf50); }
.mk-cand img { width: 100%; border-radius: 8px; display: block; }
@media (max-width: 600px) {
  .mk-wrap { padding: 10px 12px 20px; }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-cand { flex-basis: 160px; }
}
