/* ══════════════════════════════════════════════════════════════
   片刻 · pianke 视觉系统 v2
   信息架构对齐小云雀：固定头部 + 满屏 section 叙事 + 案例浏览器
   配色取自品牌规范（骨架深棕 / 象牙白 / 珊瑚橙），未沿用旧版布局
   ══════════════════════════════════════════════════════════════ */

:root {
  /* 底色层 */
  --bg: #130D08;
  --bg-card: rgba(255, 238, 224, 0.055);
  --bg-card-hover: rgba(255, 238, 224, 0.095);

  /* 描边 */
  --line: rgba(251, 238, 224, 0.13);
  --line-strong: rgba(251, 238, 224, 0.22);

  /* 文字 */
  --text: #FBEEE0;
  --text-2: rgba(251, 238, 224, 0.70);
  --text-3: rgba(251, 238, 224, 0.46);

  /* 品牌 */
  --accent: #FF8A4C;
  --accent-soft: rgba(255, 138, 76, 0.14);
  --accent-line: rgba(255, 138, 76, 0.34);
  --gold: #E0B98A;

  /* 尺寸 */
  --header-h: 64px;
  --max: 1226px;
  --gutter: 32px;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 全局环境光：顶部暖光 + 深棕骨架渐变 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(1100px 620px at 50% -10%, rgba(255, 138, 76, 0.20), transparent 68%),
    radial-gradient(820px 500px at 86% 10%, rgba(224, 185, 138, 0.10), transparent 70%),
    linear-gradient(180deg, #1C1309 0%, #150E08 40%, #110C08 100%);
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }

/* hidden 必须真隐藏：作者样式的 display 优先级高于 UA 的 [hidden]{display:none}，
   故 .sheet-host{display:grid} 会把 hidden 覆盖掉，导致全屏遮罩常驻（表现为页面蒙雾 + 点不动） */
[hidden] { display: none !important; }

::selection { background: rgba(255, 138, 76, 0.30); }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(251, 238, 224, 0.13); border-radius: 99px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(251, 238, 224, 0.24); background-clip: content-box; }

/* ── 布局容器 ── */
.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 1;
}

/* ══════════════ 顶部栏 ══════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 90;
  background: rgba(15, 10, 7, 0.62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(15, 10, 7, 0.88);
  border-bottom-color: var(--line);
}

.site-header__inner {
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  gap: 34px;
}

.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand__mark { width: 26px; height: 26px; border-radius: 7px; }
.brand__name { font-size: 17px; font-weight: 600; letter-spacing: .06em; }
.brand__tag {
  font-size: 11px; color: var(--text-3); letter-spacing: .12em;
  padding-left: 10px; margin-left: 2px; border-left: 1px solid var(--line-strong);
}

.site-nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.site-nav a {
  padding: 7px 13px;
  font-size: 13.5px;
  color: var(--text-2);
  border-radius: 999px;
  transition: color .18s, background .18s;
}
.site-nav a:hover { color: var(--text); background: var(--bg-card); }

.site-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ══════════════ 按钮 ══════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 44px;
  padding: 0 22px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background .2s, border-color .2s, box-shadow .25s;
}
.btn:hover { background: var(--bg-card-hover); border-color: rgba(251,238,224,.26); }
.btn:active { transform: scale(.978); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

.btn--primary {
  background: linear-gradient(178deg, #FFA066, var(--accent) 62%, #F0743A);
  border-color: transparent;
  color: #23120A;
  font-weight: 600;
  box-shadow: 0 8px 26px -10px rgba(255, 138, 76, 0.75), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn--primary:hover {
  background: linear-gradient(178deg, #FFAE78, #FF9459 62%, #F57C42);
  border-color: transparent;
  box-shadow: 0 12px 32px -10px rgba(255, 138, 76, 0.9), inset 0 1px 0 rgba(255,255,255,.32);
}

.btn--ghost { border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { color: var(--text); background: var(--bg-card); }

.btn--sm { height: 36px; padding: 0 17px; font-size: 13px; }
.btn--lg { height: 52px; padding: 0 30px; font-size: 15px; }
.btn--block { width: 100%; }

/* 积分药丸 */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-card);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.pill:hover { background: var(--bg-card-hover); border-color: var(--accent-line); }
.pill--points { color: var(--gold); }
.pill__unit { color: var(--text-2); font-size: 12px; }
.pill svg { opacity: .85; }

/* ══════════════ 主体 ══════════════ */
.site-main { position: relative; z-index: 1; padding-top: var(--header-h); }

/* section 通用 */
.section { padding: 128px 0; position: relative; }

.section-head {
  max-width: 640px;
  margin-bottom: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--accent-line);
}

.section-head h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.28;
}
.section-head p {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.8;
}
/* 数字与单位不许被断行拆开。中文可以在任意字符间换行，于是「18 积分」
   在中等宽度下会被拆成「18 积」+「分。」，读起来像错字。
   用在 <span class="nw">18 积分</span> 这类「数量 + 单位」的片段上。 */
.nw { white-space: nowrap; }

/* ══════════════ Hero ══════════════ */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}

.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: .85;
}

/* 浮动光斑 */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(56px);
  pointer-events: none;
  z-index: 0;
}
.hero__orb--a {
  width: 420px; height: 420px;
  right: 4%; top: 12%;
  background: radial-gradient(circle, rgba(255,138,76,.30), transparent 68%);
  animation: orbFloat 16s ease-in-out infinite;
}
.hero__orb--b {
  width: 340px; height: 340px;
  left: -4%; bottom: 8%;
  background: radial-gradient(circle, rgba(224,185,138,.18), transparent 70%);
  animation: orbFloat 21s ease-in-out infinite reverse;
}
@keyframes orbFloat {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  50% { transform: translate3d(-32px, 26px, 0) scale(1.09); }
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 56px;
  align-items: center;
}

.hero__copy { position: relative; z-index: 2; min-width: 0; }

.hero__title {
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -.025em;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(96deg, var(--accent) 12%, #FFC79A 52%, var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  margin-top: 20px;
  font-size: 15.5px;
  color: var(--text-2);
  line-height: 1.85;
  max-width: 540px;
}

/* ── hero 右侧视觉：手机形态成片卡 ── */
.hero__visual {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 520px;
}

.hero__phone::before {
  content: "";
  position: absolute;
  inset: -18%;
  z-index: -1;
  background: radial-gradient(circle at 50% 40%, rgba(255, 138, 76, 0.28), transparent 66%);
  filter: blur(24px);
  pointer-events: none;
}
.hero__phone {
  position: relative;
  width: min(304px, 100%);
  aspect-ratio: 9 / 16;
  border-radius: 30px;
  overflow: hidden;
  border: 1px solid rgba(251, 238, 224, 0.16);
  background: #0A0705;
  box-shadow:
    0 46px 90px -34px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 138, 76, 0.08),
    0 0 80px -30px rgba(255, 138, 76, 0.4);
  transform: rotate(-2deg);
}
.hero__phone-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.1) saturate(1.05);
}
.hero__phone-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,5,3,.42) 0%, transparent 34%, rgba(8,5,3,.9) 100%);
}
.hero__phone-ui {
  position: absolute;
  left: 18px; right: 18px; bottom: 20px;
}
.hero__phone-tag {
  display: inline-flex;
  align-items: center;
  height: 21px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 138, 76, 0.2);
  border: 1px solid rgba(255, 138, 76, 0.38);
  color: #FFC79A;
  font-size: 10px;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.hero__phone-shop {
  font-size: 17px;
  font-weight: 600;
  text-shadow: 0 2px 14px rgba(0,0,0,.9);
}
.hero__phone-line {
  margin-top: 4px;
  font-size: 12px;
  color: rgba(251,238,224,.82);
  line-height: 1.55;
  text-shadow: 0 1px 10px rgba(0,0,0,.9);
}

