/* 幻言官网。样式叫「夜幕 + 手帐」：首屏是夜里的角色卡，讲记忆的地方摊开一本手帐。
   颜色和字体跟 App 的「手帐 · 夜灯」同一套（apps/mobile/lib/ui/theme/tokens.dart）：
   夜里是深蓝的纸、暖白的字、台灯的暖黄；纸面是点阵纸、墨蓝的字、海棠红。夜里的底色比 App 再深一点。
   动效（11-01 加的，学苹果官网）：首屏的夜空会动（流动的光、星星、流星、跟着鼠标的灯），标题模糊着浮上来，
   有几处跟着滚动走（记忆本立起来翻开、一段话一个字一个字亮起来、广场卡片散开、结尾的角色卡升起来）。
   跟着滚动走的地方用 --p（0 到 1，site.js 按位置算好写上）；没有 JS 时 --p 取默认值 1，就是最后的样子。
   系统里打开了「减弱动态效果」的，全部直接显示最后的样子。 */

@font-face {
  font-family: "HY Display";
  src: url("/assets/fonts/display-900.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}
@font-face {
  font-family: "HY Display";
  src: url("/assets/fonts/display-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
/* 手写字（龙藏体）：便签、记忆本、拍立得下面的名字 */
@font-face {
  font-family: "HY Hand";
  src: url("/assets/fonts/hand.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
/* 记忆本的小标题（站酷小薇） */
@font-face {
  font-family: "HY Paper";
  src: url("/assets/fonts/paper.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/assets/fonts/instrument-serif-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* 夜 */
  --bg: #0e121a;
  --bg-2: #141924;
  --panel: rgba(238, 232, 226, 0.035);
  --panel-2: rgba(238, 232, 226, 0.07);
  --line: rgba(238, 232, 226, 0.1);
  --line-2: rgba(238, 232, 226, 0.18);
  --ink: #eee8e2;
  --ink-2: #bab3ad;
  --ink-3: #8a90a0;
  --accent: #f2899b;
  --brand: #c94b63;
  --lamp: #f4b56c;
  --warm: #ffd2a6;
  --danger: #ff8a7a;
  --success: #7fc3a3;
  --gold: #f2ddb0;
  --gold-grad: linear-gradient(135deg, #f2ddb0 0%, #ddb97f 100%);
  /* 纸 */
  --paper: #fbf8f7;
  --paper-dot: #e4dcdf;
  --paper-ink: #26314a;
  --paper-ink-2: #5b6478;
  --paper-ink-3: #767e8f;
  --paper-accent: #c2445c;
  --paper-accent-soft: #fbe3e8;
  --sticky: #fff0b3;
  --sticky-ink: #3b3524;
  --tape: rgba(242, 137, 155, 0.55);
  --tape-blue: rgba(140, 176, 216, 0.6);
  --tape-yellow: rgba(236, 196, 96, 0.62);

  --font-display: "HY Display", "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-hand: "HY Hand", "Long Cang", "Kaiti SC", "STKaiti", "KaiTi", cursive;
  --font-paper: "HY Paper", "ZCOOL XiaoWei", var(--font-display);
  --font-latin: "Instrument Serif", "Times New Roman", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  /* 先快后慢、收得很柔（苹果官网常用的那种）；back 是最后轻轻弹一下 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-back: cubic-bezier(0.34, 1.45, 0.5, 1);
  --gutter: max(20px, env(safe-area-inset-left));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
/* 样式里写了 display 的元素，hidden 也要能藏住（停售的套餐、没有年付时的切换按钮） */
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
/* 手机浏览器不认 body 上的 overflow-x，装饰图形伸出屏幕时整页会左右晃：在 main 上裁掉（clip 不影响 sticky） */
main { overflow-x: hidden; overflow-x: clip; }

/* 胶片颗粒，整页叠一层。 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: rgba(242, 137, 155, 0.4); color: #fff; }

img { max-width: 100%; display: block; }
/* 只给读屏软件看（拆成一个个字做动画的那段话，原文放在这里） */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.serif { font-family: var(--font-display); font-weight: 900; }
.serif-500 { font-family: var(--font-display); font-weight: 500; }
.hand { font-family: var(--font-hand); font-weight: 400; }
.paper-title { font-family: var(--font-paper); font-weight: 400; }

.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: currentColor;
}

/* ---------- 按钮 ---------- */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background-color 0.3s, border-color 0.3s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-lg { height: 56px; padding: 0 30px; font-size: 17px; }
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; }

/* 主按钮和 App 一样：一整块海棠红，白字，不用渐变 */
.btn-primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 32px -14px rgba(201, 75, 99, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover { background: #d4566e; box-shadow: 0 18px 40px -14px rgba(201, 75, 99, 1), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
/* 鼠标移上去时扫过一道光 */
.btn-primary::after, .btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.btn-primary:hover::after, .btn-gold:hover::after { transform: translateX(120%); }

.btn-ghost {
  color: var(--ink);
  background: rgba(238, 232, 226, 0.05);
  border: 1px solid var(--line-2);
}
.btn-ghost:hover { background: rgba(238, 232, 226, 0.1); border-color: rgba(238, 232, 226, 0.28); }

.btn-gold {
  color: #3b2a10;
  background: var(--gold-grad);
  box-shadow: 0 14px 34px -16px rgba(221, 185, 127, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.btn.is-off { opacity: 0.5; pointer-events: none; }

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

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.4s, border-color 0.4s, backdrop-filter 0.4s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled, .nav.is-open {
  background: rgba(14, 18, 26, 0.78);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { border-radius: 10px; box-shadow: 0 6px 20px -6px rgba(201, 75, 99, 0.7); }
.brand-name { font-size: 23px; letter-spacing: 0.06em; }
.nav-links { display: flex; gap: 34px; font-size: 15px; color: var(--ink-2); }
.nav-links a { position: relative; transition: color 0.25s; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.35s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-login { font-size: 15px; color: var(--ink-2); transition: color 0.25s; }
.nav-login:hover { color: var(--ink); }
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: rgba(238, 232, 226, 0.06);
  border: 1px solid var(--line);
}
.nav-toggle .i { width: 20px; height: 20px; }
.nav-menu {
  display: grid;
  padding: 8px var(--gutter) 22px;
  border-top: 1px solid var(--line);
}
.nav-menu a { padding: 14px 4px; font-size: 17px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.nav-menu a:last-child { border-bottom: 0; color: var(--accent); }

/* ---------- 进场动画（没有 JS 时全部直接显示） ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s var(--ease-out), transform 1.3s var(--ease-out), filter 1.1s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 110ms);
}
/* 文字类的再加一点模糊，像从雾里浮上来；卡片、图不加（大块模糊费电） */
.js .reveal:is(.eyebrow, .hero-lead, .hero-meta, .act-label, .act-lead, .note) { filter: blur(8px); }
.js .reveal.is-in { opacity: 1; transform: none; filter: none; }
/* 大标题按行一行一行浮上来（site.js 把 <br> 隔开的每一行包成 .ln） */
.lines .ln { display: block; transition: opacity 1.1s var(--ease-out), transform 1.4s var(--ease-out), filter 1.2s var(--ease-out); transition-delay: calc(var(--l, 0) * 140ms + 60ms); }
.js .lines.reveal { opacity: 1; transform: none; filter: none; }
.js .lines:not(.is-in) .ln { opacity: 0; transform: translateY(0.42em); filter: blur(14px); }
.js .hero-title .line.reveal { filter: blur(16px); transform: translateY(0.3em); transition-duration: 1.2s, 1.5s, 1.3s; }
.js .hero-title .line.reveal.is-in { filter: none; transform: none; }

/* ---------- 首屏 ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: max(780px, 100vh);
  min-height: max(780px, 100svh);
  padding: 110px 0 56px;
  overflow: hidden;
  isolation: isolate;
}
/* 夜空：角色卡后面一盏台灯的暖光，左下一点海棠红，右上一片夜蓝（.aurora 里三团光，慢慢飘），
   星星画在 canvas 上（会眨眼、偶尔有流星）；没有 JS 时用下面两层 CSS 画的星星 */
.hero-sky {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: linear-gradient(180deg, #0a0d14 0%, var(--bg) 62%, var(--bg-2) 100%);
}
/* 三团光在首屏底下淡掉，和下一屏接得上 */
.aurora {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 55%, transparent 98%);
}
.aurora i {
  position: absolute;
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  will-change: transform;
}
.aurora i:nth-child(1) {
  left: 40%;
  top: -2%;
  width: 62%;
  background: radial-gradient(closest-side, rgba(244, 181, 108, 0.2), rgba(244, 181, 108, 0.07) 55%, transparent);
  animation: aurora-a 22s ease-in-out infinite alternate;
}
.aurora i:nth-child(2) {
  left: -20%;
  top: 34%;
  width: 60%;
  background: radial-gradient(closest-side, rgba(201, 75, 99, 0.2), rgba(201, 75, 99, 0.06) 55%, transparent);
  animation: aurora-b 27s ease-in-out infinite alternate;
}
.aurora i:nth-child(3) {
  left: 56%;
  top: -42%;
  width: 62%;
  background: radial-gradient(closest-side, rgba(92, 120, 178, 0.28), rgba(92, 120, 178, 0.08) 55%, transparent);
  animation: aurora-c 33s ease-in-out infinite alternate;
}
.sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .sky-canvas {
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent 94%);
  mask-image: linear-gradient(180deg, #000 30%, transparent 94%);
}
.hero-sky.has-canvas::before, .hero-sky.has-canvas::after { display: none; }
/* 页尾的星星从上面慢慢出现，不要在分界的地方齐刷刷开始 */
.finale .sky-canvas {
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%);
  mask-image: linear-gradient(180deg, transparent, #000 30%);
}
/* 电脑上一盏跟着鼠标走的暖灯；手机上自己慢慢晃（site.js 挪位置） */
.lamp {
  position: absolute;
  left: 0;
  top: 0;
  width: 720px;
  height: 720px;
  margin: -360px 0 0 -360px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 214, 170, 0.11), rgba(255, 214, 170, 0.035) 55%, transparent);
  opacity: 0;
  transition: opacity 1.4s;
  pointer-events: none;
  will-change: transform;
}
.hero-sky.is-lit .lamp { opacity: 1; }
.hero-sky::before, .hero-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 88%);
  mask-image: linear-gradient(180deg, #000 20%, transparent 88%);
}
.hero-sky::before {
  opacity: 0.55;
  background-image:
    radial-gradient(1px 1px at 24px 36px, #fff, transparent 60%),
    radial-gradient(1px 1px at 132px 92px, rgba(255, 255, 255, 0.7), transparent 60%),
    radial-gradient(1.4px 1.4px at 70px 168px, #ffe9cf, transparent 60%),
    radial-gradient(1px 1px at 182px 200px, rgba(255, 255, 255, 0.6), transparent 60%);
  background-size: 214px 236px;
}
.hero-sky::after {
  opacity: 0.4;
  background-image:
    radial-gradient(1.2px 1.2px at 40px 60px, #fff, transparent 60%),
    radial-gradient(1px 1px at 250px 140px, #ffe9cf, transparent 60%),
    radial-gradient(1px 1px at 160px 260px, rgba(255, 255, 255, 0.8), transparent 60%);
  background-size: 337px 301px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
  align-items: center;
  gap: 32px;
  max-width: 1320px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--warm);
}
.eyebrow::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.hero-title {
  margin: 26px 0 28px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 7.8vw, 112px);
  line-height: 1.08;
  letter-spacing: 0.04em;
}
.hero-title .line { display: block; }
.hero-title em {
  font-style: normal;
  background: linear-gradient(100deg, #fff1e2 10%, #ffc7a0 55%, #f08aa0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-lead span { display: inline-block; }
.hero-lead { max-width: 24em; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.9; color: var(--ink-2); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 24px; font-size: 14px; color: var(--ink-3); }
.hero-meta li { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--lamp); opacity: 0.8; }

/* 角色卡：电脑上五张扇形排开（data-slot 是离中间那张差几位，再远的是 far，藏在后面），手机上一排左右滑。
   卡片由后台「官方角色」决定（site.js 从 /api/showcase 取），取不到就是 index.html 里写好的五张 */
.cast { position: relative; height: 650px; }
.cast-track { position: absolute; inset: 0; perspective: 1400px; }
.cast-card {
  --x: 0px;
  --z: 0px;
  --ry: 0deg;
  --s: 1;
  --b: 1;
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 300px;
  height: 456px;
  margin: -238px 0 0 -150px;
  cursor: pointer;
  transform: translateX(var(--x)) translateZ(var(--z)) rotateY(var(--ry)) scale(var(--s));
  filter: brightness(var(--b));
  transition: transform 0.9s var(--ease), filter 0.9s var(--ease), opacity 0.6s;
}
.cast-card[data-slot="0"] { --s: 1.1; z-index: 5; cursor: default; }
.cast-card[data-slot="1"] { --x: 196px; --z: -120px; --ry: -16deg; --b: 0.7; z-index: 3; }
.cast-card[data-slot="-1"] { --x: -196px; --z: -120px; --ry: 16deg; --b: 0.7; z-index: 3; }
.cast-card[data-slot="2"] { --x: 340px; --z: -260px; --ry: -24deg; --b: 0.5; z-index: 2; }
.cast-card[data-slot="-2"] { --x: -340px; --z: -260px; --ry: 24deg; --b: 0.5; z-index: 2; }
.cast-card[data-slot="far"] { --z: -420px; --b: 0.3; opacity: 0; pointer-events: none; }
.cast-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 22px;
  background: var(--art) center 30% / cover, #1c2230;
  box-shadow: 0 40px 80px -30px #000, inset 0 0 0 1px rgba(255, 240, 220, 0.12);
  /* 鼠标在中间那张卡上时跟着转（--tx、--ty 由 site.js 写） */
  transform: perspective(1000px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg));
  transition: transform 0.8s var(--ease-out), box-shadow 0.9s var(--ease);
}
.cast.is-tilting .cast-card[data-slot="0"] .cast-photo { transition: transform 0.18s linear, box-shadow 0.9s var(--ease); }
/* 卡面上一块跟着鼠标走的反光 */
.cast-glare {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255, 244, 230, 0.2), transparent 46%);
  transition: opacity 0.6s;
}
.cast.is-tilting .cast-card[data-slot="0"] .cast-glare { opacity: 1; }
.cast-card[data-slot="0"] .cast-photo {
  box-shadow: 0 50px 90px -30px rgba(0, 0, 0, 0.95), 0 0 90px -24px rgba(244, 181, 108, 0.45), inset 0 0 0 1px rgba(255, 240, 220, 0.24);
}
.cast-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(8, 10, 16, 0.88) 100%);
}
/* 换成 AI 生成的真立绘以后，给卡片加 data-ai，左上角标出来 */
.cast-card[data-ai] .cast-photo::before {
  content: "由 AI 生成";
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 1;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(8, 10, 16, 0.55);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 246, 236, 0.78);
}
.cast-info { position: absolute; left: 20px; right: 20px; bottom: 20px; z-index: 1; display: grid; gap: 2px; }
.cast-name { font-size: 26px; line-height: 1.25; letter-spacing: 0.08em; }
.cast-role { font-size: 13px; color: var(--ink-2); }
.cast-line { margin-top: 8px; font-size: 18px; line-height: 1.5; color: #fff6ec; }
.cast-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(244, 181, 108, 0.38);
  background: rgba(244, 181, 108, 0.14);
  font-size: 12.5px;
  color: #ffdcb4;
}
.cast-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lamp); box-shadow: 0 0 8px var(--lamp); }
/* 后台填的字里有标题字体没打包的字：这一行整行换成系统里的宋体、楷体，不要一半一半 */
.serif.font-fallback, .serif-500.font-fallback { font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif; }
.hand.font-fallback { font-family: "Long Cang", "Kaiti SC", "STKaiti", "KaiTi", cursive; }
.cast-line, .cast-chip { transition: opacity 0.5s; }
.cast-card:not([data-slot="0"]) .cast-line, .cast-card:not([data-slot="0"]) .cast-chip { opacity: 0; }
/* 便利贴：TA 记下的一件事，贴在中间那张卡的右上角 */
.cast-note {
  position: absolute;
  top: -44px;
  right: -150px;
  z-index: 2;
  width: 196px;
  padding: 26px 18px 16px;
  background: var(--sticky);
  color: var(--sticky-ink);
  transform: rotate(4deg);
  box-shadow: 0 18px 30px -18px rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.cast-card[data-slot="0"] .cast-note { opacity: 1; transition: opacity 0.6s 0.55s; animation: bob 6s ease-in-out 1.4s infinite; }
.cast-note::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 56px;
  width: 84px;
  height: 24px;
  background: var(--tape);
  transform: rotate(-3deg);
}
.cast-note small { display: block; margin-bottom: 4px; font-size: 12px; color: #8b7a4e; letter-spacing: 0.04em; }
.cast-note .hand { display: block; font-size: 21px; line-height: 1.45; }
.scribble {
  position: absolute;
  left: calc(50% - 380px);
  bottom: 8px;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  color: #f6c8a6;
  font-size: 23px;
  line-height: 1.3;
  transform: rotate(-4deg);
}
.scribble svg { width: 40px; height: 24px; margin-bottom: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cast-dots { position: absolute; left: 50%; bottom: 14px; z-index: 6; display: flex; gap: 10px; transform: translateX(-50%); }
.cast-dots button {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(238, 232, 226, 0.26);
  transition: width 0.4s var(--ease), background-color 0.4s;
}
.cast-dots button::after { content: ""; position: absolute; inset: -10px -4px; }
.cast-dots [aria-current="true"] { width: 24px; background: var(--lamp); }

/* ---------- 每一幕的通用排版 ---------- */

.act { position: relative; padding: clamp(64px, 7vw, 104px) 0; }
.act-head { max-width: 780px; margin-bottom: clamp(44px, 5.5vw, 72px); }
.act-head-center { max-width: 1000px; margin-inline: auto; text-align: center; }
.act-head-center .act-lead { margin-inline: auto; }
.act-label {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--warm);
}
.act-label::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.act-head-center .act-label::after { content: ""; width: 26px; height: 1px; background: currentColor; }
/* 纸胶带样子的小标签 */
.tape {
  padding: 3px 12px;
  background: rgba(242, 137, 155, 0.82);
  color: #2b1219;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transform: rotate(-2deg);
}
.act-title {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 5.2vw, 74px);
  line-height: 1.16;
  letter-spacing: 0.01em;
}
/* 大标题只在标点和 <br> 处换行，不把一个词拆到两行；实在放不下才随便断 */
.hero-title, .act-title, .finale-title, .lost-title, .doc-title { word-break: keep-all; overflow-wrap: anywhere; }
/* 居中的大标题，行末的「，」「。」「？」只画在字格左边，右边空着大半个字，整行看着往左偏（手机上最明显）。
   行末的标点包一层 <span class="hang">，让它挂到行外、不算宽度，前面的字就正好居中；靠左的标题上看不出变化。
   注意：只包行末的，包在一行中间后面的字会压上去；
   标题要占满一整行宽，宽度跟着字走的话（比如 flex 里居中的子元素）标点会被挤到下一行。 */
.hang { margin-right: -1em; }
.act-lead {
  max-width: 36em;
  font-size: clamp(16px, 1.25vw, 18px);
  line-height: 1.9;
  color: var(--ink-2);
  text-wrap: pretty;
}
.note {
  max-width: 780px;
  margin-top: 30px;
  padding: 15px 20px;
  border-left: 2px solid var(--lamp);
  border-radius: 0 14px 14px 0;
  background: rgba(244, 181, 108, 0.06);
  font-size: 14.5px;
  color: var(--ink-2);
}
.note-center {
  margin-inline: auto;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  color: var(--ink-3);
}

/* ---------- TA 记得你：摊开的记忆本 ---------- */

.act-memory { background: linear-gradient(180deg, var(--bg-2), var(--bg) 70%); }
.act-memory .act-head { margin-bottom: 26px; }
/* 一段话随滚动一个字一个字亮起来（site.js 拆成 .ch，按位置写 --p）；<b> 里的字亮起来是暖色 */
.statement {
  max-width: 25em;
  margin-bottom: clamp(56px, 7vw, 104px);
  font-size: clamp(21px, 2.45vw, 35px);
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-wrap: pretty;
}
.statement b { font-weight: inherit; color: var(--warm); }
.statement .nowrap { white-space: nowrap; }
.statement .ch { opacity: clamp(0.14, calc((var(--p, 1) * (var(--n, 1) + 10) - var(--i, 0)) / 10), 1); }
.spread {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transform-origin: 50% 100%;
  border-radius: 8px;
  background-color: var(--paper);
  background-image: radial-gradient(var(--paper-dot) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  background-position: 11px 11px;
  color: var(--paper-ink);
  box-shadow: 0 60px 100px -50px rgba(0, 0, 0, 0.95), 0 2px 0 rgba(255, 255, 255, 0.4) inset;
}
/* 中间的书脊 */
.spread::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 56px;
  margin-left: -28px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(60, 40, 40, 0.1) 40%, rgba(60, 40, 40, 0.2) 50%, rgba(60, 40, 40, 0.1) 60%, transparent);
}
.page { position: relative; min-height: 540px; padding: 52px 56px 56px; }
.page-left { display: flex; flex-direction: column; }
.polaroid {
  position: relative;
  width: 240px;
  padding: 12px 12px 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 30, 30, 0.12), 0 22px 34px -18px rgba(40, 30, 30, 0.5);
  transform: rotate(-3deg);
}
.polaroid::before {
  content: "";
  position: absolute;
  top: -14px;
  left: 50%;
  width: 104px;
  height: 28px;
  margin-left: -52px;
  background: var(--tape-blue);
  transform: rotate(2deg);
}
.polaroid-img { position: relative; display: block; aspect-ratio: 3 / 3.5; background: var(--art) center 30% / cover, #1c2230; }
.polaroid-img[data-ai]::after {
  content: "由 AI 生成";
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(8, 10, 16, 0.55);
  font-size: 10.5px;
  color: rgba(255, 246, 236, 0.8);
}
.polaroid figcaption { padding: 10px 6px 14px; font-size: 28px; line-height: 1.2; text-align: center; }
.page-hand { align-self: flex-end; margin: -10px 4px 0 0; font-size: 26px; line-height: 1.6; transform: rotate(-2deg); }
.stamp {
  position: absolute;
  top: 76px;
  right: 64px;
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border: 2.5px solid var(--paper-accent);
  border-radius: 50%;
  color: var(--paper-accent);
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  transform: rotate(-14deg);
  opacity: 0.8;
}
.page-title { font-size: 31px; line-height: 1.3; }
.page-title small { display: block; margin-bottom: 4px; font: 13px/1.6 var(--font-body); letter-spacing: 0.08em; color: var(--paper-ink-3); }
.entries { margin-top: 18px; }
.entries li {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: baseline;
  gap: 10px;
  padding: 11px 0 9px;
  border-bottom: 1px dashed rgba(38, 49, 74, 0.2);
}
.entries time { font-family: var(--font-latin); font-size: 21px; line-height: 1; color: var(--paper-accent); }
.entries .hand { font-size: 25px; line-height: 1.35; }
.cutout {
  position: relative;
  width: 86%;
  margin: 28px 0 0 auto;
  padding: 18px 20px 16px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(40, 30, 30, 0.12), 0 20px 30px -18px rgba(40, 30, 30, 0.5);
  transform: rotate(1.5deg);
}
.cutout::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 40px;
  width: 92px;
  height: 24px;
  background: var(--tape);
  transform: rotate(-4deg);
}
.cutout-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--paper-ink-3); }
.cutout-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--art) center 34% / 240%, #1c2230; }
.cutout-msg { margin-top: 10px; font-size: 15px; line-height: 1.8; color: var(--paper-ink); }
.cutout-msg i { font-style: normal; color: var(--paper-ink-3); }
.recall {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 3px 11px;
  border-radius: 999px;
  background: var(--paper-accent-soft);
  color: var(--paper-accent);
  font-size: 12.5px;
  font-weight: 600;
}

