/* AI 自媒体工作台 · 样式
   设计依据见 AGENTS.md「界面约定」。要点：
   - 三种颜色：米色底、暖黄、墨黑。颜色只从下面的变量取。
   - 介绍页是海报：超大粗标题、红色大圆、两台手机样机、整段的红色和黑色色块。
   - 工作台是内容流：选题、商品、博主都是“大字报封面”卡片。
   - 暂时只做浅色，不跟系统深色模式走。
   - 动效只动 transform / translate / scale / opacity，全部有“减少动效”回退。 */

:root {
  --bg: #faf1e4;
  --bg2: #f3e6d3;
  --card: #fffdf8;
  --ink: #16120e;
  --ink2: #5e554b;
  --ink3: #94897c;
  --hair: rgba(22, 18, 14, 0.12);
  --line: #b3a796;
  --fill: rgba(22, 18, 14, 0.07);
  --accent: #ffcf5c;
  --on-accent: #16120e;
  --link: #9a6400;
  --mark: #ffe9a8;
  --mark-ink: #5c3d00;
  --danger: #b3261e;
  --font: "HarmonyOS Sans SC", "MiSans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei UI", "Microsoft YaHei",
    -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

/* 整段换底色：.dark 是墨黑，.accent 是主色（暖黄，上面的字用墨黑）。里面的文字、线条颜色跟着变。
   主色原来是番茄红，用户嫌亮红扎眼，换成了暖黄。全站不再用亮红。 */
.dark {
  --bg: #16120e;
  --card: #221c16;
  --ink: #faf1e4;
  --ink2: #bdb2a3;
  --ink3: #8a8074;
  --hair: rgba(250, 241, 228, 0.16);
  --line: #6b6157;
  --fill: rgba(250, 241, 228, 0.12);
  --link: #ffcf5c;
  --mark: rgba(255, 207, 92, 0.26);
  --mark-ink: #ffe9a8;
  color: var(--ink);
}
.accent {
  --bg: #ffcf5c;
  --ink: #16120e;
  --ink2: rgba(22, 18, 14, 0.78);
  --ink3: rgba(22, 18, 14, 0.6);
  --hair: rgba(22, 18, 14, 0.2);
  --fill: rgba(22, 18, 14, 0.08);
  --link: #16120e;
  color: var(--ink);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  line-break: strict;
  overflow-wrap: break-word;
}
h1, h2, h3, h4, p, ul, ol, dl, dd { margin: 0; }
h1, h2, h3, h4 { font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--mark); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 大标题：900 字重加一圈细描边。电脑上没有特粗的中文黑体，描边是替代办法。 */
.landing h1, .landing h2, .page-head h1, .page-title, .amount, .sticker b, .facts strong {
  font-weight: 900; -webkit-text-stroke: 0.018em currentColor;
}

.wrap { width: min(1240px, 100% - 64px); margin-inline: auto; }
.narrow { width: min(680px, 100% - 64px); margin-inline: auto; }
@media (max-width: 640px) { .wrap, .narrow { width: calc(100% - 36px); } }

.band { background: var(--bg); padding: 110px 0; }
.band.alt { background: var(--bg2); }
@media (max-width: 640px) { .band { padding: 72px 0; } }

/* ---------------------------------------------------------------- 按钮和链接 */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 24px;
  border: 0; border-radius: 999px;
  background: var(--ink); color: var(--bg);
  font-size: 17px; font-weight: 700; white-space: nowrap;
  transition: transform 0.2s var(--ease), background-color 0.15s, box-shadow 0.25s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(0.96); }
.btn:disabled { background: var(--fill); color: var(--ink3); cursor: default; transform: none; box-shadow: none; }
.btn.lg { min-height: 62px; padding: 0 38px; font-size: 20px; }
.btn.sm { min-height: 38px; padding: 0 18px; font-size: 14px; }
.btn.soft { background: var(--fill); color: var(--ink); }
.btn.soft:hover { background: var(--hair); }
.btn.soft:disabled { color: var(--ink3); }
.btn.white { background: #faf1e4; color: #16120e; }
.btn.white:hover { background: #ffffff; }

.link { border: 0; background: none; padding: 0; color: var(--ink); font-size: inherit; text-decoration: underline; text-underline-offset: 5px; }
.link:hover { color: var(--link); }
.quiet { border: 0; background: none; padding: 6px 2px; color: var(--ink2); font-size: 15px; }
.quiet:hover, .quiet[aria-current="page"] { color: var(--ink); }
.quiet[aria-current="page"] { font-weight: 700; }

/* 小标记：示例稿、示例数据 */
.stamp {
  flex: none; display: inline-flex; align-items: center; height: 22px; padding: 0 9px;
  border: 1.5px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
}

/* ---------------------------------------------------------------- 顶栏 */

.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
}
.app .nav { border-bottom: 1px solid var(--hair); }
.nav-row { display: flex; align-items: center; gap: 10px 24px; flex-wrap: wrap; min-height: 68px; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font-size: 18px; font-weight: 700; color: var(--ink); }
.brand::before { content: ""; width: 16px; height: 16px; border-radius: 50%; background: var(--accent); }
.nav-side { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav .seg { margin-inline: auto; }
@media (max-width: 820px) {
  .nav .seg { order: 3; width: 100%; margin: 0; }
  .nav .seg > * { flex: 1; }
  .nav-side { gap: 12px; }
}

/* ---------------------------------------------------------------- 分段控件和选项胶囊 */

.seg { display: inline-flex; padding: 4px; gap: 2px; background: var(--card); border-radius: 999px; box-shadow: 0 0 0 1px var(--hair); }
.seg button, .seg label span {
  display: block; min-height: 38px; padding: 0 20px; line-height: 38px;
  border: 0; border-radius: 999px; background: none;
  font-size: 15px; font-weight: 700; color: var(--ink2); white-space: nowrap; text-align: center;
}
/* 很窄的屏（比如 320）三个栏目名挤不下，字和左右留白都收一点，不然整页会横向滚动 */
@media (max-width: 380px) { .seg button, .seg label span { padding: 0 10px; font-size: 14px; } }
.seg button[aria-selected="true"], .seg input:checked + span { background: var(--ink); color: var(--bg); }
.seg label { position: relative; }
.seg input, .chip input, .angle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.seg input:focus-visible + span, .chip input:focus-visible + span, .angle input:focus-visible + div {
  outline: 2px solid var(--ink); outline-offset: 2px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip span {
  display: block; padding: 7px 16px; border-radius: 999px;
  border: 1.5px solid var(--hair); font-size: 15px; color: var(--ink2);
}
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--bg); font-weight: 700; }
.chip-note { margin-top: 10px; font-size: 14px; color: var(--ink2); }

/* ---------------------------------------------------------------- 工作台：页头 */

.app { min-height: 100dvh; background: var(--bg); }
.page { padding: 44px 0 96px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-bottom: 30px; }
.page-head h1 { font-size: clamp(44px, 5.6vw, 68px); line-height: 1.08; }
.page-head .meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; font-size: 17px; color: var(--ink2); }
.page-head .flag { color: var(--link); font-weight: 700; }
.page-title { font-size: 40px; line-height: 1.2; margin-bottom: 28px; }