.hero__float {
  position: absolute;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(23, 16, 11, 0.82);
  backdrop-filter: blur(12px);
  font-size: 11.5px;
  color: var(--text-2);
  white-space: nowrap;
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.9);
}
.hero__float--a {
  left: -14px;
  top: 16%;
  animation: floatA 9s ease-in-out infinite;
}
.hero__float--b {
  right: -8px;
  bottom: 20%;
  animation: floatB 11s ease-in-out infinite;
}
@keyframes floatA {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes floatB {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(11px); }
}

/* hero 输入框 —— 核心交互 */
.hero__composer {
  margin-top: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(23, 16, 11, 0.72);
  backdrop-filter: blur(14px);
  max-width: 560px;
  transition: border-color .22s, box-shadow .28s;
}
.hero__composer:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 4px rgba(255,138,76,.09);
}
.hero__mode {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--gold);
  font-size: 13px;
  padding: 0 22px 0 0;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 8px center, right 3px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  flex-shrink: 0;
}
.hero__mode option { background: #1A120C; color: var(--text); }
.hero__divider { width: 1px; height: 18px; background: var(--line-strong); flex-shrink: 0; }
.hero__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14.5px;
}
.hero__input::placeholder { color: var(--text-3); }

.hero__chips {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 560px;
}
.chip {
  height: 30px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  font-size: 12.5px;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.chip:hover { color: var(--text); border-color: var(--accent-line); background: var(--accent-soft); }

/* hero 数据条
   ★ 宽度跟着内容走（fit-content，原来是写死 max-width:560px）。
   那一格用来给「14 类模板」凑满三列，第三格删掉后 560px 的分隔线会多出
   三百多像素的空白尾巴 —— 看着像少渲染了一列，而不是本来就两列。 */
.hero__stats {
  margin-top: 46px;
  display: flex;
  width: fit-content;
  max-width: 100%;
  gap: 46px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero__stat-num {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}
.hero__stat-num span { font-size: 14px; color: var(--text-2); font-weight: 400; margin-left: 3px; }
.hero__stat-label { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* ══════════════ 案例浏览器（核心组件） ══════════════ */
.browser {
  display: grid;
  grid-template-columns: 336px 1fr;
  gap: 22px;
  align-items: stretch;
}

/* 左：场景列表 */
.browser__list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  overflow: hidden;
}
.browser__list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .1em;
  color: var(--text-3);
}
.browser__pager { display: flex; gap: 6px; }
.browser__pager button {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.browser__pager button:hover { color: var(--text); border-color: var(--accent-line); }

.browser__scroll {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  max-height: 468px;
  scrollbar-width: thin;
}

.case-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background .18s, border-color .18s;
}
.case-item:hover { background: rgba(255,238,224,.045); }
.case-item.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
}
.case-item__idx {
  width: 22px;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.case-item.is-active .case-item__idx { color: var(--accent); }
/* 标题与「时长 · 类型」原本是两个 inline span，会挤在同一行里连成
   「火锅店探店44 秒」；__dur 上那个 margin-top:1px 说明原意是上下两行。
   改成纵向 flex 后，标题的 nowrap+省略号才真的生效（长标题不再把时长顶出去）。 */
.case-item__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.case-item__title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.case-item__dur { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.case-item__badge {
  flex-shrink: 0;
  height: 18px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: .06em;
  background: rgba(255,138,76,.16);
  color: var(--accent);
}
.case-item__badge--new { background: rgba(224,185,138,.14); color: var(--gold); }

/* 右：成片舞台（2026-10-31 改为「竖屏手机画幅 + 侧边信息」）
   原来的 16:10 横框配 cover，是给「横版场景海报」用的；换成真实成片后
   5 条里 4 条是竖屏，cover 进横框会同时裁掉脸和商品，contain 又留大白边。
   所以画幅跟着片子走：竖屏 9:16 + 右侧信息列；横屏那条走 .work--wide 通栏。 */
.browser__stage {
  min-width: 0;
}

.work {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.work--wide {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.stage {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: linear-gradient(160deg, #1E140D, #120C08);
  aspect-ratio: 9 / 16;
}
.stage--wide { aspect-ratio: 16 / 9; }
.stage__media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.08) contrast(1.03);
  transition: opacity .5s var(--ease), transform .8s var(--ease);
}
.stage__media.is-fading { opacity: 0; }
.stage__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,6,4,.28) 0%, transparent 34%, transparent 56%, rgba(10,6,4,.82) 100%);
  pointer-events: none;
}
.stage__badges {
  position: absolute;
  top: 16px; left: 16px;
  display: flex; gap: 8px;
}
.stage__badge {
  height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .04em;
  background: rgba(10,6,4,.56);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(251,238,224,.16);
  color: var(--text);
}
.stage__badge--live { color: var(--accent); }

.stage__play {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(251,238,224,.28);
  background: rgba(10,6,4,.42);
  backdrop-filter: blur(10px);
  color: var(--text);
  cursor: pointer;
  transition: transform .22s var(--ease), background .2s;
}
.stage__play:hover { transform: translate(-50%, -50%) scale(1.07); background: rgba(255,138,76,.24); }
.stage__play svg { margin-left: 3px; }

/* 舞台右侧信息列：标题、说明、三条硬指标。
   原先这些字压在画面底部（.stage__caption）——竖屏画幅下正文会盖住
   人物下半身，而且删掉底部操作条后，底部已经不该再承载「说明」了。 */
.work__meta { min-width: 0; }
.work__kind {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: .06em;
}
.work__title {
  margin-top: 14px;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.work__desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--text-2);
}
.work__facts {
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
}
.work__facts dt {
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text-3);
}
.work__facts dd {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* 舞台下方操作条（「用这个场景开拍」）已于 2026-10-31 移除：
   案例区展示的是已交付成片，不是可下单的模板，底部不再挂开拍入口。 */

/* ══════════════ 能力矩阵 ══════════════ */
.abilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--line);
}
.ability-col {
  background: linear-gradient(180deg, rgba(23,16,11,.9), rgba(15,10,7,.9));
  padding: 26px 22px 30px;
  transition: background .28s;
}
.ability-col:hover { background: linear-gradient(180deg, rgba(35,24,16,.95), rgba(19,13,9,.95)); }
.ability-col__name {
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--accent);
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.ability-item { padding: 11px 0; }
.ability-item__title { font-size: 14.5px; font-weight: 500; }
.ability-item__desc { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }
/* `.ability-item--soon` 的「筹备中」徽标已随第九版删除：
   能力矩阵里列出的每一项现在都是可用的，再挂一个未开放标记会自相矛盾。
   类名不再被任何模板产出，样式一并移除（留空规则只会让后来的人以为还在用）。 */

/* ══════════════ 流程 ══════════════ */
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.flow__item {
  position: relative;
  padding: 30px 24px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  transition: border-color .25s, background .25s, transform .3s var(--ease);
}
.flow__item:hover {
  border-color: var(--accent-line);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}
.flow__item::after {
  content: "";
  position: absolute;
  right: -14px; top: 50%;
  width: 8px; height: 8px;
  border-top: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  transform: translateY(-50%) rotate(45deg);
}
.flow__item:last-child::after { display: none; }
.flow__step {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
}
.flow__title { font-size: 17px; font-weight: 600; }
.flow__desc { margin-top: 8px; font-size: 13px; color: var(--text-2); line-height: 1.7; }

