:root {
  --bg: #f7f2e9;
  --bg-deep: #efe7da;
  --paper: #fffdf8;
  --paper-2: #fbf6ec;
  --ink: #2e2a24;
  --ink-soft: #4a443b;
  --muted: #6b6257;         /* 原 #7d7468 只有 4.3:1 */
  --muted-2: #75695c;
  --line: #e7ddcf;
  --line-strong: #d8cbb8;
  --sage: #71816a;
  --sage-ink: #5a6a53;      /* 正文用，5.2:1 过 AA */
  --sage-dark: #4d5d46;
  --sage-soft: #e6ebe1;
  --terra: #bd7a5b;
  --terra-ink: #9c5a3c;     /* 正文用，4.8:1 过 AA */
  --terra-soft: #f3e3da;
  --sand: #e9dac5;
  --gold: #b99a63;
  --danger: #a65440;
  --shadow-sm: 0 2px 10px rgba(72, 61, 44, .06);
  --shadow-md: 0 18px 50px rgba(72, 61, 44, .12);
  --shadow-lg: 0 30px 90px rgba(72, 61, 44, .18);
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  /* 尺寸节奏：4px 基数，新组件只用这套，旧样式逐步替换 */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --r-lg: 24px; --r-md: 16px; --r-sm: 12px;
  --touch: 44px;
  --fs-display: 44px; --fs-h1: 30px; --fs-h2: 24px; --fs-h3: 18px;
  --fs-body: 16px; --fs-small: 14px; --fs-caption: 12px;
  --radius: var(--r-lg);
  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { max-width: 100%; display: block; }
svg { width: 1.15em; height: 1.15em; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

/* ---------- topbar ---------- */
.topbar {
  position: relative; z-index: 5;
  max-width: 1180px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) calc(28px + env(safe-area-inset-right)) 8px calc(28px + env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; color: var(--sage-dark);
  background: radial-gradient(circle at 30% 25%, #fffdf8, #e9e2d4);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 0 #fff, var(--shadow-sm);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.large { width: 64px; height: 64px; margin: 0 auto 18px; }
.brand-mark.large svg { width: 38px; height: 38px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.brand-text em { font-family: var(--sans); font-style: normal; font-size: 9px; font-weight: 600; letter-spacing: .28em; color: var(--muted); margin-top: 3px; }
.topbar-actions { display: flex; gap: 2px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
/* 桌面一级导航：纯文字 tab，只有当前项带一条下划线，不再一排同权重的胶囊按钮 */
.topbar-actions .ghost-btn {
  border: 0; background: none; box-shadow: none; border-radius: 0;
  padding: 11px 12px; min-height: 44px; font-size: 14px; color: var(--ink-soft);
  position: relative;
}
.topbar-actions .ghost-btn:hover { background: none; transform: none; color: var(--sage-dark); }
.topbar-actions .ghost-btn.is-current { color: var(--sage-dark); font-weight: 600; }
.topbar-actions .ghost-btn.is-current::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 3px;
  height: 2px; border-radius: 2px; background: var(--sage-dark);
}
.ghost-btn {
  border: 1px solid var(--line); background: rgba(255,253,248,.6); color: var(--ink-soft);
  border-radius: 999px; padding: 9px 16px; display: inline-flex; align-items: center; gap: 8px;
  transition: .25s var(--ease);
}
.ghost-btn:hover { background: var(--paper); transform: translateY(-1px); }
a.ghost-btn { text-decoration: none; }
.count-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--sage-dark); color: #fff; font-size: 11px; display: inline-grid; place-items: center;
}

/* ---------- hero ---------- */
main {
  position: relative; z-index: 1; max-width: 1180px; margin: 0 auto;
  padding: 0 calc(28px + env(safe-area-inset-right)) 0 calc(28px + env(safe-area-inset-left));
}
.hero {
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 44px; align-items: center; padding: 30px 0 40px;
}
.home-greet {
  margin: 4px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .01em;
}
.home-greet strong { color: var(--ink); font-weight: 600; }
.eyebrow {
  margin: 0 0 16px; font-size: 12px; letter-spacing: .22em; font-weight: 700;
  color: var(--sage-dark); text-transform: uppercase; display: flex; align-items: center; gap: 9px;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 4px rgba(189,122,91,.12); }
.hero h1 {
  margin: 0 0 18px; font-family: var(--serif); font-weight: 700;
  font-size: clamp(32px, 4.2vw, 52px); line-height: 1.24; letter-spacing: -.02em;
}
.hero h1 span { color: var(--sage-dark); }
.lede { margin: 0 0 22px; color: var(--ink-soft); font-size: 17px; max-width: 34em; }
.trust-row { display: flex; flex-wrap: wrap; gap: 9px; }
.trust-row span {
  font-size: 12px; color: var(--muted); border: 1px solid var(--line);
  background: rgba(255,253,248,.55); padding: 5px 12px; border-radius: 999px;
}
.hero-copy, .chat-card { animation: rise .8s var(--ease) both; }
.chat-card { animation-delay: .08s; }

.chat-card {
  background: linear-gradient(160deg, #fffdf8, #faf4e9);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px;
  box-shadow: var(--shadow-md); position: relative; overflow: hidden;
}
.chat-card::before {
  content: ""; position: absolute; right: -80px; top: -100px; width: 240px; height: 240px;
  background: radial-gradient(circle, rgba(113,129,106,.18), transparent 68%); pointer-events: none;
}
.chat-card-head { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 16px; }
.chat-avatar {
  flex: none; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--sage-dark); color: #f7f2e9;
  font-family: var(--serif); font-size: 18px; box-shadow: 0 8px 18px rgba(77,93,70,.25);
}
.chat-card-head strong { display: block; font-size: 15px; }
.chat-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.chat-card textarea {
  width: 100%; resize: vertical; min-height: 96px; border: 1px solid var(--line);
  background: rgba(255,255,255,.72); border-radius: 18px; padding: 15px 16px;
  outline: none; color: var(--ink); line-height: 1.7; transition: .2s;
}
.chat-card textarea:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 4px rgba(113,129,106,.12); }
.chat-card textarea::placeholder { color: var(--muted-2); }
.chat-actions { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.mic-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong);
  background: var(--paper); color: var(--ink-soft); border-radius: 999px; padding: 10px 16px;
  transition: .2s var(--ease); position: relative;
}
.mic-btn svg { width: 17px; height: 17px; }
.mic-btn:hover { border-color: var(--sage-ink); color: var(--sage-dark); }
.mic-btn.recording { background: #f7e5df; border-color: #d9a28c; color: var(--danger); }
.mic-btn.recording::after {
  content: ""; position: absolute; inset: -4px; border-radius: 999px; border: 1px solid #d9a28c;
  animation: pulse 1.4s infinite;
}
.mic-hint { margin: 12px 0 0; font-size: 12px; color: var(--muted-2); font-style: italic; }

.primary-btn {
  border: 0; background: var(--sage-dark); color: #fbf8f0; border-radius: 999px;
  padding: 14px 24px; font-weight: 600; letter-spacing: .02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 10px 24px rgba(77,93,70,.22); transition: .25s var(--ease);
}
.primary-btn:hover { background: #43513c; transform: translateY(-1px); box-shadow: 0 14px 30px rgba(77,93,70,.28); }
.primary-btn:disabled { opacity: .48; cursor: not-allowed; transform: none; box-shadow: none; }
.primary-btn.small { padding: 11px 18px; font-size: 14px; min-height: var(--touch); }
.primary-btn.full { width: 100%; }
.primary-btn svg { width: 17px; height: 17px; }
.text-btn { border: 0; background: none; color: var(--muted); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.text-btn:hover { color: var(--ink); }
.icon-btn { border: 1px solid var(--line); background: var(--paper); border-radius: 50%; width: var(--touch); height: var(--touch); display: grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-strong); }

/* ---------- scenes ---------- */
.scenes, .why, .recent { padding: 34px 0 58px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-head h2 { margin: 0; font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); letter-spacing: -.01em; }
.section-head .eyebrow { margin-bottom: 8px; }
.section-note { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.scene-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.scene-card {
  position: relative; text-align: left; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--paper); padding: 0; overflow: hidden;
  transition: .35s var(--ease); display: flex; flex-direction: column;
}
.scene-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--line-strong); }
.scene-art { height: 132px; position: relative; overflow: hidden; background: linear-gradient(145deg, #f0e8da, #e7dfd0); }
.scene-art::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 12%, rgba(255,255,255,.65), transparent 45%); }
.art-before_after .pane { position: absolute; top: 26px; bottom: 26px; width: 34%; border-radius: 12px; }
.art-before_after .pane.a { left: 18%; background: linear-gradient(160deg, #d7c8b3, #c2b19a); }
.art-before_after .pane.b { right: 18%; background: linear-gradient(160deg, #93a088, #6f8067); }
.art-before_after .split { position: absolute; left: 50%; top: 20px; bottom: 20px; width: 2px; background: rgba(255,253,248,.9); box-shadow: 0 0 0 4px rgba(255,253,248,.16); }
.art-orbit360 .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(77,93,70,.45); }
.art-orbit360 .r1 { width: 108px; height: 108px; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.art-orbit360 .r2 { width: 74px; height: 74px; left: 50%; top: 50%; transform: translate(-50%,-50%); border-style: dashed; }
.art-orbit360 .r3 { width: 40px; height: 40px; left: 50%; top: 50%; transform: translate(-50%,-50%); background: rgba(77,93,70,.85); border: 0; }
.art-orbit360 .needle { position: absolute; left: 50%; top: 50%; width: 54px; height: 2px; background: var(--terra); transform-origin: left center; transform: rotate(-34deg); border-radius: 2px; }
.art-timeline .dot { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: var(--sage-dark); }
.art-timeline .d1 { left: 20%; top: 58%; } .art-timeline .d2 { left: 40%; top: 42%; background: var(--gold); }
.art-timeline .d3 { left: 60%; top: 50%; background: var(--terra); } .art-timeline .d4 { left: 80%; top: 32%; }
.art-timeline .line { position: absolute; left: 20%; right: 18%; top: 49%; height: 1.5px; background: rgba(77,93,70,.3); transform: rotate(-3deg); }
.art-timeline .bars { position: absolute; left: 18%; bottom: 20px; display: flex; gap: 6px; align-items: flex-end; }
.art-timeline .bars i { width: 7px; border-radius: 4px; background: rgba(77,93,70,.35); }
.art-timeline .bars i:nth-child(1){height: 12px}.art-timeline .bars i:nth-child(2){height: 20px}
.art-timeline .bars i:nth-child(3){height: 28px}.art-timeline .bars i:nth-child(4){height: 38px;background:var(--sage-dark)}
.art-promo .frame { position: absolute; border-radius: 12px; border: 1px solid rgba(77,93,70,.35); background: rgba(255,253,248,.55); }
.art-promo .f1 { left: 20%; top: 28px; width: 38%; height: 76px; transform: rotate(-5deg); }
.art-promo .f2 { left: 36%; top: 38px; width: 44%; height: 74px; transform: rotate(4deg); background: rgba(113,129,106,.22); }
.art-promo .f3 { left: 50%; top: 22px; width: 30%; height: 88px; transform: rotate(-1deg); border-color: rgba(189,122,91,.5); }
.scene-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.scene-kicker { font-size: 10px; letter-spacing: .18em; font-weight: 700; color: var(--terra-ink); text-transform: uppercase; }
.scene-body h3 { margin: 0; font-family: var(--serif); font-size: 21px; letter-spacing: .01em; }
.scene-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.scene-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.scene-tags span { font-size: 11px; color: var(--sage-dark); background: var(--sage-soft); padding: 3px 9px; border-radius: 999px; }
.scene-go {
  position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,253,248,.86); border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--sage-dark); transition: .25s;
}
.scene-card:hover .scene-go { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.scene-go svg { width: 16px; height: 16px; }

/* ---------- 首页工具行 ---------- */
.home-tools {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px; padding: 6px 0 34px;
}
.tool-tile {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  min-height: 104px; padding: 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); color: var(--ink); text-decoration: none;
  transition: .2s var(--ease);
}
.tool-tile:hover { border-color: var(--sage); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.tool-tile:focus-within { outline: 2px solid var(--sage-dark); outline-offset: 2px; }
.tool-ico {
  width: 34px; height: 34px; border-radius: 10px; margin-bottom: 2px;
  display: grid; place-items: center; background: var(--sage-soft); color: var(--sage-dark);
}
.tool-ico svg { width: 19px; height: 19px; }
.tool-tile strong { font-size: 14px; font-weight: 600; }
.tool-tile > span:not(.tool-ico) { font-size: 12px; line-height: 1.45; color: var(--muted); }
.tool-hit {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; background: none; opacity: 0; cursor: pointer;
}

/* ---------- ideas ---------- */
.ideas { padding: 22px 0 58px; }
.idea-today {
  position: relative; border-radius: 26px; overflow: hidden; margin-bottom: 18px;
  background: linear-gradient(135deg, #e7e2d3, #d9d2c0 55%, #e3d2bf);
  border: 1px solid var(--line); padding: 26px 28px; box-shadow: var(--shadow-sm);
}
.idea-today::after {
  content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px;
  border-radius: 50%; border: 1px solid rgba(77,93,70,.18);
}
.idea-today-inner { position: relative; z-index: 1; max-width: 44em; }
.idea-badge {
  display: inline-block; font-size: 10px; letter-spacing: .18em; font-weight: 700; color: #fff;
  background: var(--sage-dark); border-radius: 999px; padding: 4px 11px; margin-bottom: 10px;
}
.idea-today h3 { margin: 0 0 8px; font-family: var(--serif); font-size: clamp(22px, 2.6vw, 30px); }
.idea-today p { margin: 0 0 14px; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.idea-today .scene-tags { margin: 0 0 16px; padding: 0; }
.idea-today .scene-tags span { background: rgba(255,253,248,.6); }
.idea-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.idea-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.idea-card {
  text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 20px;
  padding: 18px; display: flex; flex-direction: column; gap: 7px; box-shadow: var(--shadow-sm);
  transition: .25s var(--ease);
}
.idea-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.idea-cadence { font-size: 10px; letter-spacing: .16em; color: var(--terra-ink); font-weight: 700; }
.idea-card h3 { margin: 0; font-family: var(--serif); font-size: 18px; }
.idea-card p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; flex: 1; }
.idea-need {
  font-size: 12px !important; color: var(--ink-soft) !important;
  background: rgba(255,253,248,.62); border-radius: 12px; padding: 8px 11px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.idea-need b, .idea-diff b { display: block; font-size: 10px; letter-spacing: .12em; color: var(--terra-ink); margin-bottom: 3px; }
.idea-diff {
  font-size: 12px !important; color: var(--muted) !important;
  border-left: 2px solid var(--line-strong); padding-left: 10px;
}
.idea-today .idea-need, .idea-today .idea-diff { margin: 0 0 12px; max-width: 52em; }
.idea-banner {
  border: 1px solid var(--line); border-left: 3px solid var(--sage);
  background: linear-gradient(135deg, #f3efe4, #ecf0e7); border-radius: 14px;
  padding: 14px 16px; margin: 0 0 14px;
}
.idea-banner .eyebrow { margin: 0 0 3px; }
.idea-banner h3 { margin: 0 0 8px; font-family: var(--serif); font-size: 18px; }
.idea-banner p { margin: 0 0 7px; font-size: 12.5px; line-height: 1.65; color: var(--ink-soft); }
.idea-banner p:last-child { margin-bottom: 0; }
.idea-banner b { display: block; font-size: 10px; letter-spacing: .12em; color: var(--terra-ink); margin-bottom: 2px; }
.idea-source { font-size: 10.5px; color: var(--muted-2); }
.idea-go { font-size: 12px; color: var(--sage-dark); font-weight: 600; display: inline-flex; gap: 5px; align-items: center; }
.idea-mix { margin: 16px 0 0; font-size: 12px; color: var(--muted); }
@media (max-width: 1000px) { .idea-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 680px) {
  .idea-today { padding: 20px; border-radius: 22px; }
  .idea-grid { grid-template-columns: 1fr; }
}

/* 首页的灵感库入口 */
.ideas-teaser {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin: 18px 0 0; padding: 20px 24px; border: 1px solid var(--line);
  background: linear-gradient(135deg, #f0ece1, #e7e2d3 60%, #ecdfcd);
  border-radius: 22px; box-shadow: var(--shadow-sm);
}
.ideas-teaser-copy { min-width: 0; max-width: 46em; }
.ideas-teaser-copy h2 { margin: 4px 0 6px; font-family: var(--serif); font-size: clamp(20px, 2.4vw, 26px); }
.ideas-teaser-copy p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.65; }
.ideas-teaser .primary-btn { flex: none; }

/* 灵感库独立页 */
.ideas-layer {
  position: fixed; inset: 0; z-index: 61; display: grid; place-items: center;
  padding: 24px; background: rgba(38, 33, 26, .42);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fade .25s ease both;
}
.ideas-panel {
  position: relative; width: min(880px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg); padding: 0 26px 26px;
  animation: rise .4s var(--ease) both; scrollbar-width: thin;
}
.ideas-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  margin: 0 -26px 16px; padding: 14px 18px 12px; background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.ideas-title-row { margin: 0 0 16px; }
.ideas-title-row h2 { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(22px, 2.8vw, 28px); }

/* ---------- why ---------- */
.why { padding-top: 10px; }
.why-more summary {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  cursor: pointer; list-style: none; padding-bottom: 18px;
}
.why-more summary::-webkit-details-marker { display: none; }
.why-more summary h2 { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.4vw, 30px); }
.why-more summary .eyebrow { margin-bottom: 8px; }
.why-toggle {
  flex: none; font-size: 12px; color: var(--sage-dark); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.why-toggle i { font-style: normal; }
.why-toggle .when-open { display: none; }
.why-more[open] .why-toggle .when-closed { display: none; }
.why-more[open] .why-toggle .when-open { display: inline; }
.why-toggle::after { content: "▾"; font-size: 11px; transition: transform .2s; }
.why-more[open] .why-toggle::after { transform: rotate(180deg); }
.why-more[open] .why-toggle { color: var(--muted); }
.why-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 20px; }
.why-grid article { border-top: 1px solid var(--line-strong); padding-top: 16px; }
.why-grid .num { font-family: var(--serif); color: var(--terra-ink); font-size: 13px; letter-spacing: .1em; }
.why-grid h3 { margin: 8px 0 6px; font-size: 17px; }
.why-grid p { margin: 0; color: var(--muted); font-size: 13.5px; }

/* ---------- recent ---------- */
.recent-grid, .drawer-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; }
/* 页面向下滚很长时，右下角出现「回到顶部」；进了弹层就让位给弹层。 */
.to-top {
  position: fixed; right: 18px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 30;
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fffdf8;
  color: var(--ink-soft); font-size: 12px; line-height: 1; cursor: pointer;
  /* 固定定位 + backdrop-filter 在 iOS WebKit 上会跑位；这里要的是稳定，不要毛玻璃 */
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px); pointer-events: none; transition: .22s var(--ease);
}
.to-top.on { opacity: 1; transform: none; pointer-events: auto; }
.to-top svg { width: 14px; height: 14px; }
body.locked .to-top { display: none; }
@media (min-width: 681px) { .to-top { bottom: calc(24px + env(safe-area-inset-bottom)); } }
.recent-card {
  border: 1px solid var(--line); background: var(--paper); border-radius: 18px; overflow: hidden;
  text-align: left; padding: 0; box-shadow: var(--shadow-sm); transition: .25s var(--ease);
}
.recent-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.recent-thumb { position: relative; aspect-ratio: 4/5; background: linear-gradient(150deg, #e9e0d1, #d8cbb8); overflow: hidden; }
.recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.recent-thumb .badge {
  position: absolute; left: 10px; top: 10px; font-size: 10px; padding: 3px 8px; border-radius: 999px;
  background: rgba(30,26,20,.62); color: #fff; backdrop-filter: blur(6px);
}
.recent-meta { padding: 12px 13px 14px; }
.recent-meta strong { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-meta span { color: var(--muted); font-size: 11.5px; }
.empty-card { border: 1px dashed var(--line-strong); border-radius: 18px; min-height: 160px; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }

/* ---------- promise / footer ---------- */
.promise {
  margin: 20px 0 70px; padding: 52px 32px; border-radius: 30px; text-align: center;
  background: linear-gradient(150deg, #e9e3d5, #ded5c4); position: relative; overflow: hidden;
}
.promise::after { content: ""; position: absolute; width: 320px; height: 320px; border: 1px solid rgba(77,93,70,.16); border-radius: 50%; left: 50%; top: 50%; transform: translate(-50%,-50%); }
.promise p { margin: 0 auto 14px; max-width: 24em; font-family: var(--serif); font-size: clamp(20px, 2.6vw, 30px); line-height: 1.55; color: var(--ink); position: relative; z-index: 1; }
.promise span { font-size: 12px; letter-spacing: .18em; color: var(--muted); position: relative; z-index: 1; }
.footer {
  border-top: 1px solid var(--line); background: rgba(255,253,248,.5);
  padding: 28px calc(28px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(28px + env(safe-area-inset-left));
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  max-width: 1180px; margin: 0 auto; color: var(--muted); font-size: 12px;
}
.footer strong { color: var(--ink); font-family: var(--serif); letter-spacing: .08em; margin-right: 10px; }
.footer p { margin: 0; max-width: 46em; }

/* ---------- layers ---------- */
.login-layer, .flow-layer, .drawer-layer {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;

  background: rgba(38, 33, 26, .42); backdrop-filter: blur(10px);
  padding: 20px; animation: fade .25s ease both;
}
.login-layer { z-index: 70; }
.login-card {
  width: min(420px, 100%); background: var(--paper); border: 1px solid var(--line);
  border-radius: 28px; padding: 38px 32px 30px; text-align: center; box-shadow: var(--shadow-lg);
}
.login-card h2 { margin: 0 0 6px; font-family: var(--serif); font-size: 27px; }
.login-card > p:not(.login-error):not(.login-invite-note) { margin: 0 0 22px; color: var(--muted); font-size: 13.5px; }
.login-card label { display: block; text-align: left; font-size: 12px; color: var(--muted); margin: 0 0 7px 4px; letter-spacing: .05em; }
.login-card input {
  width: 100%; border: 1px solid var(--line-strong); background: #fff; border-radius: 14px;
  padding: 13px 15px; outline: none; margin-bottom: 14px;
}
.login-card input:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 4px rgba(113,129,106,.12); }
.login-error { color: var(--danger); font-size: 12.5px; min-height: 20px; margin: 10px 0 0; }

.flow-layer { place-items: center; }
.flow-panel {
  position: relative; width: min(820px, 100%); max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 30px;
  box-shadow: var(--shadow-lg); padding: 0 30px 26px; animation: rise .45s var(--ease) both;
  scrollbar-width: thin;
}
.flow-close {
  position: sticky; top: 0; margin-left: auto; z-index: 5; width: 38px; height: 38px;
  border-radius: 50%; border: 1px solid var(--line); background: rgba(255,253,248,.92);
  color: var(--muted); display: grid; place-items: center; float: right;
}
.flow-close:hover { color: var(--ink); }
.flow-head { margin-bottom: 22px; }
.flow-head .eyebrow { margin-bottom: 8px; }
.flow-head h2 { margin: 0 0 6px; font-family: var(--serif); font-size: clamp(25px, 3vw, 34px); }
.flow-head p { margin: 0; color: var(--muted); font-size: 14px; max-width: 40em; }
.flow-section { margin: 22px 0 0; }
.flow-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.flow-section-title h3 { margin: 0; font-size: 15px; }
.flow-section-title span { color: var(--muted); font-size: 12px; }
.upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.upload-grid.single { grid-template-columns: 1fr; }
.upload-zone {
  border: 1.5px dashed var(--line-strong); border-radius: 20px; background: var(--paper-2);
  min-height: 168px; padding: 16px; display: flex; flex-direction: column; gap: 12px;
  transition: .2s; position: relative;
}
.upload-zone.dragover { border-color: var(--sage-ink); background: var(--sage-soft); }
.upload-zone.has-files { border-style: solid; background: #fffdf8; }
.upload-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.upload-label strong { font-size: 14px; }
.upload-label span { font-size: 11px; color: var(--muted); }
/* 拍摄要求单独一行说清楚；按钮本身只留「添加照片」，不要长成一条 */
.upload-hint { margin: -6px 0 0; font-size: 11.5px; color: var(--muted-2); line-height: 1.55; }
.upload-empty {
  flex: 1; min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; border: 1px dashed var(--line-strong); background: #fff; border-radius: 16px;
  padding: 16px 12px; color: var(--ink-soft); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: .2s var(--ease);
}
.upload-empty:hover { border-color: var(--sage-ink); color: var(--sage-dark); background: var(--sage-soft); }
.upload-empty .up-icon {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage-dark);
}
.upload-empty .up-icon svg { width: 16px; height: 16px; }
.upload-empty:hover .up-icon { background: #fff; }
.thumb-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.thumb {
  position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 1;
  background: #e9e0d1; border: 1px solid var(--line);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .rm {
  position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(30,26,20,.68); color: #fff; border: 0; display: grid; place-items: center;
  font-size: 13px; line-height: 1;
}
.thumb .prog {
  position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(0,0,0,.18);
}
.thumb .prog i { display: block; height: 100%; width: 0; background: var(--sage); transition: width .2s; }
.thumb.add {
  border: 1.5px dashed var(--line-strong); display: grid; place-items: center; color: var(--muted);
  background: var(--paper-2); font-size: 22px; cursor: pointer;
}
.thumb.add:hover { color: var(--sage-dark); border-color: var(--sage-ink); }
.thumb-tag {
  position: absolute; left: 5px; top: 5px; padding: 2px 7px; border-radius: 999px;
  font-size: 10px; line-height: 1.5; background: rgba(84,101,76,.9); color: #fff; letter-spacing: .04em;
}
.thumb-tag.scene { background: rgba(176,112,80,.9); }
/* 上传后当场质检：不合格的红角标，提醒项的琥珀角标，合格的不打扰 */
.thumb.bad { border-color: #c4765d; box-shadow: inset 0 0 0 2px rgba(196,118,93,.45); }
.thumb.warn { border-color: #c9a86b; }
.thumb-err, .thumb-warn {
  position: absolute; right: 5px; bottom: 6px; width: 19px; height: 19px; border-radius: 50%;
  color: #fff; font-size: 12px; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 1px 4px rgba(30,26,20,.25);
}
.thumb-err { background: #a65440; }
.thumb-warn { background: #b98c3f; font-weight: 700; }
.zone-check { display: grid; gap: 4px; margin-top: 2px; }
.zone-check[hidden] { display: none; }
.check-line {
  margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--muted);
  padding: 6px 9px; border-radius: 9px; background: var(--paper-2);
}
.check-line b { color: var(--ink-soft); font-weight: 600; margin-right: 6px; }
.check-line.bad { background: #f8ece6; color: #9a4f39; }
.check-line.bad b { color: #8a422f; }
.check-line.warn { background: #f7f0e1; color: #8a6a2f; }
.check-line.more { background: none; padding: 2px 9px; font-size: 11px; }
.recognize-row { margin: 0; font-size: 11.5px; color: var(--sage-dark); line-height: 1.55; }
.recognize-row:empty { display: none; }
.recognize-row.warn { color: #a8643f; }
.recognize-summary {
  margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: var(--sage-soft);
  display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--ink-soft);
}
.recognize-summary .rec-warn { color: #9a5b34; }
.recognize-summary.live { background: #f1f0e4; }
.confirm-sheet {
  margin-top: 18px; border: 1px solid var(--line); border-radius: 18px;
  background: #fffdf8; padding: 14px 18px 12px;
}
.confirm-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.confirm-head b { font-size: 13.5px; }
.confirm-head span { font-size: 11.5px; color: var(--muted); }
.confirm-rows { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8px 18px; }
.confirm-rows > div { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.confirm-rows dt { flex: none; width: 2.6em; font-size: 11.5px; color: var(--muted); }
.confirm-rows dd { margin: 0; font-size: 12.5px; color: var(--ink-soft); min-width: 0; overflow-wrap: anywhere; }
.confirm-note { margin: 10px 0 0; font-size: 11px; color: var(--muted-2); }

.options-card { border: 1px solid var(--line); border-radius: 22px; background: var(--paper-2); padding: 18px; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 12px; color: var(--muted); letter-spacing: .03em; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 11px 13px;
  outline: none; font-size: 14px;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.6; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113,129,106,.1);
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft); border-radius: 999px;
  padding: 7px 14px; font-size: 12.5px; transition: .2s;
}
.chip:hover { border-color: var(--sage-ink); }
.chip.on { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.chip.mini { padding: 5px 11px; font-size: 11.5px; }
.option-note { margin: 12px 0 0; font-size: 11.5px; color: var(--muted-2); }

.start-row { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.start-row .primary-btn { flex: 1; min-width: 200px; padding: 15px 26px; }
.start-note { color: var(--muted); font-size: 12px; max-width: 18em; }

/* progress */
.progress-wrap { text-align: center; padding: 20px 0 8px; }
.breath {
  width: 168px; height: 168px; border-radius: 50%; margin: 8px auto 26px; position: relative;
  background: radial-gradient(circle at 35% 30%, #fdfaf3, #e8e2d4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.7), 0 20px 50px rgba(77,93,70,.12);
  display: grid; place-items: center; animation: breathe 4.5s ease-in-out infinite;
}
.breath::before, .breath::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(113,129,106,.28);
  animation: ripple 3.6s ease-out infinite;
}
.breath::after { animation-delay: 1.8s; }
.breath strong { font-family: var(--serif); font-size: 42px; color: var(--sage-dark); letter-spacing: -.02em; }
.breath small { position: absolute; bottom: 44px; font-size: 10px; letter-spacing: .2em; color: var(--muted); }
.progress-stage { font-size: 20px; font-family: var(--serif); margin: 0 0 4px; }
.progress-msg { color: var(--muted); font-size: 13.5px; margin: 0 0 26px; }
.step-list { display: grid; gap: 2px; max-width: 430px; margin: 0 auto; text-align: left; }
.step {
  display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: center;
  padding: 9px 0; color: var(--muted-2); font-size: 13.5px; position: relative;
}
.step .sdot {
  width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong);
  display: grid; place-items: center; font-size: 10px; background: var(--paper); z-index: 1;
}
.step::before { content: ""; position: absolute; left: 11px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.step:first-child::before { top: 50%; }
.step:last-child::before { bottom: 50%; }
.step.done { color: var(--ink-soft); }
.step.done .sdot { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.step.active { color: var(--ink); font-weight: 600; }
.step.active .sdot { border-color: var(--sage-ink); box-shadow: 0 0 0 4px rgba(113,129,106,.12); }
.step.active .sdot::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--sage-dark); }
.progress-note { margin: 24px auto 0; font-size: 12px; color: var(--muted-2); max-width: 30em; }
.progress-actions { margin-top: 6px; display: flex; justify-content: center; }

/* result */
.result-head { margin-bottom: 16px; }
.result-head h2 { margin: 0 0 4px; font-family: var(--serif); font-size: clamp(24px, 3vw, 32px); }
.result-head p { margin: 0; color: var(--muted); font-size: 13px; }
/* 播放器只占视频本身的宽度：以前是整行宽 + 深色底，竖屏视频两侧就露出
   两条黑边，看起来像「画框」。现在裁到内容尺寸，视频边缘就是卡片边缘。 */
.video-wrap {
  position: relative; width: fit-content; max-width: 100%;
  background: #171410; border-radius: 22px; overflow: hidden;
  margin: 0 auto 16px; box-shadow: var(--shadow-md);
}
.video-wrap video {
  width: auto; height: auto; max-height: 72vh; max-width: 100%; display: block;
  border-radius: 22px; background: #171410;
}
.video-fullscreen {
  position: absolute; right: 10px; top: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(255,255,255,.22);
  background: rgba(20, 18, 16, .62); color: #fff; font-size: 12px;
  backdrop-filter: blur(8px); cursor: pointer;
}
.video-fullscreen:hover { background: rgba(20, 18, 16, .82); }
/* 全屏时容器铺满屏幕；按钮交给系统控件退出，不再叠在画面上。 */
.video-wrap:fullscreen {
  width: 100vw; height: 100vh; max-width: none; max-height: none;
  border-radius: 0; display: grid; place-items: center; background: #000;
}
.video-wrap:fullscreen video {
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; border-radius: 0;
}
.video-wrap:fullscreen .video-fullscreen { display: none; }

/* 成品库的全屏播放层：先铺满视口，再尝试进系统全屏；竖屏视频两侧留黑，
   控件用浏览器自带的，暂停、拖动进度、音量都不用重做。 */
.player-layer {
  position: fixed; inset: 0; z-index: 95; background: #000;
  display: grid; place-items: center;
}
.player-layer[hidden] { display: none; }
.player-layer video {
  width: 100%; height: 100%; max-width: none; max-height: none;
  object-fit: contain; background: #000; outline: none;
}
.player-close {
  position: fixed; right: 16px; top: 16px; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(20,18,16,.62); color: #fff; font-size: 18px;
  backdrop-filter: blur(8px);
}
.player-close:hover { background: rgba(20,18,16,.85); }
body.player-open { overflow: hidden; }
.result-meta { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 18px; }
.result-meta span { font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); background: var(--paper-2); padding: 4px 10px; border-radius: 999px; }
.warn-card {
  border: 1px solid #e5c7a8; background: #fcf3e5; border-radius: 14px; padding: 12px 14px;
  font-size: 12.5px; color: #7d5a33; margin: 0 0 14px;
}
.warn-card strong { display: block; margin-bottom: 4px; }
.warn-card ul { margin: 0; padding-left: 18px; }
.insight-card { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 16px; margin: 0 0 14px; }
.insight-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.insight-head strong { font-size: 14.5px; color: var(--ink); }
.insight-head span { font-size: 11.5px; color: var(--muted); }
.insight-summary { margin: 0 0 10px; font-size: 12.5px; line-height: 1.7; color: var(--ink-soft); }
.insight-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.insight-item { border: 1px solid var(--line); background: var(--paper-2); border-radius: 14px; padding: 10px 12px; }
.insight-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.insight-line b { font-size: 13.5px; color: var(--ink); }
.insight-trend { flex: none; font-size: 11px; border-radius: 999px; padding: 3px 9px; background: var(--sage-soft); color: var(--sage-dark); }
.insight-trend.worse { background: #fbeae1; color: #a85a3c; }
.insight-trend.flat { background: #fff; border: 1px solid var(--line); color: var(--muted); }
.insight-item p { margin: 5px 0 0; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.insight-item p.suggestion { color: var(--muted); }
.insight-disclaimer { margin: 10px 0 0; font-size: 11px; color: var(--muted-2); line-height: 1.6; }
.audit-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.audit-col { border: 1px solid var(--line); background: var(--paper-2); border-radius: 14px; padding: 10px 12px; }
.audit-col > b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 6px; }
.audit-col ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.audit-col li { display: flex; align-items: baseline; gap: 6px; font-size: 12px; color: var(--ink-soft); }
.audit-level { flex: none; font-size: 10.5px; border-radius: 999px; padding: 2px 7px; background: var(--sage-soft); color: var(--sage-dark); }
.audit-level.strong { background: #fbeae1; color: #a85a3c; }
.audit-none { margin: 0; font-size: 12px; color: var(--muted); }
.caption-card { border: 1px solid var(--line); background: var(--paper-2); border-radius: 20px; padding: 16px; margin-bottom: 14px; }
.caption-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.caption-tabs button { border: 1px solid transparent; background: none; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; color: var(--muted); }
.caption-tabs button.on { background: #fff; border-color: var(--line); color: var(--ink); box-shadow: var(--shadow-sm); }
.caption-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.75; color: var(--ink-soft); max-height: 210px; overflow: auto; padding: 4px 2px; }
.caption-actions { display: flex; justify-content: flex-end; margin-top: 8px; }
.copy-btn { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 13px; font-size: 12px; color: var(--ink-soft); display: inline-flex; gap: 6px; align-items: center; }
.copy-btn:hover { border-color: var(--sage-ink); color: var(--sage-dark); }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 6px; }
.action-row .primary-btn { flex: 1; min-width: 180px; }
.secondary-btn {
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft);
  border-radius: 999px; padding: 13px 18px; display: inline-flex; align-items: center; gap: 8px;
  transition: .2s; font-size: 14px;
}
.secondary-btn:hover { border-color: var(--sage-ink); color: var(--sage-dark); }
.danger-btn { border: 1px solid #e1c3b8; background: #fdf4f0; color: var(--danger); border-radius: 999px; padding: 13px 18px; font-size: 14px; }
.danger-btn:hover { background: #f9e7df; }
.revise-card { border: 1px solid var(--line); border-radius: 18px; background: var(--paper-2); padding: 14px; margin-top: 16px; }
.revise-card textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 11px 12px; resize: vertical; min-height: 62px; outline: none; font-size: 14px; }
.revise-card textarea:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113,129,106,.1); }
.revise-actions { display: flex; gap: 8px; align-items: center; margin-top: 9px; flex-wrap: wrap; }
.revise-actions .primary-btn { margin-left: auto; padding: 9px 16px; font-size: 13px; }
.qa-details { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 12px; color: var(--muted); }
.qa-details summary { cursor: pointer; color: var(--muted); }
.qa-details pre { white-space: pre-wrap; font-family: var(--sans); font-size: 11.5px; line-height: 1.6; color: var(--muted); }
.review-sheet { display: block; margin-top: 10px; border-radius: 12px; overflow: hidden; background: var(--bg-deep); }
.review-sheet img { display: block; width: 100%; height: auto; }
.report-links { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0 12px; }
.report-links a { text-decoration: none; }
.share-card {
  margin: 4px 0 12px; padding: 14px; border-radius: 14px;
  background: var(--sage-soft); border: 1px solid rgba(113, 129, 106, .18);
}
.share-card input {
  width: 100%; box-sizing: border-box; border: 1px solid rgba(113, 129, 106, .28);
  border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--ink);
  background: #fffdf8;
}
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center; }
.share-actions a { text-decoration: none; }
.share-card .admin-note { margin: 10px 0 0; }
.share-views { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); }
.error-card { text-align: center; padding: 26px 10px 10px; }
.error-card .err-icon { width: 62px; height: 62px; margin: 0 auto 16px; border-radius: 50%; background: #f8e8e0; color: var(--danger); display: grid; place-items: center; font-size: 28px; }
.error-card h2 { margin: 0 0 8px; font-family: var(--serif); font-size: 25px; }
.error-card p { margin: 0 auto 20px; color: var(--muted); font-size: 13.5px; max-width: 28em; }

/* drawer */
.drawer-layer { place-items: stretch; justify-items: end; padding: 0; }
.drawer {
  width: min(430px, 92vw); height: 100%; background: var(--paper); box-shadow: var(--shadow-lg);
  padding: 24px; overflow-y: auto; overscroll-behavior: contain; animation: slideIn .35s var(--ease) both;
}
.drawer-head {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
  gap: 6px 10px; margin-bottom: 18px;
}
/* 标题和按钮同一行，说明文字自己占一整行，窄屏时不会钻到按钮底下。 */
.drawer-head > div:first-child { display: contents; }
.drawer-head h2 { margin: 0; font-family: var(--serif); font-size: 24px; }
.drawer-head-actions { grid-column: 2; grid-row: 1; }
.drawer-grid { grid-template-columns: 1fr 1fr; }
.drawer .empty-card { grid-column: 1 / -1; }
.drawer-grid.list-view { grid-template-columns: 1fr; gap: 10px; }
.drawer-grid.list-view .recent-card { display: flex; align-items: center; gap: 12px; }
.drawer-grid.list-view .recent-card:hover { transform: none; }
.drawer-grid.list-view .recent-thumb { width: 74px; aspect-ratio: 4/5; flex: none; }
.drawer-grid.list-view .recent-thumb .badge { display: none; }
.drawer-grid.list-view .recent-meta { flex: 1; min-width: 0; padding: 10px 12px 10px 0; }
.drawer-grid.list-view .hist-actions { margin-top: 7px; }

/* 作品中心工具条：选择 / 回收站；批量删除只在选择模式下出现 */
.drawer-toolbar {
  grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: 0 0 14px;
}
.drawer-tool-note { font-size: 11.5px; color: var(--muted); margin-right: auto; }
.chip-btn {
  font-size: 12px; line-height: 1; padding: 8px 14px; min-height: 34px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft); cursor: pointer;
  transition: .2s var(--ease);
}
.chip-btn:hover:not(:disabled) { border-color: var(--sage-ink); color: var(--sage-dark); background: var(--sage-soft); }
.chip-btn.active { background: var(--sage-soft); border-color: var(--sage-ink); color: var(--sage-dark); }
.chip-btn.danger { border-color: #e2c4bb; color: var(--danger); }
.chip-btn.danger:hover:not(:disabled) { background: #f7e5df; border-color: var(--danger); color: var(--danger); }
.chip-btn:disabled { opacity: .45; cursor: not-allowed; }

/* 选择模式：右上角勾选圆点 */
.pick-dot {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.86); border: 1.5px solid var(--line-strong);
  font-size: 12px; color: #fff; line-height: 1;
}
.recent-card.picked { border-color: var(--sage-ink); box-shadow: 0 0 0 2px var(--sage-soft); }
.recent-card.picked .pick-dot { background: var(--sage-ink); border-color: var(--sage-ink); }
.recent-card.in-trash .recent-thumb { filter: grayscale(.55); opacity: .8; }
.hist-act.danger { color: var(--danger); border-color: #e2c4bb; }
.hist-act.danger:hover { background: #f7e5df; border-color: var(--danger); color: var(--danger); }

/* toast */
.toast-wrap { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(38, 33, 26, .92); color: #f8f3e9; padding: 10px 18px; border-radius: 999px;
  font-size: 13px; box-shadow: var(--shadow-md); animation: toastIn .3s var(--ease) both;
  max-width: min(90vw, 460px); text-align: center;
}
.toast.error { background: #7f3f31; }
.toast.ok { background: #4d5d46; }

/* composer extras */
.flow-text {
  width: 100%; resize: none; min-height: 92px; border: 1px solid var(--line);
  background: var(--paper-2); border-radius: 18px; padding: 14px 16px; outline: none;
  line-height: 1.7; transition: .2s; display: block;
}
.flow-text:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 4px rgba(113,129,106,.12); background: #fff; }
.flow-text::placeholder { color: var(--muted-2); }
.step-detail { color: var(--muted-2); font-weight: 400; }
.more-options {
  border: 1px solid var(--line); border-radius: 18px; background: var(--paper-2);
  padding: 0 16px; margin-bottom: 14px;
}
.more-options > summary {
  cursor: pointer; font-size: 13px; color: var(--muted); padding: 14px 0; list-style: none;
}
.more-options > summary::-webkit-details-marker { display: none; }
.more-options > summary::before { content: "＋"; margin-right: 7px; color: var(--sage-dark); }
.more-options[open] > summary::before { content: "－"; }
.more-options[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.more-options > *:not(summary) { margin-bottom: 14px; }
.opt-row { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.opt-label { flex: none; width: 44px; font-size: 12px; color: var(--muted); padding-top: 7px; }
.music-slot { display: inline-flex; gap: 8px; align-items: center; }
.music-name { font-size: 11.5px; color: var(--sage-dark); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thumb-file {
  width: 100%; height: 100%; display: grid; place-items: center; padding: 6px;
  font-size: 10px; color: var(--muted); text-align: center; word-break: break-all;
  background: linear-gradient(150deg, #eee6d8, #ded2bf);
}
.thumb-err {
  position: absolute; right: 5px; bottom: 6px; width: 19px; height: 19px; border-radius: 50%;
  background: #a65440; color: #fff; font-size: 12px; display: grid; place-items: center;
}
.hist-rm { display: block; margin-top: 4px; font-size: 10.5px; color: var(--muted-2); }
.hist-rm:hover { color: var(--danger); }
.recent-card { cursor: pointer; }
.drawer-foot { border-top: 1px solid var(--line); margin-top: 22px; padding-top: 16px; text-align: center; }

/* utility */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.muted { color: var(--muted); }
.center { text-align: center; }

@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { opacity: .7; transform: scale(1); } 80%,100% { opacity: 0; transform: scale(1.12); } }
@keyframes breathe { 0%,100% { transform: scale(.96); } 50% { transform: scale(1.03); } }
@keyframes ripple { 0% { transform: scale(.9); opacity: .5; } 100% { transform: scale(1.35); opacity: 0; } }

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; gap: 34px; padding: 48px 0 56px; }
  .scene-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .why-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .recent-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .topbar {
    padding: calc(10px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) 2px calc(16px + env(safe-area-inset-left));
  }
  main { padding: 0 calc(18px + env(safe-area-inset-right)) 0 calc(18px + env(safe-area-inset-left)); }
  /* 手机上营销首屏让位：先看到「说一句就开始」，场景卡压成 2×2 */
  .hero { padding: 10px 0 6px; }
  .hero-copy { display: none; }
  .hero h1 { font-size: 35px; line-height: 1.28; }
  .lede { font-size: 15px; }
  .desktop-br { display: none; }
  .chat-card { padding: 16px; border-radius: 20px; }
  .chat-card-head { margin-bottom: 10px; }
  .chat-card-head p, .mic-hint { display: none; }
  .chat-card textarea { min-height: 78px; }
  .section-head { align-items: flex-start; flex-direction: column; gap: 8px; margin-bottom: 16px; }
  .section-note { display: none; }
  .scenes { padding: 20px 0 26px; }
  .scene-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .scene-art { height: 64px; }
  .scene-body { padding: 10px 11px 12px; gap: 0; }
  .scene-body h3 { font-size: 15px; line-height: 1.35; }
  .scene-body p, .scene-tags, .scene-kicker, .scene-more { display: none; }
  .scene-go { width: 26px; height: 26px; right: 8px; top: 8px; }
  .scene-go svg { width: 13px; height: 13px; }
  /* 场景插画是按 104px 高画的，压到 64px 后按比例收紧 */
  .art-before_after .pane { top: 9px; bottom: 9px; border-radius: 8px; }
  .art-before_after .split { top: 7px; bottom: 7px; }
  .art-orbit360 .r1 { width: 54px; height: 54px; }
  .art-orbit360 .r2 { width: 36px; height: 36px; }
  .art-orbit360 .r3 { width: 18px; height: 18px; }
  .art-orbit360 .needle { width: 28px; }
  .art-timeline .bars { bottom: 8px; }
  .art-timeline .bars i:nth-child(1) { height: 6px; }
  .art-timeline .bars i:nth-child(2) { height: 10px; }
  .art-timeline .bars i:nth-child(3) { height: 14px; }
  .art-timeline .bars i:nth-child(4) { height: 19px; }
  .art-promo .f1 { top: 9px; height: 40px; }
  .art-promo .f2 { top: 12px; height: 39px; }
  .art-promo .f3 { top: 7px; height: 46px; }
  .home-tools { gap: 8px; padding: 2px 0 24px; }
  .tool-tile { min-height: 78px; padding: 10px 8px; align-items: center; text-align: center; gap: 3px; }
  .tool-ico { width: 30px; height: 30px; margin-bottom: 1px; }
  .tool-tile strong { font-size: 12.5px; }
  .tool-tile > span:not(.tool-ico) { display: none; }
  .why-grid { grid-template-columns: 1fr; gap: 18px; }
  .recent-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .promise { padding: 38px 22px; border-radius: 24px; margin-bottom: 46px; }
  .footer {
    padding: 22px calc(18px + env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
  }
  .flow-layer { padding: 0; align-items: end; }
  .flow-panel {
    width: 100%; max-height: 94vh; max-height: 94dvh; border-radius: 26px 26px 0 0; padding: 0 18px 20px;
    animation: sheetUp .4s var(--ease) both;
  }
  .flow-close { margin-bottom: 4px; }
  .upload-grid { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: 1fr; }
  .confirm-rows { grid-template-columns: 1fr; }
  .recognize-summary { font-size: 11.5px; }
  .thumb-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .video-wrap video { max-height: 66vh; }
  .action-row .primary-btn { flex: 1 1 100%; }
  .drawer { width: 100%; }
  .drawer-grid { grid-template-columns: 1fr 1fr; }
}
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 封面挑选 / 时间轴导出 ---------- */
.cover-card {
  margin-top: 16px; border: 1px solid var(--line); border-radius: 18px;
  background: #fff; padding: 14px 16px;
}
.cover-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cover-head strong { font-size: 13.5px; color: var(--ink); }
.cover-head span { font-size: 11.5px; color: var(--muted); }
.cover-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0 6px; }
.cover-item {
  position: relative; border: 2px solid transparent; border-radius: 12px; overflow: hidden;
  padding: 0; background: var(--bg-deep); cursor: pointer; aspect-ratio: 9 / 16;
}
.cover-item img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cover-item span {
  position: absolute; left: 6px; bottom: 6px; font-size: 10.5px; color: #fff;
  background: rgba(15, 16, 18, .55); border-radius: 999px; padding: 1px 7px;
}
.cover-item.on { border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113, 129, 106, .16); }
.cover-item:disabled { opacity: .6; cursor: wait; }
.cover-card .ghost-btn { margin-top: 6px; }
.export-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- 单独出文案 ---------- */
.copy-cta { border-color: var(--sage-ink); color: var(--sage-dark); background: var(--sage-soft); }
.copy-card {
  margin-top: 16px; border: 1px solid var(--sage); border-radius: 20px;
  background: linear-gradient(160deg, #fbfdf9, #f2f6ef); padding: 16px;
}
.copy-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.copy-head strong { font-size: 14px; color: var(--sage-dark); }
.copy-head span { font-size: 11.5px; color: var(--muted); }
.copy-card .caption-tabs { margin-bottom: 10px; }
.copy-tone { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.copy-tone-label { font-size: 12px; color: var(--muted); padding-top: 6px; white-space: nowrap; }
.copy-tone .tone-row { flex: 1; }
.tone-row { gap: 6px; }
.tone-row .chip { white-space: nowrap; }
.copy-card textarea {
  width: 100%; min-height: 62px; resize: vertical; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; background: #fff; outline: none; font-size: 13px;
}
.copy-card textarea:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113,129,106,.12); }
.copy-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.copy-actions .secondary-btn, .copy-actions .primary-btn.small { padding: 8px 13px; font-size: 12px; }
.copy-text {
  white-space: pre-wrap; background: #fff; border: 1px dashed var(--line-strong);
  border-radius: 12px; padding: 12px; font-size: 13px; line-height: 1.75; color: var(--ink-soft);
  max-height: 260px; overflow-y: auto;
}
.hist-copy {
  display: inline-block; margin-top: 4px; font-size: 11px; color: var(--sage-dark);
  border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; background: #fff;
}
.hist-copy:hover { background: var(--sage-soft); border-color: var(--sage-ink); }
.hist-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.hist-act {
  font-size: 11.5px; padding: 5px 11px; min-height: 32px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  transition: .2s var(--ease);
}
.hist-act:hover { background: var(--sage-soft); border-color: var(--sage-ink); color: var(--sage-dark); }
.hist-act.ghost { color: var(--muted); }
.drawer-sub { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 12.5px; }
.hist-state { font-size: 10.5px; color: var(--gold); }
.hist-state.failed { color: var(--danger); }
.review-chip {
  display: inline-block; font-size: 10.5px; line-height: 1.6; padding: 1px 8px;
  border-radius: 999px; background: #f3ead8; color: var(--gold); white-space: nowrap;
}
.review-chip.approved { background: var(--sage-soft); color: var(--sage-dark); }
.review-chip.rejected { background: #f7e5df; color: var(--danger); }
.review-note { display: block; color: var(--danger); font-size: 11px; line-height: 1.5; margin-top: 2px; }
.hist-blank {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--muted-2); background: var(--bg-deep); font-size: 12px;
}
.recent-thumb img { position: absolute; inset: 0; z-index: 1; }

/* ---------- 账号 / 素材库 ---------- */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,253,248,.7);
  box-shadow: var(--shadow-sm); color: var(--ink-soft); font-size: 13px;
}
.user-chip .avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-dark); color: #f7f2e9; font-family: var(--serif); font-size: 13px;
}
.user-chip:hover { background: var(--paper); }
.login-switch { margin-top: 14px; color: var(--muted); font-size: 12.5px; }
.login-card #registerFields { text-align: left; }
.login-card .primary-btn.full { margin-top: 4px; }

.upload-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.library-pick-btn {
  border: 1px solid var(--line); background: #fff; color: var(--sage-dark);
  border-radius: 999px; padding: 6px 12px; font-size: 11.5px;
}
.library-pick-btn:hover { border-color: var(--sage-ink); background: var(--sage-soft); }
.blur-toggle {
  display: flex; align-items: flex-start; gap: 9px; margin: 12px 0 0; padding: 11px 13px;
  border: 1px solid var(--line); background: #fdf8ee; border-radius: 14px; cursor: pointer;
}
.blur-toggle input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--sage-dark); flex: none; }
.blur-toggle span { font-size: 12px; color: var(--ink-soft); line-height: 1.55; }
.blur-toggle b { color: var(--sage-dark); }
.anchor-note {
  margin: 0 0 12px; padding: 10px 13px; border-radius: 14px;
  background: var(--sage-soft); color: var(--sage-dark); font-size: 12px; line-height: 1.6;
}

.library-layer {
  position: fixed; inset: 0; z-index: 65; display: grid; place-items: center;
  background: rgba(38, 33, 26, .42); backdrop-filter: blur(10px);
  padding: 20px; animation: fade .25s ease both;
}
.library-panel {
  position: relative;
  width: min(1040px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg); overflow: hidden;
}
.library-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 24px 26px 10px;
}
.library-head h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 25px; }
.library-head p { margin: 0; color: var(--muted); font-size: 13px; }
.library-head .eyebrow { margin-bottom: 6px; }
.library-toolbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 8px 26px 14px; border-bottom: 1px solid var(--line);
}
.library-tools { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
/* 上传是素材库最常做的动作：做成实心主按钮，别再藏在一排小字里 */
.lib-upload-btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 19px;
  font-size: 13.5px; letter-spacing: .01em;
  box-shadow: 0 12px 24px -16px rgba(74, 92, 66, .85);
}
.lib-upload-btn svg { width: 17px; height: 17px; }
.lib-upload-btn:hover { transform: translateY(-1px); }
.lib-new-collection { padding: 9px 14px; font-size: 12.5px; }
.library-search {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 7px 13px; font-size: 12.5px; outline: none; width: 150px;
}
.library-search:focus { border-color: var(--sage-ink); }
.upload-opts { display: inline-flex; align-items: center; gap: 9px; padding-left: 10px; border-left: 1px dashed var(--line-strong); }
.upload-opts > span:first-child { font-size: 11px; color: var(--muted-2); white-space: nowrap; }
.lib-blur { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); cursor: pointer; }
.lib-blur input { accent-color: var(--sage-dark); width: 14px; height: 14px; }
.collection-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.collection-chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 6px 12px; font-size: 12px; display: inline-flex; gap: 6px; align-items: center;
}
.collection-chip em { font-style: normal; color: var(--muted-2); font-size: 10.5px; }
.collection-chip.on { background: var(--sage-dark); color: #fff; border-color: var(--sage-dark); }
.collection-chip.on em { color: rgba(255,255,255,.7); }
.collection-chip { transition: border-color .16s ease, background .16s ease; }
.collection-chip:hover { border-color: var(--line-strong); }
.collection-chip .edit {
  opacity: .8; font-size: 11px; width: 19px; height: 19px; display: inline-grid;
  place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .045);
  border: 1px solid transparent; line-height: 1; cursor: pointer;
}
.collection-chip .edit:hover { opacity: 1; background: #fff; border-color: var(--line-strong); }
.collection-chip.on .edit { background: rgba(255, 255, 255, .15); }
.collection-chip.on .edit:hover { background: rgba(255, 255, 255, .28); border-color: rgba(255, 255, 255, .42); }
.library-more, .drawer-more { grid-column: 1 / -1; display: flex; justify-content: center; padding: 10px 0 4px; }

/* 分类的新建 / 改名 / 删除弹窗 */
.collection-dialog {
  position: absolute; inset: 0; z-index: 8; display: grid; place-items: center;
  background: rgba(38, 33, 26, .32); backdrop-filter: blur(3px); padding: 18px;
  animation: fade .18s ease both;
}
.collection-dialog-card {
  width: min(400px, 100%); background: var(--paper); border: 1px solid var(--line);
  border-radius: 22px; box-shadow: var(--shadow-lg); padding: 20px;
}
.collection-dialog-card header {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px;
}
.collection-dialog-card h3 { margin: 0; font-family: var(--serif); font-size: 20px; }
.collection-dialog-card .icon-btn { width: 36px; height: 36px; font-size: 18px; }
.collection-dialog-field { display: block; margin-bottom: 10px; }
.collection-dialog-field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.collection-dialog-field input {
  width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff;
  padding: 11px 13px; font-size: 15px; outline: none;
}
.collection-dialog-field input:focus {
  border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113, 129, 106, .12);
}
.collection-dialog-error { margin: 0 0 8px; font-size: 12.5px; color: var(--danger); }
.collection-dialog-card footer {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 16px; flex-wrap: wrap;
}
.collection-dialog-actions { display: flex; gap: 8px; margin-left: auto; }
.collection-dialog-actions .secondary-btn,
.collection-dialog-actions .primary-btn { padding: 10px 18px; font-size: 13.5px; }
.danger-text { color: var(--danger); text-decoration: none; }
.danger-text.armed { font-weight: 600; text-decoration: underline; }
.library-grid {
  flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 26px; display: grid; gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: max-content; align-content: start;
}
.library-card {
  position: relative; display: block;
  border: 1px solid var(--line); background: #fff; border-radius: 16px;
  overflow: hidden; cursor: pointer; transition: .18s var(--ease); text-align: left;
  padding: 0; min-height: 0;
}
.library-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.library-card.selected { box-shadow: 0 0 0 3px rgba(113,129,106,.4); border-color: var(--sage-ink); }
.library-card .lib-thumb {
  display: block; width: 100%; aspect-ratio: 1; background: var(--bg-deep); position: relative;
}
.library-card .lib-thumb img {
  display: block; width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0;
}
.library-card .lib-thumb .file-ico { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 12px; }
.library-card .lib-thumb .thumb-kind {
  position: absolute; left: 8px; bottom: 8px; z-index: 2; font-size: 10px; line-height: 1.5;
  padding: 2px 7px; border-radius: 999px; background: rgba(30,26,20,.62); color: #fff;
}
.library-card .lib-meta { padding: 8px 10px 9px; }
.library-card .lib-meta strong {
  display: block; font-size: 11.5px; font-weight: 600; color: var(--ink-soft);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.library-card .lib-meta span { font-size: 10.5px; color: var(--muted-2); }
.library-card .lib-check {
  position: absolute; right: 7px; top: 7px; width: 21px; height: 21px; border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.9); background: rgba(46,42,36,.35); color: #fff;
  display: grid; place-items: center; font-size: 12px;
}
.library-card.selected .lib-check { background: var(--sage-dark); border-color: var(--sage-dark); }
.library-card .blur-badge {
  position: absolute; left: 7px; bottom: 7px; background: rgba(46,42,36,.72); color: #fff;
  font-size: 10px; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.library-card .blur-badge.beauty {
  left: auto; right: 7px; background: rgba(116, 138, 106, .86);
}
.library-empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 46px 16px;
  border: 1px dashed var(--line-strong); border-radius: 18px; font-size: 13px;
}
/* ---------- 成长档案 ---------- */
.growth-panel { width: min(980px, 100%); }
.growth-body {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 26px 28px; display: flex; flex-direction: column; gap: 16px;
}
.growth-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.growth-step {
  border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 12px 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.growth-step em {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage-dark); font-style: normal; font-size: 12px; font-weight: 700;
}
.growth-step strong { display: block; font-size: 13px; margin-bottom: 2px; }
.growth-step span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.growth-step.done em { background: var(--sage-dark); color: #fff; }
.growth-step.on { border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113,129,106,.12); }
.growth-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.growth-lib {
  text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 18px;
  padding: 16px 18px; cursor: pointer; transition: .18s var(--ease);
}
.growth-lib:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: var(--sage-ink); }
.growth-lib strong { display: block; font-family: var(--serif); font-size: 19px; margin-bottom: 3px; }
.growth-lib .lib-line { font-size: 12px; color: var(--muted); line-height: 1.55; }
.growth-lib .lib-line b { color: var(--ink-soft); font-weight: 600; }
.growth-lib .lib-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.growth-tag {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px;
  background: var(--sage-soft); color: var(--sage-dark); font-size: 11px; padding: 3px 9px;
}
.growth-empty {
  grid-column: 1 / -1; border: 1px dashed var(--line-strong); border-radius: 18px;
  padding: 30px 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.7;
}
.growth-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.growth-toolbar .spacer { flex: 1; }
.growth-card {
  border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 16px 18px;
}
.growth-card h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; }
.growth-card h3 small { font-family: var(--sans); font-size: 11.5px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.growth-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(116px, 1fr)); gap: 10px; }
.growth-stat { background: var(--sage-soft); border-radius: 14px; padding: 10px 12px; }
.growth-stat span { display: block; font-size: 11px; color: var(--sage-dark); }
.growth-stat strong { display: block; font-size: 20px; color: var(--ink); margin-top: 2px; }
.growth-form { display: flex; flex-direction: column; gap: 14px; }
.growth-field { display: flex; flex-direction: column; gap: 6px; }
.growth-field > label { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); }
.growth-field > label em { font-style: normal; color: var(--terra-ink); margin-left: 3px; }
.growth-field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.growth-field input[type="text"], .growth-field input[type="date"],
.growth-field textarea, .growth-field select {
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 10px 12px; font: inherit; font-size: 13px; color: var(--ink); outline: none;
}
.growth-field textarea { min-height: 62px; resize: vertical; }
.growth-field input:focus, .growth-field textarea:focus, .growth-field select:focus { border-color: var(--sage-ink); }
.growth-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.growth-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.growth-chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  border-radius: 999px; padding: 7px 13px; font-size: 12.5px; cursor: pointer;
}
.growth-chip.on { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.growth-chip.pain.on { background: var(--terra); border-color: var(--terra-ink); }
.growth-photos { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.growth-photo { position: relative; width: 72px; height: 88px; border-radius: 10px; overflow: hidden; background: var(--bg-deep); }
.growth-photo img { width: 100%; height: 100%; object-fit: cover; }
.growth-photo button {
  position: absolute; right: 3px; top: 3px; width: 19px; height: 19px; border-radius: 50%;
  border: 0; background: rgba(30,26,22,.66); color: #fff; font-size: 12px; line-height: 1; cursor: pointer;
}
.growth-session {
  display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line);
  padding: 10px 0; font-size: 12.5px;
}
.growth-session:last-child { border-bottom: 0; }
.growth-session .no { flex: none; width: 54px; color: var(--sage-dark); font-weight: 600; }
.growth-session .meta { flex: 1; min-width: 0; color: var(--muted); line-height: 1.5; }
.growth-session .meta b { color: var(--ink-soft); font-weight: 600; }
.growth-session .sel { flex: none; }
.growth-session .sel input { accent-color: var(--sage-dark); width: 16px; height: 16px; }
.growth-session .thumb { flex: none; width: 46px; height: 58px; border-radius: 8px; object-fit: cover; background: var(--bg-deep); }
.growth-note { font-size: 12px; color: var(--muted); line-height: 1.65; }
.growth-tip {
  border-left: 3px solid var(--sage); background: var(--sage-soft); border-radius: 0 12px 12px 0;
  padding: 9px 13px; font-size: 12.5px; line-height: 1.65; color: var(--ink-soft);
}
.growth-tip.warn { border-color: var(--terra-ink); background: #fbf0ea; }
.growth-daily { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.growth-daily div { background: var(--bg-deep); border-radius: 12px; padding: 10px 12px; font-size: 12px; line-height: 1.6; }
.growth-daily b { display: block; color: var(--ink-soft); margin-bottom: 2px; }
.growth-report-result { display: flex; flex-direction: column; gap: 10px; }
.growth-report-result .btns { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .growth-body { padding: 4px 16px 22px; }
  .growth-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .growth-list { grid-template-columns: 1fr; }
  .growth-stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .growth-two, .growth-daily { grid-template-columns: 1fr; }
}
/* 列表视图：文件少时一行一个，缩略图还留着，找起来更快 */
.library-grid.list-view { grid-template-columns: 1fr; gap: 8px; }
.library-grid.list-view .library-card {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 14px;
}
.library-grid.list-view .library-card:hover { transform: none; }
.library-grid.list-view .library-card .lib-thumb {
  width: 54px; height: 54px; flex: none; border-radius: 10px; overflow: hidden;
}
.library-grid.list-view .library-card .lib-meta { flex: 1; min-width: 0; padding: 0; }
.library-grid.list-view .library-card .lib-meta strong { font-size: 13px; }
.library-grid.list-view .library-card .lib-meta span { font-size: 11.5px; }
.library-grid.list-view .library-card .lib-check {
  position: static; flex: none; margin-left: 4px;
  border-color: var(--line-strong); background: #fff; color: var(--muted);
}
.library-grid.list-view .library-card.selected .lib-check {
  background: var(--sage-dark); border-color: var(--sage-dark); color: #fff;
}
.library-grid.list-view .library-card .blur-badge { display: none; }
.library-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 26px; border-top: 1px solid var(--line); background: var(--paper-2);
  font-size: 12px; color: var(--muted);
}
.library-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.library-actions .secondary-btn, .library-actions .danger-btn { padding: 8px 13px; font-size: 12px; }
.library-note-busy { opacity: .6; }

/* ---------- 示例成片 ---------- */
.demos { padding: 8px 0 72px; }
.demo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.demo-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 24px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.demo-card video {
  display: block; width: 100%; aspect-ratio: 9 / 16; background: #17140f;
  object-fit: contain;
}
.demo-body { padding: 14px 17px 17px; }
.demo-tag {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 10.5px;
  letter-spacing: .06em; color: var(--sage-dark); background: var(--sage-soft);
  border: 1px solid rgba(113,129,106,.18);
}
.demo-body h3 { margin: 8px 0 5px; font-family: var(--serif); font-size: 18px; }
.demo-body p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.demo-note {
  margin: 16px 0 0; color: var(--muted); font-size: 11.5px; text-align: center;
}
@media (max-width: 900px) {
  .demo-grid { grid-template-columns: 1fr; gap: 14px; }
  .demo-card { display: grid; grid-template-columns: 132px minmax(0, 1fr); }
  .demo-card video { height: 100%; min-height: 190px; aspect-ratio: auto; }
  .demo-body { padding: 14px; }
}
@media (max-width: 420px) {
  .demo-card { grid-template-columns: 112px minmax(0, 1fr); }
}

/* ---------- 导航：返回 / 首页 ---------- */
.home-btn svg { width: 15px; height: 15px; }
.nav-btn {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  border: 1px solid var(--line); background: rgba(255,253,248,.92);
  color: var(--ink-soft); border-radius: 999px; padding: 7px 12px 7px 9px;
  font-size: 12.5px; line-height: 1; min-height: var(--touch); transition: .2s var(--ease);
}
.nav-btn svg { width: 15px; height: 15px; }
.nav-btn:hover { border-color: var(--sage-ink); background: var(--sage-soft); color: var(--ink); }
.flow-toolbar {
  position: sticky; top: 0; z-index: 8;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0 -30px 14px; padding: 14px 18px 12px;
  background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.flow-head { padding-top: 6px; }
.flow-nav { display: flex; gap: 6px; }
.flow-close {
  position: static; float: none; margin: 0; flex: none;
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255,253,248,.92); color: var(--muted);
  display: grid; place-items: center;
}
.flow-close:hover { color: var(--ink); }
.library-nav { display: flex; gap: 6px; margin-bottom: 12px; }
.drawer-head-actions { display: flex; align-items: center; gap: 8px; }
.drawer-head-actions .nav-btn { padding: 7px 10px; }
.login-home {
  display: inline-flex; align-items: center; gap: 5px; margin: 12px auto 0;
  border: none; background: none; color: var(--muted); font-size: 12.5px; padding: 4px 8px;
}
.login-home svg { width: 14px; height: 14px; }
.login-home:hover { color: var(--ink); }

@media (max-width: 900px) {
  .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 14px 18px; }
}
@media (max-width: 680px) {
  .topbar-actions { gap: 6px; }
  .topbar-actions .ghost-btn { padding: 8px 12px; font-size: 12.5px; }
  .topbar-actions .home-btn { padding: 8px 10px; }
  .home-btn span { display: none; }
  .flow-toolbar { margin: 0 -18px 12px; padding: 12px 14px 10px; }
  .library-nav { margin-bottom: 10px; }
  .user-chip #userName { display: none; }
  .library-layer { padding: 0; align-items: end; }
  .library-panel { max-height: 94vh; max-height: 94dvh; border-radius: 24px 24px 0 0; }
  .library-head, .library-toolbar, .library-foot { padding-left: 16px; padding-right: 16px; }
  .library-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 14px 16px; }
  .library-search { width: auto; flex: 1 1 150px; min-width: 0; }
  .library-tools { width: 100%; justify-content: space-between; }
  /* 手机上第一眼就要看到「上传素材」：占满一整行、排在最前 */
  .lib-upload-btn { order: -2; width: 100%; justify-content: center; min-height: 46px; font-size: 14.5px; }
  .lib-new-collection { order: -1; }
  .collection-dialog-card { padding: 18px 16px; }
  .collection-dialog-actions .secondary-btn,
  .collection-dialog-actions .primary-btn { padding: 11px 16px; }
  .collection-dialog-card footer { flex-direction: column-reverse; align-items: stretch; }
  .collection-dialog-actions { margin-left: 0; }
  .collection-dialog-actions .secondary-btn,
  .collection-dialog-actions .primary-btn { flex: 1; justify-content: center; }
  .danger-text { align-self: flex-start; }
  .library-foot { flex-direction: column; align-items: stretch; padding-bottom: calc(13px + env(safe-area-inset-bottom)); }
  .drawer { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
  .library-actions { justify-content: flex-end; }
}

/* ---------- 我的（账号） ---------- */
.account-layer {
  position: fixed; inset: 0; z-index: 65; display: grid; place-items: center;
  background: rgba(38, 33, 26, .42); backdrop-filter: blur(10px);
  padding: 20px; animation: fade .25s ease both;
}
.account-card {
  position: relative; width: min(420px, 100%); background: var(--paper);
  border: 1px solid var(--line); border-radius: 28px; padding: 30px 26px 24px;
  box-shadow: var(--shadow-lg);
}
.account-close { position: absolute; right: 14px; top: 14px; }
.account-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; padding-right: 34px; }
.account-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--sage-dark); color: #f7f2e9;
  font-family: var(--serif); font-size: 22px;
}
.account-head h2 { margin: 0; font-family: var(--serif); font-size: 22px; }
.account-head p { margin: 2px 0 0; color: var(--muted); font-size: 12.5px; }
.account-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.account-stats > div {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 13px; text-align: center;
}
.account-stats strong { display: block; font-family: var(--serif); font-size: 24px; line-height: 1.2; }
.account-stats span { font-size: 11.5px; color: var(--muted); }
.account-actions { display: grid; gap: 8px; }
.account-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 13px 15px; text-align: left; transition: .2s var(--ease);
}
.account-row span { font-size: 14px; color: var(--ink); }
.account-row em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.account-row:hover { border-color: var(--sage-ink); background: var(--sage-soft); }
.account-row.danger span { color: var(--danger); }
.account-note { margin: 16px 0 0; text-align: center; color: var(--muted-2); font-size: 11.5px; }
.account-row.admin-entry span { color: var(--sage-dark); font-weight: 600; }
.login-invite-note {
  margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65;
}
.login-card > .login-trainee-note {
  margin: 10px 0 0; color: var(--muted-2); font-size: 12px; text-align: center;
}
.login-trainee-note a { color: var(--sage-dark); text-underline-offset: 3px; }

