/* ==========================================================================
   scenes.css · 场景层
   每一幕一个 section，独立版式，共用 tokens
   ========================================================================== */

.scene {
  position: relative;
  min-height: 100vh;          /* 老浏览器兜底 */
  min-height: 100dvh;
  padding: var(--s6) var(--gut) var(--s7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s2);
  overflow: hidden;
}

/* 幕号：极淡的大号衬线数字，编辑设计常见手法 */
.step-no {
  position: absolute;
  top: var(--s5);
  right: var(--gut);
  font-family: var(--f-serif);
  font-size: clamp(56px, 20vw, 88px);
  line-height: 1;
  color: var(--peach);
  opacity: .08;
  letter-spacing: .02em;
  pointer-events: none;
  user-select: none;
}

/* 页脚幕号：编辑设计的版面标记，不是装饰 */
.scene:not(.scene--cover)::after {
  content: attr(data-scene) " / 16";
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  font-family: var(--f-serif);
  font-size: 10px;
  letter-spacing: .3em;
  color: var(--wood);
  opacity: .55;
  pointer-events: none;
  white-space: nowrap;
}

/* ---------------- 01 封面 ---------------- */
.scene--cover {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0;
  padding: var(--s7) var(--s6) var(--s6);
  isolation: isolate;
}

/* 底纹：回纹暗格，像书的环衬。宁可淡到几乎看不见，也不能抢主体 */
.cover__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .085;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cg fill='none' stroke='%238B6B4A' stroke-width='1'%3E%3Cpath d='M10 10h18v18H10z'/%3E%3Cpath d='M14 14h10v10H14z'/%3E%3Cpath d='M36 36h18v18H36z'/%3E%3Cpath d='M40 40h10v10H40z'/%3E%3Cpath d='M10 42h8v8h-8z'/%3E%3Cpath d='M46 10h8v8h-8z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 86px 86px;
  -webkit-mask-image: radial-gradient(120% 92% at 50% 42%, transparent 34%, #000 88%);
  mask-image: radial-gradient(120% 92% at 50% 42%, transparent 34%, #000 88%);
}

/* 双线画框：书封的规矩 */
.cover__frame {
  position: absolute;
  inset: 12px;
  border: 1px solid var(--wood);
  opacity: .22;
  pointer-events: none;
}
.cover__frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid var(--wood);
  opacity: .55;
}

/* 竖排书名标签 */
.cover__vlabel {
  position: absolute;
  right: 25px;
  top: 108px;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-family: var(--f-serif);
  font-size: 10.5px;
  letter-spacing: .38em;
  color: var(--wood);
  opacity: .7;
  pointer-events: none;
}

.cover__art {
  margin-top: var(--s4);
  margin-bottom: var(--s4);
}
.scene--cover .ico--hero {
  width: 206px;
  height: 206px;
  filter: drop-shadow(0 20px 30px rgba(120, 30, 50, .22));
}

/* 实拍封面：圆形裁切 + 白瓷边，像一只摆进画框的粿 */
.cover__photo {
  display: block;
  width: 208px;
  height: 208px;
  object-fit: cover;
  object-position: 50% 45%;
  border-radius: 50%;
  border: 7px solid var(--white);
  background: var(--paper-2);
  box-shadow:
    0 24px 38px -16px rgba(90, 30, 45, .45),
    0 0 0 1px rgba(139, 107, 74, .14);
  animation: floaty 8s var(--ease-soft) infinite;
}

.cover__type {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
}
.scene--cover .title--xl {
  letter-spacing: .3em;
  margin-right: -.3em;   /* 抵消末字字距，视觉居中 */
}

.cover__sub {
  font-family: var(--f-serif);
  font-size: var(--fs-lede);
  line-height: 1.95;
  letter-spacing: .04em;
  color: var(--ink-2);
}

.scene--cover .btn {
  margin-top: var(--s5);
}

/* 次要动作：看一遍全流程 */
.cover__auto {
  margin-top: var(--s3);
  padding: 6px 2px;
  border: none;
  border-bottom: 1px solid rgba(139, 107, 74, .35);
  background: none;
  color: var(--ink-2);
  font-family: var(--f-serif);
  font-size: 12px;
  letter-spacing: .14em;
  cursor: pointer;
  transition: color var(--t-2) var(--ease-soft), border-color var(--t-2) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}
.cover__auto:active { color: var(--peach); border-color: var(--peach); }
.cover__auto[disabled] { opacity: .4; pointer-events: none; }
.cover__meta {
  margin-top: var(--s2);
  font-size: 10.5px;
  letter-spacing: .26em;
  color: var(--wood);
  opacity: .68;
}

