/* 工作台 / 编辑器 / 预览 —— 界面层，取值全部来自 login.css 的设计令牌 */

/* hidden 属性优先级最高：防止下面各种 display:flex/grid 把 hidden 吃掉 */
[hidden] { display: none !important; }

body { overflow: auto; height: auto; background: var(--page); color: var(--ink); }

/* ---------- 排版层级：标题 / 正文 / 辅助 ---------- */

h2 {
  font-size: var(--fs-xl); font-weight: var(--fw-semibold); line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight); margin: 0 0 var(--sp-3);
}
h3 {
  font-size: var(--fs-base); font-weight: var(--fw-semibold); line-height: var(--lh-snug);
  letter-spacing: -0.01em; margin: 0 0 var(--sp-3);
}

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.tiny { font-size: var(--fs-xs); }
.ok-text { color: var(--success); }
.err-text { color: var(--danger); }
.spacer { flex: 1; }

/* ---------- 按钮：单一主色，无渐变；三档高度统一 ---------- */

.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 44px; padding: 0 var(--sp-5);
  border: 0; border-radius: var(--r-md);
  font-size: var(--fs-base); font-weight: var(--fw-medium);
  color: var(--accent-ink); background: var(--accent);
  transition: background var(--dur-1) var(--ease), box-shadow var(--dur-2) var(--ease), transform var(--dur-1) var(--ease);
}
.primary:hover { background: var(--accent-hover); box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 32%, transparent); }
.primary:active { transform: translateY(1px); box-shadow: none; }
.primary:disabled { background: var(--surface-3); color: var(--muted); box-shadow: none; cursor: default; transform: none; }
.primary.wide { width: 100%; min-height: 50px; font-size: var(--fs-lg); }

.ghost-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 var(--sp-3);
  border: 1px solid var(--card-border); border-radius: var(--r-md);
  background: transparent; color: var(--ink);
  font-size: var(--fs-md); font-weight: var(--fw-medium);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.ghost-btn:hover { background: var(--accent-soft); border-color: var(--line-strong); }
.ghost-btn:active { background: var(--accent-soft-strong); }
.ghost-btn:disabled { opacity: .45; background: transparent; cursor: default; }
.ghost-btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 32%, transparent); }
.ghost-btn.danger:hover { background: var(--danger-soft); }

.link-btn {
  display: inline-flex; align-items: center; gap: 4px; min-height: 32px;
  font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--link);
  padding: 0 var(--sp-1); border-radius: var(--r-xs);
  transition: color var(--dur-1) var(--ease);
}
.link-btn:hover { color: var(--ink); }
.link-btn.danger { color: var(--danger); }

/* ---------- 顶栏：滚动时半透明磨砂，内容从下方穿过 ---------- */

.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  height: var(--topbar-h); padding: 0 var(--sp-6);
  background: color-mix(in srgb, var(--page) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(16px);
  backdrop-filter: saturate(1.8) blur(16px);
  border-bottom: 1px solid var(--card-border);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.topbar-sub { font-size: var(--fs-sm); color: var(--muted); }
.topbar-sep { width: 1px; height: 16px; background: var(--card-border); }
.brand.sm { font-size: 21px; }
.ghost-btn.with-icon { display: inline-flex; align-items: center; gap: 6px; }
.topbar .theme-cycle { width: 36px; height: 36px; }
.topbar .theme-cycle svg { width: 18px; height: 18px; }
.user-mail {
  font-size: var(--fs-sm); color: var(--muted); max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 6px var(--sp-2); border-radius: var(--r-sm);
  transition: color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.user-mail:hover { color: var(--ink); background: var(--accent-soft); }

.badge {
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  padding: 5px 10px; border-radius: var(--r-full);
  border: 1px solid var(--card-border); color: var(--muted); white-space: nowrap;
}
.badge.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 34%, transparent); background: var(--success-soft); }
.badge.warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 34%, transparent); background: var(--warning-soft); }

.inline-field { display: inline-flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--muted); }

/* ---------- 表单控件：1px 发丝线 + 聚焦环，不再用 2px 粗边框 ---------- */

select, .big-input, .inspector input, .inspector textarea, .modal input {
  background: var(--field); color: var(--ink);
  border: 1px solid var(--field-border); border-radius: var(--r-md);
  font-size: var(--fs-md); padding: 8px 11px; min-height: 40px;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), box-shadow var(--dur-1) var(--ease);
}
select:hover, .big-input:hover, .inspector input:hover, .inspector textarea:hover, .modal input:hover { border-color: var(--line-strong); }
select:focus, .big-input:focus, .inspector input:focus, .inspector textarea:focus, .modal input:focus {
  border-color: var(--accent); box-shadow: var(--focus-ring);
}

.title-input {
  background: transparent; border: 1px solid transparent; color: var(--ink);
  font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -0.01em;
  padding: 6px var(--sp-2); border-radius: var(--r-sm);
  width: min(420px, 42vw); min-height: 36px;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.title-input:hover { border-color: var(--card-border); }
.title-input:focus { border-color: var(--card-border); background: var(--field); }

.save-state { font-size: var(--fs-xs); color: var(--muted); }
.save-state.busy { color: var(--warning); }
.save-state.err { color: var(--danger); }

/* ---------- 工作台 ---------- */

.workspace {
  min-width: 0; max-width: var(--page-max); margin: 0 auto;
  padding: var(--sp-10) var(--gutter) var(--sp-16);
  /* 参考风格名、文件名或模型返回的长英文不能扩张页面的滚动宽度。
     只约束工作台内容；幻灯片仍按自己的 960×540 坐标渲染。 */
  overflow-wrap: anywhere;
}

.hero-slogan {
  font-size: clamp(32px, 4.4vw, 46px); font-weight: var(--fw-bold);
  line-height: 1.22; letter-spacing: -0.03em; text-align: center;
  margin: var(--sp-3) 0 var(--sp-16); color: var(--ink);
}

.work-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--sp-6); align-items: start; margin-bottom: var(--sp-16);
}
@media (max-width: 900px) { .work-grid { grid-template-columns: 1fr; } }
.work-grid.unified-workspace { grid-template-columns: minmax(0, 1fr); max-width: 920px; margin-left: auto; margin-right: auto; }
.work-grid > * { min-width: 0; }

.upload-card {
  padding: var(--sp-6) var(--sp-6) var(--sp-5); border-radius: var(--r-xl);
  background: var(--surface); border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.composer-heading { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.composer-heading h1, .composer-heading h2 { margin: 0; font-size: var(--fs-xl); }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 22px; padding: 0 6px;
  font-family: var(--font-num); font-size: var(--fs-2xs); font-weight: var(--fw-semibold);
  letter-spacing: .04em; color: var(--accent);
  background: var(--accent-soft); border-radius: var(--r-xs);
}

.big-textarea {
  width: 100%; min-height: 132px; resize: vertical;
  font-size: var(--fs-base); line-height: var(--lh-normal); letter-spacing: -0.005em;
  border-radius: var(--r-lg); padding: var(--sp-4);
  background: var(--field); color: var(--ink);
  border: 1px solid var(--field-border);
  transition: border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
}
.big-textarea::placeholder { color: var(--field-placeholder); }
.big-textarea:hover { border-color: var(--line-strong); }
.big-textarea:focus { border-color: var(--accent); background: var(--surface-2); box-shadow: var(--focus-ring); }

.field-guidance {
  display: flex; justify-content: space-between; gap: var(--sp-3);
  font-size: var(--fs-xs); color: var(--muted); margin-top: var(--sp-2); padding: 0 var(--sp-1);
  font-variant-numeric: tabular-nums;
}
.field-guidance.is-warning { color: var(--warning); }

.options { display: flex; align-items: flex-end; gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap; }
.option-field { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-sm); color: var(--muted); font-weight: var(--fw-medium); }
.option-field[hidden] { display: none; }
.option-field select { min-width: 120px; font-weight: var(--fw-regular); color: var(--ink); }
.ref-style-tag {
  display: inline-flex; align-items: center; gap: 6px; min-width: 120px;
  padding: 9px var(--sp-3); border-radius: var(--r-md);
  border: 1px dashed var(--line-strong); background: var(--surface-2);
  font-size: var(--fs-sm); font-weight: var(--fw-regular); color: var(--text-2);
}
.ref-style-tag::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ratio-label { font-size: var(--fs-sm); color: var(--muted); padding-bottom: 11px; font-variant-numeric: tabular-nums; }
.intent-hint { margin: var(--sp-3) 0 0; font-size: var(--fs-sm); color: var(--muted); }
.composer-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-3); margin-top: var(--sp-5); }
.composer-foot .hint { margin: 0; }
.gen-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  min-height: 48px; padding: 0 var(--sp-6); font-size: var(--fs-base); border-radius: var(--r-lg);
}
.gen-btn svg { transition: transform var(--dur-2) var(--ease); }
.gen-btn:hover svg { transform: rotate(-8deg) scale(1.04); }