/* ---------------------------------------------------------------- 封面卡：选题、商品、博主
   上半张是纯色块加粗体标题，颜色由 JS 用 --c（底）、--t（字）、--tt（标签字）传进来。
   封面一律用淡色底配深色字，不用亮红铺满。 */

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1040px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid, .grid.two { grid-template-columns: minmax(0, 1fr); gap: 14px; } }

.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0; overflow: hidden;
  border: 0; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--hair);
  text-align: left; color: var(--ink);
}
.cover {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 22px;
  min-height: 178px; padding: 18px 20px; background: var(--c, #ffe1b0); color: var(--t, #5a3300);
}
.cover h3 { padding-right: 34px; font-size: 27px; line-height: 1.26; font-weight: 900; }
.cover .no { position: absolute; top: 18px; right: 20px; font-size: 15px; font-weight: 900; opacity: 0.5; }
.cover .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.cover .tags span {
  height: 26px; padding: 0 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.76);
  font-size: 12px; font-weight: 700; line-height: 26px; white-space: nowrap; color: var(--tt, var(--t, #5a3300));
}
/* 带货卡的第一个标签是实心的（--k 底、--kt 字），靠它和话题卡区分，封面本身不用亮红。 */
.cover .tags span:first-child { background: var(--k, rgba(255, 255, 255, 0.76)); color: var(--kt, var(--tt, var(--t, #5a3300))); }
.card .body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 16px 20px 18px; }
.card .sum {
  font-size: 15px; line-height: 1.55; color: var(--ink2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.fit { display: flex; flex-wrap: wrap; gap: 6px; }
.fit span { height: 26px; padding: 0 9px; border-radius: 8px; background: var(--fill); font-size: 12px; line-height: 26px; color: var(--ink2); }
.card .foot { display: flex; gap: 12px; margin-top: auto; padding-top: 4px; font-size: 13px; color: var(--ink2); }
.card .foot .go { margin-left: auto; font-weight: 700; color: var(--link); opacity: 0; transform: translateX(-8px); transition: opacity 0.3s, transform 0.3s var(--ease); }
button.card:hover .go, button.card:focus-visible .go { opacity: 1; transform: none; }

/* 头一张放大，让每一行都排满 */
.card.lead { grid-column: span 2; }
.card.lead .cover { min-height: 220px; padding: 24px 26px; }
.card.lead .cover h3 { font-size: 40px; line-height: 1.18; }
.card.lead .cover .no { top: 24px; right: 26px; }
.card.lead.wide { grid-column: 1 / -1; flex-direction: row; }
.card.lead.wide .cover { flex: 1.3; min-height: 230px; }
.card.lead.wide .cover h3 { font-size: 46px; }
.card.lead.wide .body { flex: 1; justify-content: center; padding: 24px 28px; }
.card.lead.wide .sum { font-size: 17px; }
@media (max-width: 640px) {
  .card.lead, .card.lead.wide { grid-column: auto; flex-direction: column; }
  .card.lead .cover, .card.lead.wide .cover { min-height: 178px; padding: 18px 20px; }
  .card.lead .cover h3, .card.lead.wide .cover h3 { font-size: 30px; }
  .card.lead.wide .body { padding: 16px 20px 18px; }
}

/* 商品、博主卡的下半张：几小段说明 */
.card .body h4 { margin-bottom: 3px; font-size: 13px; font-weight: 400; color: var(--ink2); }
.card .body p { font-size: 15px; line-height: 1.6; }
.card .body ul li { position: relative; padding-left: 15px; font-size: 15px; line-height: 1.6; }
.card .body ul li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 6px; height: 6px; border-radius: 50%; background: var(--link); }
.card .body .actions { margin-top: auto; padding-top: 4px; }

/* ---------------------------------------------------------------- 行列表（稿子、账号） */

.rows { border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; }
.rows > * + * { border-top: 1px solid var(--hair); }
.row summary {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; align-items: center;
  min-height: 72px; padding: 14px 24px; cursor: pointer; list-style: none;
}
.row summary::-webkit-details-marker { display: none; }
.row summary h3 { font-size: 18px; }
.row summary .meta { grid-column: 1; font-size: 14px; color: var(--ink2); }
.row summary .side { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-size: 14px; color: var(--ink2); }
.row summary .side strong { display: block; font-size: 17px; font-weight: 700; color: var(--ink); }
.row[open] summary h3 { color: var(--link); }
.row-body { display: grid; gap: 18px; padding: 4px 24px 24px; }
.row-body h4 { margin-bottom: 4px; font-size: 13px; font-weight: 400; color: var(--ink2); }
.row-body li + li { margin-top: 4px; }
.row-body .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.empty { padding: 64px 24px; text-align: center; color: var(--ink2); }
.empty .btn { margin-top: 20px; }

/* ---------------------------------------------------------------- 口播稿 */

.script { display: grid; gap: 14px; font-size: 17px; line-height: 1.75; }
.script h4 { margin: 0; font-size: 21px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.script p { white-space: pre-wrap; }
.fill { padding: 2px 7px; border-radius: 7px; background: var(--mark); color: var(--mark-ink); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tips { display: grid; gap: 6px; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 14px; line-height: 1.6; color: var(--ink2); }
.legend { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.legend i { width: 14px; height: 14px; border-radius: 4px; background: var(--mark); }

/* ---------------------------------------------------------------- 表单 */

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; min-width: 0; border: 0; margin: 0; padding: 0; }
.field label, .field legend { padding: 0; font-size: 14px; color: var(--ink2); }
.field input, .field textarea {
  width: 100%; min-height: 50px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #ffffff;
}
.field textarea { min-height: 104px; resize: vertical; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink3); }
.field input:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--ink); }
.field .seg { justify-self: start; }
.error { min-height: 20px; font-size: 14px; color: var(--danger); }
.form-card { padding: 32px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--hair); }
@media (max-width: 640px) { .form-card { padding: 22px; } }
.form-card + .form-card { margin-top: 24px; }
.form-card h2 { font-size: 22px; font-weight: 900; }
/* 管理员重置密码后显示的临时密码：等宽、能选中 */
.temp-pass { padding: 14px 16px; border-radius: 12px; background: var(--mark); color: var(--mark-ink); font: 600 20px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .04em; user-select: all; word-break: break-all; }

/* ---------------------------------------------------------------- 抽屉和弹窗 */

dialog { border: 0; padding: 0; color: var(--ink); background: var(--card); }
dialog::backdrop { background: rgba(22, 18, 14, 0.5); }
dialog.drawer {
  margin: 0 0 0 auto; width: min(580px, 100%); height: 100dvh; max-width: none; max-height: none;
  box-shadow: rgba(22, 18, 14, 0.3) -8px 0 48px -8px;
}
dialog.modal {
  width: min(420px, 100vw - 32px); border-radius: 28px;
  box-shadow: rgba(22, 18, 14, 0.4) 0 24px 64px -12px;
}
@media (prefers-reduced-motion: no-preference) {
  dialog.drawer[open] { animation: drawer-in 0.4s var(--ease); }
  dialog.modal[open] { animation: modal-in 0.25s var(--ease); }
  @keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
  @keyframes modal-in { from { transform: scale(0.96); opacity: 0; } }
  /* 关的时候原路收回去，背后的遮罩跟着淡入淡出。JS 给 dialog 加 .is-closing，动画播完才真正关。（不叫 .closing：首页最后一屏用了这个名字，会把弹层里的字变成居中。） */
  dialog[open]::backdrop { animation: fade-in 0.3s ease both; }
  dialog.drawer.is-closing { animation: drawer-out 0.22s cubic-bezier(0.4, 0, 1, 1) both; }
  dialog.modal.is-closing { animation: modal-out 0.18s cubic-bezier(0.4, 0, 1, 1) both; }
  dialog.is-closing::backdrop { animation: fade-out 0.22s ease both; }
  /* 选题详情从点的那张卡放大出来：--fx、--fy 是卡片中心到屏幕中心的距离，--fs 是卡片和弹层的宽度比，JS 在打开前算好。 */
  dialog.topic-detail[open] { animation: sheet-in 0.52s var(--ease); }
  dialog.topic-detail.is-closing { animation: sheet-out 0.24s cubic-bezier(0.4, 0, 1, 1) both; }
  @keyframes sheet-in {
    from { opacity: 0; transform: translate(var(--fx, 0px), var(--fy, 30px)) scale(var(--fs, 0.94)); }
    35% { opacity: 1; }
  }
  @keyframes sheet-out { to { opacity: 0; transform: translate(var(--fx, 0px), var(--fy, 30px)) scale(var(--fs, 0.94)); } }
  .sheet-hero.enter > * { animation-delay: calc(var(--i, 0) * 70ms + 140ms); }
  .sheet-main .drawer-body.enter > * { animation-delay: calc(var(--i, 0) * 70ms + 240ms); }
  @keyframes drawer-out { to { transform: translateX(40px); opacity: 0; } }
  @keyframes modal-out { to { transform: scale(0.96); opacity: 0; } }
  @keyframes fade-in { from { opacity: 0; } }
  @keyframes fade-out { to { opacity: 0; } }
}

/* ---------------------------------------------------------------- 选题详情（大弹层）
   从卡片放大出来，居中。左边是这张卡的大字报（颜色和卡片封面一样，--c 底、--t 字）：是什么、为什么火、适合谁拍。
   右边是动手的部分：别人怎么拍、角度、风格、稿子，生成按钮固定在右下。参考小红书笔记详情的左图右文。
   860 以下变成整屏、上下排，按钮吸在底部。 */
dialog.topic-detail {
  width: min(1120px, 100% - 48px); height: min(820px, 100dvh - 48px); max-width: none; max-height: none;
  margin: auto; overflow: hidden; border-radius: 28px;
  box-shadow: rgba(22, 18, 14, 0.45) 0 32px 80px -16px;
}
.sheet-inner { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr); height: 100%; }
.sheet-hero {
  position: relative; display: flex; flex-direction: column; gap: 22px; padding: 40px 36px 36px; overflow-y: auto; scrollbar-width: none;
  background: var(--c, #ffe1b0); color: var(--t, #5a3300);
}
.sheet-hero > * { position: relative; z-index: 1; }
.sheet-hero .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet-hero .tags span {
  height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.76);
  font-size: 13px; font-weight: 700; line-height: 28px; white-space: nowrap; color: var(--tt, var(--t, #5a3300));
}
.sheet-hero .tags span:first-child { background: var(--k, rgba(255, 255, 255, 0.76)); color: var(--kt, var(--tt, var(--t, #5a3300))); }
.sheet-hero h2 { font-size: clamp(34px, 3.5vw, 46px); line-height: 1.18; font-weight: 900; -webkit-text-stroke: 0.012em currentColor; text-wrap: balance; }
.sheet-hero .lede { font-size: 17px; line-height: 1.65; opacity: 0.88; }
.sheet-hero h3 { margin-bottom: 8px; font-size: 13px; font-weight: 700; opacity: 0.62; }
.sheet-hero .why { padding-top: 20px; border-top: 1.5px solid color-mix(in srgb, currentColor 18%, transparent); }
.sheet-hero .why p { font-size: 15px; line-height: 1.7; }
.sheet-hero .for { margin-top: auto; }
.sheet-hero .fit span { background: rgba(255, 255, 255, 0.62); color: inherit; }
.sheet-hero .big-no { position: absolute; z-index: 0; right: 20px; bottom: 0; overflow: hidden; font-size: 160px; line-height: 1; font-weight: 900; opacity: 0.08; pointer-events: none; }
/* 在弹层里放别人的视频（抖音官方嵌入播放器）：点「在这看」，左边的大字报换成播放器；收起再换回来。
   抖音的播放器里面是固定大小的（实测 330×760 才不出滚动条、不切边），所以 iframe 一直按 330×760 排，
   再整体缩放到画框的大小：--k 是画框高度除以 760，JS 量出来写上（见 topicDrawer 里的 fitPlayer）。
   视频本身还在抖音那边，我们不存。 */
.sheet-hero.playing > :not(.sheet-player) { display: none; }
.sheet-hero .sheet-player { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.sheet-hero .sheet-player[hidden] { display: none; }
.sheet-player .frame {
  position: relative; flex: none; height: calc(min(820px, 100dvh - 48px) - 196px); aspect-ratio: 330 / 760;
  border-radius: 20px; overflow: hidden; background: #16120e; box-shadow: rgba(22, 18, 14, 0.35) 0 18px 40px -14px;
}
.sheet-player .wait { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: rgba(255, 255, 255, 0.6); }
.sheet-player iframe { position: absolute; left: 0; top: 0; width: 330px; height: 760px; border: 0; transform-origin: 0 0; transform: scale(var(--k, 1)); }
.sheet-player .cap { display: grid; gap: 2px; text-align: center; }
.sheet-player .cap strong { font-size: 16px; font-weight: 800; }
.sheet-player .cap span { font-size: 14px; line-height: 1.5; opacity: 0.82; }
.sheet-player .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sheet-player .acts > * {
  height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.72);
  font: inherit; font-size: 13px; font-weight: 700; line-height: 36px; color: inherit; cursor: pointer; transition: background-color 0.25s;
}
.sheet-player .acts > *:hover { background: #ffffff; text-decoration: none; }
.sheet-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--card); }
.sheet-main .drawer-body { padding-top: 36px; scrollbar-width: thin; scrollbar-color: rgba(22, 18, 14, 0.22) transparent; }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 3; background: rgba(255, 253, 248, 0.9); box-shadow: 0 0 0 1px var(--hair); transition: transform 0.3s var(--ease); }
.sheet-close:hover { transform: rotate(90deg); }
@media (max-width: 860px) {
  dialog.topic-detail { width: 100%; height: 100dvh; border-radius: 0; }
  .sheet-inner { display: block; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(22, 18, 14, 0.22) transparent; }
  .sheet-hero { overflow: visible; gap: 16px; padding: 60px 20px 26px; }
  .sheet-hero h2 { font-size: 32px; }
  .sheet-hero .big-no { font-size: 104px; right: 12px; }
  .sheet-player .frame { width: min(100%, 250px); height: auto; }
  .sheet-main { display: block; }
  .sheet-main .drawer-body { overflow: visible; padding-top: 26px; }
  .sheet-main .drawer-foot { position: sticky; bottom: 0; z-index: 2; background: var(--card); }
}

.drawer-inner { display: flex; flex-direction: column; height: 100%; }
.drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px 14px 32px; border-bottom: 1px solid var(--hair); }
.drawer-top span { font-size: 14px; font-weight: 700; color: var(--link); }
.drawer-body { flex: 1; overflow-y: auto; padding: 28px 32px 36px; display: grid; gap: 30px; align-content: start; }
.drawer-body h2 { font-size: 34px; line-height: 1.2; font-weight: 900; -webkit-text-stroke: 0.012em currentColor; }
.drawer-body h2 + p { margin-top: 10px; color: var(--ink2); line-height: 1.6; }
.drawer-body section > h3 { margin-bottom: 10px; font-size: 13px; font-weight: 400; color: var(--ink2); }
.drawer-body li + li { margin-top: 6px; }
.drawer-foot {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 32px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--hair);
}
.drawer-foot .note { margin-left: auto; font-size: 14px; color: var(--ink2); }
.drawer-foot .error { margin-left: auto; min-height: 0; }
@media (max-width: 640px) {
  .drawer-top { padding-left: 20px; }
  .drawer-body { padding: 22px 20px 28px; }
  .drawer-foot { padding-inline: 20px; }
}

.close { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--fill); color: var(--ink2); font-size: 18px; line-height: 1; }
.close:hover { color: var(--ink); }

.angles { display: grid; gap: 8px; }
.angle { position: relative; display: block; }
.angle div { padding: 14px 16px; border: 1.5px solid var(--hair); border-radius: 14px; background: #ffffff; }
.angle strong { display: block; font-weight: 700; }
.angle span { font-size: 15px; color: var(--ink2); }
.angle input:checked + div { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
/* 别人怎么拍：真实博主的作品，一行一个。圆点里是名字的第一个字，颜色由 JS 用 --c、--t 传进来。 */
.examples { display: grid; gap: 2px; margin-inline: -12px; }
.example {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  color: var(--ink); transition: background-color 0.25s, transform 0.25s var(--ease);
}
button.example { width: 100%; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; }
:is(a, button).example:hover, .example.on { background: var(--fill); text-decoration: none; }
:is(a, button).example:active { transform: scale(0.985); }
.example .who {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--c, #ffe1b0); color: var(--t, #5a3300); font-size: 16px; font-weight: 900;
  transition: transform 0.4s var(--ease);
}
.example .txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.example strong { font-size: 15px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.example .txt span { font-size: 14px; line-height: 1.5; color: var(--ink2); }
.example .go { flex: none; font-size: 13px; font-weight: 700; color: var(--link); }
@media (hover: hover) {
  /* “看原视频”一直看得见（不然不知道这一行能点），鼠标移上来再变实、往右挪一点 */
  .example .go { opacity: 0.55; transition: opacity 0.25s, transform 0.4s var(--ease); }
  :is(a, button).example:hover .go, :is(a, button).example:focus-visible .go, .example.on .go { opacity: 1; }
  a.example:hover .go, a.example:focus-visible .go { transform: translateX(3px); }
  :is(a, button).example:hover .who { transform: scale(1.1) rotate(-6deg); }
}
.result { padding-top: 30px; border-top: 1px solid var(--hair); display: grid; gap: 16px; }

.modal-inner { display: grid; gap: 22px; padding: 28px 28px 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 26px; font-weight: 900; }
.modal-inner .switch { text-align: center; font-size: 14px; color: var(--ink2); }
.modal-inner .btn { width: 100%; min-height: 52px; }

/* ---------------------------------------------------------------- 管理 */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0; margin-bottom: 28px; border-radius: 22px; background: var(--card); box-shadow: 0 0 0 1px var(--hair); overflow: hidden; }
.stats div { padding: 20px 24px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); margin: 0 -1px -1px 0; }
.stats span { display: block; font-size: 13px; color: var(--ink2); }
.stats strong { display: block; margin-top: 4px; font-size: 26px; font-weight: 900; line-height: 1.2; }
.user-row { display: flex; align-items: center; gap: 10px 20px; flex-wrap: wrap; min-height: 72px; padding: 14px 24px; }
.user-row .who { flex: 1; min-width: 160px; }
.user-row .who strong { font-weight: 700; }
.user-row .who div { font-size: 14px; color: var(--ink2); }
.user-row .actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.user-row .plan-actions { display: flex; flex-direction: column; gap: 8px; }
.user-row .plan-label { min-width: 3.4em; font-size: 13px; color: var(--ink2); }

/* ---------------------------------------------------------------- 介绍页 */

.landing { background: var(--bg); }
.landing h2 { font-size: clamp(34px, 4.5vw, 56px); line-height: 1.15; }
.landing .lede { margin-top: 14px; max-width: 30em; font-size: 19px; line-height: 1.6; color: var(--ink2); }

/* 首屏：左边超大标题，右边红色大圆压两台手机，价格是一枚黑色贴纸 */
.hero { position: relative; overflow: hidden; }
.hero-stage { position: relative; min-height: 800px; }
.disc { position: absolute; right: -90px; top: 60px; width: 640px; height: 640px; border-radius: 50%; background: var(--accent); }
.hero-copy { position: relative; z-index: 3; }
.hero h1 { padding-top: 44px; font-size: clamp(56px, 8.1vw, 108px); line-height: 1.08; white-space: nowrap; }
.hero h1 span { display: block; }
.hero .sub { margin-top: 28px; max-width: 440px; font-size: 21px; line-height: 1.6; color: var(--ink2); }
.hero .actions { display: flex; align-items: center; gap: 24px; margin-top: 36px; font-size: 18px; }
.hero .fine { margin-top: 16px; font-size: 15px; color: var(--ink2); }
.facts { display: flex; gap: 36px; margin-top: 42px; }
.facts strong { display: block; font-size: 34px; line-height: 1.15; }
.facts span { font-size: 14px; color: var(--ink2); }

.phone {
  position: absolute; z-index: 4; width: 292px; height: 596px; padding: 10px;
  border-radius: 46px; background: #0d0d0d; box-shadow: 0 40px 80px -30px rgba(22, 18, 14, 0.55);
}
.phone.a { right: 284px; top: 138px; rotate: -5deg; }
.phone.b { right: -4px; top: 186px; rotate: 4deg; }
.screen { position: relative; display: flex; flex-direction: column; height: 100%; padding: 46px 16px 0; border-radius: 36px; background: var(--card); overflow: hidden; }
.screen::before { content: ""; position: absolute; top: 10px; left: 50%; width: 84px; height: 24px; margin-left: -42px; border-radius: 12px; background: #0d0d0d; }
.s-date { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 22px; font-size: 12px; color: var(--ink2); }
.s-title { margin-top: 2px; font-size: 23px; font-weight: 900; }
.s-rows { margin-top: 10px; }
.s-rows li { padding: 11px 0; border-top: 1px solid var(--hair); }
.s-rows b { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 15px; }
.s-rows i { flex: none; height: 20px; padding: 0 8px; border: 1.5px solid currentColor; border-radius: 999px; font-size: 11px; font-style: normal; line-height: 17px; }
.s-rows i.hot { color: var(--link); }
.s-rows li > span { display: block; margin-top: 2px; font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 右边那台手机：四种身份轮着写同一个题 */
.phone .seg { display: flex; margin-top: 10px; padding: 3px; background: var(--fill); box-shadow: none; }
.phone .seg button { flex: 1; min-height: 30px; padding: 0 4px; line-height: 30px; font-size: 13px; }
.demo-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.demo-meta span { height: 22px; padding: 0 9px; border-radius: 999px; background: var(--fill); font-size: 11px; line-height: 22px; color: var(--ink2); }
.demo-body { flex: 1; min-height: 0; margin-top: 12px; overflow: hidden; }
.demo-body .script { gap: 9px; font-size: 14px; line-height: 1.7; }
.demo-bar { height: 3px; margin: 0 -16px; background: var(--hair); }
.demo-bar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; }
.demo-bar i.run { animation: bar 4s linear forwards; }
@keyframes bar { to { transform: scaleX(1); } }

/* 会滑动的选中块：按钮不重建，只挪底下那块 */
.seg.slide { position: relative; }
.seg.slide .thumb {
  position: absolute; top: 3px; bottom: 3px; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0));
  border-radius: 999px; background: var(--ink); transition: transform 0.45s var(--ease), width 0.45s var(--ease);
}
.seg.slide button { position: relative; }
.seg.slide button[aria-selected="true"] { background: none; }

.sticker {
  position: absolute; z-index: 5; right: 566px; top: 570px; width: 140px; height: 140px; border-radius: 50%;
  background: var(--ink); color: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center;
  rotate: -12deg;
}
.sticker b { font-size: 36px; line-height: 1.1; }
.sticker span { font-size: 15px; }

/* 窄一点的屏幕：标题在上，只留会打字的那台手机 */
@media (max-width: 1180px) {
  .hero-stage { min-height: 0; padding-bottom: 72px; }
  .hero h1 { padding-top: 28px; font-size: clamp(44px, 12.4vw, 96px); }
  .hero .sub { font-size: 19px; }
  .facts { gap: 26px; }
  .facts strong { font-size: 28px; }
  .phone.a { display: none; }
  .phone.b { position: relative; right: auto; top: auto; rotate: 0deg; margin: 56px auto 0; }
  .disc { width: 520px; height: 520px; right: auto; left: 50%; top: auto; bottom: -70px; margin-left: -260px; }
  .sticker { right: max(4px, calc(50% - 236px)); top: auto; bottom: 34px; width: 108px; height: 108px; }
  .sticker b { font-size: 27px; }
  .sticker span { font-size: 13px; }
}

/* 今天的选题滚动条 */
.ticker { position: relative; z-index: 5; padding: 18px 0; overflow: hidden; background: var(--ink); color: var(--bg); }
.ticker-track { display: flex; gap: 44px; width: max-content; }
.ticker-track span { display: inline-flex; align-items: center; gap: 12px; font-size: 14px; white-space: nowrap; color: #bdb2a3; }
.ticker-track span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ticker-track b { font-size: 19px; font-weight: 800; color: var(--bg); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* 每天更新三样东西：大小不一的色块，里面是当天真实的目录 */
.three { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); grid-template-rows: auto 1fr; gap: 20px; margin-top: 44px; }
.blk { min-width: 0; padding: 34px 40px 30px; border-radius: 32px; --rule: var(--hair); }
.blk h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; font-size: 20px; }
.blk h3 span { font-size: 15px; font-weight: 400; opacity: 0.85; }
.blk > p { margin-top: 6px; font-size: 15px; line-height: 1.6; opacity: 0.85; }
.mini { margin-top: 16px; }
.mini li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 0; border-top: 1px solid var(--rule); font-size: 20px; font-weight: 700; }
.mini strong { min-width: 0; font-weight: inherit; }
.mini span { flex: none; font-size: 14px; font-weight: 400; opacity: 0.8; }
.blk.accent { grid-row: span 2; background: var(--accent); color: var(--on-accent); --rule: rgba(22, 18, 14, 0.16); }
.blk.accent .mini li { padding: 17px 0; font-size: clamp(22px, 2.5vw, 31px); font-weight: 800; }
.blk.ink { background: var(--ink); color: var(--bg); --rule: rgba(250, 241, 228, 0.18); }
.blk.line { background: var(--card); box-shadow: inset 0 0 0 2px var(--ink); }
.blk.styles { grid-column: 1 / -1; display: flex; align-items: center; gap: 24px 48px; flex-wrap: wrap; background: var(--bg2); }
.blk.styles > div:first-child { flex: 0 1 280px; }
.blk.styles > div:last-child { flex: 1 1 380px; }
.blk.styles h3 { display: block; }
.blk.styles p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--ink2); }
.blk.styles .chips button { padding: 8px 17px; border: 1.5px solid var(--ink); border-radius: 999px; background: none; font-size: 15px; font-weight: 700; color: var(--ink); transition: background-color 0.2s, color 0.2s; }
.blk.styles .chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.blk.styles .style-note { margin-top: 14px; }
@media (max-width: 900px) {
  .three { grid-template-columns: minmax(0, 1fr); }
  .blk { padding: 26px 24px 22px; border-radius: 26px; }
  .blk.accent { grid-row: auto; }
}

/* 稿子按身份现写：左边选身份，右边一张稍微歪着的纸 */
.persona-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; align-items: center; }
.ptabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.ptabs button { height: 48px; padding: 0 24px; border: 2px solid var(--ink); border-radius: 999px; background: none; font-size: 17px; font-weight: 700; transition: background-color 0.2s, color 0.2s; }
.ptabs button[aria-selected="true"] { background: var(--ink); color: var(--bg); }
.pmeta { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin-top: 28px; font-size: 16px; }
.pmeta dt { color: var(--ink2); }
.pmeta dd { font-weight: 700; }
.sheet {
  position: relative; display: grid; gap: 22px; align-content: start; min-height: 480px; padding: 54px 52px 40px;
  border-radius: 28px; background: #ffffff; rotate: 1.2deg; box-shadow: 0 40px 70px -40px rgba(22, 18, 14, 0.5);
}
.sheet .stamp { position: absolute; top: 20px; right: 24px; height: 24px; font-size: 12px; }
.sheet .script { font-size: 21px; line-height: 1.85; gap: 16px; }
@media (max-width: 900px) {
  .persona-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .sheet { min-height: 0; padding: 50px 24px 28px; rotate: 0deg; }
  .sheet .script { font-size: 18px; }
}

