/* 「一杯，到一年 · 落地页」样式：数值全部来自 tokens.css。 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* 平滑滚动（Lenis）所需的基础样式，照 lenis@1.3.26/dist/lenis.css */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis:not(.lenis-autoToggle).lenis-stopped {
  overflow: clip;
}

.lenis [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-smooth iframe {
  pointer-events: none;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--nav-top) + var(--nav-height) + var(--space-4));
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

:focus-visible {
  outline: var(--focus-ring) solid var(--focus);
  outline-offset: var(--focus-offset);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: calc(-1 * var(--space-16));
  z-index: 20;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius);
  background: var(--accent-dark);
  color: var(--on-dark);
}

.skip:focus {
  top: var(--space-2);
}

.muted {
  color: var(--ink-muted);
}

/* ---- 图标：App 图标 SVG 作为遮罩，颜色跟随文字 ---- */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex: none;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.icon-home {
  --icon: url('assets/icons/home_fill.svg');
}
.icon-receipt {
  --icon: url('assets/icons/receipt.svg');
}
.icon-stamp {
  --icon: url('assets/icons/stamp.svg');
}
.icon-user {
  --icon: url('assets/icons/user.svg');
}
.icon-plus {
  --icon: url('assets/icons/plus.svg');
}
.icon-caret-left {
  --icon: url('assets/icons/caret_left.svg');
}
.icon-caret-right {
  --icon: url('assets/icons/caret_right.svg');
}
.icon-camera {
  --icon: url('assets/icons/camera.svg');
}
.icon-share {
  --icon: url('assets/icons/share_03.svg');
}
.icon-dice {
  --icon: url('assets/icons/dice.svg');
}

/* ---- 通用排版 ---- */
.eyebrow,
.tag,
.step-num,
.step-meta,
.hint-line {
  font-family: var(--font-mono);
  font-size: var(--type-label);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--ink-muted);
}

.section-head {
  max-width: var(--measure-head);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.section-title {
  text-wrap: balance; /* 多行时各行长度接近，避免末行只剩一个词 */
  margin-top: var(--space-3);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--type-title);
  line-height: var(--type-title-leading);
  letter-spacing: var(--tracking-title);
}

.section-lead {
  text-wrap: balance;
  margin-top: var(--space-5);
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--type-lead);
  line-height: var(--leading-body);
  color: var(--ink-soft);
}

/* 进入视野时淡入上移（减少动态效果时直接显示） */
.reveal {
  opacity: 0;
  transform: translateY(var(--space-4));
  transition: opacity var(--dur-text) var(--ease-standard), transform var(--dur-text) var(--ease-standard);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---- 悬浮导航 ---- */
/* 屏幕上下边缘的渐变模糊：五层背景模糊叠放，每层只在更靠边的一段显示，
   越靠边叠加的层越多、单层半径越大，模糊程度随之渐变；层与层之间用渐变遮罩衔接，没有硬边 */
.edge-blur {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 9; /* 低于导航（10），导航不受影响 */
  pointer-events: none;
}

.edge-blur-top {
  top: 0;
  height: var(--edge-blur-top);
  --edge-dir: to top;
}

.edge-blur-bottom {
  bottom: 0;
  height: var(--edge-blur-bottom);
  --edge-dir: to bottom;
}

.edge-blur i {
  position: absolute;
  inset: 0;
  --edge-from: calc(var(--i) * 20%);
  --edge-to: calc((var(--i) + 1) * 20%);
  -webkit-mask-image: linear-gradient(var(--edge-dir), transparent var(--edge-from), #000 var(--edge-to));
  mask-image: linear-gradient(var(--edge-dir), transparent var(--edge-from), #000 var(--edge-to));
  -webkit-backdrop-filter: blur(var(--edge-layer-blur));
  backdrop-filter: blur(var(--edge-layer-blur));
}

.edge-blur i:nth-child(1) {
  --edge-layer-blur: calc(var(--edge-blur-max) / 16);
}
.edge-blur i:nth-child(2) {
  --edge-layer-blur: calc(var(--edge-blur-max) / 8);
}
.edge-blur i:nth-child(3) {
  --edge-layer-blur: calc(var(--edge-blur-max) / 4);
}
.edge-blur i:nth-child(4) {
  --edge-layer-blur: calc(var(--edge-blur-max) / 2);
}
.edge-blur i:nth-child(5) {
  --edge-layer-blur: var(--edge-blur-max);
}

.nav-wrap {
  position: fixed;
  top: var(--nav-top);
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  padding: 0 var(--gutter);
  pointer-events: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  height: var(--nav-height);
  padding: var(--nav-pad);
  border-radius: var(--radius-pill);
  background: linear-gradient(var(--bar-start), var(--bar-end));
  color: var(--bar-ink);
  box-shadow: var(--shadow-raised);
  pointer-events: auto;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-4) 0 var(--space-3);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--type-body);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: calc(var(--nav-height) - 2 * var(--nav-pad));
  padding: 0 var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: inherit;
  font: 500 var(--type-small) / 1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-standard);
}

.nav-links a:hover {
  background: var(--bar-highlight);
}

/* 中／EN 切换：两格分段按钮，浅色滑块停在当前语言上 */
.nav-lang {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: var(--lang-option-w);
  height: calc(var(--nav-height) - 2 * var(--nav-pad));
  padding: var(--lang-inset);
  border-radius: var(--radius-pill);
}

.nav-lang::before {
  content: '';
  position: absolute;
  top: var(--lang-inset);
  bottom: var(--lang-inset);
  left: var(--lang-inset);
  width: var(--lang-option-w);
  border-radius: var(--radius-pill);
  background: var(--bar-highlight);
  transition: transform var(--lang-slide) var(--ease-standard);
}

.nav-lang[data-active='en']::before {
  transform: translateX(100%);
}

.nav-lang button {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--on-dark-muted);
  font: 500 var(--type-small) / 1 var(--font-sans);
  cursor: pointer;
  transition: color var(--lang-slide) var(--ease-standard);
}