/* 往下滚时记忆本从桌上立起来（--p 从 0 到 1）。下面一页一页的出场在 .page 加上 .is-open 时开始 */
.js .book[data-scrub] .spread {
  transform: perspective(2400px) translate3d(0, calc((1 - var(--p, 1)) * 70px), 0) rotateX(calc((1 - var(--p, 1)) * 34deg)) scale(calc(0.86 + 0.14 * var(--p, 1)));
  will-change: transform;
}
.js .page .polaroid { transition: opacity 0.7s var(--ease-out) 0.1s, transform 1.1s var(--ease-back) 0.1s; }
.js .page:not(.is-open) .polaroid { opacity: 0; transform: translate(-26px, -40px) rotate(-14deg) scale(1.06); }
/* 手写的字从左往右写出来 */
.js .page .page-hand, .js .page .entries .hand {
  clip-path: inset(-0.5em -0.5em -0.5em -0.5em);
  transition: clip-path 1.1s cubic-bezier(0.45, 0.05, 0.4, 1);
}
.js .page:not(.is-open) .page-hand, .js .page:not(.is-open) .entries .hand { clip-path: inset(-0.5em 100% -0.5em -0.5em); }
.js .page .page-hand { transition-duration: 1.6s; transition-delay: 1s; }
.js .page .stamp { transition: opacity 0.2s ease 1.9s, transform 0.55s var(--ease-back) 1.9s; }
.js .page:not(.is-open) .stamp { opacity: 0; transform: rotate(-34deg) scale(2); }
.js .page .page-title { transition: opacity 0.8s var(--ease-out) 0.15s, transform 0.9s var(--ease-out) 0.15s; }
.js .page:not(.is-open) .page-title { opacity: 0; transform: translateY(12px); }
.js .page .entries time, .js .page .entries .kind { transition: opacity 0.6s ease; }
.js .page:not(.is-open) .entries time, .js .page:not(.is-open) .entries .kind { opacity: 0; }
.js .page .entries li:nth-child(1) > * { transition-delay: 0.45s; }
.js .page .entries li:nth-child(2) > * { transition-delay: 0.8s; }
.js .page .entries li:nth-child(3) > * { transition-delay: 1.15s; }
.js .page .entries li:nth-child(4) > * { transition-delay: 1.5s; }
.js .page .entries li > .kind { transition-delay: 0s; }
.js .page.is-open .entries li:nth-child(1) > .kind { transition-delay: 1.2s; }
.js .page.is-open .entries li:nth-child(2) > .kind { transition-delay: 1.55s; }
.js .page.is-open .entries li:nth-child(3) > .kind { transition-delay: 1.9s; }
.js .page.is-open .entries li:nth-child(4) > .kind { transition-delay: 2.25s; }
.js .page .cutout { transition: opacity 0.7s var(--ease-out) 2.1s, transform 1.1s var(--ease-back) 2.1s; }
.js .page:not(.is-open) .cutout { opacity: 0; transform: translate(40px, 28px) rotate(6deg); }
.page.is-open .recall { animation: recall 2.2s ease-out 3.2s 2; }

