/* 叉糕官网。颜色取自 App 的宣墨色阶（apps/mobile/global.css），标志几何取自 branding/chagao。 */

/* 健身房计数用 App 的 Barlow Condensed，只留数字。 */
@font-face {
  font-family: 'Barlow Condensed';
  src: url('assets/fonts/barlow-digits.37c90bafb1.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
  unicode-range: U+30-39;
}

/* 标题字：Noto Serif SC Bold 的两份子集。首屏那份很小、预加载；其余标题用字不阻塞首屏。 */
@font-face {
  font-family: 'Chagao Serif';
  src: url('assets/fonts/serif-hero.d572ed70ca.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  /* hero-range: written by scripts/subset-fonts.mjs */
  unicode-range:
    U+771F, U+5B9E, U+7684, U+65E5, U+5E38, U+FF0C, U+6709, U+8DA3, U+76F8, U+5904, U+3002;
}
@font-face {
  font-family: 'Chagao Serif';
  src: url('assets/fonts/serif-rest.c166f509ed.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #f6f0e7; /* mo-50 素宣 */
  --paper-up: #fcf6ed; /* mo-25 */
  --paper-2: #f0eae1; /* mo-100 */
  --paper-3: #e8e1d4; /* mo-150 */
  --rule: #e0dad1; /* mo-200 */
  --rule-2: #ccc7be; /* mo-300 */
  --ink: #1e1c19; /* mo-900 浓墨 */
  --ink-2: #474540; /* mo-700 */
  --muted: #63605b; /* mo-600 */
  --faint: #817d76; /* mo-500 */
  --night: #191714; /* mo-925 */
  --night-2: #272522; /* mo-850 */
  --night-text: #e8e1d4; /* mo-150 */
  --night-muted: #a5a199; /* mo-400 */
  --ochre: #9c6b3e; /* zhe-600 赭，图形 */
  --ochre-text: #80542a; /* zhe-700，赭作文字 */
  --ochre-soft: #edd2bb; /* zhe-200 */
  --ochre-night: #deb999; /* zhe-300 */

  --serif: 'Chagao Serif', 'Noto Serif SC', 'Source Han Serif SC', 'Songti SC', 'STSong', serif;
  --sans:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'HarmonyOS Sans SC', 'MiSans',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --ease-out: cubic-bezier(0.22, 0.68, 0.24, 1); /* branding motion.ease */
  --ease-in-out: cubic-bezier(0.62, 0.02, 0.22, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper) url('assets/textures/grain-light.e50599f5ed.png') repeat;
  background-size: 256px;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.8;
  font-feature-settings: 'palt' 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img,
svg,
picture {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
h1,
h2,
h3,
p,
dl,
dd,
figure,
ul {
  margin: 0;
}
ul {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
button {
  font: inherit;
  color: inherit;
}
.defs {
  position: absolute;
  overflow: hidden;
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
}
.skip:focus {
  top: 12px;
}

:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3,
.serif {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-wrap: balance;
}
p,
dd {
  text-wrap: pretty;
}

/* ---------- 页头 ---------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 8px;
}
.top__brand {
  display: block;
  width: 58px;
  color: var(--ink);
}
.top__brand svg {
  width: 100%;
  height: auto;
}

/* ---------- 首屏 ---------- */
.hero {
  display: grid;
  gap: clamp(36px, 6vw, 72px);
  align-items: center;
  padding-top: clamp(28px, 5vw, 56px);
  padding-bottom: clamp(64px, 8vw, 104px);
}
@media (min-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    min-height: min(720px, calc(100svh - 150px));
  }
}

.sign {
  display: flex;
  align-items: flex-end;
  gap: clamp(12px, 1.6vw, 18px);
  margin: 0 0 clamp(20px, 3vw, 32px) -6px;
}
.face {
  display: block;
  flex: none;
  width: clamp(88px, 11vw, 120px);
  margin: 0;
  padding: 6px;
  border: 0;
  background: none;
  cursor: pointer;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.face svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.face__strokes {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.s {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  animation: draw var(--dur) var(--ease) var(--delay) forwards;
}
/* 1500ms 签名时间轴，首屏前留 300ms 让版面先落定 */
.s--1 {
  --delay: 300ms;
  --dur: 110ms;
  --ease: linear;
}
.s--2 {
  --delay: 370ms;
  --dur: 230ms;
  --ease: cubic-bezier(0.62, 0.02, 0.22, 1);
}
.s--3 {
  --delay: 680ms;
  --dur: 210ms;
  --ease: cubic-bezier(0.42, 0, 0.58, 1);
}
.s--4 {
  --delay: 860ms;
  --dur: 240ms;
  --ease: cubic-bezier(0.3, 0, 0.2, 1);
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
/* 画完眨一下眼；点一下也会眨 */
.face__eye {
  transform-box: fill-box;
  transform-origin: 50% 55%;
  animation: blink 300ms var(--ease-in-out) 1.9s;
}
.face.is-winking .face__eye {
  animation: blink 300ms var(--ease-in-out);
}
@keyframes blink {
  0%,
  100% {
    transform: scaleY(1);
  }
  45%,
  55% {
    transform: scaleY(0.08);
  }
}

.hero h1 {
  font-size: clamp(40px, 11.4vw, 60px);
  line-height: 1.16;
  letter-spacing: 0.02em;
  margin-left: -0.04em;
}
.hero h1 span {
  display: block;
  white-space: nowrap;
}
@media (min-width: 960px) {
  .hero h1 {
    font-size: clamp(56px, 5.6vw, 76px);
  }
}
.hero__lede {
  margin-top: clamp(18px, 2.4vw, 28px);
  max-width: 26em;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.8;
  color: var(--ink-2);
}
.status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(26px, 3.4vw, 40px);
  font-size: 15px;
  color: var(--ink-2);
}

.soon {
  display: inline-flex;
  align-items: center;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 15px;
  letter-spacing: 0.12em;
}

/* 对影笺：两半在中缝相遇，显影，落印 */
.duet {
  position: relative;
}
.duet__mount {
  position: relative;
  padding: clamp(10px, 1.6vw, 18px);
  background: var(--paper-up);
  border-radius: 6px;
  box-shadow:
    0 1px 0 rgba(30, 28, 25, 0.04),
    0 18px 40px -18px rgba(30, 28, 25, 0.28),
    0 2px 6px rgba(30, 28, 25, 0.06);
  transform: rotate(-1.2deg);
}
.duet__mount::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: url('assets/textures/grain-light.e50599f5ed.png');
  background-size: 200px;
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
}
.duet__photo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3px, 0.4vw, 5px);
}
.duet__half {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.duet__half img {
  position: absolute;
  top: 0;
  width: 200%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  animation: develop 1600ms var(--ease-out) 500ms both;
}
.duet__half--a img {
  left: 0;
}
.duet__half--b img {
  left: -100%;
}
.duet__half--a {
  animation: meet-a 1100ms var(--ease-out) 120ms both;
}
.duet__half--b {
  animation: meet-b 1100ms var(--ease-out) 120ms both;
}
@keyframes meet-a {
  from {
    transform: translateX(-9%);
    opacity: 0;
  }
}
@keyframes meet-b {
  from {
    transform: translateX(9%);
    opacity: 0;
  }
}
@keyframes develop {
  from {
    filter: brightness(1.32) saturate(0.15) contrast(0.82);
  }
}
.duet__names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3px, 0.4vw, 5px);
  margin: clamp(10px, 1.2vw, 14px) 2px -2px;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.12em;
  color: var(--muted);
}
.duet figcaption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  margin-top: clamp(22px, 2.6vw, 30px);
  padding-left: 4px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
}
.duet figcaption b {
  flex: none;
  font-family: var(--serif);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: 0.08em;
}

/* ---------- 章节 ---------- */
.chapter {
  padding-block: clamp(72px, 9vw, 124px);
}
.chapter--see {
  border-top: 1px solid var(--rule);
}
.chapter__grid {
  display: grid;
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
}
@media (min-width: 960px) {
  .chapter__grid {
    grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  }
}
.chapter__head {
  max-width: 40em;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.chapter__head--narrow {
  max-width: 46em;
}
.kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--ochre-text);
}
.glyph {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--ochre);
  stroke-linecap: round;
  overflow: visible;
}
.glyph--wide {
  width: 54px;
  height: 22px;
}
.glyph path {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.js .glyph path {
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 420ms var(--ease-in-out);
}
.js .glyph path + path {
  transition-delay: 140ms;
}
.js .is-in .glyph path {
  stroke-dashoffset: 0;
}
.chapter h2,
.spaces h2 {
  font-size: clamp(30px, 4.2vw, 54px);
  line-height: 1.24;
}
.chapter__lede {
  margin-top: clamp(16px, 2vw, 24px);
  max-width: 32em;
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--ink-2);
}