.nav-lang button[aria-pressed='true'],
.nav-lang button:hover {
  color: var(--on-dark);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  height: calc(var(--nav-height) - 2 * var(--nav-pad));
  margin-left: var(--space-1);
  padding: 0 var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--card-surface);
  color: var(--ink);
  font: 700 var(--type-small) / 1 var(--font-sans);
  text-decoration: none;
  white-space: nowrap;
}

.nav :focus-visible {
  outline-color: var(--bar-ink);
  outline-offset: var(--focus-offset-tight);
}

/* ---- 首屏 ---- */
/* 首屏色晕：从标题下方一直铺到手机周围，颜色在饮品类别色之间缓慢随机变换 */
.hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: var(--hero-glow-top);
  bottom: 0;
  width: var(--hero-glow-w);
  transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(transparent, #000 var(--hero-glow-edge), #000 calc(100% - var(--hero-glow-edge)), transparent);
  mask-image: linear-gradient(transparent, #000 var(--hero-glow-edge), #000 calc(100% - var(--hero-glow-edge)), transparent);
  background:
    radial-gradient(closest-side, var(--glow-a), transparent) 16% 50% / 52% 85% no-repeat,
    radial-gradient(closest-side, var(--glow-b), transparent) 84% 42% / 52% 85% no-repeat,
    radial-gradient(closest-side, var(--glow-c), transparent) 50% 80% / 62% 70% no-repeat;
  opacity: var(--hero-glow-opacity);
  transition: --glow-a var(--hero-glow-fade) linear, --glow-b var(--hero-glow-fade) linear, --glow-c var(--hero-glow-fade) linear;
  pointer-events: none;
}

.hero {
  position: relative;
  overflow: hidden;
  padding-top: calc(var(--nav-top) + var(--nav-height) + var(--space-16));
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: var(--measure-hero);
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
}

.hero-title {
  text-wrap: balance;
  margin: var(--space-4) 0 var(--space-6);
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--type-hero);
  line-height: var(--type-hero-leading);
  letter-spacing: var(--tracking-title);
}

.hero-lead {
  text-wrap: balance;
  max-width: 36em;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--type-lead);
  line-height: var(--leading-body);
  color: var(--ink-soft);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.store {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  min-width: var(--store-min);
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-5);
  border: var(--rule-width) solid var(--rule);
  border-radius: var(--radius-card);
  background: var(--card-surface);
  color: var(--ink);
  text-align: left;
  text-decoration: none;
  box-shadow: var(--shadow-card);
}

.store.is-live {
  border-color: var(--accent-dark);
  background: var(--accent-dark);
  color: var(--on-dark);
}

.store-name {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--type-lead);
  line-height: 1.3;
}

.store-req {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--type-label);
  line-height: 1.5;
  color: var(--ink-muted);
}

.store.is-live .store-req {
  color: var(--on-dark-muted);
}

.store-status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  background: var(--page-bg);
  font: 500 var(--type-label) / 1.5 var(--font-sans);
  color: var(--ink-soft);
  white-space: nowrap;
}

.store-status::before {
  content: '';
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-pill);
  background: var(--ink-faint);
}

.store.is-live .store-status {
  background: var(--bar-highlight);
  color: var(--on-dark);
}

.store.is-live .store-status::before {
  background: var(--status-on);
}

.stores-center {
  margin-top: var(--space-10);
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  margin-top: var(--space-6);
  font-size: var(--type-small);
  color: var(--ink-muted);
}

.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.hero-facts li::before {
  content: '';
  width: var(--dot-small);
  height: var(--dot-small);
  border-radius: var(--radius-pill);
  background: var(--status-on);
}

.hero-facts .is-safe::before {
  background: var(--chip-safe-dot);
}
.hero-facts .is-no::before {
  background: var(--chip-no-dot);
}
.hero-facts .is-choice::before {
  background: var(--chip-choice-dot);
}

/* 首屏画面：代码绘制的手机从底部升起，周围少量大贴纸漂浮 */
.hero-stage {
  position: relative;
  height: calc(var(--phone-width) / var(--phone-ratio) * var(--hero-stage-visible));
  margin-top: var(--space-16);
  -webkit-mask-image: linear-gradient(#000 var(--hero-stage-fade), transparent);
  mask-image: linear-gradient(#000 var(--hero-stage-fade), transparent);
}


.phone {
  position: relative;
  z-index: 1;
  width: var(--phone-width);
  aspect-ratio: var(--phone-ratio);
  margin: 0 auto;
  padding: var(--phone-bezel);
  border-radius: var(--phone-radius);
  background: var(--phone-frame);
  box-shadow: var(--shadow-raised);
}

.phone-screen {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  border-radius: var(--phone-screen-radius);
  background: var(--phone-screen);
  font-size: calc(var(--phone-width) * 0.04);
  line-height: 1.3;
}

.phone-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.4em;
  padding: 0 1.9em;
  font: 700 0.95em / 1 var(--font-sans);
}

.phone-island {
  width: 6.4em;
  height: 1.9em;
  border-radius: var(--radius-pill);
  background: var(--phone-frame);
}

.phone-battery {
  width: 1.9em;
  height: 0.9em;
  border-radius: 0.3em;
  border: 0.12em solid var(--ink);
  background: linear-gradient(90deg, var(--ink) 70%, transparent 70%);
}

.phone-greeting {
  margin: 0.9em 0 1.2em;
  text-align: center;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 1.5em;
}

.phone-card {
  margin: 0 0.9em;
  padding: 0.75em;
  border-radius: 1.2em;
  background: var(--card-surface);
  box-shadow: var(--shadow-card);
}

.phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 2.5em;
  padding: 0 0.7em;
  border-radius: 0.7em;
  background: linear-gradient(var(--bar-start), var(--bar-end));
  color: var(--bar-ink);
  font: 700 0.92em / 1 var(--font-sans);
}

.phone-weekdays,
.phone-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.4em;
}

.phone-weekdays {
  margin: 0.7em 0 0.45em;
  text-align: center;
  font: 500 0.72em / 1 var(--font-sans);
  color: var(--ink-faint);
}

.cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 40 / 48;
  border-radius: 0.55em;
  background: var(--idle-cell);
  font: 700 0.82em / 1 var(--font-mono);
  color: var(--day-number);
}

.cell.is-blank {
  background: transparent;
}

.cell.is-recorded {
  background: var(--cell-color);
  color: transparent;
  animation: cell-in calc(var(--reveal-duration) * 1ms) var(--ease-standard) both;
  animation-delay: var(--delay);
}

.cell img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  animation: sticker-pop calc(var(--reveal-duration) * 1ms) linear both;
  animation-delay: var(--delay);
}

.cell .badge {
  position: absolute;
  top: -0.3em;
  right: -0.3em;
  min-width: 1.2em;
  height: 1.2em;
  padding: 0 0.3em;
  border-radius: var(--radius-pill);
  background: var(--badge-color);
  color: var(--on-badge);
  font: 700 0.8em / 1.2em var(--font-sans);
  text-align: center;
  animation: cell-in calc(var(--reveal-duration) * 1ms) var(--ease-standard) both;
  animation-delay: var(--delay);
}

.phone-grid:not(.is-playing) .cell.is-recorded,
.phone-grid:not(.is-playing) .cell img,
.phone-grid:not(.is-playing) .cell .badge {
  animation-play-state: paused;
}

@keyframes cell-in {
  from {
    opacity: 0;
  }
}

/* App 贴纸揭示：0 → 1.2（72%）→ 1，15° 回正，前半程淡入 */
@keyframes sticker-pop {
  0% {
    opacity: 0;
    transform: scale(0) rotate(calc(var(--reveal-rotation) * 1deg));
  }
  50% {
    opacity: 1;
  }
  72% {
    transform: scale(var(--reveal-overshoot)) rotate(calc(var(--reveal-rotation) * 0.2deg));
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

.phone-tabs {
  display: flex;
  align-items: center;
  justify-content: space-around;
  margin-top: auto;
  padding: 0.9em 1.2em 1.6em;
  font-size: 1.5em;
  color: var(--ink-faint);
}

.phone-tabs .is-active {
  color: var(--ink);
}

.phone-add {
  display: grid;
  place-items: center;
  width: 1.9em;
  height: 1.9em;
  border-radius: var(--radius-pill);
  background: var(--accent-dark);
  color: var(--on-dark);
  font-size: 0.9em;
}

.float {
  /* 放在手机背后（z-index 低于手机），从机身两侧伸出，像文件夹里伸出的邮票 */
  position: absolute;
  z-index: 0;
  left: calc(50% + var(--phone-width) * var(--fx) * var(--float-spread));
  top: calc(var(--phone-width) / var(--phone-ratio) * var(--fy));
  width: var(--float-size);
  height: var(--float-size);
  translate: -50% -50%;
  filter: var(--shadow-sticker);
  animation: bob var(--sticker-float) ease-in-out infinite alternate;
}
.float-a {
  --fx: var(--float-a-x);
  --fy: var(--float-a-y);
  rotate: var(--tilt-float-a);
  animation-delay: 0s;
}
.float-b {
  --fx: var(--float-b-x);
  --fy: var(--float-b-y);
  rotate: var(--tilt-float-b);
  animation-delay: -3s;
}
.float-c {
  --fx: var(--float-c-x);
  --fy: var(--float-c-y);
  rotate: var(--tilt-float-c);
  animation-delay: -1.5s;
}
.float-e {
  --fx: var(--float-e-x);
  --fy: var(--float-e-y);
  rotate: var(--tilt-float-e);
  animation-delay: -4.5s;
}
.float-d {
  --fx: var(--float-d-x);
  --fy: var(--float-d-y);
  rotate: var(--tilt-float-d);
  animation-delay: -2s;
}

@keyframes bob {
  to {
    transform: translateY(calc(-1 * var(--space-4)));
  }
}

/* ---- 一杯，到一年 ---- */
.story-section {
  padding-top: var(--space-section);
}


.story {
  position: relative;
  height: var(--story-length);
  margin-top: var(--space-8);
}

.stage {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: minmax(var(--steps-min), 0.72fr) 1.5fr;
  gap: var(--space-12);
  height: 100vh;
  height: 100svh;
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: calc(var(--nav-top) + var(--nav-height) + var(--space-6)) var(--gutter) var(--space-8);
}

.steps {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-6);
}

.step {
  padding-left: var(--space-5);
  border-left: 2px solid var(--rule-soft);
  color: var(--ink-faint);
  transition: color var(--dur-fade) var(--ease-standard), border-color var(--dur-fade) var(--ease-standard);
}

.step.is-active {
  border-left-color: var(--ink);
  color: var(--ink);
}

.step-num {
  display: block;
  color: inherit;
}

.step-title {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--type-step);
  line-height: 1.35;
}

/* 按真实高度伸缩：上一项收起与下一项展开在同一时长内同步进行 */
.step-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows var(--dur-text) var(--ease-standard), opacity var(--dur-text) var(--ease-standard);
}

.step.is-active .step-body {
  grid-template-rows: 1fr;
  opacity: 1;
}

.step-inner {
  min-height: 0;
  overflow: hidden;
}

.step-body p {
  margin-top: var(--space-2);
  color: var(--ink-soft);
}

.step-body .step-meta {
  margin-top: var(--space-3);
  color: var(--ink-muted);
}

.notes {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.notes li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
  font-size: var(--type-small);
  line-height: 1.6;
  color: var(--ink-soft);
}

.note-title {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--type-label);
  color: var(--ink-muted);
}

.note-num,
.marker {
  display: inline-grid;
  place-items: center;
  width: var(--note-badge);
  height: var(--note-badge);
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--card-surface);
  font: 700 var(--note-badge-font) / 1 var(--font-mono);
}

.story-visual {
  position: relative;
  align-self: center;
  height: var(--story-visual-h);
  overflow: hidden;
  border-radius: var(--radius-panel);
  background: var(--card-surface);
  box-shadow: var(--shadow-card);
}

.canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.marker {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  box-shadow: 0 0 0 var(--note-ring) var(--card-surface);
  transition: opacity var(--dur-text) var(--ease-standard);
}