/* 最近任务卡 */
.job-strip { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.job-card {
  border: 1px solid var(--card-border); border-radius: var(--r-lg); padding: var(--sp-3) var(--sp-4);
  background: var(--surface-2);
}
.job-rich {
  border: 1px solid var(--card-border); border-left: 3px solid var(--accent);
  border-radius: var(--r-lg); padding: var(--sp-4);
  background: var(--surface-2); color: var(--ink);
  box-shadow: var(--shadow-xs);
}
.job-rich .job-topline strong { font-size: var(--fs-md); color: var(--ink); }
.job-rich .job-topline span { color: var(--muted); }
.job-rich .job-title {
  color: var(--text-2); white-space: normal; font-size: var(--fs-sm); line-height: var(--lh-snug);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.job-rich .job-footline { display: flex; justify-content: space-between; align-items: center; margin-top: var(--sp-2); font-size: var(--fs-xs); color: var(--muted); }
.job-rich .job-elapsed { font-weight: var(--fw-semibold); color: var(--ink); font-variant-numeric: tabular-nums; }
.job-rich .inline-track { background: color-mix(in srgb, var(--muted) 26%, transparent); }
.job-rich .job-actions { margin-top: var(--sp-2); }
.job-rich.job-done { border-left-color: var(--success); background: var(--success-soft); }
.job-rich.job-done .job-topline strong { color: var(--success); }
.job-rich.job-done .job-title, .job-rich.job-done .job-topline span { color: var(--text-2); }
.job-rich.job-error { border-left-color: var(--danger); background: var(--danger-soft); }
.job-rich.job-error .job-topline strong { color: var(--danger); }
.job-rich.job-cancelled { background: var(--surface-2); border-left-color: var(--line-strong); box-shadow: none; }
.job-topline { display: flex; justify-content: space-between; align-items: baseline; gap: var(--sp-2); }
.job-topline strong { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.job-topline span { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.job-title { margin: 6px 0 0; font-size: var(--fs-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline-track { height: 4px; border-radius: var(--r-full); background: color-mix(in srgb, var(--muted) 24%, transparent); margin-top: var(--sp-3); overflow: hidden; }
.inline-track i { display: block; height: 100%; border-radius: var(--r-full); background: var(--accent); transition: width var(--dur-3) var(--ease); }
.job-actions { display: flex; gap: var(--sp-3); margin-top: var(--sp-2); }
.job-history-toggle { font-size: var(--fs-sm); color: var(--link); padding: var(--sp-1) 2px; border-radius: var(--r-xs); }
.job-history-toggle:hover { color: var(--ink); }
.job-done .job-topline strong { color: var(--success); }
.job-error .job-topline strong { color: var(--danger); }

.job-error .job-topline strong { color: var(--danger); }

/* 02 上传配图 */
.upload-trigger { width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 12px 0 8px; }
.material-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.material-list li { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); }
.material-kind {
  flex: none; font-size: var(--fs-2xs); color: var(--link);
  border: 1px solid var(--card-border); border-radius: var(--r-xs); padding: 1px 5px;
}
.material-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.optional-data { margin-top: 16px; border-top: 1px solid var(--card-border); padding-top: 12px; }
.optional-data summary {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: var(--fs-md); color: var(--ink); list-style: none;
}
.optional-data summary::-webkit-details-marker { display: none; }
.optional-data summary:hover { color: var(--link); }
.optional-data p { margin: 10px 0 0; }
.side-note { margin: auto 0 0; padding-top: var(--sp-4); }
.side-card { display: flex; flex-direction: column; }

.hint { margin: 14px 0 0; font-size: var(--fs-sm); color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.empty { padding: 40px 0; text-align: center; color: var(--muted); font-size: var(--fs-md); }

.pcard {
  border: 1px solid var(--card-border); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.pcard-cover {
  aspect-ratio: 16/9; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 14px; gap: 4px; color: #fff; position: relative;
}
.pcard-cover::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 46%, rgba(0,0,0,.42)); }
.pcard-cover-title { position: relative; font-size: var(--fs-base); font-weight: var(--fw-semibold); line-height: 1.3; }
.pcard-cover-meta { position: relative; font-size: var(--fs-xs); opacity: .85; }
.theme-midnight { background: #1E1C31; background-image: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.10), transparent 58%); }
.theme-daylight { background: #ECEEF2; background-image: radial-gradient(120% 120% at 100% 0%, rgba(0,0,0,.05), transparent 58%); }
.theme-ocean { background: #102D45; background-image: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.10), transparent 58%); }
.theme-forest { background: #16321F; background-image: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.10), transparent 58%); }
.theme-ember { background: #2E1A12; background-image: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.10), transparent 58%); }
.theme-daylight .pcard-cover-title, .theme-daylight .pcard-cover-meta { color: #20232B; }
.pcard-body { padding: 14px 16px 16px; }
.pcard-body h3 { font-size: var(--fs-base); margin: 0 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-body p { margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard-actions { display: flex; gap: 14px; margin-top: 10px; }

/* ---------- 最近作品：紧凑卡片（默认 6 个 + 加载更多） ---------- */
/* 注意：工作台顶部的「这次讲什么 / 上传配图」用的也是 .work-grid，别再撞名 */
.works-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.work-card {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0;
  padding: 16px 34px 16px 18px;
  border: 1px solid var(--card-border); border-radius: var(--r-lg); background: var(--surface);
  cursor: pointer;
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.work-card:hover { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.work-chevron { flex: none; color: var(--muted); font-size: 22px; line-height: 1; transform: translateY(-1px); }
.work-card:hover .work-chevron { color: var(--text-2); }
.work-main { min-width: 0; flex: 1; }
.work-title {
  margin: 0; font-size: var(--fs-base); font-weight: var(--fw-semibold);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.work-meta { margin: 5px 0 0; font-size: var(--fs-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.work-del {
  position: absolute; right: 8px; top: 8px;
  width: 24px; height: 24px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-full); background: transparent;
  color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.work-del:hover { background: var(--danger-soft, rgba(220, 80, 80, .16)); color: var(--danger, #e5695f); }
.work-more-row { display: flex; justify-content: center; margin-top: 20px; }
.work-more {
  min-height: 36px; padding: 0 22px; border-radius: var(--r-full);
  border: 1px solid var(--card-border); background: var(--surface-2, transparent);
  color: var(--text-2); font-size: var(--fs-sm); font-weight: var(--fw-medium); cursor: pointer;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.work-more:hover { border-color: var(--line-strong); background: var(--accent-soft); }

/* ---------- 弹窗 ---------- */

.modal-mask {
  position: fixed; inset: 0; z-index: var(--z-mask); display: grid; place-items: center;
  padding: var(--sp-5);
  background: color-mix(in srgb, var(--page) 62%, rgba(0,0,0,.62));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal-mask[hidden] { display: none; }
.modal {
  width: min(520px, 100%); max-height: calc(100vh - var(--sp-10)); overflow: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--card-border); border-radius: var(--r-xl); padding: var(--sp-6);
  box-shadow: var(--shadow-lg);
}
.modal label { display: block; margin: var(--sp-3) 0; font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--muted); }
.modal input { width: 100%; margin-top: 6px; }
.modal-actions { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-5); flex-wrap: wrap; }
.preset-line { margin-top: var(--sp-4); display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.form-error { color: var(--danger); font-size: var(--fs-sm); margin-top: var(--sp-3); }

/* ---------- 提示 ---------- */

.toast {
  position: fixed; left: 50%; bottom: var(--sp-8); transform: translate(-50%, 12px);
  background: var(--surface-3); color: var(--ink); border: 1px solid var(--card-border);
  padding: 11px var(--sp-5); border-radius: var(--r-md);
  font-size: var(--fs-md); font-weight: var(--fw-medium); z-index: var(--z-toast);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-2) var(--ease), transform var(--dur-2) var(--ease);
  box-shadow: var(--shadow-md);
}
.toast-visible { opacity: 1; transform: translate(-50%, 0); }
.toast-error { border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }

/* ---------- 编辑器 ---------- */

/* 顶栏（编辑器页用 .app-bar，与工作台 .topbar 同款） */
.app-bar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--sp-3);
  height: var(--topbar-h); padding: 0 var(--sp-5);
  background: color-mix(in srgb, var(--page) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.8) blur(16px);
  backdrop-filter: saturate(1.8) blur(16px);
  border-bottom: 1px solid var(--card-border);
}
.app-bar .title-input { flex: 0 1 auto; }
.app-bar .spacer, .app-bar-spacer { flex: 1; }
.app-bar .save-state { white-space: nowrap; }
.app-bar .ghost-btn { min-height: 36px; }
.app-bar .primary { min-height: 36px; padding: 0 var(--sp-4); border-radius: var(--r-md); font-size: var(--fs-md); }

.editor {
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 324px;
  gap: var(--sp-4); padding: var(--sp-4) var(--sp-5) var(--sp-8); align-items: start;
  height: calc(100vh - var(--topbar-h)); box-sizing: border-box;
}
.filmstrip, .strip-pane, .inspector {
  background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--r-lg);
  padding: var(--sp-3); height: 100%; overflow: auto;
  box-shadow: none;
}
.strip-pane { display: flex; flex-direction: column; }
.strip-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-2xs); color: var(--muted); font-weight: var(--fw-semibold);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
  margin-bottom: var(--sp-3); flex: none;
}
.strip-head span { font-weight: var(--fw-semibold); letter-spacing: var(--tracking-wide); }
.strip-list { display: flex; flex-direction: column; gap: 6px; flex: 1; overflow: auto; min-height: 0; }
.thumb {
  position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 5px;
  padding: 5px; border-radius: var(--r-sm);
  cursor: pointer; border: 1px solid transparent;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.thumb:hover { background: var(--accent-soft); }
.thumb.active { border-color: color-mix(in srgb, var(--accent) 52%, transparent); background: var(--accent-soft); }
.thumb-num {
  position: absolute; left: 10px; top: 10px; z-index: 2;
  min-width: 18px; padding: 1px 4px; border-radius: var(--r-xs);
  font-size: var(--fs-2xs); font-family: var(--font-num); font-variant-numeric: tabular-nums;
  color: #fff; background: rgba(0,0,0,.52);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  text-align: center; pointer-events: none;
}
.thumb.active .thumb-num { background: var(--accent); font-weight: var(--fw-semibold); }
.thumb-inner {
  width: 100%; aspect-ratio: 16 / 9; height: auto; overflow: hidden;
  border-radius: var(--r-xs); flex: none;
  box-shadow: var(--shadow-xs); background: var(--surface-3);
  transition: outline-color var(--dur-1) var(--ease);
}
.thumb.active .thumb-inner { outline: 2px solid var(--accent); outline-offset: 1px; }
.thumb-label {
  font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .02em;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb.active .thumb-label { color: var(--text-2); }
.page-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: var(--sp-3); margin-top: var(--sp-2); border-top: 1px solid var(--card-border); flex: none; }
.page-nav .ghost-btn { min-height: 28px; padding: 0 var(--sp-2); font-size: var(--fs-xs); }
.page-nav .muted { width: 100%; }

.stage-pane { min-width: 0; height: auto; overflow: visible; }
.slide-stage {
  position: relative; width: 100%; border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface); border: 1px solid var(--card-border);
  box-shadow: var(--shadow-md);
}
.stage-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.inspector label { display: block; margin-bottom: var(--sp-3); font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--muted); }
.inspector input, .inspector textarea, .inspector select { width: 100%; margin-top: 6px; }
.inspector textarea { resize: vertical; line-height: var(--lh-normal); font-family: inherit; min-height: 92px; }

/* ---------- 幻灯片预览（960x540 基准，靠 scale 适配） ---------- */

.slide-frame {
  position: relative; width: 960px; height: 540px; transform-origin: top left;
  transform: scale(var(--pv-scale, 1)); overflow: hidden;
  background: var(--pv-bg, #16151C); color: var(--pv-ink, #fff);
  font-family: Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
}
.thumb-inner .slide-frame { --pv-scale: 0.1375; }

.pv-bar-top { position: absolute; top: 0; left: 0; right: 0; height: 12px; background: var(--pv-accent); }
.pv-bar-bottom { position: absolute; bottom: 0; left: 0; right: 0; height: 12px; background: var(--pv-accent2); }
.pv-bar-left { position: absolute; left: 0; top: 0; bottom: 0; width: 16px; background: var(--pv-accent); }
.pv-line { width: 64.8px; height: 3.96px; background: var(--pv-accent); border-radius: 0; }
.pv-line.center { margin-left: auto; margin-right: auto; }

/* 每页公共骨架：左上品牌词 / 底部脚注 / 右下页码 */
.pv-chrome { position: absolute; inset: 0; pointer-events: none; }
.pv-chrome .pv-brand { position: absolute; left: 64.8px; top: 23.04px; font-size: 13px; font-weight: 700; color: var(--pv-accent); letter-spacing: 1.2px; }
.pv-chrome .pv-foot { position: absolute; left: 64.8px; bottom: 27.36px; font-size: 13px; color: var(--pv-muted); max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-chrome .pv-pageno { position: absolute; right: 64.8px; bottom: 27.36px; font-size: 13px; color: var(--pv-muted); font-family: Arial, sans-serif; }

/* ---------- 页级微风格：与构图层正交，让同一构图换一副面孔 ---------- */
/* b 装饰条：1 方块起笔 / 2 长短双段（导出端 bar() 同款） */
.pv-page.mb1 .pv-line { background: none; display: flex; align-items: center; gap: 7.2px; }
.pv-page.mb1 .pv-line::before { content: ''; width: 8.7px; height: 8.7px; background: var(--pv-accent); flex: none; }
.pv-page.mb1 .pv-line::after { content: ''; flex: 1; height: 3.96px; background: var(--pv-accent); opacity: .88; }
.pv-page.mb2 .pv-line { background: none; display: flex; align-items: center; gap: 10px; }
.pv-page.mb2 .pv-line::before { content: ''; flex: 0 0 58%; height: 3.96px; background: var(--pv-accent); }
.pv-page.mb2 .pv-line::after { content: ''; flex: 1; height: 3.96px; background: var(--pv-accent); opacity: .55; }
/* p 页码：1 大号数字 / 2 实底色块 */
.pv-page.mp1 .pv-chrome .pv-pageno { font-size: 30px; font-weight: 700; color: var(--pv-accent); bottom: 20px; right: 64.8px; line-height: 1; }
.pv-page.mp2 .pv-chrome .pv-pageno { width: 62px; height: 36px; right: 64.8px; bottom: 21px; background: var(--pv-accent); color: var(--pv-on-accent); font-weight: 700; display: flex; align-items: center; justify-content: center; }
/* c 角标：1 左上 / 2 右下 / 3 左下 */
.pv-chrome .pv-corner { position: absolute; }
.pv-page.mc1 .pv-chrome .pv-corner { left: 0; top: 0; width: 44.6px; height: 7.2px; background: var(--pv-accent); }
.pv-page.mc2 .pv-chrome .pv-corner { right: 0; bottom: 0; width: 172.8px; height: 7.2px; background: var(--pv-accent); opacity: .7; }
.pv-page.mc3 .pv-chrome .pv-corner { left: 0; bottom: 0; width: 172.8px; height: 7.2px; background: var(--pv-accent); opacity: .7; }

/* 页面内直接编辑：悬停提示可点，编辑中高亮 */
.slide-frame [data-edit] { cursor: text; border-radius: 4px; transition: box-shadow .15s, background .15s; }
.slide-stage [data-edit]:hover, .fs-view [data-edit]:hover { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pv-accent) 55%, transparent); }
.slide-frame [contenteditable="true"] { outline: none; box-shadow: 0 0 0 2px var(--pv-accent); background: color-mix(in srgb, var(--pv-accent) 12%, transparent); min-width: 24px; }

/* ---------- 编辑器底部工具条（缩放 + 放映入口） ---------- */
.stage-toolbar {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  padding: 8px 14px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--card-border); box-shadow: var(--card-shadow);
}
.stage-toolbar .tool-ic {
  width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--card-border);
  background: transparent; color: var(--muted); font-size: var(--fs-base); line-height: 1; cursor: pointer;
}
.stage-toolbar .tool-ic:hover { color: var(--ink); border-color: var(--muted); }
.stage-toolbar input[type="range"] { flex: 0 1 220px; accent-color: var(--accent); }
.stage-toolbar .tool-pct { font-size: var(--fs-xs); color: var(--muted); width: 40px; font-variant-numeric: tabular-nums; }
.stage-toolbar .tool-sp { flex: 1; }
.stage-toolbar .ghost-btn { min-height: 32px; padding: 0 14px; font-size: var(--fs-sm); }

/* ---------- 元素选中框 + 浮动操作菜单（对照原站重设计） ---------- */

#panWrap { position: relative; }
.stage-pane { position: relative; }
.slide-stage.pannable { cursor: grab; }
.slide-stage.panning { cursor: grabbing; }
.slide-stage.pannable [data-edit] { cursor: grab; }
.slide-stage.panning [data-edit] { cursor: grabbing; }

/* 独立选中图层：覆盖整个舞台区，可悬浮到画布外，不遮内容 */
.sel-layer { position: absolute; inset: 0; pointer-events: none; z-index: 40; }
.sel-layer .el-menu { pointer-events: auto; }

.sel-box {
  position: absolute; pointer-events: none;
  border: 1.5px solid var(--accent); border-radius: var(--r-xs);
}
.sel-handle {
  position: absolute; box-sizing: border-box;
  background: #fff; border: 2px solid var(--accent);
}
/* 四角圆点 */
.sel-handle.h-tl, .sel-handle.h-tr, .sel-handle.h-bl, .sel-handle.h-br {
  width: 11px; height: 11px; border-radius: 50%;
}
.sel-handle.h-tl { left: -6px; top: -6px; }
.sel-handle.h-tr { right: -6px; top: -6px; }
.sel-handle.h-bl { left: -6px; bottom: -6px; }
.sel-handle.h-br { right: -6px; bottom: -6px; }
/* 四边胶囊（同原站） */
.sel-handle.h-tm, .sel-handle.h-bm, .sel-handle.h-ml, .sel-handle.h-mr {
  width: 15px; height: 9px; border-radius: 5px;
}
.sel-handle.h-tm { left: 50%; top: -5px; transform: translateX(-50%); }
.sel-handle.h-bm { left: 50%; bottom: -5px; transform: translateX(-50%); }
.sel-handle.h-ml { left: -8px; top: 50%; transform: translateY(-50%); }
.sel-handle.h-mr { right: -8px; top: 50%; transform: translateY(-50%); }

/* 手柄默认隐藏；自由布局对象选中时出现，可拖拽缩放/由本体拖动 */
.sel-handle { display: none; pointer-events: auto; cursor: nwse-resize; }
.sel-box.scene-mode .sel-handle { display: block; }
.sel-box.scene-mode { pointer-events: none; }
/* 普通模板页选中元素时也显示手柄：拖动/拉手柄会自动解锁成自由布局后再操作 */
.sel-box.can-drag:not(.scene-mode) .sel-handle { display: block; opacity: .55; }
.sel-box.can-drag:not(.scene-mode) .sel-handle:hover { opacity: 1; }
.sel-handle.h-tm, .sel-handle.h-bm { cursor: ns-resize; }
.sel-handle.h-ml, .sel-handle.h-mr { cursor: ew-resize; }
.sel-handle.h-tr, .sel-handle.h-bl { cursor: nesw-resize; }
.slide-stage .scene-el.is-scene-selected { cursor: move; }

/* 浮动菜单：深色玻璃面板，自绘线性图标 */
.el-menu {
  position: absolute; min-width: 184px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, #272335, #1d1a27);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .55), 0 2px 10px rgba(0, 0, 0, .4);
}
.el-menu[hidden] { display: none; }
/* 自由布局对象：非文本对象隐藏「编辑文字」（无文字可编），魔法对所有对象可用 */
.el-menu.scene-mode.no-text-obj button[data-act="edit"] { display: none; }
.el-menu.template-mode button[data-act="magic"] { display: none; }
.menu-grip {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 2px 0 5px; margin-bottom: 4px;
  font-size: 10px; letter-spacing: .08em; color: rgba(255,255,255,.38);
  cursor: grab; user-select: none; border-bottom: 1px solid rgba(255,255,255,.07);
  touch-action: none;
}
.menu-grip:active { cursor: grabbing; }
.el-menu button {
  display: flex; align-items: center; gap: 11px;
  background: transparent; border: 0; color: #f1eff8;
  font-size: var(--fs-sm); font-family: inherit; text-align: left;
  padding: 9px 10px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.el-menu button:hover { background: rgba(255, 255, 255, .08); }
.el-menu button svg { width: 17px; height: 17px; flex: none; opacity: .92; }
.el-menu button .no-ic { width: 17px; flex: none; }
.el-menu button.danger { color: #ff9a9a; }
.el-menu button.has-sub .chev { width: 12px; height: 12px; margin-left: auto; opacity: .55; }

/* 图层子菜单：列当前页所有元素 */
.el-sub {
  position: absolute; left: calc(100% + 8px); top: -8px;
  min-width: 158px; max-height: 262px; overflow: auto;
  padding: 8px; display: flex; flex-direction: column; gap: 2px;
  background: linear-gradient(180deg, #272335, #1d1a27);
  border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .55);
}
.el-sub[hidden] { display: none; }
.el-sub .sub-sep { display: block; height: 1px; margin: 4px 8px; background: rgba(255,255,255,.09); }
.el-sub button {
  display: block; width: 100%; background: transparent; border: 0;
  color: #e8e5f2; font-size: var(--fs-xs); font-family: inherit; text-align: left;
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.el-sub button:hover { background: rgba(255, 255, 255, .08); }
.el-sub button.is-cur { color: var(--accent); }

/* ---------- 试试魔法弹窗 ---------- */
.magic-view {
  position: fixed; inset: 0; z-index: 320;
  background: rgba(10, 9, 15, .58); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.magic-view[hidden] { display: none; }
.magic-card {
  width: min(620px, 100%); border-radius: var(--r-xl); padding: 26px 28px 22px;
  background: #232030; border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
}
.magic-head { display: flex; align-items: center; justify-content: space-between; }
.magic-head h3 { margin: 0; font-size: var(--fs-xl); color: #f4f2fa; }
.magic-x {
  background: transparent; border: 0; color: rgba(255,255,255,.55); font-size: 22px;
  line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: var(--r-sm);
}
.magic-x:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.magic-tip { margin: var(--sp-2) 0 var(--sp-4); color: rgba(255,255,255,.6); font-size: var(--fs-sm); }
.magic-card textarea {
  width: 100%; min-height: 120px; resize: vertical; line-height: 1.7;
  background: #17151F; color: #F1EFF8;
  border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--r-lg);
  padding: 13px 15px; font-size: var(--fs-md); font-family: inherit;
}
.magic-card textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus-ring); }
.magic-foot { display: flex; align-items: center; margin-top: 16px; gap: 10px; }
.magic-count { color: rgba(255,255,255,.45); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.magic-sp { flex: 1; }
.magic-back {
  background: transparent; border: 0; color: rgba(255,255,255,.7); font-size: var(--fs-sm);
  cursor: pointer; padding: 9px 12px; border-radius: var(--r-md); font-family: inherit;
}
.magic-back:hover { background: rgba(255, 255, 255, .07); }
.magic-go {
  background: var(--accent); border: 0; color: var(--accent-ink);
  font-size: var(--fs-sm); font-family: inherit; cursor: pointer;
  padding: 10px 20px; border-radius: var(--r-md);
}
.magic-go:hover { filter: brightness(1.1); }
.magic-go:disabled { opacity: .45; cursor: default; }

/* ---------- 参考图取色 + 增强提示词（工作台创作区） ---------- */
.enhance-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 12px;
}
.enhance-row .ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 0 12px; font-size: var(--fs-sm);
}
.reference-mode {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  font-size: var(--fs-xs); min-width: 0;
}
.reference-mode select {
  max-width: 160px; min-height: 32px; padding: 3px 7px;
  border: 1px solid var(--card-border); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink); font: inherit;
}
.reference-help { margin: 7px 0 0; font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; }

/* ---------- 参考风格：已选待分析（上传即出缩略图，生成时才读风格） ---------- */

.ref-deck {
  margin-top: var(--sp-3); padding: var(--sp-3);
  border: 1px solid var(--card-border); border-radius: var(--r-lg);
  background: var(--surface-2);
  animation: styleIn .22s ease-out;
}
.ref-deck[hidden] { display: none; }
.ref-deck-head {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-2);
}
.ref-deck-title {
  flex: none; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink);
}
.ref-deck-note {
  flex: 1; min-width: 0;
  font-size: var(--fs-2xs); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ref-deck-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2);
}
.ref-tile {
  position: relative; margin: 0; overflow: hidden;
  border: 1px solid var(--card-border); border-radius: var(--r-sm);
  background: var(--surface-3);
}
.ref-tile img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.ref-tile-pptx {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 16 / 10;
  font-family: var(--font-num); font-size: var(--fs-2xs);
  letter-spacing: var(--tracking-wide); color: var(--text-2);
}
.ref-tile figcaption {
  padding: 3px var(--sp-1);
  font-size: var(--fs-2xs); color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ref-tile-x {
  position: absolute; top: 3px; right: 3px;
  display: flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; padding: 0; border: 0; border-radius: var(--r-full);
  font-size: var(--fs-xs); line-height: 1; cursor: pointer;
  color: #fff; background: rgba(0, 0, 0, .56);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.ref-tile:hover .ref-tile-x,
.ref-tile-x:focus-visible { opacity: 1; }
.ref-tile-x:hover { background: var(--danger); }

.swatches { display: inline-flex; gap: 5px; }
.swatches i {
  width: 18px; height: 18px; border-radius: var(--r-xs);
  border: 1px solid rgba(255,255,255,.25); box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.enhance-result {
  margin-top: 12px; padding: 13px 15px; border-radius: var(--r-lg);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--card-border));
}
.enhance-result[hidden] { display: none; }
.enhance-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--muted); margin-bottom: 8px;
}
.enhance-text {
  margin: 0 0 10px; font-size: var(--fs-sm); line-height: 1.75; color: var(--ink);
  max-height: 130px; overflow: auto;
}
.enhance-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.enhance-actions .primary.sm { min-height: 30px; padding: 0 14px; font-size: var(--fs-sm); }

/* ---------- 风格复刻卡 ---------- */

.style-card {
  margin-top: 12px; padding: 13px 15px; border-radius: var(--r-lg);
  background: var(--success-soft);
  border: 1px solid color-mix(in srgb, var(--success) 32%, var(--card-border));
  animation: styleIn .22s ease-out;
}
.style-card[hidden] { display: none; }
@keyframes styleIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}

.style-card-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.style-kind {
  flex: none; font-size: var(--fs-2xs); font-weight: var(--fw-semibold); letter-spacing: .3px;
  padding: 3px 8px; border-radius: var(--r-xs);
  color: var(--success); background: var(--success-soft);
}
.style-sum { flex: 1; min-width: 0; font-size: var(--fs-sm); color: var(--ink); line-height: 1.5; }

.style-palette { display: flex; gap: 7px; margin-bottom: 10px; }
.style-palette i {
  width: 34px; height: 26px; border-radius: var(--r-sm); display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
}

.style-feats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 11px; }
.style-feats:empty { display: none; }
.style-feats span {
  font-size: var(--fs-2xs); line-height: 1; padding: 5px 8px; border-radius: var(--r-xs);
  color: var(--muted); background: color-mix(in srgb, var(--ink) 7%, transparent);
}

.style-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.style-status { font-size: var(--fs-xs); color: var(--muted); }

.replica-panel {
  margin-top: 12px; padding: 14px; border: 1px solid var(--card-border);
  border-radius: var(--r-lg); background: var(--card); min-width: 0;
}
.replica-panel[hidden] { display: none; }
.replica-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.replica-heading h3 { margin: 0; font-size: var(--fs-md); color: var(--ink); }
.replica-heading > span { font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
.replica-help, .replica-status { margin: 9px 0 12px; font-size: var(--fs-xs); line-height: 1.7; color: var(--muted); overflow-wrap: anywhere; }
.replica-list { display: grid; gap: 12px; }
.replica-item { border: 1px solid var(--card-border); border-radius: var(--r-md); padding: 10px; min-width: 0; }
.replica-item.is-unselected { background: color-mix(in srgb, var(--ink) 3%, transparent); }
.replica-item.is-unselected .replica-preview { opacity: .5; }
.replica-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.replica-select { display: flex; align-items: flex-start; gap: 7px; min-width: 0; font-size: var(--fs-xs); line-height: 1.6; color: var(--ink); }
.replica-select input { flex: none; margin: 3px 0 0; width: 15px; height: 15px; accent-color: var(--accent); }
.replica-select span { overflow-wrap: anywhere; }
.replica-order { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.replica-order .link-btn { min-width: 20px; min-height: 28px; }
.replica-order button:disabled { opacity: .35; cursor: default; }
.replica-preview {
  display: flex; justify-content: center; align-items: center; min-height: 90px;
  max-height: 260px; border-radius: var(--r-sm); overflow: hidden; background: var(--surface-3);
}
.replica-preview canvas { display: block; max-width: 100%; max-height: 260px; width: auto; height: auto; object-fit: contain; }
.replica-preview-error { padding: var(--sp-4); color: var(--muted); font-size: var(--fs-xs); }
.replica-crop { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 9px; }
.replica-crop label { display: flex; align-items: center; gap: 5px; min-width: 0; color: var(--muted); font-size: var(--fs-xs); }
.replica-crop input {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: 32px;
  padding: 4px 5px; background: var(--card); color: var(--ink);
  border: 1px solid var(--card-border); border-radius: var(--r-xs); font: inherit;
}
.replica-source-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.replica-source-actions > span { flex: 1 1 150px; font-size: var(--fs-2xs); color: var(--muted); }
.replica-source-actions button { font-size: var(--fs-xs); min-height: 28px; }
.replica-pptx { display: flex; flex-direction: column; gap: 6px; padding: var(--sp-3); border-radius: var(--r-sm); background: var(--accent-soft); }
.replica-pptx strong { color: var(--ink); font-size: var(--fs-sm); }
.replica-pptx span { color: var(--muted); font-size: var(--fs-xs); line-height: 1.6; }
.replica-create { width: 100%; justify-content: center; min-height: 38px; }

.style-saved { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 10px; }
.style-saved[hidden] { display: none; }
.saved-label { font-size: var(--fs-xs); color: var(--muted); margin-right: 1px; }
.saved-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 9px 6px 7px; border-radius: var(--r-md); font-size: var(--fs-xs);
  border: 1px solid var(--card-border); background: var(--card); color: var(--ink);
  transition: border-color .15s, background .15s;
}
.saved-chip:hover { border-color: color-mix(in srgb, var(--success) 42%, var(--card-border)); }
.saved-chip i {
  width: 12px; height: 12px; border-radius: var(--r-xs); display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.saved-chip i + i { margin-left: -4px; }
.saved-chip b {
  font-weight: var(--fw-regular); font-size: var(--fs-sm); line-height: 1; color: var(--muted);
  padding: 0 2px; margin-left: 2px; border-radius: var(--r-xs);
  transition: color var(--dur-1), background var(--dur-1);
}
.saved-chip b:hover { color: var(--danger); background: var(--danger-soft); }

/* ---------- 全屏放映预览 ---------- */
.fs-view {
  position: fixed; inset: 0; z-index: 300;
  background: #08080C; display: flex; flex-direction: column;
}
.fs-view[hidden] { display: none; }

/* 放映进入动画：页整体轻淡入，页内元素错峰上浮（统一、克制） */
@keyframes pv-page-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pv-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes pv-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pv-slide-l { from { opacity: 0; transform: translateX(-22px); } to { opacity: 1; transform: none; } }
@keyframes pv-slide-r { from { opacity: 0; transform: translateX(22px); } to { opacity: 1; transform: none; } }
@keyframes pv-zoom-in { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
#fsFrame.anim .pv-page { animation: pv-page-in .3s ease-out both; }
/* 出场顺序与动画类型由 JS 按「讲解顺序」计算，这里只给动画本体 */
#fsFrame.anim .pv-page .pv-in { animation: pv-rise .5s cubic-bezier(.2, .7, .3, 1) both; }
#fsFrame.anim .pv-page .pv-fade { animation: pv-fade-in .5s ease-out both; }
#fsFrame.anim .pv-page .pv-in-l { animation: pv-slide-l .5s cubic-bezier(.2, .7, .3, 1) both; }
#fsFrame.anim .pv-page .pv-in-r { animation: pv-slide-r .5s cubic-bezier(.2, .7, .3, 1) both; }
#fsFrame.anim .pv-page .pv-in-z { animation: pv-zoom-in .5s cubic-bezier(.2, .7, .3, 1) both; }
#fsFrame.anim .scene-canvas > .scene-el { animation: pv-rise .5s cubic-bezier(.2, .7, .3, 1) both; }
#fsFrame.anim .scene-canvas > .scene-el:nth-child(2) { animation-delay: .07s; }
#fsFrame.anim .scene-canvas > .scene-el:nth-child(3) { animation-delay: .14s; }
#fsFrame.anim .scene-canvas > .scene-el:nth-child(4) { animation-delay: .21s; }
#fsFrame.anim .scene-canvas > .scene-el:nth-child(5) { animation-delay: .28s; }
#fsFrame.anim .scene-canvas > .scene-el:nth-child(n+6) { animation-delay: .35s; }
@media (prefers-reduced-motion: reduce) {
  #fsFrame.anim .pv-page, #fsFrame.anim .pv-page > *, #fsFrame.anim .scene-canvas > .scene-el { animation: none; }
}
.fs-top {
  flex: none; height: 52px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--sp-5); color: rgba(255,255,255,.5); font-size: var(--fs-sm);
}
.fs-top .fs-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; }
.fs-top .fs-exit {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); color: #fff;
  border-radius: var(--r-md); padding: 7px 14px; font-size: 13px; cursor: pointer;
}
.fs-top .fs-exit:hover { background: rgba(255,255,255,.16); }
.fs-stage { flex: 1; min-height: 0; position: relative; }
.fs-stage .slide-frame {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(var(--pv-scale, 1));
  transform-origin: center; box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.fs-bar {
  flex: none; height: 72px; display: flex; align-items: center; justify-content: center; gap: 16px;
}
.fs-bar .fs-nav {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); color: #fff; font-size: 16px; cursor: pointer;
  transition: background .15s;
}
.fs-bar .fs-nav:hover { background: rgba(255,255,255,.16); }
.fs-bar .fs-pos { color: rgba(255,255,255,.7); font-size: var(--fs-sm); min-width: 72px; text-align: center; font-variant-numeric: tabular-nums; }

/* ---------- 与 PPTX 共用坐标：960×540，72px = 1in = 72pt ---------- */
.pv-kicker { position: absolute; left: 64.8px; top: 30.24px; font-size: 13px; font-weight: 700; color: var(--pv-accent); letter-spacing: 1.2px; }
.pv-cover-inner, .pv-section-inner, .pv-quote-inner, .pv-thanks-inner,
.pv-bullets-inner, .pv-metrics-inner, .pv-compare-inner, .pv-timeline-inner, .pv-cards-inner, .pv-image-inner { position: absolute; inset: 0; }
.pv-cover-inner h1 { position: absolute; left: 64.8px; top: 97.2px; width: 830.4px; height: 198px; margin: 0; display: flex; align-items: center; font-size: var(--pv-display, 66px); font-weight: 800; line-height: 1.04; }
.pv-cover-inner h1 .pv-title-text, .pv-thanks-inner h1 .pv-title-text { display: block; width: 100%; }
.pv-cover-inner h1 .pv-accent, .pv-thanks-inner h1 .pv-accent { color: var(--pv-accent); }
.pv-cover-inner .pv-sub { position: absolute; left: 64.8px; top: 322.56px; width: 830.4px; height: 39.6px; margin: 0; font-size: var(--pv-subsize, 24px); color: var(--pv-muted); line-height: 1.15; }
.pv-cover-inner .pv-line { position: absolute; left: 64.8px; top: 392.4px; width: 115.2px; height: 5.4px; }

.pv-bullets-inner h2, .pv-metrics-inner h2, .pv-compare-inner h2, .pv-timeline-inner h2,
.pv-cards-inner h2, .pv-image-inner h2 { position: absolute; left: 64.8px; top: 50.4px; width: 830.4px; height: 44.64px; margin: 0; font-size: var(--pv-title, 32px); font-weight: 700; line-height: 1.15; }
.pv-head-sub { position: absolute; left: 64.8px; top: 102.24px; width: 830.4px; height: 30.24px; margin: 0; font-size: var(--pv-subsize, 24px); color: var(--pv-muted); line-height: 1.15; }
.pv-bullets-inner > .pv-line, .pv-metrics-inner > .pv-line, .pv-compare-inner > .pv-line,
.pv-timeline-inner > .pv-line, .pv-cards-inner > .pv-line, .pv-image-inner > .pv-line { position: absolute; left: 64.8px; top: 142.56px; }

.pv-bullet-content { position: absolute; left: 64.8px; top: 156.96px; width: 830.4px; display: flex; justify-content: space-between; align-items: flex-start; }
.pv-bullet-list { list-style: none; margin: 0; padding: 8.64px 0; width: 830.4px; background: var(--pv-card); }
.has-pic .pv-bullet-list { width: 504px; }
.pv-bullet-list li { position: relative; height: 46.08px; margin-bottom: 11.52px; padding-left: 73.44px; display: flex; align-items: center; }
.pv-bullet-list li::before { content: ''; position: absolute; left: 59.04px; top: 5.76px; bottom: 5.76px; width: 1px; background: var(--pv-accent); opacity: .55; }
.pv-bullet-list li em { position: absolute; left: 12.96px; top: 0; width: 36px; height: 46.08px; display: flex; align-items: center; font-style: normal; font-family: Arial, sans-serif; font-size: 18px; font-weight: 400; color: var(--pv-accent); }
.pv-bullet-list li span { width: 100%; height: 100%; display: flex; align-items: center; font-size: 24px; line-height: 1.15; overflow: hidden; }
.pv-bullet-content > .pv-image { position: relative; flex: none; width: 247.18px; height: 259.2px; margin-top: 8.64px; background: var(--pv-card); overflow: hidden; }
.pv-bullet-content > .pv-image::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 5.4px; background: var(--pv-accent); }
.pv-bullet-content > .pv-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- 图文分栏（对应导出 renderImage：图 5.5in 左 + 文右，CONTENT_TOP 2.3in） ---------- */
.pv-image-split { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; display: flex; gap: 36px; }
.pv-image-split .pv-img-left { position: relative; flex: none; width: 396px; height: 100%; background: var(--pv-card); overflow: hidden; }
.pv-image-split .pv-img-left::before { content: ''; position: absolute; z-index: 1; left: 0; right: 0; top: 0; height: 5.4px; background: var(--pv-accent); }
.pv-image-split .pv-img-left img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-image-split .pv-img-right { flex: 1; min-width: 0; }
.pv-image-split .pv-img-right ul { list-style: none; margin: 0; padding: 0; height: 100%; display: flex; flex-direction: column; justify-content: space-evenly; }
.pv-image-split .pv-img-right li { position: relative; padding-left: 26.4px; line-height: 1.15; display: flex; align-items: center; overflow: hidden; }
.pv-image-split .pv-img-right li::before { content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 6.48px; height: 25.92px; background: var(--pv-accent); }

.pv-section { background: var(--pv-card) !important; }
.pv-section::before, .pv-quote::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 11.52px; background: var(--pv-accent); }
.pv-num { position: absolute; left: 64.8px; top: 68.4px; width: 360px; height: 82.8px; font-size: 66px; font-weight: 700; color: var(--pv-accent); line-height: 1; font-family: Arial, sans-serif; }
.pv-section-inner h2 { position: absolute; left: 64.8px; top: 226.8px; width: 830.4px; height: 61.2px; margin: 0; font-size: var(--pv-title, 32px); font-weight: 700; line-height: 1.15; }
.pv-section-inner .pv-line { position: absolute; left: 64.8px; top: 303.84px; width: 79.2px; height: 4.32px; }
.pv-section-inner .pv-sec-sub { position: absolute; left: 64.8px; top: 327.6px; width: 830.4px; height: 39.6px; margin: 0; font-size: var(--pv-subsize, 24px); color: var(--pv-muted); }

.pv-quote { background: var(--pv-card) !important; }
.pv-quote-mark { position: absolute; left: 64.8px; top: 68.4px; width: 144px; height: 72px; font-size: 66px; line-height: 1; color: var(--pv-accent); font-family: Georgia, serif; }
.pv-quote-text { position: absolute; left: 104.4px; top: 176.4px; width: 751.2px; height: 162px; margin: 0; font-size: var(--pv-quote-size, 32px); line-height: 1.25; }
.pv-quote-author { position: absolute; left: 104.4px; top: 370.8px; width: 751.2px; height: 32.4px; font-size: 18px; color: var(--pv-muted); text-align: right; }

.pv-thanks-inner::before { content: ''; position: absolute; left: 360px; top: 97.2px; width: 230.4px; height: 5.4px; background: var(--pv-accent); }
.pv-thanks-inner h1 { position: absolute; left: 64.8px; top: 108px; width: 830.4px; height: 165.6px; margin: 0; display: flex; align-items: center; justify-content: center; font-size: var(--pv-display, 66px); font-weight: 800; line-height: 1.1; text-align: center; }
.pv-thanks-inner p { position: absolute; left: 64.8px; top: 291.6px; width: 830.4px; height: 39.6px; margin: 0; font-size: var(--pv-subsize, 24px); color: var(--pv-muted); text-align: center; }
.pv-thanks-inner .pv-line { position: absolute; left: 432px; top: 360px; width: 100.8px; height: 4.32px; }

/* ================= 版式变体：与导出坐标一致，随主题种子挑选 ================= */
/* 封面 v1 左下压角：右留竖向色场，标题压左下 */
.pv-cover-inner.v1::before { content: ''; position: absolute; left: 736.8px; top: 0; width: 223.2px; height: 540px; background: var(--pv-accent); opacity: .1; }
.pv-cover-inner.v1::after { content: ''; position: absolute; left: 736.8px; top: 0; width: 3.96px; height: 540px; background: var(--pv-accent); }
.pv-cover-inner.v1 h1 { top: 205.2px; width: 568.8px; height: 183.6px; align-items: flex-end; }
.pv-cover-inner.v1 .pv-sub { top: 399.6px; width: 568.8px; }
.pv-cover-inner.v1 .pv-line { top: 457.2px; }

/* 封面 v2 底部色带：标题居中，副标题落在反白色带内 */
.pv-cover-inner.v2::before { content: ''; position: absolute; left: 0; top: 414px; width: 960px; height: 126px; background: var(--pv-accent); }
.pv-cover-inner.v2 h1 { top: 126px; height: 194.4px; justify-content: center; text-align: center; }
.pv-cover-inner.v2 .pv-sub { top: 435.6px; color: var(--pv-on-accent); }
.pv-cover-inner.v2 .pv-line { left: 447.6px; top: 331.2px; width: 64.8px; }
.pv-page:has(.pv-cover-inner.v2) .pv-kicker { width: 100%; text-align: center; }

/* 封面 v3 左竖条 + 右上点阵 */
.pv-cover-inner.v3::before { content: ''; position: absolute; left: 0; top: 0; width: 11.52px; height: 540px; background: var(--pv-accent); }
.pv-cover-inner.v3::after { content: ''; position: absolute; left: 821.76px; top: 44.64px; width: 79.2px; height: 79.2px; background-image: radial-gradient(var(--pv-accent) 3px, transparent 3.2px); background-size: 25.92px 25.92px; opacity: .75; }
.pv-cover-inner.v3 h1 { left: 109.44px; top: 154.8px; width: 693.6px; height: 187.2px; }
.pv-cover-inner.v3 .pv-sub { left: 109.44px; top: 356.4px; width: 693.6px; }
.pv-cover-inner.v3 .pv-line { left: 109.44px; top: 414px; }
.pv-page:has(.pv-cover-inner.v3) .pv-kicker { left: 109.44px; }

/* 章节 v1 居中编号 */
.pv-section:has(.pv-section-inner.v1)::before { display: none; }
.pv-section-inner.v1 .pv-num { left: 64.8px; top: 82.8px; width: 830.4px; height: 108px; font-size: 96px; text-align: center; }
.pv-section-inner.v1 h2 { top: 219.6px; text-align: center; }
.pv-section-inner.v1 .pv-line { left: 440.4px; top: 296.64px; }
.pv-section-inner.v1 .pv-sec-sub { top: 324px; text-align: center; }

/* 章节 v2 左右分栏 */
.pv-section:has(.pv-section-inner.v2)::before { display: none; }
.pv-section-inner.v2::before { content: ''; position: absolute; left: 320.4px; top: 108px; width: 3.6px; height: 259.2px; background: var(--pv-accent); opacity: .45; }
.pv-section-inner.v2 .pv-num { top: 126px; width: 230.4px; height: 115.2px; display: flex; align-items: center; }
.pv-section-inner.v2 h2 { left: 349.2px; top: 151.2px; width: 466.8px; }
.pv-section-inner.v2 .pv-line { left: 349.2px; top: 241.2px; }
.pv-section-inner.v2 .pv-sec-sub { left: 349.2px; top: 262.8px; width: 466.8px; }

/* 引言 v1 左引号竖线 */
.pv-quote:has(.pv-quote-inner.v1)::before { display: none; }
.pv-quote-inner.v1::before { content: ''; position: absolute; left: 64.8px; top: 136.8px; width: 5.04px; height: 208.8px; background: var(--pv-accent); }
.pv-quote-inner.v1 .pv-quote-mark { display: none; }
.pv-quote-inner.v1 .pv-quote-text { left: 97.2px; top: 147.6px; width: 585.6px; height: 187.2px; }
.pv-quote-inner.v1 .pv-quote-author { left: 97.2px; text-align: left; }

/* 引言 v2 满版反白 */
.pv-quote:has(.pv-quote-inner.v2)::before { display: none; }
.pv-quote-inner.v2::before { content: ''; position: absolute; inset: 0; background: var(--pv-accent); }
.pv-quote-inner.v2 .pv-quote-mark { color: var(--pv-on-accent); }
.pv-quote-inner.v2 .pv-quote-text { left: 64.8px; top: 151.2px; width: 830.4px; height: 187.2px; color: var(--pv-on-accent); }
.pv-quote-inner.v2 .pv-quote-author { color: var(--pv-on-accent); }

/* 致谢 v1 左对齐收尾 */
.pv-thanks-inner.v1::before { left: 64.8px; top: 147.6px; width: 79.2px; }
.pv-thanks-inner.v1::after { content: ''; position: absolute; left: 700.8px; top: 0; width: 259.2px; height: 540px; background: var(--pv-accent); opacity: .1; }
.pv-thanks-inner.v1 h1 { justify-content: flex-start; text-align: left; top: 165.6px; width: 583.2px; height: 151.2px; }
.pv-thanks-inner.v1 p { top: 331.2px; width: 583.2px; text-align: left; }
.pv-thanks-inner.v1 .pv-line { left: 64.8px; top: 403.2px; width: 100.8px; }

/* 直角表面：层次来自相邻色块，不使用阴影、渐变和圆角 */
.pv-metric, .pv-side, .pv-card, .pv-img-left { background: var(--pv-card); border-radius: 0; box-shadow: none; }
.pv-metric::before, .pv-side::before { content: ''; position: absolute; z-index: 1; top: 0; left: 0; right: 0; height: 5.4px; background: var(--pv-accent); }
.pv-metric.signal, .pv-side.signal, .pv-card.signal { background: var(--pv-signal, var(--pv-accent)); }
.pv-metric.signal::before, .pv-side.signal::before { background: var(--pv-on-signal, var(--pv-on-accent)); }
.pv-metric.signal .pv-metric-val, .pv-metric.signal .pv-metric-label, .pv-metric.signal .pv-metric-note,
.pv-side.signal .pv-side-tag, .pv-side.signal h3, .pv-side.signal li,
.pv-card.signal em, .pv-card.signal h3, .pv-card.signal p { color: var(--pv-on-signal, var(--pv-on-accent)); }
.pv-side.signal li::before, .pv-card.signal .pv-card-bar { background: var(--pv-on-signal, var(--pv-on-accent)); }

/* 数据指标 */
.pv-page .pv-metrics { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 21.6px; }
.pv-metric { position: relative; overflow: hidden; }
.pv-metric-val { position: absolute; left: 20.16px; right: 20.16px; top: 46.8px; height: 79.2px; display: flex; align-items: center; font-family: Arial, sans-serif; font-weight: 700; color: var(--pv-accent); line-height: 1; }
.pv-metric-label { position: absolute; left: 20.16px; right: 20.16px; top: 147.6px; height: 36px; font-size: 24px; font-weight: 400; color: var(--pv-ink); line-height: 1.15; }
.pv-metric-note { position: absolute; left: 20.16px; right: 20.16px; top: 205.2px; height: 54px; font-size: 13px; color: var(--pv-muted); line-height: 1.15; }

/* 左右对比 */
.pv-page .pv-compare { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; display: grid; grid-template-columns: 1fr 36px 1fr; }
.pv-side { position: relative; overflow: hidden; }
.pv-side-tag { position: absolute; left: 23.04px; top: 20.16px; width: calc(100% - 46.08px); height: 23.04px; font-size: 13px; font-weight: 400; color: var(--pv-accent); letter-spacing: 1px; }
.pv-side h3 { position: absolute; left: 23.04px; top: 50.4px; width: calc(100% - 46.08px); height: 34.56px; margin: 0; font-weight: 700; color: var(--pv-ink); line-height: 1.15; }
.pv-side ul { position: absolute; left: 41.76px; top: 99.36px; width: calc(100% - 66.24px); list-style: none; margin: 0; padding: 0; }
.pv-side li { position: relative; height: 43.2px; margin-bottom: 4.32px; padding-left: 17.28px; display: flex; align-items: center; font-size: 18px; line-height: 1.1; color: var(--pv-ink); overflow: hidden; }
.pv-side li::before { content: ''; position: absolute; left: 0; top: 12.96px; width: 5.76px; height: 5.76px; background: var(--pv-accent); }
.pv-vs { align-self: center; justify-self: center; width: 40.32px; height: 40.32px; border-radius: 50%; box-shadow: 0 0 0 1px var(--pv-accent); color: var(--pv-accent); font-family: Arial, sans-serif; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; background: var(--pv-bg); }

/* 流程步骤 */
.pv-steps { position: absolute; left: 64.8px; top: 174.24px; width: 830.4px; height: 292.32px; display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 21.6px; }
.pv-step { position: relative; text-align: center; }
.pv-step:not(:first-child)::before { content: ''; position: absolute; top: 22.32px; left: -21.6px; width: 21.6px; height: 1px; background: var(--pv-accent); opacity: .55; }
.pv-node { width: 44.64px; height: 44.64px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-family: Arial, sans-serif; font-size: 18px; font-weight: 400; color: var(--pv-accent); background: var(--pv-card); box-shadow: 0 0 0 1px var(--pv-accent); }
.pv-node.first { background: var(--pv-accent); color: var(--pv-bg); box-shadow: none; }
.pv-step h4 { position: absolute; left: 0; top: 63.36px; width: 100%; height: 51.84px; margin: 0; font-weight: 700; color: var(--pv-ink); line-height: 1.1; }
.pv-step p { position: absolute; left: 7.2px; top: 128.16px; width: calc(100% - 14.4px); height: 158.4px; margin: 0; font-size: 18px; color: var(--pv-muted); line-height: 1.15; }

/* 并列卡片 */
.pv-page .pv-cards { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 24.48px; }
.pv-card { position: relative; overflow: hidden; }
.pv-card em { position: absolute; left: 21.6px; top: 20.16px; font-style: normal; font-family: Arial, sans-serif; font-size: 18px; font-weight: 400; color: var(--pv-accent); }
.pv-card-bar { position: absolute; left: 21.6px; top: 59.04px; width: 44.64px; height: 3.6px; background: var(--pv-accent); }
.pv-card h3 { position: absolute; left: 21.6px; top: 77.76px; width: calc(100% - 43.2px); height: 51.84px; margin: 0; font-weight: 700; color: var(--pv-ink); line-height: 1.1; }
.pv-card p { position: absolute; left: 21.6px; top: 140.4px; width: calc(100% - 43.2px); height: 133.2px; margin: 0; color: var(--pv-muted); line-height: 1.2; overflow: hidden; }

/* 图文分栏 */
.pv-image-split { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; display: grid; grid-template-columns: 396px 1fr; gap: 36px; }
.pv-img-left { position: relative; overflow: hidden; height: 300.96px; }
.pv-img-left img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-img-left::after { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5.4px; background: var(--pv-accent); }
.pv-img-right { position: relative; height: 300.96px; }
.pv-img-right ul { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.pv-img-right li { position: relative; height: 59.04px; margin-bottom: 11.52px; padding-left: 20.16px; display: flex; align-items: center; line-height: 1.15; color: var(--pv-ink); overflow: hidden; }
.pv-img-right li::before { content: ''; position: absolute; left: 0; top: 8.64px; width: 6.48px; height: 25.92px; background: var(--pv-accent); }

/* ---------- 版式变体（与 server/ppt.js 的 v1/v2 构图一一对应） ---------- */

/* block 页眉：标题左侧竖块，替代下划短线 */
.pv-head-block { position: absolute; left: 64.8px; top: 51.84px; width: 6.48px; height: 41.76px; background: var(--pv-accent); }
.pv-bullets-inner.v1 h2, .pv-bullets-inner.v2 h2, .pv-metrics-inner.v1 h2, .pv-compare-inner.v1 h2,
.pv-timeline-inner.v1 h2, .pv-cards-inner.v1 h2 { left: 83.52px; width: 811.68px; }
.pv-bullets-inner.v1 .pv-head-sub, .pv-bullets-inner.v2 .pv-head-sub, .pv-metrics-inner.v1 .pv-head-sub,
.pv-compare-inner.v1 .pv-head-sub, .pv-timeline-inner.v1 .pv-head-sub, .pv-cards-inner.v1 .pv-head-sub { left: 83.52px; width: 811.68px; }

/* bullets v1：双列网格卡 */
.pv-bullet-grid { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 21.6px; }
.pv-bullet-grid li { position: relative; background: var(--pv-card); overflow: hidden; }
.pv-bullet-grid li::before { content: ''; position: absolute; left: 0; top: 0; width: 44.64px; height: 3.96px; background: var(--pv-accent); }
.pv-bullet-grid li em { position: absolute; left: 18.72px; top: 18.72px; font-style: normal; font-family: Arial, sans-serif; font-size: 18px; color: var(--pv-accent); }
.pv-bullet-grid li span { position: absolute; left: 18.72px; top: 48.96px; width: calc(100% - 37.44px); height: calc(100% - 64.8px); display: block; line-height: 1.15; overflow: hidden; }

/* bullets v2：开放式清单，行间横线 */
.pv-bullet-open { position: absolute; left: 64.8px; top: 165.6px; width: 830.4px; height: 300.96px; list-style: none; margin: 0; padding: 0; display: grid; grid-template-rows: repeat(var(--n, 5), 1fr); }
.pv-bullet-open li { position: relative; display: flex; align-items: center; }
.pv-bullet-open li:not(:last-child)::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--pv-muted); opacity: .35; }
.pv-bullet-open li em { font-style: normal; width: 61.2px; flex: none; font-family: Arial, sans-serif; font-size: 24px; font-weight: 700; color: var(--pv-accent); }
.pv-bullet-open li span { flex: 1; line-height: 1.15; overflow: hidden; }

/* metrics v1：主角式 —— 左卡跨全部行，右侧随指标数量分配行槽 */
.pv-metrics.v1 { grid-template-columns: 367.2px 1fr; grid-template-rows: repeat(var(--rows, 2), 1fr); gap: 18.72px; }
.pv-metrics.v1 .pv-metric.hero { grid-column: 1; grid-row: 1 / -1; }
.pv-metrics.v1 .pv-metric.mini { grid-column: 2; min-height: 0; }
.pv-metrics.v1 .pv-metric.hero .pv-metric-val { top: 64.8px; height: 108px; left: 28.8px; right: 28.8px; }
.pv-metrics.v1 .pv-metric.hero .pv-metric-label { top: 180px; left: 28.8px; right: 28.8px; font-weight: 700; }
.pv-metrics.v1 .pv-metric.hero .pv-metric-note { top: 223.2px; left: 28.8px; right: 28.8px; height: 57.6px; }
.pv-metrics.v1 .pv-metric.hero::before { display: none; }
.pv-metrics.v1 .pv-metric.mini .pv-metric-val { top: 10.08px; height: 45%; left: 21.6px; right: 21.6px; }
.pv-metrics.v1 .pv-metric.mini .pv-metric-label { top: calc(45% + 8.64px); top: 45%; margin-top: 8.64px; height: 25.92px; font-size: 13px; left: 21.6px; right: 21.6px; }
.pv-metrics.v1 .pv-metric.mini .pv-metric-note { top: calc(45% + 37.44px); height: calc(55% - 48.96px); left: 21.6px; right: 21.6px; }
.pv-metrics.v1 .pv-metric.mini::before { width: 44.64px; right: auto; height: 3.96px; }
.pv-metrics.v1.rows-2 .pv-metric.mini .pv-metric-val { top: 8.64px; height: 68.4px; }
.pv-metrics.v1.rows-2 .pv-metric.mini .pv-metric-label { top: 80.64px; height: 20.16px; margin-top: 0; }
.pv-metrics.v1.rows-2 .pv-metric.mini .pv-metric-note { top: 104.4px; height: calc(100% - 113.04px); }
.pv-metrics.v1.dense .pv-metric.mini .pv-metric-val { top: 14.4px; width: 144px; height: 59.04px; right: auto; }
.pv-metrics.v1.dense .pv-metric.mini .pv-metric-label { left: 180px; top: 12.96px; height: 25.92px; margin-top: 0; }
.pv-metrics.v1.dense .pv-metric.mini .pv-metric-note { left: 180px; top: 44.64px; height: calc(100% - 59.04px); }

/* metrics v2：开放式大字，无卡片 */
.pv-page .pv-metrics.v2 { gap: 28.8px; }
.pv-metrics.v2 .pv-metric { background: transparent; }
.pv-metrics.v2 .pv-metric::before { display: none; }
.pv-metrics.v2 .pv-metric::after { content: ''; position: absolute; left: 0; bottom: 11.52px; width: 55%; height: 1.5px; background: var(--pv-accent); }
.pv-metrics.v2 .pv-metric-val { position: absolute; left: 0; right: 0; top: 18.06px; height: 126.4px; }
.pv-metrics.v2 .pv-metric-label { position: absolute; left: 0; right: 0; top: 138.44px; height: 32.4px; font-weight: 700; }
.pv-metrics.v2 .pv-metric-note { position: absolute; left: 0; right: 14.4px; top: 186.6px; height: 92.76px; }
.pv-page .pv-metrics.v2.g22 { grid-template-rows: 1fr 1fr; gap: 0 28.8px; }
.pv-metrics.v2.g22 .pv-metric-val { top: 9.03px; height: 63.2px; }
.pv-metrics.v2.g22 .pv-metric-label { top: 69.22px; height: 32.4px; font-size: 24px; }
.pv-metrics.v2.g22 .pv-metric-note { top: 93.3px; height: 35.58px; }

/* compare v1：上下堆叠横带 */
.pv-compare.v1 { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; gap: 21.6px; }
.pv-compare.v1 .pv-vs { display: none; }
.pv-compare.v1 .pv-side { overflow: hidden; }
.pv-compare.v1 .pv-side::before { display: none; }
.pv-compare.v1 .pv-side .pv-side-tag { left: 24.48px; top: 21.6px; width: 230.4px; height: 24.48px; }
.pv-compare.v1 .pv-side h3 { left: 24.48px; top: 48.96px; width: 230.4px; height: calc(100% - 64.8px); line-height: 1.1; }
.pv-compare.v1 .pv-side ul { left: 280.8px; top: 21.6px; width: calc(100% - 305.28px); height: calc(100% - 43.2px); display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; column-gap: 17.28px; }
.pv-compare.v1 .pv-side li { height: auto; min-height: 0; margin-bottom: 0; padding-left: 15.84px; font-size: 13px; }
.pv-compare.v1 .pv-side li::before { top: 11.52px; }

/* timeline v1：纵向阶梯 */
.pv-steps.v1 { display: block; top: 165.6px; height: 300.96px; }
.pv-steps.v1 .pv-step { position: relative; height: calc(100% / var(--n, 4)); text-align: left; }
.pv-steps.v1 .pv-step:not(:first-child)::before { display: none; }
.pv-steps.v1 .pv-step:not(:last-child)::after { content: ''; position: absolute; left: 22.32px; top: calc(50% + 22.32px); bottom: calc(-50% + 22.32px); width: 1px; background: var(--pv-accent); opacity: .55; }
.pv-steps.v1 .pv-node { position: absolute; left: 0; top: calc(50% - 22.32px); margin: 0; }
.pv-steps.v1 .pv-step h4 { position: absolute; left: var(--stack-title-x); top: var(--stack-title-y); width: var(--stack-title-w); height: var(--stack-title-h); text-align: left; display: flex; align-items: center; overflow: hidden; }
.pv-steps.v1 .pv-step p { position: absolute; left: var(--stack-desc-x); top: var(--stack-desc-y); width: var(--stack-desc-w); height: var(--stack-desc-h); font-size: 13px; text-align: left; display: flex; align-items: center; overflow: hidden; }

/* cards v1：横条带 */
.pv-cards.v1 { display: flex; flex-direction: column; gap: 17.28px; }
.pv-cards.v1 .pv-card { flex: 1; }
.pv-cards.v1 .pv-card em { top: 50%; transform: translateY(-50%); left: 24.48px; font-size: 24px; font-weight: 700; }
.pv-cards.v1 .pv-card .pv-card-bar { display: none; }
.pv-cards.v1 .pv-card h3 { left: 93.6px; top: 50%; transform: translateY(-50%); width: 259.2px; height: auto; max-height: 80%; }
.pv-cards.v1 .pv-card p { left: 388.8px; top: 50%; transform: translateY(-50%); width: calc(100% - 410.4px); height: auto; max-height: 84%; display: flex; align-items: center; }
.pv-cards.v1 .pv-row-div { position: absolute; left: 367.2px; top: 24%; bottom: 24%; width: 1px; background: var(--pv-accent); opacity: .5; }
.pv-cards.v1 .pv-card.signal .pv-row-div { background: var(--pv-on-signal, var(--pv-on-accent)); }

/* ---- 新增变体：v3 / v2（与 server/ppt.js 一一对应） ---- */

/* bullets v3：竖排分栏，副标题做左栏导语 */
.pv-bullets-inner.v3 .pv-split-rail { position: absolute; left: 306px; top: 151.2px; width: 3.6px; height: 300.96px; background: var(--pv-accent); opacity: .45; }
.pv-bullets-inner.v3 h2 { left: 64.8px; top: 151.2px; width: 216px; height: 86.4px; }
.pv-bullets-inner.v3 .pv-lead-bar { position: absolute; left: 64.8px; top: 234px; width: 44.64px; height: 3.96px; background: var(--pv-accent); }
.pv-bullets-inner.v3 .pv-lead-sub { position: absolute; left: 64.8px; top: 248.4px; width: 216px; height: 172.8px; margin: 0; color: var(--pv-muted); line-height: 1.25; }
.pv-bullet-split { position: absolute; left: 334.8px; top: 151.2px; width: 560.4px; height: 300.96px; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pv-bullet-split li { position: relative; flex: 1; min-height: 0; display: flex; align-items: flex-start; }
.pv-bullet-split li:not(:last-child)::after { content: ''; position: absolute; left: 51.84px; right: 0; bottom: 0; height: 1px; background: var(--pv-muted); opacity: .3; }
.pv-bullet-split li em { flex: none; width: 51.84px; font-style: normal; font-family: Arial, sans-serif; font-size: 18px; font-weight: 700; color: var(--pv-accent); }
.pv-bullet-split li span { flex: 1; line-height: 1.15; overflow: hidden; }

/* metrics v3：横排条形，数值走一条水平基线 */
.pv-page .pv-metrics.v3.bars { display: flex; flex-direction: column; gap: 0; }
.pv-metric-bar { position: relative; flex: 1; min-height: 0; }
.pv-metric-bar .pv-metric-val { left: 0; right: auto; width: var(--metric-value-w); top: var(--metric-value-y); height: var(--metric-value-h); overflow: hidden; }
.pv-metric-bar.signal .pv-metric-val { color: var(--pv-signal, var(--pv-accent)); }
.pv-metric-bar .pv-metric-label { left: 0; right: auto; width: var(--metric-label-w); top: var(--metric-label-y); height: var(--metric-label-h); font-size: 13px; overflow: hidden; }
.pv-bar-track { position: absolute; left: var(--metric-bar-x); top: var(--metric-bar-y); width: var(--metric-bar-w); height: var(--metric-bar-h); background: transparent; }
.pv-bar-track::before { content: ''; position: absolute; inset: 0; background: var(--pv-muted); opacity: .18; }
.pv-bar-track b { position: relative; display: block; height: 100%; background: var(--pv-accent); }
.pv-metric-bar.signal .pv-bar-track b { background: var(--pv-signal, var(--pv-accent)); }
.pv-metric-bar .pv-metric-note { left: var(--metric-bar-x); right: auto; width: var(--metric-bar-w); top: var(--metric-note-y); height: var(--metric-note-h); font-size: 13px; overflow: hidden; }

/* compare v2：表格式对照，左右条目逐行对齐 */
.pv-compare.v2 { display: block; top: 126px; height: auto; }
.pv-compare.v2::before { content: ''; position: absolute; left: 415.2px; top: 14.4px; width: 1.8px; height: 271px; background: var(--pv-muted); opacity: .3; }
.pv-table-head { display: flex; gap: 36px; }
.pv-table-head span { width: 397.2px; font-size: 13px; font-weight: 700; letter-spacing: 1px; color: var(--pv-accent); }
.pv-table-head span + span { color: var(--pv-signal, var(--pv-accent)); }
.pv-compare.v2 .pv-table-l, .pv-compare.v2 .pv-table-r { position: absolute; top: 21.6px; width: 397.2px; margin: 0; font-size: 18px; font-weight: 700; color: var(--pv-ink); }
.pv-compare.v2 .pv-table-l { left: 0; }
.pv-compare.v2 .pv-table-r { left: 433.2px; }
.pv-table-body { position: relative; margin-top: 63.6px; height: 237px; display: flex; flex-direction: column; }
.pv-table-row { flex: 1; min-height: 0; display: flex; gap: 36px; align-items: center; }
.pv-table-cell { width: 397.2px; display: flex; align-items: center; font-size: 18px; color: var(--pv-ink); }
.pv-table-cell i { flex: none; width: 5.04px; height: 5.04px; margin-right: 14.4px; background: var(--pv-accent); }
.pv-table-cell + .pv-table-cell i { background: var(--pv-signal, var(--pv-accent)); }

/* timeline v2：左右交错，沿中轴展开 */
.pv-steps.v2 { display: block; top: 165.6px; height: 300.96px; }
.pv-steps.v2::before { content: ''; position: absolute; left: 415.2px; top: 0; width: 1.8px; height: 271px; background: var(--pv-accent); opacity: .5; }
.pv-steps.v2 .pv-step { position: relative; height: calc(100% / var(--n, 3)); }
.pv-steps.v2 .pv-step::before { display: none; }
.pv-steps.v2 .pv-node { position: absolute; left: 392.88px; top: calc(50% - 22.32px); margin: 0; }
.pv-zig-body { position: absolute; top: 16%; height: 68%; width: 397.2px; }
.pv-step.zig.l .pv-zig-body { left: 0; }
.pv-step.zig.r .pv-zig-body { left: 433.2px; }
.pv-steps.v2 .pv-step h4 { position: relative; left: auto; top: auto; width: auto; height: 38%; margin: 0; text-align: left; }
.pv-steps.v2 .pv-step p { position: relative; left: auto; top: auto; width: auto; height: 62%; margin: 0; text-align: left; font-size: 18px; }

/* timeline v3：卡片轨道 */
.pv-steps.v3 { display: flex; gap: 20.16px; top: 165.6px; height: 300.96px; }
.pv-steps.v3 .pv-step { flex: 1; text-align: left; background: var(--pv-card); }
.pv-steps.v3 .pv-step::before { display: none; }
.pv-steps.v3 .pv-node { display: none; }
.pv-steps.v3 .pv-step.signal { background: var(--pv-signal, var(--pv-accent)); }
.pv-steps.v3 .pv-step em { position: absolute; left: 18.72px; top: 17.28px; font-style: normal; font-family: Arial, sans-serif; font-size: 32px; font-weight: 700; color: var(--pv-accent); }
.pv-steps.v3 .pv-step .pv-card-bar { left: 18.72px; top: 72px; }
.pv-steps.v3 .pv-step h4 { left: 18.72px; top: 86.4px; width: calc(100% - 37.44px); height: 72px; text-align: left; }
.pv-steps.v3 .pv-step p { left: 18.72px; top: 165.6px; width: calc(100% - 37.44px); height: calc(100% - 183.6px); text-align: left; font-size: 13px; }
.pv-steps.v3 .pv-step.signal em, .pv-steps.v3 .pv-step.signal h4, .pv-steps.v3 .pv-step.signal p { color: var(--pv-on-signal, var(--pv-on-accent)); }
.pv-steps.v3 .pv-step.signal .pv-card-bar { background: var(--pv-on-signal, var(--pv-on-accent)); }

/* cards v3：错位卡 */
.pv-cards.v3 { display: flex; align-items: flex-start; gap: 24.48px; }
.pv-cards.v3 .pv-card { flex: 1; }
.pv-cards.v3 .pv-card:nth-child(1) { height: 246.96px; }
.pv-cards.v3 .pv-card:nth-child(2) { height: 286.56px; margin-top: 39.6px; }
.pv-cards.v3 .pv-card:nth-child(3) { height: 260.64px; margin-top: 14.4px; }
.pv-cards.v3 .pv-card p { top: 122.4px; height: calc(100% - 140.4px); font-size: 18px; }

/* image v1：图在右，文字靠左 */
.pv-image-inner.v1 .pv-image-split { grid-template-columns: 1fr 396px; }
.pv-image-inner.v1 .pv-img-left { grid-column: 2; grid-row: 1; }
.pv-image-inner.v1 .pv-img-right { grid-column: 1; grid-row: 1; }

/* block 页眉：新增变体的标题缩进 */
.pv-metrics-inner.v3 h2, .pv-compare-inner.v2 h2, .pv-timeline-inner.v3 h2, .pv-cards-inner.v3 h2 { left: 83.52px; width: 811.68px; }
.pv-metrics-inner.v3 .pv-head-sub, .pv-compare-inner.v2 .pv-head-sub, .pv-timeline-inner.v3 .pv-head-sub, .pv-cards-inner.v3 .pv-head-sub { left: 83.52px; width: 811.68px; }

/* cards v2：主打卡 —— 第一张横贯上半，其余并排下半 */
.pv-cards.v2 { grid-template-columns: 1fr 1fr; grid-template-rows: 138.44px 1fr; gap: 24.48px; }
.pv-cards.v2 .pv-card:first-child { grid-column: 1 / -1; }
.pv-cards.v2 .pv-card:last-child:nth-child(2) { grid-column: 1 / -1; }
.pv-cards.v2 .pv-card:first-child em { top: 18.72px; width: 57.6px; height: 25.92px; }
.pv-cards.v2 .pv-card:first-child .pv-card-bar { top: 57.6px; }
.pv-cards.v2 .pv-card:first-child h3 { left: 93.6px; top: 18px; width: 259.2px; height: calc(100% - 36px); }
.pv-cards.v2 .pv-card:first-child p { left: 388.8px; top: 18px; width: calc(100% - 410.4px); height: calc(100% - 36px); line-height: 1.15; }
.pv-cards.v2 .pv-card:not(:first-child) .pv-card-bar { display: none; }
.pv-cards.v2 .pv-card:not(:first-child) h3 { left: 68.4px; top: 11.52px; width: calc(100% - 90px); height: 25.92px; font-size: 18px; }
.pv-cards.v2 .pv-card:not(:first-child) p { top: 44.64px; height: calc(100% - 53.28px); line-height: 1.15; }
.pv-cards.v2 .pv-card:not(:first-child) em { top: 12.96px; width: 39.6px; height: 25.92px; }


@media (max-width: 1100px) {
  .editor { grid-template-columns: 170px minmax(0, 1fr); }
  .inspector { grid-column: 1 / -1; height: auto; }
}

/* ---------- 精选案例 ---------- */

.case-gallery { margin-top: 8px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.section-title h2 { font-size: var(--fs-2xl); font-weight: var(--fw-semibold); margin: 0; letter-spacing: var(--tracking-tight); }
.section-title span { font-size: var(--fs-sm); color: var(--muted); }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: var(--sp-5); }
.case-card {
  border: 1px solid var(--card-border); border-radius: var(--r-lg); overflow: hidden;
  background: var(--surface);
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.case-cover {
  position: relative; display: block; width: 100%; aspect-ratio: 16/9;
  border: 0; cursor: pointer; text-align: left; padding: 26px 28px;
  font-family: inherit;
}
.case-cover-kicker { display: block; font-size: var(--fs-xs); font-weight: var(--fw-semibold); letter-spacing: .18em; text-transform: uppercase; margin-bottom: var(--sp-4); opacity: .82; }
.case-cover-title { display: block; font-size: clamp(24px, 2.9vw, 36px); font-weight: var(--fw-bold); line-height: 1.2; letter-spacing: -0.025em; }
.case-cover-sub { display: block; margin-top: var(--sp-2); font-size: var(--fs-sm); opacity: .72; }
.case-view {
  position: absolute; right: var(--sp-4); bottom: var(--sp-3);
  font-size: var(--fs-xs); font-weight: var(--fw-medium); padding: 6px var(--sp-3);
  border-radius: var(--r-full); border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.38); color: #fff;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.case-cover:hover .case-view { background: rgba(0,0,0,.6); border-color: rgba(255,255,255,.34); }
.template-meta { padding: var(--sp-3) var(--sp-4) var(--sp-4); }
.template-meta p { margin: 0 0 3px; font-size: var(--fs-xs); color: var(--muted); }
.template-meta h3 { font-size: var(--fs-base); margin: 0 0 var(--sp-3); font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
.case-actions { display: flex; gap: 10px; }
.case-actions .ghost-btn { min-height: 34px; padding: 0 14px; font-size: var(--fs-sm); }
.case-disclaimer { margin: var(--sp-4) 2px 0; font-size: var(--fs-xs); color: var(--muted); }

/* ---------- 案例播放器 ---------- */

.player-mask {
  position: fixed; inset: 0; z-index: 80;
  background: color-mix(in srgb, #050508 96%, transparent);
  display: flex; flex-direction: column; padding: var(--sp-3) var(--sp-5);
}
.player-mask[hidden] { display: none; }
.player-top {
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; font-size: var(--fs-md); font-weight: var(--fw-medium);
  letter-spacing: -0.01em; margin-bottom: var(--sp-2); flex: none; gap: 12px;
}
.player-top #playerTitle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.player-actions .ghost-btn, .player-foot .ghost-btn { min-height: 44px; min-width: 44px; color: #fff; border-color: #ffffff42; white-space: nowrap; }
.player-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
}
.player-fit { position: relative; overflow: hidden; border-radius: var(--r-sm); box-shadow: 0 32px 90px rgba(0,0,0,.6); }
.player-fit .slide-frame { box-shadow: none; }
.player-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  color: rgba(255,255,255,.5); font-size: var(--fs-xs); margin-top: var(--sp-2);
  font-variant-numeric: tabular-nums;
}

/* ---------- 任务进度条 ---------- */

.job-bar {
  padding: var(--sp-3) var(--sp-6); background: var(--surface);
  border-bottom: 1px solid var(--card-border);
}
.job-head { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-sm); }
.job-title { font-weight: var(--fw-semibold); }
.job-pct { color: var(--muted); font-variant-numeric: tabular-nums; }
.job-state { color: var(--muted); }
.job-state.ok { color: var(--success); }
.job-state.err { color: var(--danger); }
.job-track { height: 4px; border-radius: var(--r-full); background: color-mix(in srgb, var(--muted) 22%, transparent); overflow: hidden; margin: var(--sp-2) 0; }
.job-fill { height: 100%; width: 0; border-radius: var(--r-full); background: var(--accent); transition: width var(--dur-3) var(--ease); }
.job-steps { display: flex; flex-wrap: wrap; gap: 6px; }
.job-step {
  font-size: var(--fs-2xs); padding: 3px var(--sp-2); border-radius: var(--r-full);
  border: 1px solid var(--card-border); color: var(--muted);
  transition: color var(--dur-1), border-color var(--dur-1), background var(--dur-1);
}
.job-step.is-running { color: var(--ink); border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: var(--accent-soft); }
.job-step.is-done { color: var(--success); border-color: color-mix(in srgb, var(--success) 34%, transparent); background: var(--success-soft); }

/* ---------- 标签页 ---------- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--card-border); margin-bottom: var(--sp-4); }
.tab {
  padding: var(--sp-2) var(--sp-3); font-size: var(--fs-sm); color: var(--muted);
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  transition: color var(--dur-1), background var(--dur-1);
}
.tab:hover { color: var(--ink); background: var(--accent-soft); }
.tab.is-active { color: var(--ink); font-weight: var(--fw-semibold); box-shadow: inset 0 -2px 0 var(--accent); }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ---------- 指令 / 配图 / 素材 ---------- */

.field { margin-bottom: var(--sp-3); font-size: var(--fs-sm); color: var(--muted); }
.field label { display: block; margin-bottom: 6px; }
.field select, .field textarea { width: 100%; margin-top: 4px; }
.field textarea { resize: vertical; line-height: 1.6; font-family: inherit; }

.chat-history { margin-top: var(--sp-4); border-top: 1px solid var(--card-border); padding-top: var(--sp-3); }
.chat-item { padding: var(--sp-2) 0; border-bottom: 1px solid var(--card-border); }
.chat-item:last-child { border-bottom: 0; }
.chat-item-head { display: flex; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-1); }
.chat-text { font-size: var(--fs-sm); margin: 0 0 var(--sp-1); line-height: var(--lh-snug); }

.chip {
  display: inline-block; font-size: var(--fs-2xs); font-weight: var(--fw-medium);
  padding: 2px var(--sp-2); border-radius: var(--r-full);
  border: 1px solid var(--card-border); color: var(--muted);
}
.chip.warn { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 34%, transparent); background: var(--warning-soft); }

.image-preview { position: relative; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--card-border); margin: var(--sp-2) 0; min-height: 90px; display: grid; place-items: center; background: var(--surface-2); }
.image-preview img { display: block; width: 100%; }
.image-preview .chip { position: absolute; left: 8px; top: 8px; background: var(--card); }
.image-prompt { font-size: var(--fs-xs); color: var(--muted); line-height: 1.6; margin-bottom: 10px; word-break: break-word; }
.row { display: flex; gap: 8px; margin-bottom: 8px; }
.row > * { flex: 1; }