/* 看见 */
.facts {
  display: grid;
  gap: 22px;
  margin-top: clamp(32px, 4vw, 48px);
  padding-top: clamp(28px, 3.4vw, 36px);
  border-top: 1px solid var(--rule);
}
.facts div {
  display: grid;
  gap: 4px;
}
@media (min-width: 560px) {
  .facts div {
    grid-template-columns: 7.5em 1fr;
    gap: 16px;
  }
}
.facts dt {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
}
.facts dd {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

.phones {
  position: relative;
  display: grid;
  justify-items: center;
}
.phone {
  position: absolute;
  width: clamp(200px, 56vw, 290px);
  padding: 7px;
  border-radius: 40px;
  background: var(--ink);
  box-shadow:
    0 30px 60px -28px rgba(30, 28, 25, 0.45),
    0 2px 0 rgba(255, 255, 255, 0.06) inset;
}
.phone picture,
.phone img {
  width: 100%;
  border-radius: 33px;
  aspect-ratio: 640 / 1391;
  object-fit: cover;
  background: var(--paper-3);
}
.phone--front {
  position: relative;
  width: clamp(240px, 70vw, 340px);
  rotate: -2deg;
}
.js .phones .phone {
  opacity: 0;
  transition:
    opacity 700ms var(--ease-out),
    transform 900ms var(--ease-out);
  transform: translateY(36px);
}
.js .phones.is-in .phone {
  opacity: 1;
  transform: none;
}

/* 眨眼：三种打招呼 */
.greetings {
  display: grid;
  gap: clamp(40px, 5vw, 32px);
}
@media (min-width: 760px) {
  .greetings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.greeting h3 {
  margin-top: 22px;
  font-size: 21px;
}
.greeting p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}
.greeting__art {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(184px, 22vw, 240px);
  border-radius: 20px;
  background: var(--paper-2);
  overflow: hidden;
}
.greeting__art--note,
.greeting__art--polaroid {
  background: none;
  overflow: visible;
}
.greeting__art--note picture {
  width: min(66%, 240px);
  filter: drop-shadow(0 14px 18px rgba(30, 28, 25, 0.16));
  rotate: -3deg;
}
.greeting__art--bow {
  background: #1c1712;
}
.greeting__art--bow picture {
  position: absolute;
  inset: 0;
}
.greeting__art--bow img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.greeting__art--polaroid picture {
  width: min(40%, 140px);
  rotate: 4deg;
  filter: drop-shadow(0 12px 16px rgba(30, 28, 25, 0.18));
}
.js .greeting__art--note img {
  transition: transform 900ms var(--ease-out);
  transform: translateY(12px) rotate(-4deg);
}
.js .greeting.is-in .greeting__art--note img {
  transform: none;
}
.js .greeting__art--polaroid img {
  transition:
    transform 1100ms var(--ease-out),
    opacity 600ms var(--ease-out);
  transform: translateY(26%);
  opacity: 0;
}
.js .greeting.is-in .greeting__art--polaroid img {
  transform: none;
  opacity: 1;
  transition-delay: 240ms;
}
/* 星图上一道流光，循着弓到心的弧线走 */
.bow__flight {
  position: absolute;
  inset: 0;
  background: radial-gradient(closest-side, rgba(255, 236, 196, 0.85), rgba(255, 236, 196, 0) 70%)
    no-repeat;
  background-size: 18% 34%;
  background-position: 6% 58%;
  mix-blend-mode: screen;
  opacity: 0;
}
.greeting.is-live .bow__flight {
  animation: flight 3.6s var(--ease-in-out) 600ms infinite;
}
@keyframes flight {
  0% {
    opacity: 0;
    background-position: 8% 64%;
  }
  12% {
    opacity: 1;
  }
  60% {
    opacity: 1;
    background-position: 80% 34%;
  }
  72%,
  100% {
    opacity: 0;
    background-position: 84% 36%;
  }
}

/* 然后笑：相处的物件 */
.chapter--smile {
  background: var(--paper-2);
  border-block: 1px solid var(--rule);
}
.desk {
  display: grid;
  gap: clamp(20px, 2.4vw, 28px);
}
@media (min-width: 860px) {
  .desk {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    column-gap: clamp(24px, 3vw, 40px);
    row-gap: clamp(28px, 3vw, 40px);
  }
  .keep--draw {
    grid-row: span 2;
    align-self: center;
  }
  .keep--draw .keep__stage {
    min-height: 0;
  }
  .keep--draw .scroll-paper {
    width: min(420px, 100%);
  }
}
.keep {
  display: flex;
  flex-direction: column;
}
.keep h3 {
  margin-top: 20px;
  font-size: 21px;
}
.keep p {
  margin-top: 6px;
  max-width: 30em;
  font-size: 15px;
  color: var(--muted);
}
.keep__stage {
  position: relative;
  display: grid;
  place-items: center;
  height: 230px;
}
.keep--draw .keep__stage {
  height: auto;
}
.keep__stamp {
  position: absolute;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ochre);
  border: 2px solid currentColor;
  border-radius: 8px;
  letter-spacing: 0.1em;
}