.markers.is-on .marker {
  opacity: 1;
}

.counter {
  position: absolute;
  right: var(--space-6);
  bottom: var(--space-5);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-mono);
  opacity: 0;
  transition: opacity var(--dur-text) var(--ease-standard);
}

.counter.is-on {
  opacity: 1;
}

.counter-value {
  font-size: var(--type-counter);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
}

.counter-unit {
  font-size: var(--type-label);
  color: var(--ink-muted);
}

/* ---- 功能卡片 ---- */
.features {
  max-width: calc(var(--content-max) + 2 * var(--gutter));
  margin: 0 auto;
  padding: var(--space-section) var(--gutter) 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--feature-min), 1fr));
  gap: var(--space-5);
  margin-top: var(--space-12);
}

.feature {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background: var(--card-surface);
  box-shadow: var(--shadow-card);
}

.tag {
  align-self: flex-start;
  padding: 0 var(--space-3);
  border: var(--rule-width) solid var(--rule);
  border-radius: var(--radius-pill);
  font-size: var(--tag-label-size);
  line-height: var(--tag-label-height);
}

.feature-title {
  margin: var(--space-5) 0 var(--space-2);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--type-step);
  line-height: 1.35;
}

.feature-text {
  color: var(--ink-soft);
}

.feature-art {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  height: var(--feature-art-height);
  margin-top: auto;
  padding-top: var(--space-6);
}

.art-photo .photo-frame {
  display: grid;
  place-items: center;
  width: var(--art-photo-w);
  height: var(--art-photo-h);
  border-radius: var(--radius);
  background: var(--rule-soft);
  color: var(--ink-faint);
  font-size: var(--art-icon);
  rotate: var(--tilt-photo);
}

.art-arrow {
  width: var(--art-arrow-w);
  height: var(--art-arrow-stroke);
  background: var(--rule);
  position: relative;
}

.art-arrow::after {
  content: '';
  position: absolute;
  right: 0;
  top: calc(var(--art-arrow-head) / -2);
  width: var(--art-arrow-head);
  height: var(--art-arrow-head);
  border-top: var(--art-arrow-stroke) solid var(--rule);
  border-right: var(--art-arrow-stroke) solid var(--rule);
  rotate: var(--quarter-turn);
}

.art-photo img {
  width: var(--art-sticker);
  height: var(--art-sticker);
  filter: var(--shadow-sticker);
  rotate: var(--tilt-sticker);
}

.art-tags {
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  gap: var(--space-3) var(--tag-gap);
  padding-right: var(--badge-offset);
}

/* 分类 Tag：对照 App CategoryTag（默认白底灰字；选中类别 200 底、500 边、800 字；右缘 5° 徽章） */
.cat-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: var(--tag-height);
  padding: 0 var(--tag-pad-x);
  border: var(--rule-width) solid var(--tag-border-idle);
  border-radius: var(--radius);
  background: var(--tag-surface);
  font: 500 var(--tag-font) / var(--tag-line) var(--font-sans);
  letter-spacing: -0.16px;
  color: var(--tag-ink-idle);
}

.cat-tag.is-selected {
  border: var(--tag-selected-border) solid var(--c500);
  background: var(--c200);
  color: var(--c800);
}

.cat-badge {
  position: absolute;
  z-index: 1;
  right: calc(-1 * var(--badge-offset) + (var(--badge-anchor) - var(--badge-size)) / 2);
  top: 50%;
  display: grid;
  place-items: center;
  width: var(--badge-size);
  height: var(--badge-size);
  translate: 0 -50%;
  rotate: var(--badge-rotate);
  border: var(--badge-border) solid var(--badge-ring);
  border-radius: var(--badge-radius);
  background: var(--c400);
  color: var(--c100);
  font-size: var(--badge-icon);
  box-shadow: var(--shadow-object);
}

.art-year {
  flex: 1 1 auto;
  height: auto;
  min-height: var(--feature-art-height);
  margin-top: 0;
}

/* 年历撑满卡片内容宽度，与说明文字左右对齐；格子按 App 年历 6:7 比例随宽度放大 */
.mini-year {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  width: 100%;
}

.mini-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--mini-gap);
}

.mini-month span,
.mini-month i {
  aspect-ratio: var(--mini-cell-ratio);
}

.mini-month span {
  border-radius: var(--mini-radius);
  background: var(--year-idle-cell);
}

/* 统计小票：按 App 原尺寸搭建，整体缩放放进卡片（对照 docs/components/statistics-receipt.md） */
.art-receipt {
  flex: 1 1 0;
  align-items: flex-start;
  height: 0;
  min-height: var(--stat-art-height);
  margin: 0 calc(-1 * var(--space-8)) calc(-1 * var(--space-8));
  padding-top: var(--space-6);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 var(--stat-art-fade), transparent);
  mask-image: linear-gradient(#000 var(--stat-art-fade), transparent);
}

.stat {
  flex: none;
  width: var(--stat-dispenser-width);
  zoom: var(--stat-zoom);
}

.stat-dispenser {
  position: relative;
  z-index: 1;
  height: var(--stat-dispenser-height);
  padding: var(--stat-dispenser-pad);
  border: var(--rule-width) solid var(--stat-dispenser-edge);
  border-radius: var(--stat-dispenser-radius);
  background: linear-gradient(var(--stat-dispenser-start), var(--stat-dispenser-end));
  box-shadow: var(--stat-dispenser-shadow);
}

.stat-head {
  display: flex;
  align-items: center;
  gap: var(--stat-control-gap);
  height: var(--stat-head-height);
}

.stat-lamp {
  width: var(--stat-lamp-w);
  height: var(--stat-lamp-h);
  margin-left: var(--stat-month-left);
  border-radius: var(--radius-pill);
  background: var(--stat-lamp);
  box-shadow: var(--stat-lamp-glow);
}

.stat-month {
  margin-left: calc(var(--stat-month-gap) - var(--stat-control-gap));
  margin-right: auto;
  font: var(--stat-month-font);
  letter-spacing: var(--stat-tracking);
  color: var(--stat-month-ink);
}