/* ---------- 账号管理（管理员） ---------- */
.admin-layer {
  position: fixed; inset: 0; z-index: 66; display: grid; place-items: center;
  background: rgba(38, 33, 26, .42); backdrop-filter: blur(10px);
  padding: 20px; animation: fade .25s ease both;
}
.admin-panel {
  width: min(720px, 100%); max-height: 90vh; display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg); padding: 24px 26px 20px; overflow: hidden;
}
.admin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.admin-head h2 { margin: 2px 0 4px; font-family: var(--serif); font-size: 25px; }
.admin-head p { margin: 0; color: var(--muted); font-size: 13px; }
.admin-head .eyebrow { margin: 0 0 2px; }
.admin-create {
  display: grid; grid-template-columns: 1.1fr 1.5fr auto; gap: 10px; align-items: end;
  margin: 18px 0 0; padding: 14px; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: 18px;
}
.admin-field { display: grid; gap: 6px; min-width: 0; }
.admin-field label { font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.admin-field input {
  width: 100%; border: 1px solid var(--line-strong); background: #fff;
  border-radius: 12px; padding: 10px 12px; outline: none; font-size: 14px;
}
.admin-field input:focus { border-color: var(--sage-ink); box-shadow: 0 0 0 3px rgba(113, 129, 106, .12); }
.admin-pass-row { display: flex; gap: 8px; }
.admin-pass-row input {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .02em;
}
.admin-pass-row .ghost-btn { padding: 0 14px; flex: none; }
.admin-create-btn { height: 42px; padding: 0 20px; white-space: nowrap; }
.admin-error { margin: 0 2px; min-height: 0; color: var(--danger); font-size: 12.5px; }
.admin-cred {
  margin-top: 14px; padding: 14px 16px; border-radius: 18px;
  background: var(--sage-soft); border: 1px solid rgba(113, 129, 106, .35);
}
.admin-cred-title { margin: 0 0 10px; font-size: 13px; color: var(--sage-dark); font-weight: 600; }
.admin-cred dl { margin: 0 0 8px; display: grid; gap: 6px; }
.admin-cred dl > div { display: flex; gap: 12px; align-items: baseline; }
.admin-cred dt { width: 44px; flex: none; font-size: 12px; color: var(--muted); }
.admin-cred dd { margin: 0; font-size: 15px; color: var(--ink); word-break: break-all; }
#adminCredPass { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; }
.admin-cred-tip { margin: 6px 0 0; font-size: 11.5px; color: var(--muted); }
.admin-list-head {
  display: flex; align-items: baseline; justify-content: space-between; margin: 20px 2px 8px;
}
.admin-list-head h3 { margin: 0; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.admin-list-head span { font-size: 12px; color: var(--muted); }
.admin-list { display: grid; gap: 8px; align-content: start; }
.admin-user {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.admin-user-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage-dark); font-family: var(--serif); font-size: 15px;
}
.admin-user-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.admin-user-info strong {
  font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.admin-user-info small {
  color: var(--muted); font-size: 11.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-badge {
  font-style: normal; font-size: 10.5px; padding: 1px 7px; border-radius: 999px;
  background: var(--sage-dark); color: #f7f2e9; font-weight: 500;
}
.admin-badge.self { background: rgba(185, 154, 99, .18); color: var(--gold); }
.admin-user .ghost-btn { flex: none; padding: 6px 12px; font-size: 12px; }
.admin-empty { margin: 8px 2px; color: var(--muted); font-size: 12.5px; line-height: 1.7; }

/* 管理平台：考试记录 */
.admin-exam-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-exam-list { gap: 10px; }
.admin-exam-item { display: block; padding: 0; overflow: hidden; }
.admin-exam-summary {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  cursor: pointer; list-style: none;
}
.admin-exam-summary::-webkit-details-marker { display: none; }
.admin-exam-item[open] .admin-exam-summary { border-bottom: 1px solid var(--line); }
.exam-caret {
  width: 9px; height: 9px; flex: none; margin-right: 4px;
  border-right: 1.6px solid var(--muted-2); border-bottom: 1.6px solid var(--muted-2);
  transform: rotate(45deg); transition: transform .2s var(--ease);
}
.admin-exam-item[open] .exam-caret { transform: rotate(-135deg); }
.admin-exam-rows { display: grid; gap: 1px; background: var(--line); }
.admin-exam-row {
  display: grid; grid-template-columns: 122px 34px 1fr 1fr auto; gap: 8px;
  align-items: center; padding: 8px 12px; background: #fff; font-size: 12px;
  color: var(--muted);
}
.admin-exam-row .exam-score { color: var(--ink); font-weight: 600; }
/* 补考授权：一条说明 + 一个按钮，放在每场记录下面 */
.admin-exam-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px 11px; background: #fff; border-top: 1px dashed var(--line);
}
.admin-exam-note { font-size: 12px; color: var(--sage-dark); }
.admin-exam-foot .ghost-btn { flex: none; }
.exam-chip { font-style: normal; font-size: 10.5px; padding: 1px 8px; border-radius: 999px; }
.exam-chip.pass { background: var(--sage-soft); color: var(--sage-dark); }
.exam-chip.fail { background: #f7e5df; color: var(--danger); }
.password-card h2 { font-size: 24px; }

/* 管理平台：概览看板 */
.admin-tabs {
  display: flex; gap: 6px; margin: 16px 0 0; padding: 4px; width: fit-content;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: 999px;
}
.admin-tab {
  border: 0; background: none; color: var(--muted);
  font-size: 13px; padding: 7px 18px; border-radius: 999px; transition: .2s var(--ease);
}
.admin-tab.on { background: var(--sage-dark); color: #f7f2e9; }
.admin-tab-count {
  display: inline-block; min-width: 17px; margin-left: 3px; padding: 0 5px;
  border-radius: 999px; background: var(--gold); color: #fff; font-size: 10px; line-height: 16px;
}
.admin-tab.on .admin-tab-count { background: rgba(255, 255, 255, .22); }
.admin-body { flex: 1; min-height: 0; overflow-y: auto; padding-right: 2px; margin-top: 14px; }
.admin-view { display: grid; gap: 14px; }
.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.admin-stat {
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 16px; padding: 12px 13px;
}
.admin-stat span { display: block; font-size: 11.5px; color: var(--muted); }
.admin-stat strong {
  display: block; font-family: var(--serif); font-size: 24px; line-height: 1.25; margin-top: 2px;
}
.admin-stat small { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 2px; line-height: 1.4; }
.admin-block { border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; background: #fff; }
.admin-block h3 { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.admin-block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.admin-block-head h3 { margin: 0; }
.admin-block-head span { font-size: 11.5px; color: var(--muted); }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.admin-chart { display: flex; align-items: flex-end; gap: 8px; height: 118px; padding-top: 4px; }
.admin-chart.is-empty { height: auto; align-items: flex-start; }
.admin-chart.is-empty .admin-empty { margin: 4px 0; }
.admin-bar {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: 3px;
}
.admin-bar span { font-size: 10.5px; color: var(--muted); }
.admin-bar i {
  display: block; width: 100%; max-width: 36px; border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, var(--sage) 0%, var(--sage-dark) 100%);
}
.admin-bar em { font-style: normal; font-size: 10.5px; color: var(--muted-2); }
.admin-template-list { display: grid; gap: 9px; }
.admin-tpl { display: grid; grid-template-columns: 64px 1fr 28px; align-items: center; gap: 8px; }
.admin-tpl span { font-size: 12px; color: var(--ink-soft); }
.admin-tpl i { display: block; height: 7px; background: var(--bg-deep); border-radius: 999px; overflow: hidden; }
.admin-tpl b { display: block; height: 100%; border-radius: 999px; background: var(--sage); }
.admin-tpl em { font-style: normal; font-size: 11.5px; color: var(--muted); text-align: right; }
.admin-storage { display: grid; gap: 8px; }
.admin-store-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.admin-store-row strong { color: var(--ink); font-weight: 600; }
.admin-recent { display: grid; gap: 8px; }
.admin-recent-row { display: flex; align-items: center; gap: 10px; }
.admin-recent-row strong { display: block; font-size: 13px; }
.admin-recent-row small { color: var(--muted); font-size: 11px; }
.admin-status {
  flex: none; font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--sage-soft); color: var(--sage-dark);
}
.admin-status.failed { background: #f7e5df; color: var(--danger); }
.admin-status.running, .admin-status.queued { background: #f3ead8; color: var(--gold); }
/* 管理平台：运行看板 */
.ops-head { align-items: center; gap: 10px; }
.ops-head .ghost-btn { margin-left: auto; flex: none; }
.ops-updated { font-size: 11.5px; color: var(--muted); }
.ops-updated.ops-warn { color: var(--danger); font-weight: 600; }
.ops-bar {
  flex: none; display: block; width: 86px; height: 6px;
  background: var(--bg-deep); border-radius: 999px; overflow: hidden;
}
.ops-bar b { display: block; height: 100%; border-radius: 999px; background: var(--sage); }
.ops-upload { align-items: center; }
.ops-upload > div { flex: 1; min-width: 0; }
.ops-upload strong, .ops-upload small {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ops-dot {
  flex: none; width: 7px; height: 7px; border-radius: 50%;
  background: var(--line); margin: 0 2px;
}
.ops-dot.on { background: var(--sage); box-shadow: 0 0 0 3px rgba(122, 143, 120, .16); }
.ops-online {
  font-style: normal; font-size: 10px; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; background: var(--sage-soft); color: var(--sage-dark);
}
.ops-warn-tag {
  font-style: normal; font-size: 10px; margin-left: 6px; padding: 1px 6px;
  border-radius: 999px; background: #f7e5df; color: var(--danger);
}
.admin-top { display: grid; gap: 8px; }
.admin-top-row { display: flex; align-items: center; gap: 10px; }
.admin-top-row strong { font-size: 13px; display: flex; align-items: center; gap: 6px; }
.admin-top-row small { color: var(--muted); font-size: 11px; }
.admin-note { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.admin-foot-note { margin: 0; text-align: center; color: var(--muted-2); font-size: 11.5px; }

/* 管理平台：成品审核 */
.admin-review-filter { display: flex; gap: 6px; flex-wrap: wrap; }
.review-filter {
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  font-size: 12.5px; padding: 6px 14px; border-radius: 999px; transition: .2s var(--ease);
}
.review-filter b { font-weight: 600; margin-left: 2px; }
.review-filter.on { background: var(--sage-dark); border-color: var(--sage-dark); color: #f7f2e9; }
.admin-review-list { display: grid; gap: 9px; }
.admin-review-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff;
}
.admin-review-thumb {
  width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden;
  background: var(--bg-deep); display: grid; place-items: center;
}
.admin-review-thumb img { width: 100%; height: 100%; object-fit: cover; }
.review-thumb-play {
  all: unset; display: block; width: 100%; height: 100%; cursor: pointer;
}
.review-thumb-play:focus-visible { outline: 2px solid var(--sage-dark); outline-offset: 2px; }
.review-doc { font-size: 11px; letter-spacing: .06em; color: var(--muted); }
.admin-review-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.admin-review-info strong {
  font-size: 13.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-review-info small { color: var(--muted); font-size: 11.5px; }
.review-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.review-who { font-size: 11px; color: var(--muted-2); }
.review-reject-note { margin: 3px 0 0; font-size: 11.5px; color: var(--danger); line-height: 1.5; }
.admin-review-actions { flex: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.admin-review-actions .ghost-btn,
.admin-review-actions .primary-btn,
.admin-review-actions .text-btn { font-size: 12px; padding: 6px 12px; }
@media (max-width: 680px) {
  .admin-review-item { flex-wrap: wrap; }
  .admin-review-actions { width: 100%; justify-content: flex-start; }
}

/* ---------- 手机底部导航 ---------- */
.tabbar { display: none; }
@media (max-width: 680px) {
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 253, 248, .95);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 30px rgba(72, 61, 44, .08);
  }
  body.locked .tabbar { display: none; }
  .tabbar-btn {
    border: 0; background: none; color: var(--muted);
    display: grid; justify-items: center; gap: 2px;
    padding: 5px 2px; font-size: 10.5px; line-height: 1.2;
  }
  .tabbar-btn svg { width: 22px; height: 22px; }
  .tabbar-btn.on { color: var(--sage-dark); font-weight: 600; }
  .account-layer { padding: 0; align-items: end; }
  .account-card {
    border-radius: 24px 24px 0 0;
    padding: 28px 20px calc(20px + env(safe-area-inset-bottom));
  }
  .admin-layer { padding: 0; align-items: end; }
  .admin-panel {
    max-height: 94vh; max-height: 94dvh; border-radius: 24px 24px 0 0;
    padding: 20px 16px calc(16px + env(safe-area-inset-bottom));
  }
  .admin-create { grid-template-columns: 1fr; }
  .admin-create-btn { width: 100%; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-cols { grid-template-columns: 1fr; }
  .admin-tabs { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .admin-tabs::-webkit-scrollbar { display: none; }
  .admin-tab { flex: none; padding: 7px 14px; }
  .admin-block-head { flex-wrap: wrap; gap: 6px; }
  .ops-bar { width: 56px; }
  .admin-chart { height: 104px; }
}

@media (max-width: 680px) {
  /* 底部导航接管一级入口，顶部只留品牌和账号，减少重复 */
  .topbar-actions .ghost-btn { display: none; }
  .topbar { padding-top: calc(10px + env(safe-area-inset-top)); }
  .toast-wrap { bottom: calc(82px + env(safe-area-inset-bottom)); }
  body.locked .toast-wrap { bottom: 26px; }
  /* 考试记录：手机上两行一条，日期/用时在左，级别/分数在右 */
  .admin-exam-row { grid-template-columns: 1fr auto; column-gap: 10px; row-gap: 2px; }
  .admin-exam-row .exam-when { grid-column: 1; }
  .admin-exam-row .exam-lv { grid-column: 2; text-align: right; }
  .admin-exam-row .exam-time { grid-column: 1; }
  .admin-exam-row .exam-score { grid-column: 2; text-align: right; }
  .admin-exam-row .exam-chip { grid-column: 1 / -1; justify-self: start; }
  /* 素材库：手机上空出高度给素材，标题只说一次 */
  .library-head { padding: 18px 18px 8px; }
  .library-head .eyebrow, .library-head #libraryNote { display: none; }
  .library-toolbar { padding: 6px 18px 10px; }
}

/* ---------- 快速开始 / 创作入口 ---------- */
.quick-start {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin: 18px 0 0; padding: 11px 16px; border: 1px solid var(--line);
  background: rgba(255,253,248,.72); border-radius: 16px; box-shadow: var(--shadow-sm);
}
.quick-start-copy { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.quick-start-copy strong { font-size: 13px; letter-spacing: .04em; }
.quick-start-copy span { font-size: 12px; color: var(--muted); }
.quick-start-actions { display: flex; gap: 8px; align-items: center; }
.quick-start-actions .primary-btn.small { padding: 9px 18px; }
.quick-start-paths { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
/* 手机上顶部按钮收进底部导航，成长档案只剩「我的」一条路；首页补一个直达 */
.quick-growth-btn { display: none; }
@media (max-width: 900px) {
  .quick-growth-btn { display: inline-flex; margin-left: auto; padding: 6px 13px; font-size: 12px; }
}
.quick-path {
  flex: 1 1 190px; min-width: 170px; max-width: 270px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 9px 14px 10px; transition: .2s var(--ease);
}
.quick-path strong { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
.quick-path span { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.quick-path:hover { border-color: var(--sage-ink); background: var(--sage-soft); transform: translateY(-1px); }
.quick-path.primary { background: var(--sage-dark); border-color: var(--sage-dark); }
.quick-path.primary strong { color: #fff; }
.quick-path.primary span { color: rgba(255,255,255,.78); }
.quick-path.primary:hover { background: var(--sage); border-color: var(--sage-ink); }

/* 体态检测入口：手机顶部按钮收进底部导航后，首页这里仍能一眼看到 */
.posture-entry {
  display: flex; align-items: center; gap: 14px;
  margin: 12px 0 0; padding: 12px 16px;
  border: 1px solid rgba(113,129,106,.30); border-radius: 16px;
  background: linear-gradient(135deg, rgba(113,129,106,.10), rgba(185,154,99,.08));
  text-decoration: none; color: var(--ink);
  transition: .2s var(--ease);
}
.posture-entry:hover { border-color: var(--sage); transform: translateY(-1px); }
.posture-entry-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--sage-dark); color: #fff;
}
.posture-entry-mark svg { width: 22px; height: 22px; }
.posture-entry-copy { display: grid; gap: 2px; min-width: 0; }
.posture-entry-copy strong { font-size: 14px; }
.posture-entry-copy span { font-size: 12px; line-height: 1.45; color: var(--muted); }
.posture-entry-go { margin-left: auto; flex: none; font-size: 12.5px; font-weight: 600; color: var(--sage-dark); }
@media (max-width: 680px) {
  .posture-entry { margin-top: 10px; padding: 11px 13px; gap: 11px; }
  .posture-entry-copy span { font-size: 11.5px; }
  .posture-entry-go { font-size: 12px; }
}
a.tabbar-btn, a.account-row { text-decoration: none; }
a.account-row { color: inherit; }

.create-layer {
  position: fixed; inset: 0; z-index: 62; display: grid; place-items: center;
  padding: 24px; background: rgba(30,26,20,.42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.create-panel {
  width: min(640px, 100%); max-height: 88vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg); padding: 24px 24px 20px; animation: rise .35s var(--ease) both;
}
.create-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.create-head h2 { margin: 2px 0 4px; font-family: var(--serif); font-size: 26px; }
.create-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 34em; }
.create-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 14px; }
.create-item {
  text-align: left; border: 1px solid var(--line); background: var(--paper-2);
  border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 5px;
  transition: .2s var(--ease);
}
.create-item:hover { border-color: var(--sage-ink); background: #fffdf8; transform: translateY(-1px); }
.create-item b { font-size: 15px; }
.create-item span { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.create-item em { font-style: normal; font-size: 11px; color: var(--sage-dark); }
.create-foot { margin: 0; font-size: 11.5px; color: var(--muted-2); }

/* ---------- 场景详情：单个功能单独说明 ---------- */
.scene-layer {
  position: fixed; inset: 0; z-index: 62; display: grid; place-items: center;
  padding: 24px; background: rgba(38, 33, 26, .42);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fade .25s ease both;
}
.scene-panel {
  position: relative; width: min(620px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg); padding: 0 26px 24px;
  animation: rise .4s var(--ease) both; scrollbar-width: thin;
}
.scene-toolbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
  margin: 0 -26px 16px; padding: 14px 18px 12px; background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.scene-detail-head h2 { margin: 4px 0 8px; font-family: var(--serif); font-size: clamp(26px, 3.4vw, 34px); }
.scene-detail-head p { margin: 0 0 12px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.scene-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.scene-meta span {
  font-size: 11.5px; color: var(--muted); border: 1px solid var(--line);
  background: var(--paper-2); padding: 4px 10px; border-radius: 999px;
}
.scene-demo {
  display: flex; gap: 14px; align-items: center; margin: 18px 0 0;
  padding: 12px; border: 1px solid var(--line); background: #fffdf8; border-radius: 18px;
}
.scene-demo video {
  flex: none; width: 118px; aspect-ratio: 9 / 16; border-radius: 12px;
  background: #171410; object-fit: cover;
}
.scene-demo figcaption { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.scene-demo b { font-size: 13px; }
.scene-demo span { font-size: 12px; line-height: 1.6; color: var(--ink-soft); }
.scene-demo em { font-style: normal; font-size: 10.5px; line-height: 1.5; color: var(--muted-2); }
.detail-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.detail-block h3 {
  margin: 0 0 11px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 9px;
}
.detail-block h3 b {
  width: 22px; height: 22px; border-radius: 50%; background: var(--sage-dark); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 600;
}
.detail-check, .detail-gets { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.detail-check li, .detail-gets li {
  position: relative; padding-left: 23px; font-size: 13px; line-height: 1.6; color: var(--ink-soft);
}
.detail-check li::before {
  content: "✓"; position: absolute; left: 1px; top: 0; color: var(--sage-dark); font-size: 12px;
}
.detail-gets li::before {
  content: "→"; position: absolute; left: 0; top: 0; color: var(--gold, #b07050); font-size: 13px;
}
.detail-tools { display: flex; flex-wrap: wrap; gap: 7px; }
.detail-tools span {
  font-size: 11.5px; padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fffdf8; color: var(--ink-soft);
}
.detail-note { margin: 9px 0 0; font-size: 11.5px; color: var(--muted-2); }
.scene-cta { display: flex; align-items: center; gap: 14px; margin-top: 24px; }
.scene-cta .primary-btn { flex: 1; }
.scene-more { margin-top: 2px; font-size: 11px; color: var(--sage-dark); letter-spacing: .02em; }

/* ---------- 三步创作向导 ---------- */
.flow-steps { display: flex; align-items: center; gap: 8px; margin: 16px 0 7px; }
.flow-step {
  border: 0; background: none; padding: 0; color: var(--muted);
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; white-space: nowrap;
}
.flow-step b {
  width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  background: var(--paper-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600;
}
.flow-step.on { color: var(--ink); font-weight: 600; }
.flow-step.on b { background: var(--sage-dark); border-color: var(--sage-dark); color: #fff; }
.flow-step.done b { background: var(--sage-soft); border-color: var(--sage-ink); color: var(--sage-dark); }
.flow-step-line { flex: 1; height: 1px; background: var(--line); min-width: 12px; }
.flow-progress { height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; margin-bottom: 6px; }
.flow-progress i { display: block; height: 100%; width: 33.33%; background: var(--sage); transition: width .3s var(--ease); }
.flow-anchor-quote {
  margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--sage);
  background: var(--sage-soft); border-radius: 0 14px 14px 0; font-size: 12.5px;
  color: var(--ink-soft); line-height: 1.65;
}
.flow-anchor-quote b { font-weight: 600; }
.flow-anchor-quote span { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.flow-footer {
  position: sticky; bottom: 0; z-index: 4;
  margin: 20px -30px 0; padding: 13px 30px 16px;
  display: flex; align-items: center; gap: 14px;
  /* 不透明底 + 上缘阴影：滚动内容在按钮栏处干净收住，不会透出半截文字。 */
  background: var(--paper);
  border-top: 1px solid var(--line);
  box-shadow: 0 -14px 20px -16px rgba(60, 50, 40, .28);
}
.flow-footer .text-btn { flex: none; }
.flow-footer-mid { flex: 1; min-width: 0; }
.flow-footer-mid span { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.flow-footer .primary-btn { flex: none; min-width: 150px; padding: 12px 20px; }

/* 每个上传区里的素材库直选 */
.zone-lib { border-top: 1px dashed var(--line); padding-top: 10px; margin-top: 2px; min-height: 20px; }
.zone-lib-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.zone-lib-head span { font-size: 11px; color: var(--muted); }
.zone-lib-head button { border: 0; background: none; color: var(--sage-dark); font-size: 11px; padding: 0; }
.zone-lib-row { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.zone-lib-item {
  flex: none; width: 48px; height: 48px; border-radius: 11px; overflow: hidden;
  border: 1px solid var(--line); background: #eee; padding: 0; position: relative;
}
.zone-lib-item img { width: 100%; height: 100%; object-fit: cover; }
.zone-lib-item::after {
  content: "+"; position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: rgba(77,93,70,.92); color: #fff;
  font-size: 12px; line-height: 16px; text-align: center;
}
.zone-lib-empty { font-size: 11px; color: var(--muted-2); line-height: 1.55; margin: 0; }

/* 360° 拍摄示意 */
.orbit-guide {
  display: flex; gap: 16px; align-items: center; border: 1px solid var(--line);
  background: #fffdf8; border-radius: 18px; padding: 13px 15px; margin: 8px 0 14px;
}
.orbit-diagram {
  flex: none; width: 108px; height: 108px; position: relative; border-radius: 50%;
  border: 1px dashed var(--line-strong); background: radial-gradient(circle, #fffdf8 56%, #f4eee2 57%);
}
.orbit-diagram .person {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: 30px; height: 30px; border-radius: 50%; background: var(--sage-soft);
  border: 1px solid var(--sage); color: var(--sage-dark);
  display: grid; place-items: center; font-size: 11px; z-index: 2;
}
.orbit-diagram .cam {
  position: absolute; width: 19px; height: 19px; border-radius: 50%;
  background: var(--sage-dark); color: #fff; font-size: 9px;
  display: grid; place-items: center; transform: translate(-50%,-50%);
}
.orbit-diagram .cam:nth-child(2) { left: 50%; top: 7%; }
.orbit-diagram .cam:nth-child(3) { left: 84%; top: 28%; }
.orbit-diagram .cam:nth-child(4) { left: 84%; top: 72%; }
.orbit-diagram .cam:nth-child(5) { left: 50%; top: 93%; }
.orbit-diagram .cam:nth-child(6) { left: 16%; top: 72%; }
.orbit-diagram .cam:nth-child(7) { left: 16%; top: 28%; }
.orbit-guide-body > b { font-size: 13px; display: block; margin-bottom: 4px; }
.orbit-guide-body ol { margin: 0; padding-left: 17px; font-size: 12px; color: var(--ink-soft); line-height: 1.7; }
.shot-guide { align-items: flex-start; }
.shot-guide .orbit-guide-body { min-width: 0; }
.shot-note { margin: 6px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted-2); }

/* 360°：先挑动作，再讲这一圈怎么绕 */
.orbit-pose-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin: 0 0 10px;
}
.orbit-pose-label {
  flex: none; font-size: 11px; font-weight: 600; letter-spacing: .04em;
  color: var(--muted-2); margin-right: 2px;
}
.orbit-pose-row .chip.mini { min-height: 32px; }

/* 拍摄示意：几张照片、什么顺序 */
.shot-diagram { flex: none; display: flex; align-items: center; gap: 5px; padding-top: 2px; }
.shot-diagram .shot-pane {
  position: relative; width: 44px; height: 62px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: linear-gradient(180deg, #fffdf8, #f1e9dc);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  padding-bottom: 4px; overflow: hidden;
}
.shot-diagram .shot-pane em {
  position: relative; z-index: 1;
  font-style: normal; font-size: 8.5px; line-height: 1.1;
  color: var(--ink-soft); white-space: nowrap;
  background: rgba(255, 253, 248, .92); padding: 1px 3px; border-radius: 4px;
}
.shot-diagram .shot-figure { position: relative; width: 18px; height: 32px; margin-bottom: 3px; }
.shot-diagram .shot-figure::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 8px; height: 8px; border-radius: 50%; background: var(--sage-dark); opacity: .45;
}
.shot-diagram .shot-figure::after {
  content: ""; position: absolute; top: 9px; left: 50%; transform: translateX(-50%);
  width: 13px; height: 23px; border-radius: 7px 7px 4px 4px;
  background: var(--sage-soft); border: 1px solid var(--sage);
}
.shot-diagram .shot-same {
  font-size: 8.5px; line-height: 1.25; text-align: center; color: var(--sage-dark);
  padding: 0 4px; border-left: 1px dashed var(--line-strong);
  border-right: 1px dashed var(--line-strong);
}
.shot-diagram.tl .shot-pane { width: 38px; }
.shot-diagram.promo .shot-pane { width: 32px; height: 56px; }

/* 360° 俯视拍摄图：8 个机位，从正面起步 */
.orbit-shoot { align-items: flex-start; }
.orbit-map-figure { flex: none; width: 230px; margin: 0; }
.orbit-map-figure svg { display: block; width: 100%; height: auto; }
.orbit-map-figure figcaption {
  margin-top: 3px; font-size: 10.5px; line-height: 1.4;
  color: var(--muted); text-align: center;
}
.orbit-map-label { font-size: 13px; font-weight: 700; fill: var(--sage-dark); }
.orbit-map-cam circle { fill: var(--sage-dark); }
.orbit-map-cam.start circle { fill: var(--terra); }
.orbit-map-cam text { font-size: 12px; font-weight: 700; fill: #fff; text-anchor: middle; }
.orbit-prep { display: flex; gap: 18px; align-items: flex-start; }
.orbit-prep .detail-check { flex: 1 1 auto; min-width: 0; }
.orbit-plan-note { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }

/* 前后对比：先选角度，再看拍摄图例 */
.shoot-guide { padding: 14px 16px 12px; }
.shoot-lead { margin: 0 0 10px; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.shot-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.shot-plan {
  appearance: none; -webkit-appearance: none; min-width: 0; font-family: inherit;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 6px 7px; border: 1.5px solid var(--line); border-radius: 14px;
  background: #fffdf8; color: var(--ink-soft); cursor: pointer; text-align: center;
  transition: border-color .16s, background .16s, box-shadow .16s;
}
.shot-plan:hover { border-color: var(--sage-ink); background: #fff; }
.shot-plan.on {
  border-color: var(--terra-ink); background: #fdf1e8;
  box-shadow: 0 0 0 3px rgba(189, 122, 91, .10);
}
.shot-plan-fig { display: block; width: 64px; }
.shot-plan-fig svg { display: block; width: 100%; height: auto; }
.shot-plan b { font-size: 11.5px; line-height: 1.35; color: var(--ink); font-weight: 600; }
.shot-plan em {
  font-style: normal; font-size: 10px; line-height: 1.4; color: var(--terra-ink);
  background: rgba(189, 122, 91, .10); padding: 1px 7px; border-radius: 99px;
}
.shot-plan.on em { color: #fff; background: var(--terra); }
.shot-plan-lv {
  font-size: 9.5px; line-height: 1.4; padding: 1px 6px; border-radius: 99px;
  color: var(--sage-dark); background: var(--sage-soft);
}
.shot-plan-lv.adv { color: var(--muted); background: rgba(125, 116, 104, .10); }
.shot-plan.on .shot-plan-lv { background: rgba(255, 255, 255, .72); }
.shot-plan.on .shot-plan-lv.adv { color: var(--muted); background: rgba(255, 255, 255, .68); }
.shot-plan-grid.static .shot-plan { cursor: default; }
.shot-plan-grid.static .shot-plan:hover { border-color: var(--line); background: #fffdf8; }
.sf-ground { stroke: #cdbfa9; stroke-width: 1.4; stroke-dasharray: 2 3; }
.sf-line { stroke: var(--sage-dark); stroke-width: 5.6; stroke-linecap: round; opacity: .92; }
.sf-line.sf-far { opacity: .38; }
.sf-accent { stroke: var(--terra); stroke-width: 1.5; opacity: .8; }
.sf-head { fill: #e8efe2; stroke: var(--sage-dark); stroke-width: 2.6; }
.sf-joint { fill: var(--terra); }
.shot-plan-detail {
  margin-top: 10px; padding: 10px 12px; border-radius: 12px;
  background: #f7f2e8; border: 1px solid var(--line);
}
.shot-plan-detail-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 5px; }
.shot-plan-detail-head b { font-size: 13px; }
.shot-plan-detail-head em {
  font-style: normal; font-size: 10px; color: var(--sage-dark);
  background: var(--sage-soft); border-radius: 99px; padding: 1px 8px;
}
.shot-plan-detail-head em.lv.adv { color: var(--muted); background: rgba(125, 116, 104, .10); }
.shot-plan-detail p { margin: 3px 0 0; font-size: 12px; line-height: 1.65; color: var(--ink-soft); }
.shot-plan-detail p strong {
  display: inline-block; min-width: 42px; color: var(--ink); font-weight: 600; margin-right: 2px;
}
.shot-plan-detail .shot-tip { margin-top: 6px; color: var(--terra-ink); font-size: 11.5px; }
.shoot-detail-plans { margin-top: 12px; }
.shoot-detail-plans .orbit-plan-note { margin: 0 0 10px; }

/* 360°：正面 / 侧面 / 背面各看什么 */
b.orbit-view-title { display: block; margin: 10px 0 6px; font-size: 12.5px; }
.orbit-views { display: flex; flex-direction: column; gap: 6px; }
.orbit-view {
  display: flex; align-items: center; gap: 10px; padding: 6px 9px;
  border-radius: 12px; background: #f7f2e8; border: 1px solid var(--line);
}
.orbit-view-fig { flex: none; width: 42px; }
.orbit-view-fig svg { display: block; width: 100%; height: auto; }
.orbit-view b { font-size: 11.5px; }
.orbit-view em {
  font-style: normal; margin-left: 6px; padding: 1px 7px; border-radius: 99px;
  font-size: 9.5px; color: var(--terra-ink); background: var(--terra-soft); white-space: nowrap;
}
.orbit-view p { margin: 2px 0 0; font-size: 11px; line-height: 1.55; color: var(--ink-soft); }
.orbit-view-block { margin-top: 12px; }
.orbit-view-block .orbit-plan-note { margin-top: 8px; }

/* 手机底部中间的创作入口 */
.tabbar-create { position: relative; }
.tabbar-plus {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-dark); color: #fff; font-size: 27px; line-height: 1;
  margin-top: -19px; border: 4px solid var(--paper);
  box-shadow: 0 8px 18px rgba(77,93,70,.28);
}
.tabbar-create.on .tabbar-plus { background: var(--ink); }

@media (max-width: 680px) {
  .quick-start { margin-top: 12px; padding: 10px 13px; flex-direction: column; align-items: stretch; gap: 8px; }
  .quick-start-copy span { display: none; }
  .quick-start-paths { width: 100%; }
  .quick-path { flex: 1 1 0; min-width: 0; max-width: none; padding: 8px 11px 9px; }
  .quick-path strong { font-size: 12.5px; }
  .quick-path span { font-size: 10.5px; }
  .quick-start-actions .quick-lib-btn, .quick-lib-btn { display: none; }
  /* 六个一级入口：首页 / 素材库 / 创作 / 体态 / 作品 / 我的 */
  .tabbar { grid-template-columns: repeat(6, 1fr); }
  .create-layer { padding: 0; align-items: end; }
  .create-panel { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 26px 26px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); }
  .create-list { grid-template-columns: 1fr; gap: 10px; }
  .ideas-layer { padding: 0; align-items: end; }
  .ideas-panel {
    width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 26px 26px 0 0;
    padding: 0 18px calc(20px + env(safe-area-inset-bottom));
  }
  .ideas-head { margin: 0 -18px 14px; padding: 12px 14px 10px; }
  .ideas-teaser { padding: 16px 18px; border-radius: 20px; }
  .ideas-teaser .primary-btn { width: 100%; }
  .scene-layer { padding: 0; align-items: end; }
  .scene-panel {
    width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 26px 26px 0 0;
    padding: 0 18px calc(20px + env(safe-area-inset-bottom));
  }
  .scene-toolbar { margin: 0 -18px 14px; padding: 12px 14px 10px; }
  .scene-detail-head h2 { font-size: 25px; }
  .scene-demo { gap: 11px; padding: 10px; }
  .scene-demo video { width: 96px; }
  .scene-cta { margin: 22px 0 4px; }
  .flow-footer { margin: 18px -18px 0; padding: 12px 18px calc(13px + env(safe-area-inset-bottom)); }
  .flow-footer .primary-btn { min-width: 128px; padding: 11px 15px; }
  .flow-step span { font-size: 11px; }
  .flow-step { gap: 5px; }
  .flow-step b { width: 24px; height: 24px; font-size: 11px; }
  .orbit-guide { align-items: flex-start; gap: 12px; padding: 12px; }
  .orbit-shoot { flex-direction: column; align-items: stretch; gap: 10px; }
  .orbit-map-figure { width: 200px; margin: 0 auto; }
  .orbit-prep { flex-direction: column; gap: 10px; }
  .orbit-prep .orbit-map-figure { margin: 2px auto 0; }
  .orbit-plan-note { font-size: 11.5px; }
  b.orbit-view-title { font-size: 12px; margin-top: 8px; }
  .orbit-view { padding: 5px 8px; gap: 8px; }
  .orbit-view-fig { width: 36px; }
  .orbit-view p { font-size: 10.5px; }
  .shoot-guide { padding: 12px; }
  .shoot-lead { font-size: 11.5px; }
  .shot-plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .shot-plan { padding: 7px 5px 6px; border-radius: 12px; }
  .shot-plan-fig { width: 56px; }
  .shot-plan b { font-size: 11px; }
  .shot-plan-detail { padding: 9px 10px; }
  .shot-plan-detail p { font-size: 11.5px; }
  .orbit-diagram { width: 82px; height: 82px; }
  .orbit-diagram .person { width: 24px; height: 24px; font-size: 10px; }
  .orbit-diagram .cam { width: 16px; height: 16px; font-size: 8px; }
  .orbit-guide-body ol { font-size: 11.5px; padding-left: 15px; }
  .shot-diagram { gap: 4px; }
  .shot-diagram .shot-pane { width: 36px; height: 54px; }
  .shot-diagram.tl .shot-pane { width: 31px; }
  .shot-diagram.promo .shot-pane { width: 26px; height: 48px; }
  .shot-diagram .shot-figure { height: 28px; margin-bottom: 2px; }
  .shot-diagram .shot-figure::after { height: 20px; }
  .shot-note { font-size: 10.5px; }
  .zone-lib-item { width: 52px; height: 52px; }
}

/* 同角度 / 指标预检 */
.rec-compare {
  flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px 14px;
  margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line-strong);
}
.rec-angle { flex-basis: 100%; font-size: 11px; color: var(--muted); }
.rec-angle.ok { color: var(--sage-dark); }
.rec-angle.warn { color: #a8643f; }
.rec-metric {
  display: inline-flex; align-items: baseline; gap: 5px; font-size: 11.5px;
  color: var(--ink-soft); background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 3px 9px;
}
.rec-metric em { font-style: normal; color: var(--muted); }
.rec-metric b { font-weight: 600; color: var(--sage-dark); }

/* ---------- 宽度 / 横屏适配 ---------- */
/* 780–900 这一段顶部已经有「素材库」，快速开始里就不再放第三个按钮，两张卡片也不会莫名换行。 */
@media (max-width: 900px) {
  .quick-lib-btn { display: none; }
  .quick-start-paths { flex-wrap: nowrap; }
}
/* 手机横过来时高度只有 360–390px：弹层收紧留白，让内容真的放得下。 */
@media (orientation: landscape) and (max-height: 520px) {
  .topbar { padding-top: calc(12px + env(safe-area-inset-top)); padding-bottom: 2px; }
  .library-layer {
    padding: 8px calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
  }
  .library-panel { width: 100%; height: 100%; max-height: none; border-radius: 18px; }
  .library-head { padding: 10px 18px 4px; align-items: center; }
  .library-head h2 { font-size: 20px; margin-bottom: 2px; }
  #libraryNote { display: none; }
  .library-head .eyebrow { margin-bottom: 2px; }
  .library-nav { margin-bottom: 4px; }
  .library-nav .nav-btn { min-height: 32px; padding: 5px 9px; }
  .library-toolbar { padding: 4px 18px 8px; gap: 6px; }
  .library-grid { grid-template-columns: repeat(4, minmax(0,1fr)); padding: 8px 18px; gap: 8px; }
  .library-foot { padding: 6px 18px; }
  .drawer {
    padding: 16px calc(18px + env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) 18px;
  }
  .drawer-head { margin-bottom: 12px; }
  .drawer-head h2 { font-size: 21px; }
  /* 横屏时灵动岛/刘海在左右两侧，弹层留白要把安全区算进去，不能只留 8px。 */
  .create-layer, .scene-layer, .ideas-layer, .account-layer, .admin-layer, .flow-layer {
    padding: 8px calc(8px + env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
    align-items: center;
  }
  .create-panel, .scene-panel, .ideas-panel {
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); border-radius: 18px;
  }
  .account-card {
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
    overflow-y: auto; overscroll-behavior: contain;
  }
  .flow-panel {
    max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
    padding: 0 18px 12px;
  }
  .flow-toolbar { margin: 0 -18px 8px; padding: 8px 12px; }
  .flow-toolbar .nav-btn { min-height: 32px; padding: 5px 9px; }
  .flow-head { padding-top: 0; margin-bottom: 10px; }
  .flow-head .eyebrow { margin-bottom: 2px; }
  .flow-head h2 { font-size: 24px; margin-bottom: 2px; }
  .flow-head p { font-size: 12px; }
  .flow-steps { margin: 8px 0 4px; }
  .flow-step { font-size: 11px; gap: 5px; }
  .flow-step b { width: 20px; height: 20px; font-size: 10px; }
  .flow-section { margin-top: 14px; }
  .flow-footer { margin: 10px -18px 0; padding: 8px 18px calc(8px + env(safe-area-inset-bottom)); }
  .flow-footer .primary-btn { min-width: 120px; padding: 9px 14px; font-size: 13px; }
  .scene-panel { padding: 0 18px 12px; }
  .scene-toolbar { margin: 0 -18px 10px; padding: 8px 12px; }
  .scene-toolbar .nav-btn { min-height: 32px; padding: 5px 9px; }
  .scene-detail-head h2 { font-size: 25px; margin: 2px 0 4px; }
  .scene-detail-head p { font-size: 12.5px; margin-bottom: 8px; }
  .scene-cta { margin-top: 16px; }
  .toast-wrap { bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* ---- 拍摄参考图（拿真实成片帧做的教程图） ---- */
.guide-ref {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin: 16px 0 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: zoom-in;
  transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.guide-ref:hover { border-color: var(--sage-ink); transform: translateY(-1px); }
.guide-ref img {
  width: 96px;
  height: 76px;
  object-fit: cover;
  object-position: center;
  border-radius: 10px;
  flex: none;
  background: var(--bg-deep);
}
.guide-ref span { font-size: 13px; line-height: 1.7; color: var(--muted); }
.guide-ref b { display: block; font-size: 15px; color: var(--ink); letter-spacing: .02em; }
.guide-zoom {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow: auto;
  background: rgba(20, 17, 13, .95);
}
.guide-zoom img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 64px);
  border-radius: 12px;
  -webkit-touch-callout: default;
}
.guide-zoom p { margin: 12px 0 2px; font-size: 13px; color: #c9bfae; }

/* ---- 可达性：触控目标、输入框、错误提示、动效 ---- */
button, .ghost-btn, .primary-btn, .mic-btn, .icon-btn, .text-btn, a.btn, [role="button"] {
  min-height: 44px;
}
.primary-btn, .ghost-btn, .mic-btn { min-height: 48px; }
input, textarea, select { font-size: 16px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
select { min-height: 44px; }
input[type="checkbox"], input[type="radio"] { min-width: 22px; min-height: 22px; }

/* 键盘焦点要看得见（微信里用不到，但电脑端、无障碍设备要用） */
:focus-visible { outline: 2px solid var(--sage-ink); outline-offset: 2px; border-radius: 6px; }

/* 错误提示就近显示 */
#stepHint.is-error { color: var(--terra-ink); font-weight: 600; }
.field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--terra-ink); }
[aria-invalid="true"] { border-color: var(--terra-ink) !important; }

/* 尊重「减少动效」 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* 窄屏不横向滚动（320px 起） */
@media (max-width: 360px) {
  main { padding-left: 14px; padding-right: 14px; }
}

/* ---- 同意勾选 ---- */
.consent-group {
  margin: 18px 0 6px;
  padding: 16px 16px 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper-2, #f7f2e9);
}
.consent-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.consent-group .consent-row {
  margin: 0 0 10px;
  background: var(--paper, #fffdf8);
}
.consent-group .option-note {
  margin: 2px 0 12px;
}
/* ---- 拍前筛查 ---- */
.screening-group {
  border-color: #d9c7b4;
}
.screening-group .consent-row {
  font-size: 14px;
}
/* 「以上都没有」放在最后一条：拉开一点、描边深一点，一眼看出是「都没中」那项 */
.screening-group .consent-row-none {
  margin-top: 18px;
  border-color: var(--sage-dark, #7d8f6a);
}
.screening-banner {
  border: 1px solid #e3c3ad;
}
.screening-banner p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.6;
}
.screening-banner .secondary-btn {
  margin-top: 8px;
}

.consent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent-row input {
  margin: 3px 0 0;
  flex: none;
  width: 20px;
  height: 20px;
  accent-color: var(--sage-dark);
}

/* ---------- 视频润色配音 ---------- */
.polish-entry {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 18px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 22px;
  background: linear-gradient(135deg, #eef2e8, #e4ebdd 60%, #eef0e2); box-shadow: var(--shadow-sm);
}
.polish-entry-copy { min-width: 0; max-width: 44em; }
.polish-entry h3 { margin: 2px 0 6px; font-family: var(--serif); font-size: clamp(19px, 2.2vw, 23px); }
.polish-entry p { margin: 0; font-size: 13px; color: var(--ink-soft); line-height: 1.65; }
.polish-entry .primary-btn { flex: none; }
.polish-home { margin: 0 0 18px; }
.polish-home .polish-entry { margin: 0; }

.polish-voice-script {
  display: block; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 12px;
  background: rgba(255, 255, 255, 0.72); font-size: 13px; line-height: 1.75; color: var(--ink);
}
.polish-voicey-actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; flex: none; }

/* 现场录音：录的时候按钮变红、带计时，点同一颗按钮停止并自动上传 */
.polish-voicey-actions .secondary-btn.rec-on,
.polish-row .secondary-btn.rec-on {
  background: #c0442f; border-color: #c0442f; color: #fff;
}
.polish-recstate { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.polish-recstate.on { color: #c0442f; display: inline-flex; align-items: center; gap: 6px; }
.polish-recstate.on::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c0442f;
  animation: polish-rec-blink 1s steps(2, start) infinite;
}
@keyframes polish-rec-blink { to { visibility: hidden; } }

.polish-copyblock {
  margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--paper-2);
}
.polish-copyhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.polish-copyhead strong { font-size: 14px; }
.polish-copy-modes { display: grid; gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.polish-copymode {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.polish-copymode.on { border-color: var(--sage-dark); background: #eef2e8; }
.polish-copymode.off { opacity: 0.52; cursor: not-allowed; }
.polish-copymode span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.polish-copymode strong { font-size: 13px; }
.polish-copymode em { font-style: normal; font-size: 11.5px; line-height: 1.5; color: var(--muted); }
.polish-copyblock .polish-req { margin-top: 12px; }
.polish-own {
  width: 100%; margin: 10px 0 6px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 14px; background: #fff; color: var(--ink); font: inherit;
  line-height: 1.8; resize: vertical;
}
.polish-own:focus { outline: 2px solid var(--sage-dark); outline-offset: 1px; }

.polish-layer {
  position: fixed; inset: 0; z-index: 63; display: grid; place-items: center;
  padding: 24px; background: rgba(38, 33, 26, .46);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  animation: fade .25s ease both;
}
.polish-panel {
  position: relative; width: min(920px, 100%); max-height: 90vh; overflow-y: auto;
  background: var(--paper); border: 1px solid var(--line); border-radius: 28px;
  box-shadow: var(--shadow-lg); padding: 0 26px 26px;
  animation: rise .4s var(--ease) both; scrollbar-width: thin;
}
.polish-head {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin: 0 -26px 18px; padding: 14px 18px 12px; background: var(--paper);
  box-shadow: 0 1px 0 var(--line);
}
.polish-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.polish-steps li {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted);
  padding: 4px 10px; border-radius: 999px; border: 1px solid transparent; white-space: nowrap;
}
.polish-steps li em {
  font-style: normal; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center;
  font-size: 10px; background: var(--bg-deep); color: var(--muted);
}
.polish-steps li.done { color: var(--sage-ink); }
.polish-steps li.done em { background: var(--sage-dark); color: #fff; }
.polish-steps li.on { color: var(--ink); border-color: var(--line-strong); background: var(--paper-2); font-weight: 600; }
.polish-steps li.on em { background: var(--terra); color: #fff; }

.polish-step h3 { margin: 6px 0 8px; font-family: var(--serif); font-size: clamp(20px, 2.4vw, 25px); }
.polish-lead { margin: 0 0 18px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.75; }
.polish-hint { font-size: 12px; color: var(--muted); }

.polish-drop {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 20px;
  border: 1px dashed var(--line-strong); border-radius: 20px; background: var(--paper-2);
}
.polish-drop span { font-size: 12.5px; color: var(--muted); }
.polish-upload { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.polish-bar { height: 6px; border-radius: 999px; background: var(--bg-deep); overflow: hidden; }
.polish-bar i { display: block; height: 100%; background: var(--sage-dark); border-radius: 999px; transition: width .2s; }

.polish-video { margin-top: 16px; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; background: #1d1a16; }
.polish-video video { width: 100%; max-height: 46vh; display: block; background: #000; }
.polish-video p {
  margin: 0; padding: 12px 16px; background: var(--paper);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12.5px;
}
.polish-video p span { color: var(--muted); }

.polish-recent { margin-top: 20px; }
.polish-recent-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.polish-pick {
  text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 16px;
  padding: 12px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm);
  transition: .2s var(--ease);
}
.polish-pick:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.polish-pick strong { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.polish-pick span { font-size: 11px; color: var(--muted); }

.polish-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
}
.polish-foot > div { display: flex; gap: 10px; flex-wrap: wrap; }

.polish-score {
  display: flex; gap: 20px; align-items: center; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 22px; background: var(--paper-2);
}
.polish-score h3 { margin: 0 0 4px; font-family: var(--serif); font-size: 20px; }
.polish-score p { margin: 0; font-size: 12.5px; color: var(--muted); }
.score-ring {
  flex: none; width: 86px; height: 86px; border-radius: 50%; position: relative;
  display: grid; place-items: center;
  background: conic-gradient(var(--sage-dark) calc(var(--v, 96) * 1%), var(--bg-deep) 0);
}
.score-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--paper); }
.score-ring strong { font-size: 24px; font-family: var(--serif); position: relative; z-index: 1; }
.score-ring span { font-size: 10px; color: var(--muted); position: absolute; bottom: 17px; z-index: 1; }

.polish-group { margin-top: 18px; }
.polish-group h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .08em; display: flex; align-items: center; gap: 8px; }
.polish-group h4 em { font-style: normal; font-size: 10.5px; background: var(--bg-deep); border-radius: 999px; padding: 1px 8px; color: var(--muted); }
.polish-opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper);
  margin-bottom: 8px; cursor: pointer; transition: .2s;
}
.polish-opt.on { border-color: var(--sage); background: #f4f7f1; }
.polish-opt.bad.on { border-color: var(--terra); background: #fbf0ea; }
.polish-opt input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--sage-dark); }
.polish-opt-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.polish-opt-main strong { font-size: 13.5px; }
.polish-opt-main span { font-size: 12px; color: var(--muted); line-height: 1.55; }
.polish-opt-main em.polish-effect {
  font-style: normal; font-size: 11.5px; color: var(--sage-dark); line-height: 1.5;
  margin-top: 3px; padding-left: 10px; border-left: 2px solid var(--sage-soft, #c9d8bd);
}
.polish-opt > em {
  flex: none; font-style: normal; font-size: 10.5px; color: var(--muted-2);
  background: var(--bg-deep); border-radius: 999px; padding: 2px 9px; white-space: nowrap;
}

/* 片头片尾：常规固定项，默认关着，勾了才填字 */
.polish-frame { border-top: 1px dashed var(--line); padding-top: 16px; }
.polish-frame-switch {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; background: var(--paper);
  margin-bottom: 8px; cursor: pointer; transition: .2s;
}
.polish-frame-switch.on { border-color: var(--sage); background: #f4f7f1; }
.polish-frame-switch.off { opacity: .55; cursor: not-allowed; }
.polish-frame-switch input { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--sage-dark); }
.polish-frame-switch > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.polish-frame-switch strong { font-size: 13.5px; }
.polish-frame-switch > span > span { font-size: 12px; color: var(--muted); line-height: 1.55; }
.polish-frame-fields { margin: 4px 0 14px; }
.polish-frame-extras {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px;
  margin: 2px 0 12px; font-size: 12px; color: var(--muted);
}
.polish-frame-select { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.polish-frame-check { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 12px; color: var(--muted); }
.polish-frame-check input { width: 16px; height: 16px; accent-color: var(--sage-dark); }
@media (max-width: 680px) {
  .polish-frame-extras { flex-direction: column; align-items: flex-start; }
}

.polish-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.polish-mode {
  text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 18px;
  padding: 14px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow-sm);
  transition: .2s;
}
.polish-mode strong { font-size: 14px; }
.polish-mode span { font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.polish-mode.on { border-color: var(--sage); background: #f4f7f1; box-shadow: 0 0 0 2px rgba(113, 129, 106, .18); }
.polish-mode:disabled { opacity: .55; cursor: not-allowed; }

.polish-subpanel { margin-top: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper-2); }
.polish-voicey {
  display: flex; gap: 14px; align-items: center; justify-content: space-between;
  padding: 14px; border: 1px dashed var(--sage); border-radius: 16px; background: #f4f7f1;
}
.polish-voicey-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.polish-voicey-copy strong { font-size: 14px; }
.polish-voicey-copy span { font-size: 12px; color: var(--muted); line-height: 1.6; }
.polish-voicey-copy em { font-style: normal; font-size: 12px; color: var(--sage-ink); }
.polish-voicey .secondary-btn { flex: none; white-space: nowrap; }
.polish-voice { position: relative; }
.polish-play {
  flex: none; margin-left: auto; align-self: center; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--sage-ink); font-size: 11px; cursor: pointer;
}
.polish-play:hover { border-color: var(--sage); }
.polish-content {
  margin-top: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: var(--paper-2);
}
.polish-content-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.polish-content-head h4 { font-size: 13px; margin: 0; }
.polish-swatches { display: inline-flex; gap: 4px; }
.polish-swatches i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.08); }
.polish-content-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.polish-content-facts span {
  display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 9px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 12px;
}
.polish-content-facts em { font-style: normal; color: var(--muted); font-size: 11px; }
.polish-place { margin-top: 16px; }
.polish-place > label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 8px; }
.polish-place-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.polish-place-row input[type=text] {
  flex: 1; min-width: 180px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px;
  background: #fff; font-size: 13px;
}
.polish-place-check { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.polish-place-check input { accent-color: var(--sage-dark); }
.polish-voices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.polish-voice {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--paper); cursor: pointer; font-size: 12.5px;
}
.polish-voice.on { border-color: var(--sage); background: #f4f7f1; }
.polish-voice input { flex: none; margin: 2px 0 0; accent-color: var(--sage-dark); }
.polish-voice strong { font-weight: 600; }
.polish-voice span { display: block; font-size: 11px; color: var(--muted); line-height: 1.5; }
.polish-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.polish-row > label { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.polish-row select, .polish-settings input, .polish-line input,
.polish-frame-select select,
.polish-revise input, .polish-req textarea {
  border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; font-size: 13px;
}
.polish-row input[type=range] { accent-color: var(--sage-dark); }
.polish-probe { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--sage-soft); font-size: 12px; color: var(--sage-ink); line-height: 1.6; }

.polish-req { margin-top: 18px; }
.polish-req > label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 8px; }
.polish-req-row { display: flex; gap: 10px; align-items: flex-start; }
.polish-req textarea { flex: 1; min-height: 64px; resize: vertical; }

.polish-tone { margin: 0 0 6px; }
.polish-tone-label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.polish-tone-label em { font-style: normal; color: var(--line-strong); margin-left: 4px; }
.polish-tone-dirty { display: block; margin-top: 7px; font-size: 11.5px; color: var(--terra-ink); }

/* 风格预设：客户看不出「自然」和原片的差别，这几档要一眼能看出来 */
.polish-look { margin: 16px 0 6px; }
.polish-look h4 { font-size: 12.5px; margin: 0 0 8px; color: var(--ink); display: flex; align-items: baseline; gap: 6px; }
.polish-look h4 em { font-style: normal; font-size: 11px; color: var(--muted-2); font-weight: 400; }
.polish-look .polish-hint { display: block; margin-top: 7px; }

/* 创意方案：几个讲法摆在一起挑，比一句「你帮我写」有内容 */
.polish-direction { margin: 14px 0 4px; display: flex; flex-direction: column; gap: 9px; }
.polish-direction-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.polish-direction-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 9px; }
.polish-direction-card { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 12px 13px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.polish-direction-card strong { font-size: 13px; }
.polish-direction-card em { font-style: normal; font-size: 13.5px; color: var(--terra-ink); }
.polish-direction-card span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.polish-direction-card small { font-size: 11px; color: var(--muted-2); }
.polish-direction-card.on { border-color: var(--terra); box-shadow: 0 0 0 2px var(--terra-soft) inset; }

.polish-settings { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 6px 0 18px; }
.polish-settings label { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 5px; }
.polish-settings input { width: 100%; }
.polish-scripthead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.polish-lines { display: flex; flex-direction: column; gap: 8px; }
.polish-line { display: flex; align-items: center; gap: 10px; }
.polish-time { flex: none; width: 44px; font-size: 11px; color: var(--muted-2); font-variant-numeric: tabular-nums; text-align: right; }
.polish-line input { flex: 1; min-width: 0; }
.polish-warn { margin: 12px 0 0; font-size: 12px; color: var(--terra-ink); background: var(--terra-soft); border-radius: 12px; padding: 10px 12px; }
.polish-revise { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.polish-revise input { flex: 1; min-width: 200px; }
.polish-has-speech { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; cursor: pointer; }
.polish-has-speech input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sage-dark); }

.polish-summary { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--paper-2); overflow: hidden; }
.polish-summary li { display: flex; gap: 16px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.polish-summary li:last-child { border-bottom: 0; }
.polish-summary span { flex: none; width: 64px; color: var(--muted); font-size: 12px; }
.polish-summary strong { font-weight: 600; line-height: 1.6; }
.polish-consent {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; font-size: 12.5px; color: var(--ink-soft);
  line-height: 1.65; cursor: pointer;
}
.polish-consent input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sage-dark); }
.polish-recut {
  display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px;
  border: 1px dashed var(--line); border-radius: 16px; font-size: 12.5px; color: var(--ink-soft);
  line-height: 1.65; cursor: pointer;
}
.polish-recut b { color: var(--ink); font-weight: 600; }
.polish-recut input { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sage-dark); }

.plan-card { border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 16px; margin: 0 0 14px; }
.plan-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.plan-head strong { font-size: 14px; }
.plan-head span { color: var(--muted); font-size: 11.5px; text-align: right; }
.plan-segs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.plan-segs li {
  font-size: 11.5px; color: var(--ink-soft); border: 1px solid var(--line);
  background: var(--paper-2); border-radius: 10px; padding: 4px 8px;
  font-variant-numeric: tabular-nums;
}
.plan-segs li b { font-weight: 600; color: var(--ink); margin-left: 6px; }
.plan-note { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.6; }

.polish-progress { text-align: center; padding: 24px 8px; }
.polish-progress h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 22px; }
.polish-progress p { margin: 0; color: var(--muted); font-size: 13px; }
.polish-progress .polish-bar { margin: 18px auto 10px; max-width: 420px; height: 8px; }
.polish-result video { width: 100%; max-height: 56vh; border-radius: 20px; background: #000; display: block; }
.polish-result .polish-foot { margin-top: 16px; }
.polish-error { border: 1px solid var(--terra); background: var(--terra-soft); color: var(--terra-ink); border-radius: 16px; padding: 14px 16px; font-size: 13px; line-height: 1.7; }

@media (max-width: 680px) {
  .polish-panel { padding: 0 16px 20px; border-radius: 22px; }
  .polish-head { margin: 0 -16px 14px; padding: 12px 14px 10px; }
  .polish-steps li { font-size: 10.5px; padding: 3px 7px; }
  .polish-modes, .polish-voices, .polish-settings { grid-template-columns: 1fr; }
  .polish-recent-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .polish-score { gap: 14px; }
  .polish-voicey { flex-direction: column; align-items: stretch; }
  .polish-voicey .secondary-btn { width: 100%; }
  .polish-voicey-actions { width: 100%; align-items: stretch; }
  .polish-copy-modes { grid-template-columns: 1fr; }
}


/* 连拍：机位说明 + 相机取景（水平线 / 脚位框） */
.shot-capture-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: -4px 0 4px; }
.shot-capture-row .muted { font-size: 11.5px; line-height: 1.6; }

.capture-layer {
  position: fixed; inset: 0; z-index: 90; background: rgba(20, 18, 15, .86);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.capture-box {
  width: min(520px, 100%); max-height: 100%; overflow: auto;
  background: var(--paper); border-radius: 22px; padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
.capture-stage { position: relative; border-radius: 16px; overflow: hidden; background: #111; aspect-ratio: 3 / 4; }
.capture-stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.capture-tip {
  position: absolute; left: 10px; bottom: 8px; margin: 0; padding: 4px 8px;
  border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11.5px;
}
/* 水平线：手机左右倾斜时气泡滑出中线，±2° 内变绿 */
.capture-level {
  position: absolute; left: 8%; right: 8%; top: 46%; height: 0;
  border-top: 2px dashed rgba(255, 255, 255, .75);
}
.capture-level i {
  position: absolute; left: 50%; top: -7px; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: #fff; opacity: .85;
  transform: translateX(var(--tilt, 0px)); transition: transform .08s linear;
}
.capture-level.on { border-color: var(--sage); }
.capture-level.on i { background: var(--sage); opacity: 1; }
/* 脚位框：两条脚印 + 底边线，确认头顶到脚都在画面里 */
.capture-feet {
  position: absolute; left: 18%; right: 18%; bottom: 7%; height: 13%;
  border: 2px dashed rgba(255, 255, 255, .8); border-radius: 14px;
}
.capture-feet .foot {
  position: absolute; bottom: 6%; width: 26%; height: 78%;
  border-radius: 40% 40% 30% 30%; background: rgba(255, 255, 255, .16);
  border: 1.5px solid rgba(255, 255, 255, .65);
}
.capture-feet .foot.l { left: 12%; }
.capture-feet .foot.r { right: 12%; }
.capture-feet span {
  position: absolute; left: 50%; top: -20px; transform: translateX(-50%);
  color: #fff; font-size: 11px; white-space: nowrap; text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}
.capture-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 2px 4px; }
.capture-count { font-variant-numeric: tabular-nums; color: var(--ink-soft); font-size: 12.5px; margin-right: auto; }
.capture-thumbs { display: flex; gap: 8px; padding: 6px 2px; }
.capture-thumbs figure { position: relative; width: 64px; margin: 0; }
.capture-thumbs img { width: 64px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.capture-thumbs button {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%;
  border: 0; background: var(--ink); color: #fff; font-size: 13px; line-height: 22px;
  padding: 0; cursor: pointer;
}
.capture-thumbs figcaption { text-align: center; font-size: 11px; color: var(--muted); margin-top: 2px; }
.capture-note { margin: 6px 4px 2px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }

/* ---------- 收尾：空状态 / 骨架 / 焦点 / 管理员待办 / 开始面板 ---------- */
.empty-card p { margin: 0 0 12px; }
.empty-card .primary-btn.small { margin: 0 auto; }
.library-empty p { margin: 0 0 12px; }
.library-empty .primary-btn.small { margin: 0 auto; }
.growth-empty p { margin: 0 0 12px; }
.growth-empty .primary-btn.small { margin: 0 auto; }

/* 列表加载：骨架块，减少「白屏一下」的突兀感 */
.skeleton-grid { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.sk-card { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--paper); }
.sk-card i { display: block; aspect-ratio: 1; background: var(--bg-deep); animation: skPulse 1.2s ease-in-out infinite; }
.sk-card b { display: block; height: 10px; margin: 10px; border-radius: 999px; background: var(--bg-deep); animation: skPulse 1.2s ease-in-out infinite; }
@keyframes skPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk-card i, .sk-card b { animation: none; } }

/* 管理员有待审时，头像右上角一个小圆点（不抢主按钮） */
.user-chip { position: relative; }
.user-chip.has-review::after {
  content: ""; position: absolute; right: 2px; top: 2px; width: 9px; height: 9px;
  border-radius: 50%; background: var(--terra); box-shadow: 0 0 0 2px var(--paper);
}

/* 开始面板：先能说一句，再挑场景 */
.create-say {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  border: 1px dashed var(--line-strong); background: var(--paper-2); border-radius: var(--r-md);
  padding: 14px 16px; margin-bottom: 14px; color: var(--ink); transition: .2s var(--ease);
}
.create-say:hover { border-color: var(--sage-ink); background: #fff; }
.create-say-ico {
  flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sage-soft); color: var(--sage-dark);
}
.create-say-ico svg { width: 19px; height: 19px; }
.create-say span:nth-child(2) { flex: 1; min-width: 0; }
.create-say strong { display: block; font-size: 14px; }
.create-say em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 2px; }
.create-say .arr { flex: none; color: var(--sage-dark); }
.create-links { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.create-links .text-btn { font-size: 13px; }

/* ---------- 手机端：弹层顶部只留一个返回键 ---------- */
@media (max-width: 680px) {
  /* ideas / polish / scene 都有常驻的「← 返回」，右上角的 × 就不重复出现 */
  .ideas-head .flow-close,
  .polish-head .flow-close,
  .scene-toolbar .flow-close { display: none; }
  .drawer-sub { display: none; }
  .skeleton-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; }
  .admin-tabs::-webkit-scrollbar { display: none; }
}
.growth-crumb { margin: 6px 0 0; font-size: 12px; color: var(--muted-2); letter-spacing: .01em; }
.growth-crumb b { color: var(--ink-soft); font-weight: 600; }

/* 打开弹层时把焦点放到标题上：读屏能读到位置，但不要画成输入框 */
.layer-focus:focus,
.layer-focus:focus-visible { outline: none; }

/* ---------- iPhone Safari 排版兜底（2026-11-22） ---------- */
/* 有杂散元素偏出去时，宁可裁掉也不让整页能左右拖 */
html { overflow-x: clip; }
/* iOS 点进小于 16px 的输入框会自动放大整页，看起来就是「左右挤出屏幕、底部错位」。
   iPad 的 Safari 也是同一套行为，所以这条放宽到 1024px；桌面浏览器把窗口拖窄时只是字号大一点。 */
@media (max-width: 1024px) {
  input, textarea, select { font-size: 16px !important; }
}
@media (max-width: 680px) {
  /* 固定底栏叠 backdrop-filter，iOS 滚动或地址栏收起时会跑位，改实底 */
  .tabbar { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* 中间「创作」按钮比底栏高出 23px，留白加大，别让最后一行压在它下面 */
  body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* 手指点得准：可点的按钮至少给到 44px（作品卡的历史操作、分类改名的 ×） */
  .hist-act { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .collection-chip { min-height: 44px; padding-top: 10px; padding-bottom: 10px; }
  .collection-chip .edit {
    width: 32px; height: 32px; margin: -8px -4px -8px 0; font-size: 15px;
  }
  .tabbar-btn { min-height: 44px; }
}
