/* ==========================================================================
   scenes2.css · 07 / 08 / 09 / 11 / 12 / 13 / 14 / 15 / 16
   与 scenes.css 共用同一套 tokens 与曲线
   ========================================================================== */

/* ===================== 07 调色 ===================== */
.scene--tint { gap: var(--s2); }

.tint {
  position: relative;
  width: min(76vw, 286px);
  aspect-ratio: 1 / .86;
  margin: var(--s4) auto var(--s3);
}

/* 陶盆 */
.tint__bowl {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 74%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #FFFDF7, #F1E8D8 56%, #DECEB2 100%);
  box-shadow:
    0 24px 38px -20px rgba(110, 81, 54, .5),
    inset 0 -12px 22px rgba(150, 120, 85, .16);
  display: grid;
  place-items: center;
}

/* 面团：白 → 桃红，靠 --mix（0–3）叠一层渐变 */
.tint__dough {
  position: relative;
  width: 72%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #FFFDF7, #EFE0C6 60%, #DCC9A9 100%);
  box-shadow:
    inset -10px -12px 24px rgba(140, 110, 80, .22),
    inset 8px 10px 18px rgba(255, 255, 255, .6);
  overflow: hidden;
}
.tint__dough::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #E9768B, #D94A64 55%, #A32E46 100%);
  opacity: calc(var(--mix, 0) / 3 * .95);
  box-shadow:
    inset -10px -12px 24px rgba(120, 30, 50, .3),
    inset 8px 10px 18px rgba(255, 255, 255, .35);
  transition: opacity 240ms var(--ease-soft);
}

/* 红曲米碟 */
.tint__dish {
  position: absolute;
  right: 0;
  bottom: 8%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 34%, #FFFDF7, #EFE6D6 72%);
  box-shadow: 0 16px 24px -14px rgba(110, 81, 54, .55);
  cursor: grab;
  touch-action: none;
  transition: transform var(--t-1) var(--ease-back);
}
.tint__dish:active { cursor: grabbing; transform: scale(.94); }

.tint__heap {
  width: 54%;
  height: 38%;
  border-radius: 50%;
  transform: translateY(-22%);
  background: radial-gradient(circle at 40% 30%, #E4647B, #B62F49 72%);
  box-shadow: inset -4px -4px 8px rgba(90, 15, 35, .45);
}
.tint__label {
  position: absolute;
  bottom: -20px;
  font-size: 9.5px;
  letter-spacing: .22em;
  color: var(--wood);
}

/* 飞入的米粒 */
.tint__grain {
  position: fixed;
  z-index: 8300;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #E4647B, #A32E46);
  pointer-events: none;
  transition: transform 460ms cubic-bezier(.4, .1, .6, 1), opacity 460ms ease-in;
}

/* ===================== 08 炒馅 ===================== */
.scene--wok { gap: var(--s2); }

.wok {
  position: relative;
  width: min(72vw, 266px);
  aspect-ratio: 1;
  margin: var(--s4) auto var(--s1);
}
.wok__pan {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 22px 28px rgba(60, 50, 40, .28));
}

/* 锅里堆起来的东西：随下料数量变大 */
.wok__pile {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 47%;
  width: 42%;
  height: 12%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(.18);
  opacity: 0;
  background: radial-gradient(circle at 40% 26%, #F2D49A 0%, #D19A55 52%, #A9743A 100%);
  box-shadow:
    inset 0 -4px 8px rgba(60, 35, 10, .5),
    inset 0 3px 5px rgba(255, 240, 210, .55);
  transition:
    transform 420ms var(--ease-back),
    opacity 300ms var(--ease);
}
.wok__pile.is-on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(var(--n, .4));
}

.wok__tray {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: var(--s2);
}
.chip {
  padding: 9px 15px;
  border: 1px solid var(--paper-3);
  border-radius: var(--r-full);
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 12.5px;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition:
    transform var(--t-1) var(--ease-back),
    opacity var(--t-2) var(--ease-soft),
    border-color var(--t-2) var(--ease-soft);
  -webkit-tap-highlight-color: transparent;
}
.chip:active { transform: scale(.94); }
.chip.is-done {
  opacity: .22;
  pointer-events: none;
  text-decoration: line-through;
  text-decoration-color: var(--peach);
}
.chip.is-wrong {
  border-color: var(--peach);
  animation: shake 380ms var(--ease-soft);
}

/* ===================== 09 包馅 ===================== */
.scene--wrap { gap: var(--s2); }

.wrap {
  position: relative;
  width: min(74vw, 272px);
  aspect-ratio: 1 / .9;
  margin: var(--s5) auto var(--s3);
}

/* 粿皮 */
.wrap__skin {
  position: absolute;
  left: 0;
  bottom: 6%;
  width: 56%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 30%, #FCF5E7, #EFE0C6 58%, #DCC7A4 100%);
  box-shadow:
    inset -10px -12px 24px rgba(140, 110, 80, .2),
    0 20px 30px -18px rgba(110, 81, 54, .45);
  transition:
    left 560ms var(--ease),
    bottom 560ms var(--ease),
    width 560ms var(--ease),
    background 560ms var(--ease),
    transform 560ms var(--ease-back);
}