/* 三步 */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding-top: 26px; border-top: 2px solid var(--hair); }
.steps li::after { content: ""; position: absolute; top: -2px; left: 0; width: 100%; height: 2px; background: var(--ink); transform-origin: left; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 24px; font-weight: 900;
}
.steps h3 { font-size: 24px; font-weight: 800; }
.steps p { margin-top: 8px; font-size: 16px; line-height: 1.6; color: var(--ink2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 32px; } }

/* 价格：一整段主色，里面两张并排的档位卡。基础档是米白卡，带货档是墨黑卡（.plan.dark）。 */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 44px; }
.plans.one { grid-template-columns: minmax(0, 640px); }
.plan { min-width: 0; padding: 34px 40px 30px; border-radius: 32px; background: var(--card); }
.plan.dark { background: var(--bg); }
.plan h3 { font-size: 26px; font-weight: 900; }
.plan-note { margin-top: 4px; font-size: 15px; color: var(--ink2); }
.plan .amount { margin-top: 24px; font-size: clamp(60px, 7.6vw, 108px); }
.plan .includes li { padding: 13px 0; font-size: 17px; }
.plan-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px 40px; flex-wrap: wrap; margin-top: 32px; }
.plan-foot .how { margin-top: 0; }
.amount { font-size: clamp(88px, 12.5vw, 176px); line-height: 1; white-space: nowrap; }
.amount small { margin-left: 10px; font-size: 0.26em; font-weight: 700; -webkit-text-stroke: 0; }
.how { margin-top: 22px; max-width: 26em; font-size: 16px; line-height: 1.6; color: var(--ink2); }
.includes { margin-top: 26px; }
.includes li { display: flex; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--hair); font-size: 19px; font-weight: 700; }
.includes li:first-child { border-top: 1px solid var(--hair); }
.includes li::before { content: ""; flex: none; width: 8px; height: 14px; margin: 5px 4px 0 2px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(45deg); }
@media (max-width: 860px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .plan { padding: 26px 24px 22px; border-radius: 26px; }
}