/* ══════════════ 套餐 ══════════════ */
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
/* 四档订阅：桌面上排一行（38/98/198/398 的价格阶梯必须一眼看完，
   拆成 3+1 会让最贵那档单独落到第二行，看着像"附加项"） */
.plans--4 { grid-template-columns: repeat(4, 1fr); }
/* 散买只剩一个 SKU（¥18 / 12 积分）：不能让它占 1/3 列宽飘在左边，
   也不能拉满整行（一张 1200px 宽的卡片读起来像广告位）。
   定宽到 380，靠左对齐，与上面四档的网格起点对齐。 */
.plans--one { grid-template-columns: minmax(0, 380px); }
/* 套餐分两组（订阅 / 散买积分），组标题用一条细线拉通，
   避免出现「一排 7 张卡」时用户只按价格排序 */
.plans__label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--text-3);
}
.plans__label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.plans__label:not(:first-of-type) { margin-top: 32px; }
.plan {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 26px 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  transition: border-color .25s, background .25s, transform .3s var(--ease);
}
.plan:hover { border-color: var(--line-strong); background: var(--bg-card-hover); transform: translateY(-3px); }
.plan--feature {
  border-color: var(--accent-line);
  background: linear-gradient(180deg, rgba(255,138,76,.10), rgba(255,138,76,.02));
  position: relative;
}
.plan--feature::before {
  content: "推荐";
  position: absolute;
  top: -9px; right: 16px;
  height: 19px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #23120A;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
}
.plan__name { font-size: 14px; font-weight: 600; }
.plan__price {
  margin-top: 14px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.plan__price i { font-style: normal; font-size: 14px; color: var(--text-2); margin-right: 2px; }
/* 「/ 月」紧跟在价格后面，字号必须比主价格小一档，否则 ¥198/月 会被读成 198 元起 */
.plan__per { font-style: normal; font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 3px; }
/* 散买积分不做主推：边框与背景都压一档，让四档订阅在视觉上先被看到 */
.plan--credit { background: transparent; }
.plan--credit .plan__price { font-size: 23px; }
.plan__points { margin-top: 4px; font-size: 12.5px; color: var(--gold); }
.plan__meta { margin-top: 18px; font-size: 12.5px; color: var(--text-3); line-height: 1.9; }
.plan__meta span { display: block; }
/* 形象库权益行（2026-10-27 第十一版）。
   四档订阅卡都渲染这一行，只是「上传自己的形象 / 本档未包含」不同 ——
   行数一致，四张卡的按钮才能落在同一条线上。
   刻意与 .plan__meta 分开：meta 的「正好两行」被测试锁着，那两行讲产能，这行讲能力。
   字号/行高与 meta 对齐，高度差只剩 margin。 */
.plan__lib {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--text-3);
}
.plan__lib.is-on { color: var(--text-2); }
/* 角标（tag）与权益行（perk）已于 2026-10-26 第五版移除：
   tag 是四个「先跑通一次 / 个人·单店 / 最常订 / 代运营·连锁」的定位标签，
   站主要求不出现在卡片上；perk 那一行长度不一，会把四张卡拉成不同高度，
   导致「订阅」按钮错位。两者对应的 .plan__tag / .plan__perk 类一并删除，
   避免留下"看起来还在用"的死样式。 */
/* 按钮统一压到卡片底部：grid 已让四张卡等高，margin-top:auto 保证
   首屏无论名称/价格占几行，「订阅」都落在同一条水平线上。 */
.plan__cta { margin-top: auto; padding-top: 20px; }

/* ══════════════ 创作台 ══════════════ */
.studio {
  padding: 24px 0 60px;
  min-height: calc(100vh - var(--header-h));
}

.studio__bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.studio__back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: color .18s, border-color .18s;
}
.studio__back:hover { color: var(--text); border-color: var(--line-strong); }
.studio__crumb { font-size: 13px; color: var(--text-3); }
.studio__crumb b { color: var(--text); font-weight: 500; }
.studio__bar-spacer { margin-left: auto; }
.studio__cost {
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.studio__cost b { color: var(--accent); font-weight: 600; font-size: 16px; }
/* 顶栏里的「我的作品」：一行文字链，不要做成按钮 —— 顶栏已经有一个主按钮
   （提交），再加一个同权重的按钮会抢走注意力。 */
.studio__lib {
  font-size: 13px;
  color: var(--text-3);
  padding: 4px 2px;
  margin-right: 14px;
  border-bottom: 1px solid transparent;
  transition: color .18s, border-color .18s;
}
.studio__lib:hover { color: var(--accent); border-bottom-color: var(--accent); }

.studio__grid {
  display: grid;
  grid-template-columns: 1fr 452px;
  gap: 24px;
  align-items: start;
}

/* 左：预览画布 */
.preview {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, rgba(30,20,13,.96), rgba(14,9,6,.98));
  padding: 22px;
}
.preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.preview__title { font-size: 13px; color: var(--text-2); letter-spacing: .06em; }
.preview__ratio {
  font-size: 11px;
  color: var(--text-3);
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.preview__frame {
  position: relative;
  width: 100%;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0A0705;
  display: grid;
  place-items: center;
}
.preview__frame[data-ratio="9:16"] { aspect-ratio: 9 / 16; max-width: 268px; margin: 0 auto; }
.preview__frame[data-ratio="16:9"] { aspect-ratio: 16 / 9; }
.preview__frame[data-ratio="1:1"]  { aspect-ratio: 1 / 1; max-width: 400px; margin: 0 auto; }
/* 生图预览：比例与限高由 imageFrameStyle() 就地算成内联样式（见 pages.studio.js），
   这里只兜底置中，不重复声明 aspect-ratio —— 两处都写会以内联为准，改这边等于没改。 */
.preview__frame--img { align-self: start; }

.preview__empty {
  padding: 32px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.9;
}
.preview__empty svg { margin: 0 auto 14px; opacity: .35; }

/* 生图结果墙（2026-10-29 第十四版）
 * 结果张数 1–6，必须是网格而不是单张大图：出 6 张时用一张铺满，
 * 其余 5 张要么被裁掉、要么把预览框撑到看不见底。
 * `auto-fit + minmax(0,1fr)` 让 1 张时铺满、2 张时两列、3 张以上三列，
 * 不写死列数 —— 写死 2 列的话单张结果会缩成半个框。 */
.imgres {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  padding: 6px;
}
.imgres--fill { align-content: center; }
.imgres__item {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255,238,224,.04);
  border: 1px solid var(--line);
  transition: border-color .18s;
}
.imgres__item:hover { border-color: var(--accent-line); }
.imgres__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 结果墙在竖屏框里（aspect-ratio 3/4）会被拉到很高，限高防溢出 */
.preview__frame .imgres { max-height: 100%; }

/* 槽位标题右侧的「从素材库选」文字按钮 */
.linkbtn {
  margin-left: 8px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 400;
  cursor: pointer;
  transition: opacity .18s;
}
.linkbtn:hover { opacity: .78; text-decoration: underline; }

/* 槽位里「来自素材库」的角标：压在缩略图左上角，不挡 × 也不挡名字 */
.upload__tag {
  position: absolute;
  top: 4px; left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(8,5,3,.78);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 9.5px;
  line-height: 1.6;
  pointer-events: none;
}

/* 生图完成提示：结果已在服务端入库，这里只给一句确认 + 去资源库的入口 */
.imgnote {
  margin-bottom: 10px;
  padding: 9px 12px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-sm);
  background: var(--accent-soft);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.7;
}
.imgnote a { color: var(--accent); text-decoration: none; margin-left: 4px; }
.imgnote a:hover { text-decoration: underline; }