.drop {
  border: 1px dashed var(--line-strong); border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-3); text-align: center;
  font-size: var(--fs-sm); color: var(--muted); cursor: pointer;
  transition: border-color var(--dur-1), color var(--dur-1), background var(--dur-1);
}
.drop:hover, .drop.over { border-color: var(--accent); color: var(--ink); background: var(--accent-soft); }
.material-list { list-style: none; padding: 0; margin: 12px 0 0; }
.material-list li { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2) 0; border-bottom: 1px solid var(--card-border); font-size: var(--fs-sm); }
.material-list li:last-child { border-bottom: 0; }
.mat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal-sep { border: 0; border-top: 1px solid var(--card-border); margin: 18px 0 12px; }
.field-row { display: flex; gap: var(--sp-3); align-items: flex-end; }
.field-row > label { flex: 1 1 0; min-width: 0; }
.field-row input, .field-row select { width: 100%; margin-top: 6px; }
#recipeHint { margin: 4px 0 12px; }

/* ---------- 预览里的配图：主规则见上方 pv-bullet-content ---------- */


/* ---------- 手机 / 平板适配 ---------- */

@media (max-width: 760px) {
  /* 顶栏：收起次要信息，保留品牌 / 主题 / 退出 */
  .topbar, .app-bar { padding: 0 12px; gap: 8px; }
  .topbar-sub, .topbar-sep, .user-mail, .topbar .badge { display: none; }
  .brand.sm { font-size: 18px; }
  .topbar-left, .topbar-right { gap: 8px; }
  .topbar { height: auto; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
  .topbar-right { flex-wrap: wrap; justify-content: flex-end; }
  .topbar .ghost-btn { white-space: nowrap; flex-shrink: 0; }
  .ghost-btn { padding: 0 10px; font-size: var(--fs-sm); }
  .ghost-btn.with-icon span, .ghost-btn.with-icon svg { display: inline; }

  /* 工作台 */
  .workspace { padding: 22px 14px 48px; }
  /* iOS 会自动放大字号小于 16px 的表单，收起键盘后易留下缩放状态。
     使用可读字号，保留浏览器原生的双指缩放。 */
  .workspace input:not([type="checkbox"]):not([type="radio"]),
  .workspace select, .workspace textarea { font-size: 16px; }
  .hero-slogan { margin-bottom: 26px; }
  .upload-card { padding: 16px 14px; border-radius: var(--r-lg); }
  .composer-foot { flex-direction: column-reverse; align-items: stretch; }
  .gen-btn { width: 100%; justify-content: center; }
  .options { gap: 10px; }
  .composer-tools .ghost-btn { min-height: 44px; }
  .reference-mode { flex: 1 1 100%; }
  .reference-mode select { flex: 1; max-width: none; }
  .style-card-head { flex-wrap: wrap; }
  .style-card-head .style-sum { flex-basis: 50%; }
  .ref-deck { padding: var(--sp-2); }
  .ref-deck-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ref-tile-x { opacity: 1; }          /* 触屏没有 hover，删除键常显 */
  .ref-deck-note { display: none; }
  .style-foot { align-items: flex-start; }
  .replica-panel { padding: 10px; }
  .replica-item-head { flex-direction: column; gap: 4px; }
  .replica-order { align-self: flex-end; }
  .replica-crop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .option-field { flex: 1; }
  .option-field select { width: 100%; min-width: 0; }
  #recipeField { flex: 1 1 100%; }
  .section-title { flex-direction: column; gap: 4px; }
  .case-grid { grid-template-columns: 1fr; }
  .case-cover { padding: 18px 16px; }
  .section-head { flex-direction: column; gap: 4px; margin-bottom: 10px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .works-list { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .work-card { padding: 13px 32px 13px 14px; }
  .modal { max-height: calc(100vh - 32px); overflow: auto; padding: 18px 16px; }
  .modal-mask { padding: 14px; }
  .player-mask { padding: 10px 10px 8px; }
  .player-foot span.muted { display: none; }
  .job-bar { padding: 8px 12px; }

  /* 编辑器：三栏改单栏，缩略图横向滚动 */
  .app-bar { flex-wrap: wrap; height: auto; min-height: 54px; padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
  .app-bar .title-input { flex: 1 1 130px; width: auto; min-width: 110px; font-size: var(--fs-md); }
  .app-bar .save-state { display: none; }
  .app-bar .ghost-btn, .app-bar .primary { min-height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
  .theme-select { max-width: 96px; }
  .editor {
    grid-template-columns: minmax(0, 1fr);
    height: auto; padding: 12px 12px 32px; gap: 12px;
  }
  .strip-pane { height: auto; }
  .strip-list {
    flex-direction: row; overflow-x: auto; overflow-y: hidden;
    padding-bottom: 6px; -webkit-overflow-scrolling: touch;
  }
  .thumb { flex: none; width: 142px; }  /* 142 = 960*0.1375 + 2*5padding：横排下必须定宽，否则 960x540 布局盒把卡片撑爆 */
  .page-nav { flex-wrap: nowrap; overflow-x: auto; }
  .page-nav .muted { width: auto; flex: none; }
  .stage-pane { order: -1; }
  .stage-toolbar { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 40px; gap: 8px; padding: 8px; }
  .stage-toolbar .tool-ic { width: 44px; height: 44px; }
  .stage-toolbar input[type="range"] { width: 100%; min-width: 0; margin: 0; }
  .stage-toolbar .tool-sp { display: none; }
  .stage-toolbar .ghost-btn { grid-column: 1 / -1; min-height: 44px; }
  .inspector { height: auto; max-height: none; }
}

/* ---------- 动效系统（全部 transform/opacity 合成动画，不触发布局） ---------- */

/* 幻灯片页面入场：预览与播放器切页时，整页内容 fadeUp。
   .pv-page 是绝对定位的整页容器（inset:0），绝对定位子元素仍正确锚定。 */
@keyframes pv-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}
.pv-page { position: absolute; inset: 0; animation: pv-in .48s cubic-bezier(.22, 1, .36, 1) both; }
.thumb .pv-page { animation: none; } /* 缩略图不播动画，省渲染 */
/* Editing/capture must use the final geometry, never an entrance-animation frame. */
.studio-editor #frame .pv-page { animation: none; }

/* 滚动触发：案例卡 / 作品卡进入视口渐显上浮 */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s cubic-bezier(.22, 1, .36, 1), transform .5s cubic-bezier(.22, 1, .36, 1); }
.reveal.in-view { opacity: 1; transform: none; }

/* 悬停：卡片轻浮起（位移 2-3px，阴影只加深一档，不做夸张投影） */
.pcard, .case-card {
  transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.pcard:hover, .case-card:hover { border-color: var(--line-strong); }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.case-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* 点击反馈：按下轻微下沉 */
.primary:active, .ghost-btn:active, .gen-btn:active { transform: translateY(1px); }

/* 无障碍：用户偏好减弱动效时全部关闭 */
@media (prefers-reduced-motion: reduce) {
  .pv-page, .reveal { animation: none !important; transition: none !important; opacity: 1 !important; transform: none !important; }
  .pcard, .case-card, .primary, .ghost-btn, .gen-btn { transition: none !important; }
  .pcard:hover, .case-card:hover { transform: none; }
  .inline-track i, .job-fill { transition: none !important; }
}

/* image 版式无图时：去掉占位框，文字全宽 */
.pv-image-split.no-pic { grid-template-columns: 1fr; }
.pv-img-right.full ul { max-width: 900px; }

/* ---------- 顶部额度入口 ---------- */
.quota-chip {
  border: 1px solid var(--card-border); background: transparent; color: var(--muted);
  font-size: var(--fs-xs); font-weight: var(--fw-medium);
  padding: 6px var(--sp-3); border-radius: var(--r-full);
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.quota-chip b { font-weight: var(--fw-semibold); color: var(--ink); font-variant-numeric: tabular-nums; }
.quota-chip:hover { border-color: var(--line-strong); color: var(--ink); }
.quota-chip.empty { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 40%, transparent); background: var(--warning-soft); }
.quota-chip.empty b { color: var(--warning); }
.user-mail { cursor: pointer; }

/* ---------- 账户弹窗 ---------- */
.account-modal { position: relative; max-width: 480px; }
.modal-close {
  position: absolute; top: var(--sp-4); right: var(--sp-4); width: 32px; height: 32px;
  border-radius: var(--r-sm); border: none; cursor: pointer;
  background: transparent; color: var(--muted); font-size: var(--fs-md); line-height: 1;
  transition: background var(--dur-1), color var(--dur-1);
}
.modal-close:hover { background: var(--accent-soft); color: var(--ink); }
.account-title { font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: var(--tracking-tight); margin: 0 0 var(--sp-5); }
.account-id { display: flex; align-items: center; gap: var(--sp-3); }
.account-avatar {
  width: 46px; height: 46px; border-radius: var(--r-md); flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-lg); font-weight: var(--fw-semibold);
  background: var(--accent-soft-strong); color: var(--accent);
}
.account-id strong { display: block; font-size: var(--fs-base); font-weight: var(--fw-semibold); }
.account-id small { display: block; color: var(--muted); font-size: var(--fs-xs); margin-top: 2px; }
.account-saved { font-size: var(--fs-xs); color: var(--success); margin: var(--sp-3) 0 0; }

.quota-head { display: flex; justify-content: space-between; align-items: baseline; margin: var(--sp-6) 0 var(--sp-1); }
.quota-head strong { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.quota-nums { display: flex; gap: var(--sp-12); margin: 6px 0 var(--sp-3); }
.qn-label { display: block; font-size: var(--fs-xs); color: var(--muted); }
.qn-val { display: block; font-family: var(--font-num); font-size: 46px; font-weight: var(--fw-semibold); line-height: 1.1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.qn-remain { color: var(--ink); }
.qn-used { color: var(--muted); }

.quota-bar { display: flex; gap: 4px; margin: var(--sp-1) 0 var(--sp-3); }
.quota-bar i { flex: 1; height: 8px; border-radius: var(--r-full); background: color-mix(in srgb, var(--muted) 20%, transparent); transition: background var(--dur-2); }
.quota-bar i.on { background: var(--accent); }
.quota-meta { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--muted); }
.quota-rules { font-size: var(--fs-xs); line-height: var(--lh-normal); color: var(--muted); margin: var(--sp-4) 0 0; }
.quota-rules b { color: var(--text-2); font-weight: var(--fw-semibold); }

/* ---------- 底部信息栏 ---------- */
.site-foot {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-3) var(--sp-6); margin-top: var(--sp-12);
  border-top: 1px solid var(--card-border);
  font-size: var(--fs-xs); color: var(--muted);
}
.sf-brand { font-weight: var(--fw-semibold); color: var(--text-2); letter-spacing: .02em; }
.sf-slogan { color: var(--muted); }
.sf-spacer { flex: 1; }
.sf-right { color: var(--muted); }

/* ---------- 指标 2×2 网格（4 项时） ---------- */
.pv-page .pv-metrics.g22 { grid-template-rows: repeat(2, 1fr); gap: 17.28px 21.6px; }
.pv-metrics.g22 .pv-metric-val { top: 8.64px; height: 72px; }
.pv-metrics.g22 .pv-metric-label { top: 80.64px; height: 30.24px; }
.pv-metrics.g22 .pv-metric-note { top: 110.88px; height: 28.8px; }

@media (max-width: 760px) {
  .sf-slogan { display: none; }
  .quota-nums { gap: 34px; }
  .qn-val { font-size: 42px; }
  .quota-chip { display: none; }
}

/* ---------- 资料来源弹窗 ---------- */
.src-modal-mask { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: var(--sp-6); background: color-mix(in srgb, var(--page) 60%, rgba(0,0,0,.6)); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: srcFade .18s var(--ease); }
@keyframes srcFade { from { opacity: 0; } to { opacity: 1; } }
.src-modal {
  width: min(640px, 94vw); max-height: 78vh; overflow: auto;
  border-radius: var(--r-xl); padding: var(--sp-5) var(--sp-6);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--card-border); box-shadow: var(--shadow-lg);
}
.src-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.src-modal-head h3 { margin: 0; font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -0.01em; }
.src-modal-x {
  border: 0; background: transparent; color: var(--muted);
  width: 30px; height: 30px; border-radius: var(--r-sm); font-size: var(--fs-lg);
  transition: background var(--dur-1), color var(--dur-1);
}
.src-modal-x:hover { background: var(--accent-soft); color: var(--ink); }
.src-meta { margin: var(--sp-1) 0 var(--sp-4); font-size: var(--fs-xs); color: var(--muted); }
.src-list { margin: 0; padding-left: var(--sp-5); display: grid; gap: var(--sp-4); }
.src-list li { font-size: var(--fs-md); line-height: var(--lh-snug); }
.src-list a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.src-list a:hover { color: var(--ink); }
.src-list .src-site { display: block; font-size: var(--fs-xs); color: var(--muted); margin-top: 2px; }
.src-list .src-snippet { margin: var(--sp-1) 0 0; font-size: var(--fs-sm); color: var(--text-2); line-height: var(--lh-snug); }

/* ---------- 风格智能匹配 ---------- */

.style-pick { position: relative; display: flex; align-items: center; gap: var(--sp-2); margin: 0 0 var(--sp-4); flex-wrap: wrap; }
.style-pick[hidden] { display: none; }
.sp-main {
  display: inline-flex; align-items: center; gap: var(--sp-2); min-height: 38px; padding: 0 var(--sp-3);
  border-radius: var(--r-md); border: 1px solid var(--card-border); background: transparent; color: var(--ink);
  font-size: var(--fs-md); text-align: left; max-width: 100%;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.sp-main:hover { background: var(--accent-soft); border-color: var(--line-strong); }
.sp-flag { font-size: var(--fs-2xs); letter-spacing: var(--tracking-wide); color: var(--muted); font-weight: var(--fw-semibold); }
.sp-main b { font-weight: var(--fw-semibold); white-space: nowrap; }
.sp-main em {
  font-style: normal; color: var(--muted); font-size: var(--fs-sm);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sp-dots { display: inline-flex; gap: 3px; flex: none; }
.sp-dots i { display: block; width: 9px; height: 9px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.sp-switch {
  font-size: var(--fs-sm); color: var(--muted); padding: 5px var(--sp-2);
  border: 0; border-radius: var(--r-sm); background: none;
  transition: color var(--dur-1), background var(--dur-1);
}
.sp-switch:hover { color: var(--ink); background: var(--accent-soft); }
.sp-list {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: var(--z-pop); width: min(100%, 430px);
  display: grid; gap: 2px; padding: 6px; border-radius: var(--r-lg);
  border: 1px solid var(--card-border); background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: surface-arrive .18s var(--ease) both;
}
.sp-list[hidden] { display: none; }
.sp-chip {
  display: flex; align-items: center; gap: var(--sp-2); width: 100%; padding: 9px 10px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--ink); text-align: left;
  transition: background var(--dur-1);
}
.sp-chip:hover { background: var(--accent-soft); }
.sp-chip.on { background: var(--accent-soft-strong); }
.sp-chip > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-chip b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.sp-chip em { font-style: normal; font-size: var(--fs-xs); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-chip .sp-dots { width: 34px; justify-content: flex-start; }
.sp-auto { border-top: 1px solid var(--card-border); margin-top: 4px; padding-top: 11px; border-radius: 0 0 9px 9px; }
.sp-auto-mark { width: 34px; text-align: center; color: var(--muted); font-size: var(--fs-base); }

/* 保存恢复操作始终可见，窄屏也保留未保存/冲突提示。 */
.save-recovery { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.save-recovery[hidden] { display: none; }
.account-admin-link { margin-top: 8px; text-decoration: none; }
@media (max-width: 640px) {
  .app-bar .save-state.err, .app-bar .save-state.busy { display: block; flex-basis: 100%; white-space: normal; }
  .app-bar .save-recovery { flex-basis: 100%; }
}

/* 本次素材：缩略图、有限数据预览与清晰的来源提示。 */
.material-target-help { margin: 7px 0 10px; }
.material-status:empty { display: none; }
.composer-tools .material-count { color: var(--muted); font-size: var(--fs-xs); }
.composer-materials .material-list:empty { display: none; }
.composer-materials .material-list { margin-bottom: 0; }
.material-reuse { margin-top: 12px; color: var(--muted); font-size: var(--fs-xs); }
.material-reuse summary { cursor: pointer; width: fit-content; }
.material-reuse[open] .option-field { margin-top: 10px; }
.material-reuse select { max-width: 100%; min-width: 0; }
.material-target-help:empty { display: none; }
.composer-materials .material-chart-options { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.composer-materials .material-chart-options[hidden] { display: none; }
.composer-materials .material-chart-options .option-field { flex-direction: row; align-items: center; margin: 0; }
.material-list .material-entry { display: block; padding: 10px 0; }
.material-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.material-main .material-name { min-width: 0; flex: 1; }
.material-thumb { width: 48px; height: 38px; flex: none; object-fit: contain; border-radius: 5px; background: var(--surface); }
.material-preview { margin: 7px 0 0; font-size: var(--fs-xs); color: var(--muted); }
.material-preview summary { cursor: pointer; }
.material-preview pre { overflow: auto; max-height: 150px; white-space: pre-wrap; margin: 7px 0; }
.material-table-wrap { overflow: auto; max-height: 180px; margin-top: 7px; border: 1px solid var(--card-border); }
.material-table-wrap table { width: 100%; border-collapse: collapse; }
.material-table-wrap td { padding: 5px 7px; border: 1px solid var(--card-border); white-space: nowrap; color: var(--ink); }
.material-preview p { margin: 5px 0; }
.material-warning { margin: 5px 0; color: var(--ink); font-size: var(--fs-xs); border-left: 2px solid var(--accent); padding-left: 7px; }

.job-card.job-quality-partial, .job-card.job-quality-skeleton, .job-card.job-quality-review { border-left-color: var(--warning); background: var(--warning-soft); }
.job-card.job-quality-partial .job-topline strong, .job-card.job-quality-skeleton .job-topline strong, .job-card.job-quality-review .job-topline strong { color: var(--warning); }
#jobStrip { scroll-margin-top: 80px; }
.material-chart-options { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.material-chart-options[hidden] { display: none; }
.material-chart-toggle { display: flex; align-items: center; gap: 7px; font-size: var(--fs-sm); }
.material-chart-options .option-field { margin-top: 9px; }