/* 带货推荐没开通时：上面一块墨黑的说明（这一档有什么、多少钱、怎么开），下面是只有名字的商品卡。 */
.upsell { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 36px 56px; align-items: center; margin-bottom: 28px; padding: 40px 44px; border-radius: 32px; background: var(--bg); }
.upsell h2 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; font-weight: 900; -webkit-text-stroke: 0.018em currentColor; }
.upsell h2 + p { margin-top: 10px; font-size: 17px; line-height: 1.6; color: var(--ink2); }
.upsell .includes { margin-top: 20px; }
.upsell .includes li { padding: 12px 0; font-size: 17px; }
.upsell .amount { font-size: clamp(60px, 7vw, 100px); }
.upsell .btn { margin-top: 24px; }
.card.locked .body { gap: 12px; }
.card.locked .bar { display: block; height: 12px; border-radius: 6px; background: var(--fill); }
.card.locked .bar.short { width: 58%; }
.lock-note { margin-top: 6px; font-size: 14px; color: var(--ink3); }
@media (max-width: 860px) { .upsell { grid-template-columns: minmax(0, 1fr); padding: 28px 24px; border-radius: 26px; } }

/* 常见问题 */
.faq { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: 48px; }
.faq-list { border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--hair); }
.faq-list summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; font-size: 20px; font-weight: 700; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; display: inline-block; font-size: 24px; font-weight: 400; line-height: 1.2; color: var(--link); transition: transform 0.3s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { padding: 0 0 24px; max-width: 34em; line-height: 1.7; color: var(--ink2); }
@media (max-width: 760px) { .faq { grid-template-columns: 1fr; gap: 28px; } }