/* 合画笺：墨画上半幅，折起，赭接下半幅，合卷落印。9 秒一轮。 */
.scroll-paper {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 7 / 5;
  background: var(--paper-up);
  border-radius: 4px;
  box-shadow: 0 10px 24px -14px rgba(30, 28, 25, 0.4);
}
.scroll-paper::before {
  /* 折起来的左半幅，盲接时盖住 */
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 1;
  background: linear-gradient(90deg, #ece5d9, #f3ede3);
  border-radius: 4px 0 0 4px;
  box-shadow: 6px 0 10px -6px rgba(30, 28, 25, 0.3);
  transform-origin: 100% 50%;
  transform: scaleX(0);
}
.draw {
  width: 100%;
  height: 100%;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3.4;
}
.draw__a {
  stroke: var(--ink);
}
.draw__b {
  stroke: var(--ochre-text);
}
.draw path {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.draw__fold {
  stroke: var(--rule-2);
  stroke-width: 1;
  stroke-dasharray: 4 5;
}
.keep__stamp--draw {
  right: 12px;
  bottom: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  font-size: 13px;
  writing-mode: vertical-rl;
  rotate: -8deg;
}
.js .keep--draw .draw__a path {
  stroke-dashoffset: 1;
}
.js .keep--draw .draw__b path {
  stroke-dashoffset: 1;
}
.js .keep--draw .keep__stamp--draw {
  opacity: 0;
}
.keep--draw.is-live .draw__a path {
  animation: draw-a 9s var(--ease-in-out) infinite;
}
.keep--draw.is-live .draw__b path {
  animation: draw-b 9s var(--ease-in-out) infinite;
}
.keep--draw.is-live .scroll-paper::before {
  animation: fold 9s var(--ease-in-out) infinite;
}
.keep--draw.is-live .keep__stamp--draw {
  animation: seal 9s var(--ease-out) infinite;
}
@keyframes draw-a {
  0% {
    stroke-dashoffset: 1;
  }
  20%,
  92% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes fold {
  0%,
  24% {
    transform: scaleX(0);
  }
  30%,
  60% {
    transform: scaleX(1);
  }
  66%,
  100% {
    transform: scaleX(0);
  }
}
@keyframes draw-b {
  0%,
  32% {
    stroke-dashoffset: 1;
    opacity: 1;
  }
  56%,
  92% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}
@keyframes seal {
  0%,
  68% {
    opacity: 0;
    transform: scale(1.5);
  }
  72%,
  92% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
  }
}

/* 默契盒：两张答案同时翻开 */
.quiz {
  display: grid;
  justify-items: center;
  gap: 16px;
  width: 100%;
  padding: 0 18px;
}
.quiz__q {
  display: grid;
  justify-items: center;
  gap: 2px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
}
.quiz__q span {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--faint);
}
.quiz__row {
  display: flex;
  gap: 12px;
  perspective: 600px;
}
.quiz__card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  width: 112px;
  padding: 16px 8px 18px;
  border-radius: 14px;
  background: var(--paper-up);
  box-shadow: 0 8px 18px -12px rgba(30, 28, 25, 0.4);
  transform-style: preserve-3d;
}
.quiz__card i {
  font-style: normal;
  font-size: 12px;
  color: var(--faint);
}
.quiz__card b {
  font-family: var(--serif);
  font-size: 17px;
}
.quiz__card::after {
  /* 背面：还没揭晓 */
  content: '?';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: var(--ink);
  color: var(--paper-3);
  font-family: var(--serif);
  font-size: 26px;
  backface-visibility: hidden;
  transform: rotateY(180deg);
}
.quiz__match {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 15px;
  color: var(--ochre-text);
  letter-spacing: 0.12em;
}
.js .keep--box .quiz__card {
  transform: rotateY(180deg);
}
.js .keep--box .quiz__match {
  opacity: 0;
}
.keep--box.is-live .quiz__card {
  animation: reveal 6s var(--ease-in-out) infinite;
}
.keep--box.is-live .quiz__match {
  animation: match 6s var(--ease-out) infinite;
}
@keyframes reveal {
  0%,
  22% {
    transform: rotateY(180deg);
  }
  34%,
  90% {
    transform: rotateY(0);
  }
  100% {
    transform: rotateY(180deg);
  }
}
@keyframes match {
  0%,
  38% {
    opacity: 0;
    transform: translateY(6px);
  }
  46%,
  86% {
    opacity: 1;
    transform: none;
  }
  94%,
  100% {
    opacity: 0;
  }
}