/* 记忆的分类：颜色和 App 白天的记忆本一样（apps/mobile/lib/ui/memory/memory_kinds.dart），印在纸上 */
.kind {
  display: inline-block;
  flex: none;
  padding: 1px 9px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 700;
  font-style: normal;
  line-height: 1.7;
}
.kind-relation { color: #b3364f; background: #fbe3e8; }
.kind-promise { color: #8f5a06; background: #fbefd6; }
.kind-like { color: #2f7357; background: #e0f1e8; }
.kind-hint { color: #23767d; background: #dcf0f1; }
.kind-state { color: #335fa6; background: #e1eaf8; }
.kind-event { color: #6447b8; background: #ebe5fb; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 52px; }
.pillar { padding: 26px 24px 24px; border-radius: 22px; border: 1px solid var(--line); background: var(--panel); }
.pillar .i { width: 26px; height: 26px; color: var(--lamp); }
.pillar h3 { margin: 14px 0 6px; font-size: 19px; }
.pillar p { font-size: 15px; line-height: 1.8; color: var(--ink-2); }

/* ---------- 怎么开始 ---------- */

.act-start::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(40% 40% at 50% 30%, rgba(244, 181, 108, 0.07), transparent 70%);
  animation: glow-drift 26s ease-in-out infinite alternate;
}
.ways { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.way {
  display: flex;
  flex-direction: column;
  padding: 18px 18px 26px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.way-art {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 220px;
  margin-bottom: 22px;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(70% 70% at 50% 40%, rgba(244, 181, 108, 0.1), transparent 70%), rgba(0, 0, 0, 0.22);
}
.way h3 { margin: 0 6px 8px; font-size: 21px; }
.way p { margin: 0 6px; font-size: 15px; line-height: 1.85; color: var(--ink-2); }
.way-square span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 108px;
  height: 162px;
  margin: -81px 0 0 -54px;
  border-radius: 14px;
  border: 1px solid rgba(255, 240, 220, 0.16);
  background: var(--art) center 30% / cover, #1c2230;
  box-shadow: 0 20px 34px -16px #000;
}
/* 三张卡随滚动从叠在一起慢慢散开（--p 从 0 到 1） */
.way-square span:nth-child(1) { transform: translate(calc(-74px * var(--p, 1)), calc(10px * var(--p, 1))) rotate(calc(-10deg * var(--p, 1))); }
.way-square span:nth-child(2) { z-index: 1; transform: translateY(calc(-4px * var(--p, 1))) scale(calc(0.94 + 0.06 * var(--p, 1))); }
.way-square span:nth-child(3) { transform: translate(calc(74px * var(--p, 1)), calc(10px * var(--p, 1))) rotate(calc(10deg * var(--p, 1))); }
.ticket {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px 14px 14px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 18px 30px -16px #000;
  transform: rotate(-2deg);
}
.ticket .i { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: var(--paper-accent-soft); color: var(--paper-accent); }
.ticket div { display: grid; line-height: 1.5; }
.ticket b { font-size: 15px; }
.ticket span { font-size: 12.5px; color: var(--paper-ink-3); }
.ticket-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.ticket-tags li { padding: 2px 11px; border-radius: 999px; border: 1px dashed rgba(238, 232, 226, 0.3); font-size: 12.5px; color: var(--ink-2); }
/* 卡片出现以后：导入的卡「啪」地落下，标签一个个冒出来；捏角色那张一行行写上去 */
.js .way .ticket { transition: opacity 0.6s var(--ease-out) 0.35s, transform 1s var(--ease-back) 0.35s; }
.js .way:not(.is-in) .ticket { opacity: 0; transform: translateY(-30px) rotate(-10deg); }
.js .way .ticket-tags li { transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-back); }
.js .way:not(.is-in) .ticket-tags li { opacity: 0; transform: translateY(10px) scale(0.86); }
.js .way .ticket-tags li:nth-child(1) { transition-delay: 0.8s; }
.js .way .ticket-tags li:nth-child(2) { transition-delay: 0.92s; }
.js .way .ticket-tags li:nth-child(3) { transition-delay: 1.04s; }
.js .way .way-create .hand { clip-path: inset(-0.5em -0.5em -0.5em -0.5em); transition: clip-path 0.9s cubic-bezier(0.45, 0.05, 0.4, 1); }
.js .way:not(.is-in) .way-create .hand { clip-path: inset(-0.5em 100% -0.5em -0.5em); }
.js .way .way-create p:nth-child(1) .hand { transition-delay: 0.5s; }
.js .way .way-create p:nth-child(2) .hand { transition-delay: 0.95s; transition-duration: 1.2s; }
.js .way .way-create p:nth-child(3) .hand { transition-delay: 1.6s; }
.way-create p {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: baseline;
  width: 82%;
  padding: 7px 14px;
  background: var(--paper);
  color: var(--paper-ink);
  border-bottom: 1px solid rgba(38, 49, 74, 0.12);
}
.way-create p:first-child { padding-top: 14px; border-radius: 10px 10px 0 0; }
.way-create p:last-child { padding-bottom: 14px; border-bottom: 0; border-radius: 0 0 10px 10px; }
.way-create { transform: rotate(1.5deg); }
.way-create small { font-size: 12px; color: var(--paper-ink-3); }
.way-create .hand { font-size: 21px; line-height: 1.35; }
.extras { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 36px; }
.extras li { padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); font-size: 14px; color: var(--ink-2); }
/* 一颗一颗冒出来 */
.js .extras.reveal { opacity: 1; transform: none; filter: none; }
.extras li { transition: opacity 0.6s var(--ease-out), transform 0.9s var(--ease-out); }
.js .extras:not(.is-in) li { opacity: 0; transform: translateY(14px); }
.extras li:nth-child(2) { transition-delay: 0.07s; }
.extras li:nth-child(3) { transition-delay: 0.14s; }
.extras li:nth-child(4) { transition-delay: 0.21s; }
.extras li:nth-child(5) { transition-delay: 0.28s; }
.extras li:nth-child(6) { transition-delay: 0.35s; }

/* ---------- 会员 ---------- */

.act-pricing::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(40% 40% at 72% 60%, rgba(242, 221, 176, 0.07), transparent 70%);
  animation: glow-drift 24s ease-in-out infinite alternate;
}
.period {
  position: relative;
  display: flex;
  width: fit-content;
  margin: 0 auto 44px;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(238, 232, 226, 0.04);
}
.period button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-3);
  transition: background-color 0.3s, color 0.3s;
}
.period small { font-size: 12px; font-weight: 700; color: var(--gold); }
.period [aria-checked="true"] { background: rgba(238, 232, 226, 0.12); color: var(--ink); }
/* 选中的那块底会滑过去（site.js 量好位置；没有 JS 时还是上面那种直接换底色） */
.period-pill {
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 0;
  border-radius: 999px;
  background: rgba(238, 232, 226, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  opacity: 0;
}
.period.has-pill .period-pill { opacity: 1; }
.period.has-pill [aria-checked="true"] { background: transparent; }
.period.is-ready .period-pill { transition: transform 0.55s var(--ease-out), width 0.55s var(--ease-out); }
/* 切换月付、年付时价格换一下 */
.is-swap { animation: swap 0.6s var(--ease-out); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; align-items: stretch; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 32px 28px 28px;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: rgba(238, 232, 226, 0.03);
  transition: transform 0.6s var(--ease-out), box-shadow 0.6s var(--ease-out), border-color 0.4s;
}
.plan:hover { transform: translateY(-6px); }
.plan h3 { min-height: 40px; display: flex; align-items: center; font-size: 22px; }
.plan-for { margin: 6px 0 22px; font-size: 14px; color: var(--ink-3); }
.price { display: flex; align-items: baseline; gap: 2px; }
.price .cur { font-size: 22px; color: var(--ink-2); }
.price .num { font-family: var(--font-latin); font-size: 80px; line-height: 0.95; letter-spacing: -0.02em; }
.price .per { margin-left: 8px; font-size: 15px; color: var(--ink-3); }
.price-alt { min-height: 22px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-3); }
.plan ul { flex: 1; margin: 22px 0 30px; padding-top: 22px; border-top: 1px solid var(--line); }
.plan li { display: flex; gap: 10px; padding: 7px 0; font-size: 15px; line-height: 1.6; color: var(--ink-2); }
.plan li .i { margin-top: 4px; color: var(--accent); }
.plan .btn { width: 100%; }
.badge { font-family: var(--font-latin); font-style: italic; font-size: 38px; font-weight: 400; line-height: 1; }
.badge-plus { background: linear-gradient(100deg, #ffd0d8, #f2899b); -webkit-background-clip: text; background-clip: text; color: transparent; }
.badge-pro { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-plus {
  border-color: rgba(242, 137, 155, 0.34);
  background: linear-gradient(180deg, rgba(201, 75, 99, 0.12), rgba(238, 232, 226, 0.02));
}
.plan-pro {
  --a: 140deg;
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg, #1d1d24, #13161d) padding-box,
    linear-gradient(140deg, #f2ddb0, #ddb97f 42%, rgba(221, 185, 127, 0.18) 80%) border-box;
  /* 支持 @property 的浏览器：金边上一道光慢慢绕着转 */
  background:
    linear-gradient(180deg, #1d1d24, #13161d) padding-box,
    conic-gradient(from var(--a), #f2ddb0, #ddb97f 18%, rgba(221, 185, 127, 0.16) 42%, rgba(221, 185, 127, 0.16) 58%, #ddb97f 82%, #f2ddb0) border-box;
  box-shadow: 0 50px 100px -50px rgba(221, 185, 127, 0.5);
  animation: gold-turn 9s linear infinite;
}
.plan-pro li .i { color: var(--gold); }
.plan-flag {
  position: absolute;
  top: -14px;
  left: 28px;
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--gold-grad);
  color: #3b2a10;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.act-pricing .note-center { margin-top: 36px; max-width: 760px; font-size: 14px; }

/* ---------- 下载 ---------- */

.downloads { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.dl {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 26px 22px 22px;
  border-radius: 26px;
  border: 1px solid var(--line);
  background: rgba(238, 232, 226, 0.03);
  transition: border-color 0.4s, transform 0.5s var(--ease);
}
.dl:hover { border-color: var(--line-2); transform: translateY(-4px); }
.dl > .i { width: 32px; height: 32px; color: var(--ink); }
.dl h3 { margin-top: 16px; font-size: 19px; }
.dl p { margin: 2px 0 20px; font-size: 13.5px; color: var(--ink-3); }
.dl .btn { margin-top: auto; }
.act-download .note-center { max-width: 760px; margin-top: 28px; font-size: 14px; }
.help {
  max-width: 820px;
  margin: 26px auto 0;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(238, 232, 226, 0.02);
}
.help summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  list-style: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--ink-2);
}
.help summary::-webkit-details-marker { display: none; }
.help summary .i { transition: transform 0.3s; }
.help[open] summary .i { transform: rotate(180deg); }
.help.is-closing summary .i { transform: none; }
.help ul { padding: 0 22px 18px; }
.help li { padding: 6px 0; font-size: 14.5px; color: var(--ink-2); }
.help b { color: var(--ink); }

/* ---------- 问答 ---------- */

.faq-wrap { display: grid; grid-template-columns: 0.8fr 1.6fr; gap: 64px; align-items: start; }
.faq-wrap .act-head { position: sticky; top: 120px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary {
  position: relative;
  padding: 24px 48px 24px 0;
  list-style: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
  transition: color 0.25s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--warm); }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: var(--ink-2);
  transition: transform 0.35s var(--ease);
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0); }
.faq details.is-closing summary::after { transform: rotate(90deg); }
.faq details p { max-width: 42em; padding: 0 0 26px; font-size: 15.5px; line-height: 1.9; color: var(--ink-2); }

/* ---------- 页尾：今晚想和谁聊聊 ---------- */

.finale {
  position: relative;
  padding: clamp(120px, 14vw, 200px) 0 clamp(250px, 27vw, 340px);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.finale-bg { position: absolute; inset: 0; z-index: -1; }
.finale-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  /* 角色卡升起来的时候，地平线那边的光跟着亮起来 */
  opacity: calc(0.35 + 0.65 * var(--p, 1));
  background:
    radial-gradient(46% 55% at 50% 100%, rgba(244, 181, 108, 0.24), transparent 72%),
    radial-gradient(30% 40% at 18% 92%, rgba(201, 75, 99, 0.22), transparent 70%),
    radial-gradient(30% 40% at 82% 92%, rgba(92, 120, 178, 0.18), transparent 70%);
}
.finale-cast {
  position: absolute;
  left: 50%;
  bottom: -70px;
  display: flex;
  align-items: flex-end;
  /* 跟着滚动从下面升起来（--p 从 0 到 1） */
  transform: translateX(-50%) translateY(calc((1 - var(--p, 1)) * 170px));
}
.finale-cast span {
  width: 200px;
  height: 306px;
  margin-inline: -18px;
  border-radius: 26px;
  border: 1px solid rgba(255, 240, 220, 0.12);
  background: var(--art) center 30% / cover, #1c2230;
  opacity: 0.5;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.9);
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent 96%);
  mask-image: linear-gradient(180deg, #000 40%, transparent 96%);
}
/* 升起来的同时像一手牌一样散开 */
.finale-cast span { transform: rotate(calc(var(--r, 0deg) * var(--p, 1))) translateY(calc(var(--y, 0px) * var(--p, 1))); }
.finale-cast span:nth-child(1) { --r: -12deg; --y: 40px; }
.finale-cast span:nth-child(2) { --r: -6deg; --y: 12px; }
.finale-cast span:nth-child(3) { --y: -6px; z-index: 1; opacity: 0.72; }
.finale-cast span:nth-child(4) { --r: 6deg; --y: 12px; }
.finale-cast span:nth-child(5) { --r: 12deg; --y: 40px; }
.finale-title {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(56px, 8.4vw, 132px);
  line-height: 1.06;
}
.finale .act-lead { margin-inline: auto; }
.finale .hero-cta { justify-content: center; }

/* ---------- 页脚 ---------- */

.footer { padding: 64px 0 36px; border-top: 1px solid var(--line); color: var(--ink-3); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand p { margin-top: 14px; font-size: 14.5px; }
.footer-col h3 { margin-bottom: 12px; font-size: 13px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-2); }
.footer-col a { display: block; padding: 5px 0; font-size: 14.5px; transition: color 0.25s; }
.footer-col a:hover { color: var(--ink); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}
/* 备案号：页脚最底下居中一行（只在国内那台上有内容，没填就整行不显示） */
.footer-beian { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-top: 16px; font-size: 12.5px; }
.footer-beian:empty { display: none; }
.footer-beian a { display: inline-flex; align-items: center; gap: 6px; transition: color 0.25s; }
.footer-beian a:hover { color: var(--ink); }
/* 公安备案号前面的小图标：公安备案平台给的图标存成 assets/img/beian-police.png，没放之前什么都不画（背景图找不到不会裂图） */
.footer-beian .beian-police::before { content: ""; flex: none; width: 16px; height: 16px; background: url(/assets/img/beian-police.png) center / contain no-repeat; }

/* ---------- 协议页 ---------- */

.doc { padding: 140px 0 100px; }
.doc .wrap { max-width: 820px; }
.doc-title { margin-bottom: 12px; font-family: var(--font-display); font-weight: 900; font-size: clamp(36px, 5vw, 56px); line-height: 1.15; }
.doc-meta { margin-bottom: 40px; font-size: 14px; color: var(--ink-3); }
.doc-body { font-size: 16px; line-height: 1.95; color: var(--ink-2); }
.doc-body h2, .doc-body h3, .doc-body h4 { margin: 40px 0 12px; color: var(--ink); line-height: 1.4; }
.doc-body h2 { font-size: 26px; }
.doc-body h3 { font-size: 20px; }
.doc-body p { margin: 0 0 14px; }
.doc-body ul { margin: 0 0 14px; padding-left: 1.3em; list-style: disc; }
.doc-body li { margin: 4px 0; }
.doc-body li::marker { color: var(--accent); }
.doc-body strong { color: var(--ink); }
.doc-body > h2:first-child { display: none; }
.doc-loading { color: var(--ink-3); }

/* ---------- 404 ---------- */

.lost {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px var(--gutter) 80px;
  text-align: center;
  overflow: hidden;
}
.lost-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 50% 40%, rgba(244, 181, 108, 0.16), transparent 70%),
    radial-gradient(40% 40% at 70% 70%, rgba(201, 75, 99, 0.16), transparent 70%);
}
.lost-code {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: clamp(90px, 16vw, 200px);
  line-height: 1;
  background: linear-gradient(100deg, #fff1e2 10%, #ffc7a0 55%, #f08aa0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  opacity: 0.85;
}
.lost-title {
  align-self: stretch; /* 占满一行，行末标点才挂得出去（见 .hang） */
  margin: 8px 0 22px;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.08;
}
.lost .hero-cta { justify-content: center; }
.lost-note { margin-top: 34px; font-size: 22px; color: var(--warm); transform: rotate(-2deg); }

/* ---------- 动画 ---------- */

@keyframes twinkle { from { opacity: 0.15; } to { opacity: 0.5; } }
@keyframes aurora-a { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-9%, 7%, 0) scale(1.14); } 100% { transform: translate3d(6%, -4%, 0) scale(0.92); } }
@keyframes aurora-b { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(16%, -12%, 0) scale(1.2); } }
@keyframes aurora-c { 0% { transform: translate3d(0, 0, 0) scale(1.06); } 100% { transform: translate3d(-14%, 14%, 0) scale(0.88); } }
@keyframes glow-drift { from { transform: translate3d(-3%, 2%, 0) scale(1); } to { transform: translate3d(3%, -3%, 0) scale(1.1); } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes recall { 0% { box-shadow: 0 0 0 0 rgba(194, 68, 92, 0.45); } 100% { box-shadow: 0 0 0 12px rgba(194, 68, 92, 0); } }
@keyframes swap { from { opacity: 0; transform: translateY(0.3em); filter: blur(4px); } }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 140deg; }
@keyframes gold-turn { from { --a: 140deg; } to { --a: 500deg; } }