.closing { text-align: center; }
.closing .btn { margin-top: 34px; }
.foot-note { padding: 28px 0 40px; background: #16120e; text-align: center; font-size: 13px; color: #8a8074; border-top: 1px solid rgba(250, 241, 228, 0.16); }

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

#toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 50; transform: translate(-50%, 16px);
  padding: 12px 22px; border-radius: 999px; background: #16120e; color: #faf1e4; font-size: 15px; font-weight: 700;
  opacity: 0; pointer-events: none; max-width: calc(100vw - 40px);
  transition: opacity 0.25s, transform 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- 交互和动效
   2026-12-02 用户要求：要有交互、有动效，不能是一张静态页。
   规矩：只动 transform / translate / scale / opacity（骨架屏的流光除外）；全部包在“没有要求减少动效”里；
   内容默认可见的地方不靠动画才显示（滚动出现的元素由 JS 加 data-reveal，JS 不跑就不会被藏起来）。
   手机样机的倾斜写在 rotate 属性上，进场用 transform，浮动用 translate，三样互不打架。 */

/* 鼠标光斑：给元素加 .spot，JS 把鼠标位置写进 --mx / --my */
.spot { position: relative; isolation: isolate; }
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 196, 60, 0.22), transparent 62%);
}
.spot:hover::before { opacity: 1; }