/* 收藏印：书封右上角的一方朱记 */
.cover__seal {
  position: absolute;
  top: 28px;
  right: 26px;
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: var(--peach-deep);
  color: var(--paper);
  font-family: var(--f-serif);
  font-size: 16px;
  line-height: 1;
  border-radius: 3px;
  transform: rotate(-4deg);
  box-shadow: 0 2px 7px rgba(120, 30, 50, .28);
  opacity: .92;
}

/* ---------------- 02 引子 ---------------- */
.scene--intro { gap: var(--s3); }
.scene--intro .title { margin-bottom: var(--s1); }
.scene--intro .body { max-width: 34em; }
.body--tight { font-size: 14px; }

/* ---------------- 03 认知纠偏 ---------------- */
.scene--quiz { gap: var(--s2); }
.scene--quiz .hint { margin-top: var(--s4); }

/* ---------------- 04 粿品家族 ---------------- */
.scene--family { gap: var(--s2); }
.scene--family .rail { margin-top: var(--s3); }

/* ---------------- 05 材料台 ---------------- */
.scene--material { gap: var(--s2); }
.scene--material .hint { margin-top: var(--s4); }

/* ---------------- 06 和面 ---------------- */
.knead {
  position: relative;
  width: min(64vw, 220px);
  aspect-ratio: 1 / 1;
  margin: var(--s5) auto;
  display: grid;
  place-items: center;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.knead__ball {
  width: 74%;
  height: 74%;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  background:
    radial-gradient(circle at 34% 26%, #FCF6E9 0%, #EDDFC6 36%, #D8C4A2 74%, #C7AF8C 100%);
  box-shadow:
    inset -12px -16px 30px rgba(130, 100, 66, .3),
    inset 10px 12px 22px rgba(255, 255, 255, .5),
    0 24px 36px -18px rgba(110, 81, 54, .42);
  transition:
    border-radius var(--t-3) var(--ease),
    transform var(--t-3) var(--ease-back),
    box-shadow var(--t-3) var(--ease);
}
.knead__ball.is-done {
  border-radius: 50%;
  transform: scale(1.04);
  background:
    radial-gradient(circle at 32% 24%, #FFFDF7 0%, #F6EDDA 40%, #E6D3B2 78%, #D6C09B 100%);
  box-shadow:
    inset -10px -12px 26px rgba(130, 100, 66, .2),
    inset 12px 14px 24px rgba(255, 255, 255, .7),
    0 26px 42px -18px rgba(110, 81, 54, .46);
}

/* 进度环（和面 / 压印共用） */
.knead__ring,
.stamp__ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(var(--peach) calc(var(--p, 0) * 1%), rgba(217, 74, 100, .1) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  opacity: 0;
  transition: opacity var(--t-1) var(--ease);
  pointer-events: none;
}
.is-pressing .knead__ring,
.is-pressing .stamp__ring { opacity: 1; }

.knead__ring i,
.stamp__ring i { display: none; }

/* ---------------- 10 压印 ---------------- */
/* 版面：粿在下，印模在上，两者同宽比 0.9，拖下来正好重合 */
.stamp {
  width: 100%;
  display: grid;
  place-items: center;
}

.stamp__stage {
  position: relative;
  width: min(74vw, 290px);
  aspect-ratio: 1 / 1.24;
  margin: var(--s4) auto var(--s2);
  display: block;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* 粿胚：占下方 62%，上面留出印模的位置 */
.stamp__disk {
  position: absolute;
  left: 19%;
  bottom: 0;
  width: 62%;
  aspect-ratio: 1 / 1;
  filter: drop-shadow(0 22px 30px rgba(120, 30, 50, .26));
  transition: transform var(--t-3) var(--ease);
}
.stamp__kueh { display: block; width: 100%; height: 100%; }

/* 纹样：与粿胚同框，靠内在 scale .9 缩进一圈 */
.stamp__seal {
  position: absolute;
  left: 19%;
  bottom: 0;
  width: 62%;
  aspect-ratio: 1 / 1;
  opacity: 0;
  clip-path: none;
}
.stamp__svg { width: 100%; height: 100%; display: block; }

/* 印模：桃形木印，比粿略小，悬在粿的上方 */
.stamp__mold {
  position: absolute;
  left: 22%;
  top: 3%;
  width: 56%;
  aspect-ratio: 1 / 1;
  cursor: grab;
  filter: drop-shadow(0 16px 20px rgba(90, 60, 35, .32));
  z-index: 3;
}

/* 进度环：套在印模外圈，跟着一起走 */
.stamp__ring {
  position: absolute;
  top: 3%;
  left: 22%;
  width: calc(56% + 18px);
  aspect-ratio: 1 / 1;
  transform: translate(-9px, -9px);
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--t-1);
  pointer-events: none;
}