.stat-control {
  display: grid;
  place-items: center;
  width: var(--stat-control-size);
  height: var(--stat-control-size);
  border-radius: var(--stat-control-radius);
  background: linear-gradient(var(--stat-control-start), var(--stat-control-end));
  box-shadow: var(--stat-control-shadow);
  color: var(--stat-month-ink);
  font: 500 var(--type-label) / 1 var(--font-mono);
  font-size: var(--stat-control-icon);
}

.stat-slot {
  position: absolute;
  left: var(--stat-dispenser-pad);
  right: var(--stat-dispenser-pad);
  top: var(--stat-slot-top);
  height: var(--stat-slot-height);
  border-radius: var(--stat-slot-radius);
  background: var(--stat-slot);
}

/* 小票从出纸口出来，盖住吐票口前缘；窗口裁掉出纸口以上的部分，出口处有一道独立阴影 */
.stat-window {
  position: relative;
  z-index: 2;
  width: calc(var(--stat-paper-width) + 2 * var(--stat-paper-shadow-room));
  margin: calc(-1 * var(--stat-paper-overlap)) auto 0;
  padding: 0 var(--stat-paper-shadow-room) var(--stat-paper-shadow-room);
  overflow: hidden;
}

.stat-paper {
  position: relative;
  filter: var(--stat-paper-shadow);
  will-change: transform;
}

.stat-exit-shadow {
  position: absolute;
  z-index: 1;
  left: var(--stat-paper-shadow-room);
  right: var(--stat-paper-shadow-room);
  top: 0;
  height: var(--stat-exit-shadow-height);
  background: linear-gradient(var(--stat-exit-shadow), transparent);
}

.stat-body {
  display: grid;
  justify-items: center;
  gap: var(--stat-section-gap);
  padding: var(--stat-paper-pad-y) 0;
  background: var(--stat-paper);
  font: var(--stat-font);
  letter-spacing: var(--stat-tracking);
  color: var(--stat-ink);
}

/* 英文版小票照 App 换成 Courier Prime */
:lang(en) .stat-body {
  font: var(--stat-font-en);
}

.stat-tear {
  display: block;
  width: 100%;
  height: var(--stat-tear-height);
}

.stat-line,
.stat-row,
.stat-list {
  width: var(--stat-content-width);
  white-space: nowrap;
}

.stat-line.is-center {
  text-align: center;
}

.stat-two,
.stat-row {
  display: flex;
  align-items: center;
}

.stat-row {
  height: var(--stat-row-height);
}

.stat-left {
  display: flex;
  align-items: center;
  gap: var(--stat-badge-gap);
  width: var(--stat-left-col);
}

.stat-left.is-indent {
  padding-left: var(--stat-label-indent);
}

.stat-right {
  width: var(--stat-right-col);
}

.stat-right.is-split {
  display: flex;
  justify-content: space-between;
}

.stat-list {
  position: relative;
  display: grid;
  gap: var(--stat-row-gap);
}

.stat-list.is-dense {
  gap: var(--stat-row-gap-dense);
}

/* 类别徽章在小票里保持原位（不向外偏移），锚点 26px */
.stat .cat-badge {
  position: relative;
  right: auto;
  top: auto;
  flex: none;
  translate: none;
  margin: 0 calc((var(--badge-anchor) - var(--badge-size)) / 2);
}

.stat-tile {
  display: grid;
  place-items: center;
  flex: none;
  width: var(--stat-tile-size);
  height: var(--stat-tile-size);
  border-radius: var(--stat-tile-radius);
  background: var(--bg);
  color: var(--ink);
  font-size: var(--stat-tile-icon);
}

.stat-nutri-label {
  width: var(--stat-nutri-label);
}

/* TOP 章：对照 AppStampTag 双框 */
.stamp-tag {
  position: absolute;
  left: var(--left);
  top: calc(var(--row) * (var(--stat-row-height) + var(--stat-row-gap)) + var(--stamp-tag-top));
  padding: var(--stamp-tag-outer-pad);
  border: var(--stamp-tag-outer) solid var(--stamp-tag-ink);
  border-radius: var(--stamp-tag-outer-radius);
  background: var(--stat-paper);
  rotate: var(--stamp-tag-tilt);
  color: var(--stamp-tag-ink);
}

.stamp-tag-inner {
  display: block;
  padding: 0 var(--stamp-tag-inner-pad);
  border: var(--stamp-tag-inner) solid var(--stamp-tag-ink);
  border-radius: var(--stamp-tag-inner-radius);
  font: var(--stamp-tag-font);
  letter-spacing: var(--stamp-tag-tracking);
}

.stat-barcode {
  position: relative;
  width: var(--stat-barcode-width);
  height: var(--stat-barcode-height);
}

.stat-barcode span {
  position: absolute;
  top: 0;
  bottom: 0;
}

.stat-code {
  font: var(--stat-code-font);
}

/* 出票中：状态灯由绿变橙并发光 */
.stat-lamp {
  transition: background var(--stat-lamp-fade) ease-out, box-shadow var(--stat-lamp-fade) ease-out;
}

.stat.is-printing .stat-lamp {
  background: var(--stat-lamp-printing);
  box-shadow: var(--stat-lamp-printing-glow);
}

/* TOP 章：整张小票到位后同时落下（对照 AppStampLanding） */
.stamp-tag {
  opacity: 0;
}

.stat.is-printed .stamp-tag {
  opacity: 1;
  animation: stamp-land var(--stat-stamp-land) var(--ease-standard) both;
}

@keyframes stamp-land {
  0% {
    opacity: 0;
    transform: translateY(var(--stamp-land-offset)) scale(var(--stamp-land-scale)) rotate(var(--stamp-land-rotate));
  }
  36% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: none;
  }
}

/* 营养罐：照 App「添加更多信息」的罐子，紧跟说明文字 */
.art-jars {
  height: auto;
  margin-top: var(--space-20);
  padding-top: 0;
}

.jar-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  width: 100%;
}