@media (hover: hover) {
  .card { transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
  .card:hover { transform: translateY(-5px); box-shadow: 0 0 0 1px var(--hair), 0 26px 44px -26px rgba(22, 18, 14, 0.5); }
  button.card:active { transform: translateY(-1px) scale(0.99); }
  .btn:not(.soft):not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 14px 26px -14px rgba(22, 18, 14, 0.7); }
  .mini li { transition: padding 0.3s var(--ease); }
  .mini li:hover { padding-left: 10px; }
  .row summary { transition: background-color 0.2s; }
  .row summary:hover { background: var(--fill); }
}

/* 行：箭头会转 */
.row summary h3::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 10px; vertical-align: 3px;
  border: solid var(--ink3); border-width: 0 2px 2px 0; transform: rotate(45deg); transition: transform 0.3s var(--ease);
}
.row[open] summary h3::after { transform: rotate(225deg); vertical-align: -1px; }

/* 生成中：骨架屏和按钮上的小圈 */
.skeleton { display: grid; gap: 14px; padding-top: 4px; }
.skeleton i {
  display: block; height: 16px; border-radius: 8px; background-size: 200% 100%;
  background-image: linear-gradient(90deg, var(--fill) 25%, rgba(22, 18, 14, 0.16) 50%, var(--fill) 75%);
}
.skeleton i:nth-child(1) { width: 52%; height: 22px; }
.skeleton i:nth-child(3) { width: 88%; }
.skeleton i:nth-child(4) { width: 64%; }
.skeleton i:nth-child(6) { width: 76%; }
.btn.busy::before {
  content: ""; width: 14px; height: 14px; margin-right: 8px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
}
.caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -0.16em; background: var(--ink); }
.script > .wait { display: none; }
.style-note { font-size: 15px; color: var(--ink2); }