/* ---------- 首屏跟着滚动（电脑和平板；手机上首屏是竖排，不做） ---------- */

@media (min-width: 761px) {
  /* 往下滚时：左边的字往上飘走、淡掉，角色卡慢一点往后退（--hp 从 0 到 1，site.js 写在 .hero 上） */
  .js .hero-copy { transform: translate3d(0, calc(var(--hp, 0) * -90px), 0); opacity: calc(1 - var(--hp, 0) * 1.3); }
  .js .cast-track { transform: translate3d(0, calc(var(--hp, 0) * 70px), 0) scale(calc(1 - var(--hp, 0) * 0.1)); }
  /* 刚打开时角色卡叠在一起，再像发牌一样散开 */
  .js .cast:not(.is-dealt) .cast-card { --x: 0px; --z: -240px; --ry: 0deg; --s: 0.92; --b: 0.45; }
  .cast.is-dealing .cast-card[data-slot="1"], .cast.is-dealing .cast-card[data-slot="-1"] { transition-delay: 0.12s; }
  .cast.is-dealing .cast-card[data-slot="2"], .cast.is-dealing .cast-card[data-slot="-2"] { transition-delay: 0.24s; }
}

/* ---------- 平板和手机 ---------- */

/* 便签别挡住立绘的脸（脸在卡片上面三分之一、正中间）：右边地方越窄，便签越小、越往上提 */
@media (max-width: 1220px) {
  .cast-note { right: -118px; width: 176px; }
}