/* 素材库多选弹层 */
.libpick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-height: 46vh;
  overflow-y: auto;
  margin-bottom: 20px;
  padding-right: 2px;
}
.libpick__item {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(255,238,224,.04);
  cursor: pointer;
  transition: border-color .18s, box-shadow .18s;
}
.libpick__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 任务来源的素材：字节归任务管，删任务素材会让这张失效 —— 打个标让用户知道 */
.libpick__tag {
  position: absolute;
  left: 3px; bottom: 3px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(10, 6, 4, .78);
  color: var(--text-3);
  font-size: 9px;
  line-height: 1.7;
  pointer-events: none;
}
.libpick__item:hover { border-color: var(--line-strong); }
/* 选中态必须有明确的勾，只靠描边颜色在缩略图上看不出来 */
.libpick__item.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}
.libpick__item.is-on::after {
  content: "✓";
  position: absolute;
  top: 4px; right: 4px;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #1A0E05;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

/* 预览内的合成层 */
.pvenv {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.04);
}
.pvgrad {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,5,3,.30) 0%, transparent 30%, rgba(8,5,3,.88) 100%);
}
.pvcreator {
  position: absolute;
  right: 12px; bottom: 96px;
  width: 78px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(251,238,224,.22);
  box-shadow: 0 10px 26px -10px rgba(0,0,0,.8);
}
.pvcreator img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.pvtext {
  position: absolute;
  left: 14px; right: 14px; bottom: 16px;
}
.pvtext__shop {
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}
.pvtext__line {
  margin-top: 5px;
  font-size: 11.5px;
  color: rgba(251,238,224,.86);
  line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0,0,0,.9);
}
.pvtext__dur {
  position: absolute;
  right: 0; top: -22px;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(8,5,3,.62);
  border: 1px solid rgba(251,238,224,.18);
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.preview__thumbs {
  margin-top: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preview__thumb {
  width: 52px; height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  position: relative;
}
.preview__thumb img { width: 100%; height: 100%; object-fit: cover; }
.preview__thumb-more {
  width: 52px; height: 52px;
  border-radius: 10px;
  border: 1px dashed var(--line-strong);
  display: grid; place-items: center;
  font-size: 11px;
  color: var(--text-3);
}

/* 右：参数面板 */
.panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pcard {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  padding: 20px;
}
.pcard__head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
}
.pcard__step {
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pcard__title { font-size: 14px; font-weight: 600; }
.pcard__hint { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

/* 表单 */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field__label {
  display: block;
  font-size: 12.5px;
  color: var(--text-2);
  margin-bottom: 7px;
}
.field__label i { font-style: normal; color: var(--accent); margin-left: 3px; }

/* ── 时长滑块（15–120 秒、5 秒一档） ──
   填充进度用 --fill 变量（由 JS 写入百分比）：伪元素 ::-webkit-slider-runnable-track
   拿不到元素的计算宽度，只能靠外部喂一个百分比。 */
.field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.field__value {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 7px;
}
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 20px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
.range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) var(--fill, 0%),
    rgba(251, 238, 224, 0.14) var(--fill, 0%)
  );
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  margin-top: -5.5px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1A120C;
  box-shadow: 0 0 0 4px rgba(255, 138, 76, 0.16);
  transition: box-shadow .18s, transform .18s;
}
.range:hover::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(255, 138, 76, 0.22); }
.range:active::-webkit-slider-thumb { transform: scale(1.08); }
.range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 7px rgba(255, 138, 76, 0.30); }
.range::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: rgba(251, 238, 224, 0.14);
}
.range::-moz-range-progress {
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
}
.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #1A120C;
}
.range__scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
}

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: rgba(10,7,5,.55);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(255,138,76,.08);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { resize: vertical; min-height: 82px; line-height: 1.7; }
.select { appearance: none; cursor: pointer; }