@media (prefers-reduced-motion: no-preference) {
  /* 进场：容器加 .enter，子元素按 --i 依次升起 */
  .enter > * { animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
  @keyframes rise { from { opacity: 0; transform: translateY(20px); } }

  /* 首屏：红圆放大出现，手机从下面升上来再轻轻浮动，价格贴纸最后“啪”地贴上 */
  .disc { animation: disc-in 1.1s var(--ease) both, breathe 9s ease-in-out 1.1s infinite alternate; }
  @keyframes disc-in { from { opacity: 0; transform: scale(0.6); } }
  @keyframes breathe { to { scale: 1.05; } }
  .phone { animation: phone-in 1s var(--ease) both, float 7s ease-in-out 1.2s infinite alternate; }
  .phone.a { animation-delay: 0.15s, 1.2s; }
  .phone.b { animation-delay: 0.3s, 2.4s; }
  @keyframes phone-in { from { opacity: 0; transform: translateY(70px); } }
  @keyframes float { to { translate: 0 -12px; } }
  .sticker { animation: stamp 0.55s cubic-bezier(0.2, 1.5, 0.4, 1) 0.95s both; }
  @keyframes stamp { from { opacity: 0; transform: scale(1.7); } }

  /* 滚动到才出现 */
  [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--d, 0) * 90ms); }
  [data-reveal].in { opacity: 1; transform: none; }
  .steps li::after { transform: scaleX(0); transition: transform 1.1s var(--ease); transition-delay: calc(var(--d, 0) * 140ms + 0.25s); }
  .steps li.in::after { transform: scaleX(1); }

  /* 稿子一行一行出来 */
  .script.play > * { animation: line-in 0.6s var(--ease) both; animation-delay: calc(var(--i, 0) * 0.11s); }
  @keyframes line-in { from { opacity: 0; transform: translateY(8px); } }
  .style-note.swap { animation: line-in 0.4s var(--ease) both; }
  /* 抽屉刚打开时，别人怎么拍的每一行跟在这一段后面依次出来（--i 是这一段的次序，--j 是行的次序） */
  .drawer-body.enter .example { animation: line-in 0.55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + var(--j, 0) * 70ms + 180ms); }

  .ticker-track { animation: ticker 40s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }
  .skeleton i { animation: shimmer 1.4s linear infinite; }
  @keyframes shimmer { to { background-position: -200% 0; } }
  .btn.busy::before { animation: spin 0.7s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
  .caret { animation: blink 1s steps(2, jump-none) infinite; }
  @keyframes blink { 50% { opacity: 0; } }

  /* 切栏目、筛选：选中块滑过去，页面内容换场，选题卡挪位置 */
  .route .page { view-transition-name: page; }
  .app .nav .seg button[aria-selected="true"] { view-transition-name: tab-pill; }
  .page-head .seg button[aria-selected="true"] { view-transition-name: filter-pill; }
  ::view-transition-old(page) { animation: vt-out 0.18s ease both; }
  ::view-transition-new(page) { animation: vt-in 0.5s var(--ease) both; }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(16px); } }
  ::view-transition-group(*) { animation-duration: 0.4s; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
}

/* 展开收起的高度过渡（新浏览器才有，旧的直接展开） */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    :root { interpolate-size: allow-keywords; }
    details::details-content { block-size: 0; overflow: clip; opacity: 0; transition: block-size 0.4s var(--ease), opacity 0.3s, content-visibility 0.4s allow-discrete; }
    details[open]::details-content { block-size: auto; opacity: 1; }
  }
}