@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); }
  .cast-card[data-slot="1"] { --x: 168px; }
  .cast-card[data-slot="-1"] { --x: -168px; }
  .cast-card[data-slot="2"] { --x: 290px; }
  .cast-card[data-slot="-2"] { --x: -290px; }
  .scribble { left: calc(50% - 330px); }
  .page { padding: 44px 40px 48px; }
  .polaroid { width: 210px; }
  .page-hand { font-size: 23px; }
  .stamp { right: 44px; }
}

@media (max-width: 1100px) {
  .nav-links { gap: 24px; }
  .cast-note { top: -64px; right: -72px; width: 150px; padding: 24px 14px 14px; }
  .cast-note .hand { font-size: 19px; }
  .downloads { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 980px) {
  .nav-links, .nav-login { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero { min-height: auto; padding-top: 110px; }
  .hero-grid { grid-template-columns: 1fr; gap: 10px; }
  .hero-copy { text-align: center; }
  .eyebrow, .hero-cta, .hero-meta { justify-content: center; }
  .hero-lead { margin-inline: auto; }
  .cast { height: 620px; }
  .cast-note { top: -44px; right: -140px; width: 188px; padding: 26px 18px 16px; }
  .cast-note .hand { font-size: 21px; }
  .spread { grid-template-columns: 1fr; }
  .spread::after { display: none; }
  .page { min-height: 0; }
  .page-left { padding-bottom: 20px; }
  .page-right { padding-top: 20px; border-top: 1px dashed rgba(38, 49, 74, 0.18); }
  .ways { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .pillars { grid-template-columns: 1fr; gap: 10px; margin-top: 36px; }
  .pillar { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; padding: 20px 20px 18px; }
  .pillar .i { grid-row: span 2; margin-top: 2px; }
  .pillar h3 { margin: 0; font-size: 17px; }
  .pillar p { font-size: 14.5px; }
  .plans { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; }
  .faq-wrap { grid-template-columns: 1fr; gap: 0; }
  .faq-wrap .act-head { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* 手机：角色卡变成一排，左右滑；顺序是标题、角色卡、按钮、介绍 */
@media (max-width: 760px) {
  :root { --gutter: max(18px, env(safe-area-inset-left)); }
  .brand-name { font-size: 21px; }
  .nav-actions .btn { display: none; }
  .hero { padding: 92px 0 44px; }
  .hero-grid { display: flex; flex-direction: column; align-items: stretch; gap: 0; }
  .hero-copy { display: contents; }
  .eyebrow { order: 1; align-self: center; font-size: 13px; }
  .hero-title { order: 2; margin: 14px 0 0; font-size: clamp(46px, 13.6vw, 64px); text-align: center; }
  .hero-title .line { display: inline; }
  /* 「，」右边自带半个字的空，排成一行时收一点 */
  .hero-title .line + .line { margin-left: -0.3em; }
  .cast { order: 3; height: auto; margin: 6px calc(-1 * var(--gutter)) 0; }
  .hero-cta { order: 4; margin-top: 22px; }
  .hero-cta .btn { flex: 1 1 0; padding: 0 16px; }
  .hero-lead { order: 5; margin-top: 20px; font-size: 15.5px; text-align: center; }
  .hero-meta { order: 6; margin-top: 14px; gap: 4px 16px; font-size: 13px; }
  .cast-track {
    position: static;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 72px var(--gutter) 10px;
    perspective: none;
    scrollbar-width: none;
  }
  .cast-track::-webkit-scrollbar { display: none; }
  .cast-card,
  .cast-card[data-slot] {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    left: auto;
    top: auto;
    flex: 0 0 76%;
    width: auto;
    height: min(420px, 112vw);
    margin: 0;
    transform: none;
    filter: none;
    cursor: default;
    scroll-snap-align: center;
  }
  .cast-card .cast-photo { box-shadow: 0 30px 50px -26px #000, inset 0 0 0 1px rgba(255, 240, 220, 0.14); }
  .cast-card:not([data-slot="0"]) .cast-line, .cast-card:not([data-slot="0"]) .cast-chip { opacity: 1; }
  .cast-line { font-size: 16px; }
  .cast-note, .cast-card:not([data-slot="0"]) .cast-note {
    top: -56px;
    right: -8px;
    width: 153px;
    padding: 18px 11px 10px;
    opacity: 1;
  }
  .cast-note .hand { font-size: 14.5px; line-height: 1.4; }
  .cast-note small { margin-bottom: 2px; font-size: 10.5px; }
  .cast-note::before { top: -10px; left: 34px; width: 66px; height: 20px; }
  .scribble { display: none; }
  .cast-dots { position: static; justify-content: center; margin: 14px 0 0; transform: none; }
  .act-label { letter-spacing: 0.14em; }
  .act-title { font-size: clamp(30px, 9.2vw, 44px); }
  .statement { font-size: clamp(19px, 5.4vw, 24px); line-height: 1.65; }
  /* 手机上记忆本是竖着一长条，立起来的角度小一点 */
  .js .book[data-scrub] .spread {
    transform: perspective(1600px) translate3d(0, calc((1 - var(--p, 1)) * 40px), 0) rotateX(calc((1 - var(--p, 1)) * 16deg)) scale(calc(0.93 + 0.07 * var(--p, 1)));
  }
  .finale-title { font-size: clamp(44px, 14vw, 64px); }
  .page { padding: 30px 22px 34px; }
  .page-left { align-items: center; gap: 18px; }
  .polaroid { width: 200px; }
  .page-hand { align-self: center; margin: 0; font-size: 22px; text-align: center; }
  .stamp { top: 24px; right: 16px; width: 82px; height: 82px; font-size: 13px; }
  .page-title { font-size: 26px; }
  .entries li { grid-template-columns: 50px 1fr; }
  .entries .kind { grid-column: 2; justify-self: start; }
  .entries time { font-size: 18px; }
  .entries .hand { font-size: 21px; }
  .cutout { width: 100%; }
  .extras li { font-size: 13px; padding: 6px 13px; }
  .downloads { grid-template-columns: 1fr 1fr; }
  .downloads .dl:first-child { grid-column: 1 / -1; }
  .dl { padding: 20px 18px 18px; }
  .finale-cast span { width: 140px; height: 214px; margin-inline: -14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .aurora i, .act-start::before, .act-pricing::before, .plan-pro, .cast-card .cast-note { animation: none !important; }
}