/* 赛博唱片：从唱片套里滑出来，转起来 */
.record {
  position: relative;
  width: 258px;
  height: 150px;
}
.record__sleeve {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 150px;
  height: 150px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.55), transparent 55%),
    linear-gradient(140deg, #efe4d3, #e2d3bd);
  box-shadow: 0 10px 22px -12px rgba(30, 28, 25, 0.45);
}
.record__sleeve span {
  position: absolute;
  left: 12px;
  bottom: 10px;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.record__disc {
  position: absolute;
  left: 5px;
  top: 5px;
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      transparent 0 30%,
      rgba(255, 255, 255, 0.05) 30.5% 31%,
      transparent 31.5% 40%,
      rgba(255, 255, 255, 0.05) 40.5% 41%,
      transparent 41.5% 52%,
      rgba(255, 255, 255, 0.06) 52.5% 53%,
      transparent 53.5%
    ),
    conic-gradient(
      from 20deg,
      #1e1c19,
      #2e2b27 12%,
      #1a1815 30%,
      #2b2824 52%,
      #1a1815 70%,
      #2e2b27 86%,
      #1e1c19
    );
  box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.6);
  transform: translateX(108px);
}
.record__label {
  display: grid;
  place-items: center;
  align-content: center;
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: var(--ochre-soft);
  text-align: center;
  line-height: 1.2;
}
.record__label b {
  font-family: var(--serif);
  font-size: 12px;
  color: var(--ink);
}
.record__label i {
  font-style: normal;
  font-size: 8.5px;
  color: var(--ink-2);
}
.js .record__disc {
  transform: translateX(0);
  transition: transform 1200ms var(--ease-out) 200ms;
}
.js .keep--record.is-in .record__disc {
  transform: translateX(108px);
}
.record__label {
  animation: spin 3.2s linear infinite;
  animation-play-state: paused;
}
.keep--record.is-live .record__label {
  animation-play-state: running;
}
@keyframes spin {
  to {
    rotate: 360deg;
  }
}