.jar-col {
  display: grid;
  justify-items: center;
}

.jar {
  position: relative;
  width: var(--jar-w);
  height: var(--jar-h);
  margin-bottom: var(--jar-label-gap);
  background: var(--jar);
  -webkit-mask: url('assets/nutrition/jar.svg') center / 100% 100% no-repeat;
  mask: url('assets/nutrition/jar.svg') center / 100% 100% no-repeat;
}

.jar img {
  position: absolute;
  width: var(--jar-item-size);
  height: var(--jar-item-size);
}

.jar-label,
.jar-value {
  font: 500 var(--tray-small-font);
  letter-spacing: -0.16px;
  color: var(--tray-muted);
}

.jar-value span {
  color: var(--tray-ink);
}

.jar-value .is-empty {
  color: var(--tray-muted);
}

/* 摇一摇：卡片就是屏幕，滚轮横跨整张卡片宽度，邮票从卡片边缘外进出（对照 App 推荐滚轮） */
.feature:has(.art-shake) {
  container-type: inline-size;
}

.art-shake {
  height: auto;
  margin: var(--space-6) calc(-1 * var(--space-8)) 0;
  padding-block: var(--space-6);
}

.reel {
  position: relative;
  width: 100%;
  height: calc((100cqw + 2 * var(--space-8)) * var(--reel-stamp-ratio) * 56 / 44);
  transform-style: preserve-3d;
}

.pstamp {
  position: absolute;
  left: 50%;
  top: 0;
  width: var(--stamp-w);
  aspect-ratio: 44 / 56;
  margin-left: calc(var(--stamp-w) / -2);
  background: url('assets/postage/drink.svg') center / 100% 100% no-repeat;
  filter: var(--pstamp-shadow);
  backface-visibility: hidden;
}

.pstamp-bg {
  position: absolute;
  inset: calc(100% * 4 / 56) calc(100% * 4 / 44);
  border-radius: calc(var(--stamp-w) * 2 / 44);
  background: var(--bg);
}

.pstamp img {
  position: absolute;
  left: calc(100% * 6 / 44);
  top: calc(100% * 8 / 56);
  width: calc(100% * 32 / 44);
  height: calc(100% * 40 / 56);
  object-fit: contain;
}

/* ---- 里程碑：深色展台 ---- */
.milestones {
  padding: var(--space-section) var(--gutter) 0;
}

.showcase {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: var(--space-16) var(--space-8);
  border-radius: var(--radius-panel);
  background: var(--showcase-bg);
  color: var(--showcase-ink);
}

.section-head-dark .eyebrow,
.section-head-dark .section-lead,
.section-head-dark .hint-line {
  color: var(--showcase-muted);
}

.hint-line {
  margin-top: var(--space-5);
}

/* 横向缓慢滚动：两份相同内容首尾相接；悬停、键盘聚焦或有邮票翻面时暂停 */
.rail {
  margin: var(--space-12) calc(-1 * var(--space-8)) 0;
  padding-block: var(--space-6);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--chips-fade), #000 calc(100% - var(--chips-fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--chips-fade), #000 calc(100% - var(--chips-fade)), transparent);
}

.rail-track {
  display: flex;
  width: max-content;
  animation: marquee var(--rail-duration) linear infinite;
}

.rail:hover .rail-track,
.rail:has(:focus-visible) .rail-track {
  animation-play-state: paused;
}

.stamp-item {
  position: relative;
  flex: none;
  width: var(--stamp-width);
  margin-right: var(--rail-gap);
  text-align: center;
}

.stamp-item.is-flipped {
  z-index: 2;
}

.stamp-btn {
  display: block;
  width: 100%;
  aspect-ratio: var(--stamp-ratio);
  padding: 0;
  border: 0;
  background: none;
  perspective: var(--stamp-perspective);
  cursor: pointer;
  rotate: calc(var(--tilt-k) * var(--stamp-tilt));
  transition: rotate var(--dur-fade) var(--ease-standard);
}

.stamp-btn:hover {
  rotate: 0deg;
}

.stamp-btn:focus-visible {
  outline-color: var(--showcase-ink);
}

.stamp-card {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--stamp-flip) var(--ease-standard);
}

.is-flipped .stamp-card {
  transform: rotateY(var(--flip-angle));
}

.stamp-front,
.stamp-back {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.stamp-front {
  background: url('assets/postage/milestone.svg') center / 100% 100% no-repeat;
  filter: var(--shadow-stamp);
}

.stamp-art {
  display: block;
  position: absolute;
  inset: var(--stamp-inset);
  overflow: hidden;
  border-radius: var(--stamp-art-radius);
}

.stamp-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: var(--stamp-gray);
  transition: filter var(--stamp-color-in) var(--ease-standard);
  transition-delay: var(--color-delay, 0ms);
}

.is-colored .stamp-art img {
  filter: none;
}

.stamp-title,
.stamp-foot {
  position: absolute;
  left: calc(var(--stamp-inset) + var(--stamp-overlay-inset));
  right: calc(var(--stamp-inset) + var(--stamp-overlay-inset));
  font-family: var(--font-stamp);
  font-weight: 400;
  color: var(--base-white);
}

.stamp-title {
  top: calc(var(--stamp-inset) + var(--stamp-overlay-inset));
  font-size: var(--stamp-title-size);
  line-height: 1.1;
  text-align: right;
  white-space: pre-line;
}

.stamp-foot {
  bottom: calc(var(--stamp-inset) + var(--stamp-overlay-inset));
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  line-height: 1;
}

.stamp-number {
  font-size: var(--stamp-number-size);
}

.stamp-number.is-long {
  font-size: var(--stamp-number-size-3);
}

.stamp-unit {
  font-size: var(--stamp-unit-size);
}

/* 背面：按原作真实比例，最长边与邮票等高，白边对照 MilestoneOriginalCard */
.stamp-back {
  inset: auto;
  left: 50%;
  top: 50%;
  display: block;
  padding: var(--original-border);
  border-radius: var(--original-radius);
  background: var(--base-white);
  transform: translate(-50%, -50%) rotateY(var(--flip-angle));
  filter: var(--shadow-stamp);
}