/* 馅 */
.wrap__fill {
  position: absolute;
  right: 2%;
  bottom: 4%;
  width: 38%;
  aspect-ratio: 1;
  border-radius: 46% 54% 52% 48% / 52% 46% 54% 48%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 30%, #C98A3E, #7E5320 78%);
  color: rgba(246, 239, 226, .9);
  font-family: var(--f-serif);
  font-size: 14px;
  letter-spacing: .1em;
  box-shadow: 0 16px 26px -16px rgba(90, 60, 30, .65);
  cursor: grab;
  touch-action: none;
  transition: transform var(--t-1) var(--ease-back), opacity 420ms var(--ease);
}
.wrap__fill:active { transform: scale(.95); }

/* 收口完成：皮包住馅，合成一团 */
.wrap.is-done .wrap__fill { opacity: 0; }
.wrap.is-done .wrap__skin {
  left: 22%;
  bottom: 22%;
  width: 56%;
  border-radius: 50%;
  transform: scale(1.03);
  background: radial-gradient(circle at 36% 28%, #FCF5E7, #EDDCC0 58%, #D6BE99 100%);
  box-shadow:
    inset -8px -10px 20px rgba(140, 110, 80, .16),
    0 22px 34px -18px rgba(110, 81, 54, .5);
}

/* ===================== 11 上笼 ===================== */
.scene--steam { gap: var(--s2); }

.steam {
  position: relative;
  width: min(74vw, 272px);
  aspect-ratio: 1;
  margin: var(--s4) auto var(--s1);
}

.steam__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.steam__kueh {
  opacity: 0;
  transition: opacity 420ms var(--ease);
}

.steam__lid {
  transform: translate(0, -58px) rotate(-7deg);
  transform-origin: 100px 96px;
  transform-box: view-box;
  transition: transform 640ms var(--ease-back);
  cursor: pointer;
  filter: drop-shadow(0 14px 16px rgba(90, 60, 35, .3));
}

.steam__puffs {
  position: absolute;
  inset: -10% 0 30%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms var(--ease);
  overflow: hidden;
}
.steam__puffs i {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  border-radius: 50%;
  background: rgba(255, 253, 247, .9);
  filter: blur(7px);
  opacity: 0;
  animation: steamRise 3.6s linear infinite;
}
.steam__puffs i:nth-child(1) { left: 34%; animation-delay: 0s; }
.steam__puffs i:nth-child(2) { left: 44%; animation-delay: .5s; }
.steam__puffs i:nth-child(3) { left: 56%; animation-delay: 1s; }
.steam__puffs i:nth-child(4) { left: 66%; animation-delay: 1.5s; }
.steam__puffs i:nth-child(5) { left: 40%; animation-delay: 2s; }
.steam__puffs i:nth-child(6) { left: 60%; animation-delay: 2.6s; }
.steam__puffs i:nth-child(7) { left: 50%; animation-delay: 3.1s; }

.steam.is-capped .steam__lid { transform: none; cursor: default; }
.steam.is-capped .steam__kueh { opacity: 1; }
.steam.is-capped .steam__puffs { opacity: 1; }

.timer {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: var(--s2);
  font-family: var(--f-serif);
  color: var(--peach);
}
.timer__num {
  font-size: 40px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .02em;
}
.timer__unit {
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--wood);
}

/* ===================== 12 出锅 ===================== */
.scene--serve { gap: var(--s2); }

.serve {
  width: min(74vw, 276px);
  margin: var(--s4) auto var(--s1);
}
.serve__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
}
.serve__layer {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(.96);
  transition:
    opacity 480ms var(--ease),
    transform 480ms var(--ease);
}
.serve__layer.is-on { opacity: 1; transform: none; }
.serve__layer svg { display: block; width: 100%; height: 100%; }

.serve__photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--r-2);
  box-shadow: var(--shadow-2);
}

.serve__dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-top: var(--s3);
}
.serve__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper-3);
  transition: background var(--t-1);
}
.serve__dots i.is-on { background: var(--peach); }

/* ===================== 13 节俗日历（开放节日色） ===================== */
.scene--calendar { gap: var(--s2); }

.scene--calendar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background:
    radial-gradient(120% 78% at 50% 16%, #FBEEDF 0%, #F2D8C0 58%, #E7C3A4 100%);
  transition: opacity 640ms var(--ease-soft);
}
.scene--calendar.is-festive::before { opacity: 1; }

/* 节日模式：强调色转深，描金上岗 */
.scene--calendar.is-festive {
  --peach: #B4263F;
  --peach-deep: #7E1526;
  --gold: #B8891A;
}