.more {
  margin-top: clamp(28px, 3.4vw, 40px);
  font-size: 15px;
  color: var(--muted);
}

/* 手机上横着滑的一排：下一张露出一截 */
@media (max-width: 759px) {
  .rail {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    grid-template-columns: none;
    gap: 16px;
    margin-inline: calc(var(--gutter) * -1);
    padding: 4px var(--gutter) 8px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar {
    display: none;
  }
  .rail > * {
    scroll-snap-align: start;
  }
}

/* ---------- 工具箱 ---------- */
.spaces {
  padding-block: clamp(72px, 9vw, 124px);
}
.rooms {
  display: grid;
  gap: clamp(28px, 3vw, 28px);
}
@media (min-width: 760px) {
  .rooms {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.room h3 {
  margin-top: 20px;
  font-size: 21px;
}
.room p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--muted);
}
.room__art {
  position: relative;
  height: clamp(240px, 26vw, 300px);
  border-radius: 20px;
  overflow: hidden;
}
.room--lab .room__art {
  background: #d9cfbf;
}
.room__deck img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}
.room__tape {
  position: absolute;
  right: 8%;
  bottom: 9%;
  width: 42%;
  filter: drop-shadow(0 10px 12px rgba(30, 28, 25, 0.3));
  rotate: -7deg;
}
.js .room__tape {
  transition:
    transform 1000ms var(--ease-out),
    opacity 600ms var(--ease-out);
  transform: translate(30%, 20%);
  opacity: 0;
}
.js .room--lab.is-in .room__tape {
  transform: none;
  opacity: 1;
  transition-delay: 200ms;
}
.room--beads .room__art {
  display: grid;
  place-items: center;
  background: #f2ece2;
}
.pegboard {
  display: grid;
  place-items: center;
  width: min(78%, 240px);
  aspect-ratio: 1;
  border-radius: 14px;
  background-color: #e9e1d3;
  background-image: radial-gradient(circle, #d6ccbb 1.4px, transparent 1.8px);
  background-size: 9px 9px;
  box-shadow: inset 0 0 0 1px rgba(30, 28, 25, 0.06);
}
.pegboard {
  position: relative;
}
.beads {
  width: 92%;
  grid-area: 1 / 1;
}
/* 没上色的豆子：灰白的底稿 */
.beads--blank {
  filter: grayscale(1) contrast(0.45) brightness(1.2);
  opacity: 0.5;
}
/* 一抹上色：斜着的一笔从左上扫到右下 */
.js .beads--paint {
  -webkit-mask-image: linear-gradient(120deg, #000 42%, transparent 54%);
  mask-image: linear-gradient(120deg, #000 42%, transparent 54%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
}
.room--beads.is-live .beads--paint {
  animation: smear 5.4s var(--ease-in-out) infinite;
}
@keyframes smear {
  0%,
  8% {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
  58%,
  88% {
    -webkit-mask-position: 0 0;
    mask-position: 0 0;
  }
  100% {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
  }
}
.room--gym .room__art {
  display: grid;
  place-items: end center;
  background: linear-gradient(#f6e4cc, #f1d7b6);
}
.room--gym .room__art::before {
  /* 木地板 */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 22%;
  background: repeating-linear-gradient(90deg, #e2a46c 0 46px, #d9965c 46px 48px);
}
.squat {
  position: relative;
  z-index: 1;
  width: 104px;
  aspect-ratio: 150 / 338;
  margin-bottom: 7%;
  background: url('assets/img/gym-squat.e6bc759b7e.webp') 0 0 / 1200% 100% no-repeat;
  animation: squat 0.9s steps(12, jump-none) infinite alternate;
  animation-play-state: paused;
}
@supports (background-image: url('x.avif')) {
  .squat {
    background-image: image-set(
      url('assets/img/gym-squat.12fcd2d128.avif') type('image/avif'),
      url('assets/img/gym-squat.e6bc759b7e.webp') type('image/webp')
    );
  }
}
.room--gym.is-live .squat {
  animation-play-state: running;
}
@keyframes squat {
  to {
    background-position: 100% 0;
  }
}
.counter {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 1;
  display: grid;
  justify-items: end;
  line-height: 1;
  color: #2c3f9a;
}
.counter b {
  font-family: 'Barlow Condensed', var(--sans);
  font-size: 54px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.counter i {
  margin-top: 6px;
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.2em;
}

/* ---------- 分寸：入夜 ---------- */
.measure {
  position: relative;
  padding-block: clamp(80px, 12vw, 160px);
  background: var(--night);
  color: var(--night-text);
}
.measure::before {
  /* 由纸入夜的一段过渡 */
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 120px;
  background: linear-gradient(var(--paper), var(--night));
  opacity: 0;
}
.measure__grid {
  display: grid;
  gap: clamp(40px, 6vw, 96px);
}
@media (min-width: 960px) {
  .measure__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  }
}
.measure h2 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.26;
}
@media (min-width: 960px) {
  .measure__grid > :first-child {
    position: sticky;
    top: 96px;
    align-self: start;
  }
}
.rules {
  display: grid;
  gap: 0;
}
.rules li {
  padding: 22px 0 24px;
  border-top: 1px solid rgba(232, 225, 212, 0.14);
}
.rules li:last-child {
  border-bottom: 1px solid rgba(232, 225, 212, 0.14);
}
.rules h3 {
  font-size: 19px;
}
.rules p {
  margin-top: 6px;
  font-size: 15px;
  color: var(--night-muted);
}

/* ---------- 页脚 ---------- */
.foot {
  padding: clamp(56px, 8vw, 96px) 0 max(36px, env(safe-area-inset-bottom));
  background: var(--night);
  color: var(--night-muted);
  border-top: 1px solid rgba(232, 225, 212, 0.1);
  font-size: 14px;
}
.foot .wrap {
  display: grid;
  gap: 32px;
}
@media (min-width: 860px) {
  .foot .wrap {
    grid-template-columns: 1.2fr 1fr 1fr;
    align-items: end;
  }
}
.foot__sign svg {
  width: 150px;
  height: auto;
  color: var(--night-text);
}
.foot__links {
  display: grid;
  gap: 8px;
  justify-items: start;
}
.foot a {
  text-decoration: none;
  color: var(--night-text);
}
.foot a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.foot__legal {
  display: grid;
  gap: 4px;
}
.foot__note {
  margin-top: 6px;
  font-size: 12px;
  color: #817d76;
}

/* ---------- 进入视野 ---------- */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 700ms var(--ease-out),
    transform 900ms var(--ease-out);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}
.js .phones[data-reveal] {
  opacity: 1;
  transform: none;
}
.greetings > :nth-child(2),
.desk > :nth-child(2),
.rooms > :nth-child(2) {
  transition-delay: 90ms;
}
.greetings > :nth-child(3),
.desk > :nth-child(3),
.rooms > :nth-child(3) {
  transition-delay: 180ms;
}

/* 减少动态：不做时间驱动的动画，直接给完成状态 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .s,
  .js .glyph path,
  .js .keep--draw .draw__a path,
  .js .keep--draw .draw__b path {
    stroke-dashoffset: 0;
  }
  .js [data-reveal],
  .js .phones .phone,
  .js .greeting__art--polaroid img,
  .js .room__tape {
    opacity: 1;
    transform: none;
  }
  .js .keep--draw .keep__stamp--draw,
  .js .keep--box .quiz__match {
    opacity: 1;
  }
  .js .keep--box .quiz__card {
    transform: none;
  }
  .js .record__disc {
    transform: translateX(108px);
  }
  .js .beads--paint {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ---------- 404 ---------- */
.lost__main {
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 18px;
  min-height: 100svh;
  max-width: 640px;
}
.lost__face {
  width: 96px;
  color: var(--ink);
  margin-bottom: 8px;
}
.lost h1 {
  font-size: clamp(32px, 6vw, 48px);
}
.lost p {
  color: var(--muted);
}
.lost__home {
  margin-top: 12px;
  text-decoration: none;
}
.nowrap {
  white-space: nowrap;
}
.foot--legal {
  padding-block: 28px max(28px, env(safe-area-inset-bottom));
}