.original {
  --ar: 0.75;
  display: block;
  width: calc((var(--original-long-edge) - 2 * var(--original-border)) * min(1, var(--ar)));
  aspect-ratio: var(--ar);
  max-width: calc((var(--original-long-edge) - 2 * var(--original-border)) * var(--ar));
}

.original img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stamp-caption {
  display: grid;
  margin-top: var(--space-4);
  min-height: 4.5em;
}

/* 新旧两层叠在同一格：旧的先淡出，新的晚一点淡入，中间有重叠 */
.cap {
  grid-area: 1 / 1;
  transition: opacity var(--caption-fade) var(--ease-standard) var(--caption-overlap);
}

.cap.is-out {
  opacity: 0;
}

.cap.is-leaving {
  transition-delay: 0ms;
}

.stamp-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--type-body);
  line-height: 1.4;
}

.stamp-rule {
  margin-top: var(--space-1);
  font-size: var(--type-label);
  line-height: 1.55;
  color: var(--showcase-muted);
}

/* ---- 纯本地 ---- */
.local {
  padding: var(--space-section) var(--gutter) 0;
}

.local-box {
  max-width: var(--content-max); /* 与里程碑展台同宽 */
  margin: 0 auto;
  padding: var(--space-16) var(--space-8);
  overflow: hidden;
  border: 1.5px dashed var(--rule);
  border-radius: var(--radius-panel);
  text-align: center;
}

.chips {
  display: grid;
  gap: var(--space-3);
  margin: calc(var(--space-10) - var(--chips-pad)) calc(-1 * var(--space-8)) var(--space-4);
  padding-block: var(--chips-pad);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--chips-fade), #000 calc(100% - var(--chips-fade)), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 var(--chips-fade), #000 calc(100% - var(--chips-fade)), transparent);
}

.chip-row {
  display: flex;
  gap: var(--space-3);
  width: max-content;
  animation: marquee var(--marquee-duration) linear infinite;
}

.chip-row.is-reverse {
  animation-direction: reverse;
}

.chips:hover .chip-row {
  animation-play-state: paused;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  height: var(--chip-height);
  padding: 0 var(--space-2) 0 var(--space-4);
  border: var(--rule-width) solid var(--rule-soft);
  border-radius: var(--radius-pill);
  background: var(--card-surface);
  font: 500 var(--type-small) / 1 var(--font-sans);
  white-space: nowrap;
  box-shadow: var(--shadow-card);
}

.chip-state {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font: 500 var(--type-label) / 1.4 var(--font-mono);
}

.chip-state::before {
  content: '';
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-pill);
}

.chip-state.is-no {
  background: var(--chip-no-bg);
  color: var(--chip-no-ink);
}
.chip-state.is-safe {
  background: var(--chip-safe-bg);
  color: var(--chip-safe-ink);
}
.chip-state.is-choice {
  background: var(--chip-choice-bg);
  color: var(--chip-choice-ink);
}
.chip-state.is-no::before,
.chip-key.is-no {
  background: var(--chip-no-dot);
}
.chip-state.is-safe::before,
.chip-key.is-safe {
  background: var(--chip-safe-dot);
}
.chip-state.is-choice::before,
.chip-key.is-choice {
  background: var(--chip-choice-dot);
}

.chip-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-10);
  font-size: var(--type-small);
  color: var(--ink-muted);
}

.chip-legend li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.chip-key {
  width: var(--dot);
  height: var(--dot);
  border-radius: var(--radius-pill);
}

.local-lead {
  text-wrap: balance;
  max-width: 32em;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: var(--type-lead);
  line-height: var(--leading-body);
  color: var(--ink-soft);
}

.local-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--fact-min), 1fr));
  gap: var(--space-8);
  margin-top: var(--space-12);
  text-align: left;
}

.local-facts li {
  padding-top: var(--space-4);
  border-top: var(--rule-width) solid var(--rule);
}

.local-facts h3 {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--type-lead);
}

.local-facts p {
  margin-top: var(--space-2);
  font-size: var(--type-small);
  color: var(--ink-soft);
}

/* ---- 常见问题 ---- */
.faq {
  max-width: var(--measure-faq);
  margin: 0 auto;
  padding: var(--space-section) var(--gutter) 0;
}

.faq-list {
  margin-top: var(--space-12);
  border-top: var(--rule-width) solid var(--rule);
}

.faq details {
  border-bottom: var(--rule-width) solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: var(--type-lead);
  line-height: 1.5;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '';
  flex: none;
  width: var(--faq-icon);
  height: var(--faq-icon);
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% var(--faq-icon-stroke) no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / var(--faq-icon-stroke) 100% no-repeat;
  transition: rotate var(--dur-fade) var(--ease-standard);
}

.faq details[open] summary::after {
  rotate: var(--quarter-turn);
}

.faq details.is-closing summary::after {
  rotate: 0deg;
}

.faq-body {
  overflow: hidden;
  contain: layout paint; /* 展开动画只影响自身，减少整页重排 */
  max-width: 46em;
  color: var(--ink-soft);
}

/* 底部留白放在最后一段文字上（而不是答案区的内边距），高度动画才能真正从 0 开始，不会先卡在留白高度 */
.faq-body > :last-child {
  margin-bottom: var(--space-6);
}

.faq-body p + p {
  margin-top: var(--space-3);
}

/* ---- 收尾下载 ---- */
.closing {
  padding: var(--space-section) var(--gutter);
  text-align: center;
}

.nav-logo {
  width: var(--logo-nav);
  height: var(--logo-nav);
}

.closing-icon {
  width: var(--app-icon-closing);
  height: var(--app-icon-closing);
  margin: 0 auto var(--space-6);
  border-radius: var(--app-icon-radius);
  box-shadow: var(--shadow-card);
  animation: bob var(--sticker-float) ease-in-out infinite alternate;
}

.closing-title {
  text-wrap: balance;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--type-hero);
  line-height: var(--type-hero-leading);
  letter-spacing: var(--tracking-title);
}