/* 上传区 */
.upload {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.upload__add {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.upload__add:hover { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.upload__add span { font-size: 11px; }
.upload__item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
}
.upload__item img { width: 100%; height: 100%; object-fit: cover; }
.upload__rm {
  position: absolute;
  top: 3px; right: 3px;
  width: 19px; height: 19px;
  display: grid; place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(8,5,3,.78);
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .18s;
}
.upload__item:hover .upload__rm { opacity: 1; }
.upload__name {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 12px 4px 3px;
  font-size: 9.5px;
  text-align: center;
  color: rgba(251,238,224,.9);
  background: linear-gradient(transparent, rgba(8,5,3,.9));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 单文件槽位（声纹 / 参考原片，2026-10-27 第九版）
 *
 * 这两类不是缩略图网格里的格子，而是「一行文件名 + 一个播放器」：
 * ① 音频和视频都没有能当缩略图的画面，套 aspect-ratio:1 只会留一个大空框；
 * ② 用户必须**当场能放一遍** —— 传错了在这里发现，比在成片里发现便宜得多。
 * 所以这里把 .upload__item 从方块改回 flex 行，并让 × 常驻可见（没有图就无法 hover 定位）。 */
.upload__add--wide {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  min-height: 54px;
  padding: 12px;
  border-radius: var(--r-sm);
}
.upload__item--audio,
.upload__item--video {
  aspect-ratio: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 32px 9px 11px;
  background: rgba(255,255,255,.03);
}
.upload__item--audio .upload__name,
.upload__item--video .upload__name {
  position: static;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 11.5px;
  text-align: left;
  color: var(--text-2);
  background: none;
}
.upload__item--audio .upload__rm,
.upload__item--video .upload__rm { opacity: 1; }
.voice-preview,
.ref-preview {
  display: block;
  width: 100%;
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: rgba(8,5,3,.5);
}
.voice-preview { height: 34px; }
.ref-preview { max-height: 260px; aspect-ratio: 16 / 9; object-fit: contain; }

/* 达人选择 */
.creators { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.creator {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  transition: border-color .2s, transform .2s;
}
.creator:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.creator.is-active { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,138,76,.18); }
.creator img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
/* 无正脸小图时的占位（GET /api/creators 的 face 为空）：只显示名字首字。
   尺寸/圆角刻意与 img 一致，否则整行卡片高度会跳一下。 */
.creator__mono {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 3/4;
  font-size: 20px;
  color: var(--text-3);
  background: var(--bg-card);
}
.creator__name {
  display: block;
  font-size: 10.5px;
  color: var(--text-2);
  padding: 4px 2px 5px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.creator.is-active .creator__name { color: var(--accent); }

/* 分段选择（时长 / 画质 / 画幅） */
.segs { display: flex; gap: 6px; flex-wrap: wrap; }
.seg {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: all .18s;
}
.seg:hover { color: var(--text); border-color: var(--line-strong); background: var(--bg-card-hover); }
.seg.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
  font-weight: 500;
}
/* 画质锁定态（2026-10-27 第七版）：套餐不允许的画质。
   刻意**不加 disabled** —— 要保住点击事件去弹「升级后可出 1080P」，
   disabled 的按钮在浏览器里根本不触发 click，用户点了没反应只会以为页面坏了。 */
.seg.is-locked {
  opacity: .42;
  border-style: dashed;
  cursor: not-allowed;
}
.seg.is-locked:hover {
  color: var(--text-2);
  border-color: var(--line-strong);
  background: transparent;
}
.field__hint {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}

/* 开关 */
.switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.switch-row__label { font-size: 13px; }
.switch-row__desc { font-size: 11.5px; color: var(--text-3); }
.switch {
  margin-left: auto;
  position: relative;
  width: 40px; height: 22px;
  flex-shrink: 0;
}
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch__track {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(251,238,224,.12);
  border: 1px solid var(--line-strong);
  transition: background .22s, border-color .22s;
  pointer-events: none;
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform .22s var(--ease), background .22s;
}
.switch input:checked + .switch__track { background: var(--accent-soft); border-color: var(--accent-line); }
.switch input:checked + .switch__track::after { transform: translateX(18px); background: var(--accent); }

/* 成本明细 */
.cost {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 16px;
  background: rgba(10,7,5,.4);
  font-size: 12.5px;
}
.cost__row { display: flex; justify-content: space-between; padding: 4px 0; color: var(--text-2); }
.cost__row b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.cost__row--total {
  margin-top: 8px;
  padding-top: 11px;
  border-top: 1px solid var(--line);
  color: var(--text);
}
.cost__row--total b { color: var(--accent); font-size: 16px; }

.panel__submit { margin-top: 4px; }

/* 任务结果 */
.result {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background: linear-gradient(180deg, rgba(255,138,76,.10), rgba(255,138,76,.02));
}
.result__icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.result__title { font-size: 13.5px; font-weight: 600; }
.result__meta { font-size: 11.5px; color: var(--text-2); margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ══════════════ Toast / Sheet ══════════════ */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 34px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 11px 20px;
  border-radius: 999px;
  background: rgba(28, 19, 13, 0.94);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 16px 40px -16px rgba(0,0,0,.9);
  animation: toastIn .26s var(--ease);
}
.toast--out { animation: toastOut .22s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* 路由模块按需加载时的占位（app.js 的 ensureRoute）。
   只在首次进创作台/资源库时闪一下，要求：不改变布局高度、不比页面本身更抢眼。 */
.route-loading {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-3);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.route-loading__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  animation: routeDot 1.1s var(--ease) infinite;
}
@keyframes routeDot {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .route-loading__dot { animation: none; opacity: 0.7; }
}

.sheet-host {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 5, 3, 0.66);
  backdrop-filter: blur(6px);
}
.sheet {
  width: 100%;
  max-width: 460px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, #1C130D, #120C08);
  padding: 26px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.9);
  animation: sheetIn .26s var(--ease);
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.sheet h3 { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.sheet p { font-size: 13.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 20px; }
.sheet__actions { display: flex; gap: 10px; }
.sheet__actions .btn { flex: 1; }
/* 宽版弹层（形象库：卡片列表 + 上传表单要并排）*/
.sheet--wide { max-width: 720px; }

/* ── 形象库（我的形象，2026-10-27 第十版） ──
 * 卡片是「图 + 名称 + 两个动作」的横条，不是缩略图墙：
 * 用户在这里做的判断是「这张脸像不像我要出镜的人」，横向排布能同时看到
 * 更多张，而竖排每行只能放三张、要滑两次才看完。
 */
/* 弹层壳（第十二版）：**不能复用 .sheet--wide**。
 * 那个壳是给分镜确认窗的，padding:0 是因为内边距由 .sbsheet__head/list/foot 各自管；
 * 形象库没有那三层，直接套上去的实测结果是 .sheet / h3 / .avshelf 的 padding **全是 0px** ——
 * 标题贴着左边框，长句顶到边框外被 overflow:hidden 裁掉，
 * 而内容一超过 88vh，底部的「保存形象」因为没有任何滚动容器，**根本滚不到**（是够不到，不是不好看）。
 * 所以这里自带内边距，并把滚动交给 .avshelf。 */
.sheet--lib {
  max-width: 780px;
  max-height: 88vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sheet--lib > h3 { flex: 0 0 auto; padding: 22px 28px 0; margin-bottom: 14px; }
.sheet--lib .avshelf {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 28px 22px;
}
.avshelf__list { display: flex; flex-direction: column; gap: 8px; max-height: 42vh; overflow-y: auto; margin-bottom: 14px; }
.avshelf__empty { font-size: 12.5px; color: var(--text-3); padding: 24px 0; text-align: center; }
.avshelf__notice {
  font-size: 12.5px; line-height: 1.9; color: var(--text-2);
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-sm); padding: 11px 13px; margin-bottom: 14px;
  background: var(--accent-soft);
}
.avcard {
  display: flex; align-items: center; gap: 11px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 11px 8px 8px;
  transition: border-color .18s;
}
.avcard.is-active { border-color: var(--accent); }
.avcard__pic { width: 46px; height: 58px; flex: 0 0 auto; border-radius: 6px; overflow: hidden; background: rgba(255,255,255,.04); display: grid; place-items: center; }
.avcard__pic img { width: 100%; height: 100%; object-fit: cover; }
.avcard__ph { font-size: 10px; color: var(--text-3); }
.avcard__body { flex: 1 1 auto; min-width: 0; }
.avcard__name { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avcard__meta { font-size: 11px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avcard__acts { display: flex; gap: 6px; flex: 0 0 auto; }
.avshelf__form {
  border-top: 1px solid var(--line); padding-top: 16px;
  display: flex; flex-direction: column; gap: 14px;
}
/* 主按钮在 780px 的壳里按内容宽度只有 99px，看起来像个次要动作；
   给它一个下限，和弹层里其它主按钮的分量对齐。 */
.avshelf__form > .btn { align-self: flex-start; min-width: 168px; }
/* 创作台里的「我的形象」分区标题 + 两个特殊格子 */
.creators__label { font-size: 11px; color: var(--text-3); margin: 10px 0 6px; letter-spacing: .04em; }
.creator--mine img { object-fit: cover; }
.creator--lib { border-style: dashed; }
.creator--lib:hover { border-color: var(--accent-line); }

/* ── 账号：登录 / 注册 / 我的 ── */
.auth__tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.auth__tab {
  flex: 1;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.auth__tab:hover { color: var(--text); background: var(--bg-card); }
.auth__tab.is-active {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent);
  font-weight: 600;
}
.auth__err {
  font-size: 12.5px;
  color: #FF9E8C;
  background: rgba(255, 90, 70, 0.10);
  border: 1px solid rgba(255, 90, 70, 0.28);
  border-radius: var(--r-sm);
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.6;
}
/* 覆盖 .sheet p 的默认 20px 下边距（提示语在按钮下方，不该再顶开一块） */
.sheet .auth__hint {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
  margin: 14px 0 0;
}
.acct { display: grid; gap: 0; margin-bottom: 18px; }
.acct__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}
.acct__row:last-child { border-bottom: 0; }
.acct__row span { color: var(--text-3); }
.acct__row b { color: var(--text); font-weight: 600; }
/* 可点的行（2026-10-27 第十一版）：形象库入口。
   复用 .acct__row 的排版，只把 button 的默认外观清掉 ——
   不清会出现灰底圆角块 + 系统字体 + 悬停变色的浏览器默认样式。 */
.acct__row--act {
  width: 100%;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.acct__row--act:hover span { color: var(--text); }
/* 未订阅的那一档要能一眼看出「这里要花钱」，用金色与展示行区分开。
   选择器带上 .acct__row 是因为 `.acct__row b` 的权重更高，压不住它。 */
.acct__row b.acct__go--up { color: var(--gold); }
.btn--block { width: 100%; }
.auth-btn { max-width: 148px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-btn.is-on { color: var(--gold); }

/* ══════════════ 页脚 ══════════════ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  padding: 54px 0 26px;
  margin-top: 60px;
  background: rgba(10, 7, 5, 0.6);
}
.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  gap: 60px;
  justify-content: space-between;
  flex-wrap: wrap;
}
.site-footer__brand { display: flex; gap: 12px; align-items: flex-start; }
.site-footer__brand img { border-radius: 8px; margin-top: 2px; }
.site-footer__name { font-size: 15px; font-weight: 600; letter-spacing: .06em; }
.site-footer__slogan { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.site-footer__cols { display: flex; gap: 72px; }
.site-footer__col { display: flex; flex-direction: column; gap: 9px; }
.site-footer__col h4 {
  font-size: 11.5px;
  letter-spacing: .12em;
  color: var(--text-3);
  font-weight: 400;
  margin-bottom: 3px;
}
.site-footer__col a { font-size: 13px; color: var(--text-2); transition: color .18s; }
.site-footer__col a:hover { color: var(--text); }
.site-footer__bar {
  max-width: var(--max);
  margin: 40px auto 0;
  padding: 20px var(--gutter) 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-3);
}

/* ══════════════ 入场动画 ══════════════ */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .68s var(--ease), transform .68s var(--ease);
}
.reveal.is-in { opacity: 1; transform: none; }

/* ── 「分镜与台词」确认窗 + 生成进度条（2026-10-27 第八版） ──
   确认窗是产品里第一个「一屏两列含义」的弹层：左边是分镜（只读），
   右边是台词（可改）。所以它不能沿用 .sheet 的 460px 窄卡 ——
   窄到那个程度，一句 20 字的台词会折成四行，用户根本对不上是哪个镜头。 */

.sheet--wide {
  max-width: 720px;
  max-height: 88vh;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sbsheet { display: flex; flex-direction: column; min-height: 0; }
.sbsheet__head { padding: 22px 24px 10px; }
.sbsheet__head h3 { margin-bottom: 6px; }
.sbsheet__sub {
  font-size: 12.5px; line-height: 1.7; color: var(--text-2); margin: 0 0 8px;
}
.sbsheet__sub b { color: var(--accent); font-weight: 600; }
.sbsheet__meta { font-size: 11.5px; color: var(--text-3); }
.sbsheet__list {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 24px 10px;
}
.sbsheet__foot {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--line);
  background: rgba(255, 238, 224, 0.025);
}
.sbsheet__sum { font-size: 12px; color: var(--text-2); margin-bottom: 10px; text-align: center; }
.sbsheet__sum .is-bad { color: #FF6B5A; }
.sbsheet__sum .is-ok { color: #4FD1A5; }
.sbsheet__tip {
  margin-top: 8px; text-align: center; font-size: 11px; color: var(--text-3); line-height: 1.6;
}

.shot {
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 11px 12px;
  margin-bottom: 9px;
  background: rgba(255, 238, 224, 0.028);
}
.shot__head { display: flex; align-items: baseline; gap: 8px; }
.shot__no {
  flex: 0 0 auto; font-size: 10.5px; font-variant-numeric: tabular-nums;
  color: var(--accent); border: 1px solid var(--accent-line);
  border-radius: 5px; padding: 1px 5px; line-height: 1.5;
}
.shot__scene { flex: 1; font-size: 12.5px; color: var(--text); line-height: 1.6; }
.shot__meta {
  flex: 0 0 auto; font-size: 11px; color: var(--text-3);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.shot__line { margin-top: 9px; }
.shot__input {
  width: 100%; resize: vertical; min-height: 46px;
  border: 1px solid var(--line-strong); border-radius: 8px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text); font: inherit; font-size: 13px; line-height: 1.7;
  padding: 8px 10px;
}
.shot__input:focus {
  outline: none; border-color: var(--accent-line);
  box-shadow: 0 0 0 3px rgba(255, 138, 76, 0.12);
}
/* 一行读完：字数 · 秒数 · 语速 · 结论。
   结论靠右（margin-left:auto），不独占一行 —— 独占会让每张镜头卡多出 16px 高度，
   十来个镜头就要多滚一屏。窄屏放不下时它自然折到下一行，仍然可读。 */
.shot__rate {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 10px;
  margin-top: 6px; font-size: 11px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.shot__rate .shot__say { margin-left: auto; text-align: right; min-width: 0; }
.shot__rate.is-ok .shot__val { color: #4FD1A5; }
.shot__rate.is-ok .shot__say { color: rgba(79, 209, 165, .82); }
.shot__rate.is-bad .shot__val { color: #FF6B5A; font-weight: 600; }
.shot__rate.is-bad .shot__say { color: #FF6B5A; font-weight: 500; }
.shot__rate.is-unk .shot__val { color: var(--text-3); }
.shot__none, .shot__cont {
  margin-top: 7px; font-size: 11px; color: var(--text-3); font-style: normal;
}
.shot__none { opacity: .72; }
/* 成片播放弹层（2026-10-28）
 *
 * ★ 为什么必须给视频单独定高度上限（而不是 width:100% 就完事）：
 *   成片是**竖屏 480×854**。写 width:100% 时它在 720px 宽的弹层里会被拉到
 *   668px 宽 → 按比例高 1188px，整个 .sheet 比视口高出一倍。而 .sheet-host 是
 *   `place-items:center` 且**没有滚动容器** —— 于是弹层上下各被切掉三百多像素，
 *   底部的「关闭」按钮**根本不在视口内**（用户报的现象：播放窗没有关闭按钮）。
 *   约束方式必须同时限 max-width 与 max-height：只限宽，竖屏仍然会顶穿；
 *   只限高，横屏会左右溢出。
 *
 * ★ 另外两个关闭出口（只留底部一个不够）：
 *   右上角 × 与「点遮罩」—— 后者由 openVideo 里 host.onclick 兜住。
 */
.sheet--video {
  position: relative;
  /* 宽度跟着视频走：竖屏成片只有 300 多像素宽，写死 max-width:560 会在两侧
     留出两条空黑边（实测截图里视频 170px、弹层 560px）。auto + min-width 保证
     窄屏也不会被压成一条线。 */
  width: auto;
  min-width: 300px;
  max-width: min(520px, calc(100vw - 32px));
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 18px;
}
/* 标题过长时省略，而不是把整个弹层撑宽（撑宽之后视频两侧又出现空边） */
.sheet--video > h3 {
  flex: 0 0 auto; padding-right: 36px; margin-bottom: 10px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sheet--video .sheet__media {
  flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.sheet--video .sheet__actions { flex: 0 0 auto; }
.sb__video {
  max-width: 100%; max-height: 68vh; width: auto; height: auto;
  border-radius: var(--r-sm); background: #000; display: block;
}
.sheet__x {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 28px; height: 28px; border-radius: 7px; line-height: 1;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .28);
  color: var(--text-3); cursor: pointer; font-size: 13px;
}
.sheet__x:hover { color: var(--text-1); border-color: var(--line-strong); }

/* 底部进度条：关掉确认窗之后，用户还得知道「到底有没有在跑」。
   固定在右下角，不参与 #view 重绘（否则一切页就没了）。 */
.watch {
  position: fixed; right: 20px; bottom: 20px; z-index: 170;
  width: 302px; max-width: calc(100vw - 32px);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  background: linear-gradient(180deg, #1F150E, #150E09);
  box-shadow: 0 18px 44px -20px rgba(0, 0, 0, .92);
  padding: 13px 14px 12px;
  animation: sheetIn .26s var(--ease);
}
.watch__head { display: flex; align-items: center; gap: 7px; }
.watch__dot {
  width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(255, 138, 76, .16);
  animation: watchPulse 1.6s ease-in-out infinite;
}
@keyframes watchPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.watch__title { flex: 1; font-size: 12.5px; font-weight: 600; }
.watch__x {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 5px; line-height: 1;
  border: 1px solid var(--line); background: transparent; color: var(--text-3);
  cursor: pointer; font-size: 13px;
}
.watch__x:hover { color: var(--text-2); border-color: var(--line-strong); }
.watch__msg {
  margin-top: 5px; font-size: 11.5px; color: var(--text-3); line-height: 1.6;
  min-height: 18px;
}
.watch__bar {
  margin-top: 8px; height: 3px; border-radius: 2px; overflow: hidden;
  background: rgba(251, 238, 224, 0.10);
}
.watch__bar i {
  display: block; height: 100%; background: var(--accent);
  transition: width .5s var(--ease);
}
.watch__bar.is-indet i {
  width: 34% !important;
  animation: watchIndet 1.5s ease-in-out infinite;
}
@keyframes watchIndet { 0% { margin-left: -34%; } 100% { margin-left: 100%; } }
.watch__acts { display: flex; gap: 8px; margin-top: 10px; }
.watch__acts .btn { flex: 1; height: 32px; font-size: 12px; padding: 0 10px; }
.watch.is-min .watch__msg,
.watch.is-min .watch__bar,
.watch.is-min .watch__acts { display: none; }
.watch.is-done .watch__dot { background: #4FD1A5; box-shadow: 0 0 0 3px rgba(79, 209, 165, .16); animation: none; }
.watch.is-done .watch__bar i { background: #4FD1A5; }
.watch.is-fail .watch__dot { background: #FF6B5A; box-shadow: 0 0 0 3px rgba(255, 107, 90, .16); animation: none; }
.watch.is-fail .watch__bar i { background: #FF6B5A; }

@media (max-width: 720px) {
  .sheet--wide { max-width: 100%; max-height: 92vh; }
  .sheet--lib { max-width: 100%; max-height: 92vh; }
  /* 手机竖向：视频占 56vh，按钮区永远留在视口内 */
  .sheet--video { max-width: 100%; padding: 16px 14px 14px; }
  .sheet--video .sb__video { max-height: 56vh; }
  .sheet--lib > h3 { padding: 18px 16px 0; }
  .sheet--lib .avshelf { padding: 0 16px 18px; }
  .sbsheet__head, .sbsheet__list, .sbsheet__foot { padding-left: 15px; padding-right: 15px; }
  .watch { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__orb { animation: none; }
  html { scroll-behavior: auto; }
}

/* ══════════════ 资源库（2026-10-28 第十二版） ══════════════
 *
 * 三条约束写在这里，因为它们是「看起来能跑、实际不能用」的那类错误：
 *  ① 卡片是三段式（封面 / 信息 / 动作），动作永远在**卡片最下方** ——
 *    用户报「只有播放下载窗、刷新后什么都没有」，他真正要的是「一条任务的
 *    全部信息 + 下方两个按钮」这个固定结构，而不是把按钮藏进二级弹层。
 *  ② 素材缩略图必须是 `object-fit: cover` 且有固定宽高比：竖屏成片封面是
 *    480×854，不裁切会把列表撑成一行一根竖条。
 *  ③ 任务详情弹层自带滚动层（.dtl__scroll），底部按钮不跟着滚走。
 */
.lib {
  padding: 22px 0 72px;
  min-height: calc(100vh - var(--header-h));
}
.lib__bar {
  display: flex;
  align-items: flex-end;
  gap: 18px;
  padding: 6px 0 18px;
  border-bottom: 1px solid var(--line);
}
.lib__title { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: .01em; }
.lib__sub { margin: 6px 0 0; font-size: 12.5px; color: var(--text-3); }
.lib__bar-spacer { margin-left: auto; }

.lib__tabs { display: flex; gap: 8px; margin: 18px 0 20px; flex-wrap: wrap; }
.lib__tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: color .18s, border-color .18s, background .18s;
}
.lib__tab:hover { color: var(--text); border-color: var(--line-strong); }
.lib__tab.is-active {
  color: #1A1208;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.lib__num {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .22);
}
.lib__tab:not(.is-active) .lib__num { background: var(--bg-card); color: var(--text-3); }

.lib__body { min-height: 220px; }
.lib__grid { display: grid; gap: 16px; }
.lib__grid--task { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.lib__grid--asset { grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); }

.lib__tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.lib__tools .btn { margin-left: auto; }
.lib__hint { font-size: 12.5px; color: var(--text-3); }

.lib__notice {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r-md);
  background: var(--accent-soft);
  font-size: 13px;
  color: var(--text-2);
}
.lib__notice .btn { margin-left: auto; flex: 0 0 auto; }

.lib__empty {
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  background: rgba(255, 238, 224, .02);
}
.lib__empty-title { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.lib__empty-desc {
  margin: 0 auto 20px;
  max-width: 460px;
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-3);
}

/* ── 任务卡 ── */
.tcard {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
.tcard:hover { border-color: var(--line-strong); background: var(--bg-card-hover); }
.tcard__cover {
  position: relative;
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background: linear-gradient(155deg, rgba(255, 238, 224, .07), rgba(0, 0, 0, .55));
  overflow: hidden;
}
.tcard__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard__ph { font-size: 12px; letter-spacing: .1em; color: var(--text-3); }
.tcard__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  color: var(--text-2);
  background: rgba(10, 6, 4, .74);
  border: 1px solid rgba(251, 238, 224, .18);
  backdrop-filter: blur(4px);
}
.tcard__badge.is-done { color: #9BE7B4; border-color: rgba(155, 231, 180, .34); }
.tcard__badge.is-fail { color: #FF9E8A; border-color: rgba(255, 158, 138, .34); }
.tcard__badge.is-wait { color: var(--gold); border-color: rgba(224, 185, 138, .34); }
.tcard__badge.is-run { color: var(--accent); border-color: var(--accent-line); }
.tcard__badge.is-idle { color: var(--text-3); }

.tcard__main { padding: 14px 16px 10px; display: flex; flex-direction: column; gap: 6px; }
.tcard__title { margin: 0; font-size: 14.5px; font-weight: 600; line-height: 1.45; }
.tcard__meta { font-size: 12px; color: var(--text-3); }
.tcard__copy {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tcard__err { margin: 0; font-size: 12px; color: #FF9E8A; }
.tcard__foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-3);
  padding-top: 4px;
}
.tcard__acts {
  display: flex;
  gap: 8px;
  padding: 10px 16px 16px;
  margin-top: auto;
}
.tcard__acts .btn { flex: 1; }
.tcard__acts .btn--ghost { flex: 0 0 auto; }

.tcard.is-skeleton { pointer-events: none; }
.tcard.is-skeleton .tcard__cover { aspect-ratio: 16 / 10; background: rgba(255, 238, 224, .04); }
.tcard.is-skeleton i {
  display: block;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 238, 224, .07);
  margin-bottom: 8px;
}

/* ── 素材 / 形象卡 ── */
.acard {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, background .2s;
}
.acard:hover { border-color: var(--line-strong); background: var(--bg-card-hover); }
.acard__pic {
  position: relative;
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, .42);
  overflow: hidden;
}
.acard__pic--tall { aspect-ratio: 3 / 4; }
.acard__pic img,
.acard__thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 视频角标挪到左下角：以前它占着画面正中，是因为卡片根本没有缩略图；
   现在有真帧了，标签只做提示，不该盖住内容。 */
.acard__kind {
  position: absolute;
  left: 8px;
  bottom: 8px;
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--text);
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(4px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 2px 8px;
}
.acard__cap { padding: 10px 12px 4px; display: flex; flex-direction: column; gap: 3px; }
.acard__name {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 单行截断：这行是「类型 · 大小 · 日期」，一旦折成两行，同一排卡片的
   按钮就高低不齐（178px 栏宽下 100% 会折），对齐问题不该由内容长度决定。 */
.acard__meta {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.acard__acts {
  display: flex;
  gap: 6px;
  padding: 8px 12px 12px;
  margin-top: auto;
  align-items: center;
}
.acard__acts .btn { flex: 1; }
.acard__from { font-size: 11px; color: var(--text-3); margin-left: auto; }

/* ── 任务详情弹层 ── */
.sheet--detail {
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.sheet--detail .dtl {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
}
.dtl__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.dtl__title { font-size: 16px; font-weight: 600; }
.dtl__badge { position: static; }
.dtl__err { margin: 0 0 12px; font-size: 12.5px; color: #FF9E8A; }
.dtl__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 6px;
}
.dtl__rows { display: flex; flex-direction: column; gap: 9px; }
.dtl__row { display: grid; grid-template-columns: 118px 1fr; gap: 12px; font-size: 13px; }
.dtl__k { color: var(--text-3); }
.dtl__v { color: var(--text-2); word-break: break-word; white-space: pre-wrap; }
.dtl__sec { margin: 18px 0 10px; font-size: 12.5px; color: var(--text-3); letter-spacing: .06em; }
.dtl__assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.dtl__asset { margin: 0; }
.dtl__asset-pic {
  aspect-ratio: 1 / 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, .4);
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--text-3);
}
.dtl__asset-pic img { width: 100%; height: 100%; object-fit: cover; }
.dtl__asset figcaption {
  margin-top: 5px;
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dtl__none { font-size: 12.5px; color: var(--text-3); }
.dtl__meta { font-size: 12px; color: var(--text-3); margin: 12px 0 18px; }
.sheet--detail .sheet__actions { flex: 0 0 auto; margin-top: 16px; }

/* ── 素材预览弹层 ── */
.sheet--preview { max-width: 620px; max-height: 88vh; display: flex; flex-direction: column; }
.sheet--preview .sheet__img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  border-radius: var(--r-md);
  background: #0A0705;
}
.sheet--preview .sheet__video {
  width: 100%;
  max-height: 62vh;
  border-radius: var(--r-md);
  background: #0A0705;
}

/* ── 图片任务（2026-10-29 第十四版） ──
 * 一次可能出 1–6 张，卡片封面只放第一张，右上角挂「+N」告诉用户还有几张 ——
 * 否则 6 张的任务和 1 张的任务在列表里长得一模一样。 */
.tcard__more {
  position: absolute;
  top: 10px;
  right: 10px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: rgba(10, 6, 4, .74);
  border: 1px solid rgba(251, 238, 224, .18);
  backdrop-filter: blur(4px);
}

/* 创作信息里的生成结果缩略图 */
.dtl__imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}
.dtl__img {
  display: block;
  aspect-ratio: 1;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, .4);
}
.dtl__img:hover { border-color: var(--accent-line); }
.dtl__img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ── 图片结果弹层 ──
 * 与「素材预览」的关键差别：这里是**多张**。所以必须有滚动层
 * （flex:1;min-height:0;overflow-y:auto），否则 6 张竖图会把弹层顶出屏幕，
 * 底部「关闭」按钮够不到 —— 竖屏成片那个坑（播放窗没有关闭按钮）的同类。 */
.sheet--imgs {
  width: 100%;
  max-width: 680px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
}
.imgview-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding-right: 4px;
  margin-bottom: 16px;
}
.imgview { margin: 0; }
.imgview__pic {
  display: block;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0A0705;
}
.imgview__pic img {
  width: 100%;
  height: auto;
  max-height: 46vh;
  object-fit: contain;
  display: block;
}
.imgview__cap {
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-3);
}
.imgview__cap > span {
  flex: 1 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* 这里刻意没有 .imgview__dl：下载入口只留在卡片上（与视频卡一致）。
   两个入口并存会让人以为「弹层里下的是高清、卡片上下的不是」，
   而它们本来就是同一份原图。 */
.sheet--imgs .sheet__actions { flex: 0 0 auto; }

/* 骨架/占位动画统一走 opacity，不引额外 keyframes 依赖 */
@media (prefers-reduced-motion: reduce) {
  .tcard.is-skeleton i { animation: none; }
}

/* ══════════════ 响应式 ══════════════ */
@media (max-width: 1180px) {
  .abilities { grid-template-columns: repeat(2, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
  .plans--4 { grid-template-columns: repeat(2, 1fr); }
  .studio__grid { grid-template-columns: 1fr 400px; }
}

@media (max-width: 1024px) {
  :root { --gutter: 24px; }
  .site-nav { display: none; }
  .brand__tag { display: none; }
  .section { padding: 92px 0; }
  .browser { grid-template-columns: 1fr; }
  .browser__scroll { max-height: 300px; }
  .work { grid-template-columns: 220px minmax(0, 1fr); gap: 22px; }
  .work__title { font-size: 22px; }
  .flow { grid-template-columns: repeat(2, 1fr); }
  .flow__item::after { display: none; }
  .studio__grid { grid-template-columns: 1fr; }
  .preview { position: static; }
  .hero__grid { grid-template-columns: 1fr; gap: 44px; }
  .hero__visual { min-height: 400px; order: -1; }
  .hero__phone { width: 236px; }
  .hero__float--a { left: 0; }
  .hero__float--b { right: 0; }
}

@media (max-width: 720px) {
  :root { --gutter: 18px; }
  body { font-size: 14px; }
  .section { padding: 68px 0; }
  .section-head { margin-bottom: 36px; }
  .hero { padding: 48px 0 64px; min-height: auto; }
  .hero__composer { flex-wrap: wrap; border-radius: var(--r-md); padding: 12px; }
  .hero__divider { display: none; }
  .hero__mode { flex: 1 0 100%; padding: 0 20px 10px 0; }
  .hero__input { flex: 1 0 100%; height: 36px; }
  .hero__composer .btn { width: 100%; }
  .hero__stats { gap: 26px; flex-wrap: wrap; margin-top: 40px; }
  .hero__stat-num { font-size: 21px; }
  .work { grid-template-columns: 1fr; gap: 18px; }
  .work__title { font-size: 20px; }
  .work__desc { font-size: 13.5px; }
  .work__facts { margin-top: 16px; gap: 8px 22px; }
  .abilities { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .flow { grid-template-columns: 1fr; }
  .creators { grid-template-columns: repeat(4, 1fr); }
  .studio__bar { flex-wrap: wrap; gap: 10px; }
  .site-footer__inner { gap: 32px; }
  .site-footer__cols { gap: 40px; }

  /* 页头（2026-10-28 第十二版）：390px 下原来会把「开始创作」挤出屏幕右侧、
     「积分」两字折成两行。导航在 1024 就整条隐掉了，这里只剩品牌 + 三个操作，
     还差 ~20px —— 省在「积分」这两个字和间距上，品牌名保留。
     手机端的资源库入口不在这里（塞不下），放在创作台顶栏的「我的作品」。 */
  .site-header__inner { gap: 8px; }
  .pill__unit { display: none; }
  .pill { white-space: nowrap; }
  .auth-btn { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

/* ══════════════ 资源库 · 窄屏（2026-10-28 第十二版） ══════════════ */
@media (max-width: 1024px) {
  .lib__grid--task { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
}
@media (max-width: 720px) {
  .lib { padding: 16px 0 56px; }
  .lib__bar { flex-wrap: wrap; align-items: flex-start; }
  .lib__bar .btn { width: 100%; }
  .lib__title { font-size: 20px; }
  .lib__grid--task { grid-template-columns: 1fr; }
  .lib__grid--asset { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .lib__notice { flex-wrap: wrap; }
  .lib__notice .btn { width: 100%; margin-left: 0; }
  .dtl__row { grid-template-columns: 92px 1fr; gap: 10px; }
  .sheet--detail { max-height: 92vh; }
  .sheet--preview .sheet__video, .sheet--preview .sheet__img { max-height: 56vh; }
}