.cal {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: var(--s2);
}
.cal__cell {
  min-height: 54px;
  border: 1px solid rgba(139, 107, 74, .28);
  border-radius: 5px;
  background: rgba(255, 253, 247, .72);
  color: var(--ink);
  font-family: var(--f-serif);
  font-size: 12.5px;
  letter-spacing: .1em;
  cursor: pointer;
  transition:
    background var(--t-2) var(--ease-soft),
    color var(--t-2) var(--ease-soft),
    border-color var(--t-2) var(--ease-soft),
    transform var(--t-1) var(--ease-back);
  -webkit-tap-highlight-color: transparent;
}
.cal__cell:active { transform: scale(.96); }
.cal__cell--wide { grid-column: span 4; min-height: 44px; }
.cal__cell.is-on {
  background: var(--peach);
  border-color: var(--peach);
  color: var(--paper);
  box-shadow: 0 10px 20px -12px rgba(120, 30, 50, .6);
}

.cal__panel {
  margin-top: var(--s3);
  padding-top: var(--s2);
  border-top: 1px solid rgba(139, 107, 74, .22);
  min-height: 92px;
}
.cal__title {
  font-family: var(--f-serif);
  font-size: 16px;
  letter-spacing: .08em;
  color: var(--peach-deep);
}
.cal__text {
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.9;
  color: var(--ink-2);
}

/* ===================== 14 纹样连线 ===================== */
.scene--line { gap: var(--s2); }

.line {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s3);
}
.line__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.line__col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 72px;
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--paper-3);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 10.5px;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition:
    border-color var(--t-2) var(--ease-soft),
    color var(--t-2) var(--ease-soft),
    transform var(--t-1) var(--ease-back);
  -webkit-tap-highlight-color: transparent;
}
.node svg { width: 38px; height: 38px; display: block; }
.node--t {
  padding: 0 12px;
  font-family: var(--f-serif);
  font-size: 12.5px;
  text-align: center;
}
.node:active { transform: scale(.96); }
.node.is-active {
  border-color: var(--peach);
  color: var(--peach-deep);
  box-shadow: 0 0 0 3px rgba(217, 74, 100, .18), var(--shadow-2);
  transform: translateY(-1px);
}
.node.is-wrong { border-color: var(--peach); animation: shake 380ms var(--ease-soft); }
.node.is-linked {
  border-color: var(--gold);
  color: var(--gold);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, .3), var(--shadow-1);
}

/* ===================== 15 测验与证书 ===================== */
.scene--exam { gap: var(--s2); }

.exam { width: 100%; }
.exam__q {
  font-family: var(--f-serif);
  font-size: 17px;
  line-height: 1.8;
  letter-spacing: .03em;
  color: var(--ink);
}
.exam__opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: var(--s3);
}
.exam__opts .opt { min-height: 50px; font-size: 14px; }

.exam__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s4);
}
.exam__dots { display: flex; gap: 7px; }
.exam__dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--paper-3);
  transition: background var(--t-1) var(--ease-soft);
}
.exam__dots i.is-on { background: var(--peach); }
.exam__score {
  font-family: var(--f-serif);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--wood);
}

/* 证书 */
.cert { display: none; width: 100%; }
.cert.is-on { display: block; }
.cert__frame {
  position: relative;
  padding: var(--s6) var(--s4) var(--s5);
  text-align: center;
  background: linear-gradient(168deg, var(--white), var(--paper-2));
  box-shadow: var(--shadow-2);
}
.cert__frame::after {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(139, 107, 74, .35);
  pointer-events: none;
}
.cert__k {
  font-family: var(--f-serif);
  font-size: 11px;
  letter-spacing: .5em;
  color: var(--wood);
}
.cert__name {
  margin-top: var(--s4);
  font-family: var(--f-serif);
  font-size: 26px;
  letter-spacing: .16em;
  color: var(--ink);
  border-bottom: 1px solid rgba(139, 107, 74, .3);
  display: inline-block;
  padding-bottom: 4px;
  min-width: 55%;
}
.cert__meta {
  margin-top: var(--s3);
  font-family: var(--f-serif);
  font-size: 13px;
  letter-spacing: .18em;
  color: var(--peach-deep);
}
.cert__line {
  margin-top: var(--s4);
  font-size: 10.5px;
  letter-spacing: .22em;
  color: var(--ink-2);
  opacity: .8;
}
.cert__seal {
  position: absolute;
  right: 26px;
  bottom: 24px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--peach-deep);
  color: var(--paper);
  font-family: var(--f-serif);
  font-size: 16px;
  border-radius: 3px;
  transform: rotate(-5deg);
  opacity: .9;
}
.cert .hint { margin-top: var(--s3); justify-content: center; }
.cert .btn {
  display: flex;
  width: max-content;
  margin: var(--s3) auto 0;
}

/* ===================== 16 尾声 ===================== */
.scene--end { gap: var(--s3); }

.end__sign {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: var(--s2);
}
.end__seal {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: var(--peach-deep);
  color: var(--paper);
  font-family: var(--f-serif);
  font-size: 15px;
  border-radius: 3px;
  transform: rotate(-4deg);
}
.end__name {
  font-family: var(--f-serif);
  font-size: 11.5px;
  letter-spacing: .18em;
  color: var(--ink-2);
}
.scene--end .btn { margin-top: var(--s3); }