.closing-note {
  margin-top: var(--space-5);
  font-size: var(--type-small);
  color: var(--ink-muted);
}

/* ---- 页脚 ---- */
.footer {
  /* 底部不留白：英文名故意落进屏幕底部的渐变模糊带 */
  padding: var(--space-12) var(--gutter) 0;
  overflow: hidden;
  background: var(--footer-bg);
  font-family: var(--font-sans);
  font-size: var(--type-small);
  line-height: 1.9;
  color: var(--footer-muted);
}

/* 说明、产品、支持同一排 */
.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer-head {
  margin-bottom: var(--space-2);
  color: var(--footer-ink);
}

.footer-about {
  display: flex;
  flex-direction: column;
}

/* © 推到栏底，与右侧「里程碑」「下载」那一行对齐 */
.footer-copy {
  margin-top: auto;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-family: var(--font-serif);
  font-size: var(--footer-brand-size);
  font-weight: 900;
  line-height: 1;
  color: var(--footer-ink);
}

.footer-icon {
  width: var(--logo-footer);
  height: var(--logo-footer);
}

.footer a {
  display: block;
  text-decoration: none;
}

.footer a:hover {
  color: var(--footer-ink);
}

/* 英文名：页脚的主角，撑满内容宽度，下沉进底部模糊带 */
.footer-wordmark {
  container-type: inline-size;
  max-width: var(--content-max);
  margin: var(--space-12) auto calc(var(--footer-wordmark-sink) * -1);
}

/* 字号以外层宽度为基准（容器单位），任何屏宽下都正好撑满一行 */
.footer-wordmark span {
  display: block;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: var(--footer-wordmark-size);
  line-height: var(--footer-wordmark-leading);
  letter-spacing: var(--footer-wordmark-tracking);
  color: var(--footer-ink);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .footer-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-about {
    grid-column: 1 / -1;
  }

  .footer-copy {
    margin-top: 0;
  }
}

/* ---- 隐私政策页 ---- */
.legal {
  padding: calc(var(--nav-top) + var(--nav-height) + var(--space-16)) var(--gutter) var(--space-section);
}

.legal-body {
  max-width: var(--legal-max);
  margin: 0 auto;
}

.legal-title {
  font-family: var(--font-serif);
  font-size: var(--legal-title);
  font-weight: 900;
  line-height: var(--type-title-leading);
  letter-spacing: var(--tracking-title);
}

.legal-date {
  margin-top: var(--space-3);
  font-size: var(--type-small);
  color: var(--ink-muted);
}

.legal-section {
  margin-top: var(--space-10);
}

.legal-section h2 {
  margin-bottom: var(--space-2);
  font-size: var(--legal-heading);
  font-weight: 700;
  line-height: 1.5;
}

.legal-section p {
  color: var(--ink-soft);
}

.legal-section code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* 网站自身的说明与 App 政策正文隔开 */
.legal-site {
  margin-top: var(--space-16);
  padding-top: var(--space-10);
  border-top: var(--rule-width) solid var(--rule);
}

/* 很窄的手机：英文品牌名较长，导航只留 Logo 图形（中文名短，照常显示） */
@media (max-width: 370px) {
  :lang(en) .nav-brand-text {
    display: none;
  }
}

/* ---- 窄屏：画布占满，当前步骤成为底部字幕 ---- */
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  .stage {
    grid-template-columns: 1fr;
    gap: 0;
    padding-bottom: var(--space-4);
  }

  .story-visual {
    grid-row: 1;
    grid-column: 1;
    align-self: stretch;
    height: auto;
  }

  .steps {
    position: relative;
    z-index: 2;
    grid-row: 1;
    grid-column: 1;
    justify-content: flex-end;
    padding: 0 var(--space-5) var(--space-6);
    pointer-events: none;
  }

  /* 字幕下方的柔和淡出底，避免压在日期格上 */
  .steps::before {
    content: '';
    position: absolute;
    z-index: -1;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--frame-narrow-caption) * 100% + var(--space-12));
    border-radius: 0 0 var(--radius-panel) var(--radius-panel);
    background: linear-gradient(to top, var(--veil) var(--veil-solid), transparent);
  }

  .step {
    display: none;
    padding: 0;
    border: 0;
    text-align: center;
  }

  .step.is-active {
    display: block;
    animation: cell-in var(--dur-text) var(--ease-standard);
  }

  .step-body {
    grid-template-rows: 1fr;
    opacity: 1;
  }

  .notes,
  .markers {
    display: none;
  }

  .counter {
    top: var(--space-4);
    bottom: auto;
    right: var(--space-5);
  }
}

@media (max-width: 760px) {
  .nav-links {
    display: none;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  .nav-lang {
    margin-left: auto;
  }

  /* 手机上导航收紧，英文品牌名更长也放得下 */
  .nav-brand {
    padding: 0 var(--space-2);
  }

  .nav-cta {
    padding: 0 var(--space-4);
  }

  .store {
    width: 100%;
  }

  .showcase {
    padding: var(--space-12) var(--space-5);
    border-radius: var(--radius-card);
  }

  .stat {
    zoom: var(--stat-zoom-narrow);
  }

  /* 手机：饮品收拢、缩小，仍从机身背后伸出 */
  .hero-stage {
    --float-spread: var(--float-spread-narrow);
    --float-size: calc(var(--phone-width) * var(--float-size-narrow));
  }

  .rail {
    margin-left: calc(-1 * var(--space-5));
    margin-right: calc(-1 * var(--space-5));
  }

  .local-box {
    padding: var(--space-12) var(--space-5);
    border-radius: var(--radius-card);
  }

  .chips {
    margin-left: calc(-1 * var(--space-5));
    margin-right: calc(-1 * var(--space-5));
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .float,
  .closing-icon,
  .chip-row,
  .stamp-card,
  .stamp-art img,
  .step,
  .step-body {
    animation: none;
    transition: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .rail {
    overflow-x: auto;
  }

  .rail-track {
    animation: none;
  }

  .cell.is-recorded,
  .cell img,
  .cell .badge {
    animation-name: cell-in;
  }
}
