/* ============================================================
   羲皇寻踪 · 淮阳太昊陵
   四幕互动文化体验
   ============================================================ */



*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
img, svg { display: block; }
a { color: inherit; text-decoration: none; }
input { font: inherit; color: inherit; }

::selection { background: var(--gold-2); color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

/* ---------------- 舞台 ---------------- */

.app {
  position: relative;
  width: 100vw;
  height: 100svh;
  overflow: hidden;
  background: var(--paper);
  isolation: isolate;
}

.grain {
  position: absolute;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: .16;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.45'/%3E%3C/svg%3E");
}

.vignette {
  position: absolute;
  inset: 0;
  z-index: 79;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(78, 64, 54, .18) 100%),
    linear-gradient(180deg, rgba(78, 64, 54, .08), transparent 18%, transparent 82%, rgba(78, 64, 54, .16));
}

.act {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.025);
  transition:
    opacity .65s var(--ease),
    visibility .65s linear,
    transform 1s var(--ease-cinema);
  pointer-events: none;
}
.act.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  z-index: 2;
}

.veil {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(90% 80% at 50% 50%, rgba(247, 242, 232, .94), rgba(199, 180, 156, .98));
  transition: opacity .5s linear;
}
.veil.is-on { opacity: 1; pointer-events: auto; }

.toast {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  z-index: 75;
  max-width: min(86vw, 520px);
  padding: 10px 18px;
  border: 1px solid rgba(199, 180, 156, .35);
  border-radius: 24px;
  background: rgba(78, 64, 54, .92);
  color: var(--paper);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: .03em;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .25s linear, transform .25s var(--ease);
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------------- HUD ---------------- */

.hud {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(14px, 2.4vh, 26px) var(--pad);
  pointer-events: none;
}
.hud > * { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.brand__seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(138, 106, 85, .5);
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px rgba(247, 242, 232, .18);
}

.brand__txt { display: flex; flex-direction: column; gap: 3px; }
.brand__txt strong {
  font-family: var(--font-serif);
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: .02em;
  color: var(--ink);
}
.brand__txt small {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
}

.chapters {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 5px 8px;
  border: 1px solid rgba(78, 64, 54, .14);
  border-radius: 24px;
  background: rgba(247, 242, 232, .82);
  box-shadow: 0 8px 20px -16px rgba(78, 64, 54, .6);
}

.chapter {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 24px;
  background: none;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
  transition: color .2s linear, background-color .2s linear;
}
.chapter i {
  font-family: var(--font-serif);
  font-style: normal;
  font-size: 14px;
  opacity: .7;
}
.chapter:hover { color: var(--ink); }
.chapter.is-active {
  background: var(--red-deep);
  color: var(--paper);
}
.chapter.is-done i { color: var(--gold-3); opacity: 1; }

.hud__right { display: flex; align-items: center; gap: 8px; flex: none; }

.tasks-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px 0 6px;
  border: 1px solid rgba(78, 64, 54, .16);
  border-radius: 24px;
  background: rgba(247, 242, 232, .88);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: .04em;
  box-shadow: 0 8px 18px -16px rgba(78, 64, 54, .6);
  transition: transform .18s var(--ease), background-color .18s linear;
}
.tasks-btn:hover { background: var(--paper); transform: translateY(-2px); }
.tasks-btn__seal {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: var(--red);
  color: var(--paper);
  font-family: var(--font-serif);
  font-size: 12px;
}
.tasks-btn b {
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--red-deep);
}
.tasks-btn em { font-style: normal; color: var(--muted); }
.tasks-btn__total { color: var(--muted); }
.tasks-btn__word { font-style: normal; }
.tasks-btn > span { flex: none; white-space: nowrap; }

.sound-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(78, 64, 54, .16);
  border-radius: 50%;
  background: rgba(247, 242, 232, .88);
  color: var(--ink);
  transition: background-color .18s linear, opacity .18s linear;
}
.sound-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sound-btn.is-off { opacity: .45; }
.sound-btn.is-off svg { stroke-dasharray: 2 3; }

/* ---------------- 通用按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .12em;
  line-height: 1;
  text-decoration: none;
  transition: transform .18s var(--ease), background-color .18s linear, color .18s linear, border-color .18s linear;
}
.btn__arrow {
  font-family: var(--font-sans);
  font-size: 16px;
  transition: transform .18s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary {
  background: var(--red-deep);
  color: var(--paper);
  box-shadow: 0 14px 28px -18px rgba(138, 106, 85, .9);
}
.btn--primary:hover { background: var(--ink-2); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled {
  background: #C9BCA9;
  color: #F8F4EB;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(247, 242, 232, .58);
  color: var(--ink);
}
.btn--ghost:hover { background: var(--paper); border-color: var(--ink); transform: translateY(-2px); }

/* ---------------- 第一幕 · 地图 ---------------- */

.act--1 { background: var(--paper); }

.map-camera {
  position: absolute;
  inset: -3%;
  transform-origin: 50% 62%;
  animation: map-drift 24s var(--ease-cinema) forwards;
  will-change: transform;
}
@keyframes map-drift {
  0% { transform: scale(.94); }
  100% { transform: scale(1.075); }
}
.map-camera.is-diving {
  animation: none;
  transform: scale(1.45) translateY(-3%);
  transition: transform 1.7s var(--ease-cinema);
}

.aerial { width: 100%; height: 100%; }

.map-label {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: .12em;
  fill: var(--ink-2);
  paint-order: stroke;
  stroke: rgba(247, 242, 232, .95);
  stroke-width: 4px;
  opacity: 0;
  animation: label-in .9s var(--ease) .35s forwards;
}
.map-label--big { font-size: 25px; letter-spacing: .18em; fill: var(--red-deep); }
.map-label--gold { fill: var(--muted); }
.map-label--water { fill: #7D8A82; font-style: italic; }

@keyframes label-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.act--4 .map-label { animation: none; opacity: 1; }

.intro {
  position: absolute;
  left: var(--pad);
  bottom: 7vh;
  z-index: 20;
  width: min(45vw, 540px);
  padding: 26px 34px 28px 30px;
  border-radius: 0 var(--r-l) var(--r-l) 0;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}
.intro::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--red);
}

.intro__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: .28em;
  color: var(--muted);
}
.intro__eyebrow span { width: 26px; height: 1px; background: var(--red); }

.intro__title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(64px, 8.4vw, 118px);
  line-height: 1.18;
  font-weight: var(--font-weight-title);
  letter-spacing: -.04em;
  color: var(--ink);
}

.intro__sub {
  margin: 18px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(18px, 1.8vw, 22px);
  letter-spacing: .2em;
  color: var(--red-deep);
}

.intro__copy {
  margin: 14px 0 0;
  max-width: 30em;
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--ink-2);
}

.intro .btn { margin-top: 22px; }

.intro__hint {
  margin: 12px 0 0;
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}

.zoom-hint {
  position: absolute;
  right: var(--pad);
  bottom: 5.4vh;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--muted);
}
.zoom-hint i {
  position: relative;
  width: 42px;
  height: 1px;
  background: rgba(78, 64, 54, .3);
}
.zoom-hint i::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: zoom-dot 2.8s ease-in-out infinite;
}
@keyframes zoom-dot {
  0%, 100% { transform: translateX(0); opacity: .4; }
  50% { transform: translateX(-30px); opacity: 1; }
}

/* ---------------- 街景通用 ---------------- */

.act--2, .act--3 { background: #E5DCCE; }

.street-viewport {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
  touch-action: pan-y;
}
.street-viewport:active { cursor: grabbing; }

.street-world {
  position: absolute;
  left: 0;
  top: 0;
  width: 3000px;
  height: 100%;
  will-change: transform;
}

.street-sky {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, #F6F1E8 0%, #EFE7DA 38%, var(--surface-3) 66%, var(--surface-3) 100%);
}
.street-sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(28% 11% at 18% 20%, rgba(247, 242, 232, .55), transparent 70%),
    radial-gradient(22% 9% at 44% 10%, rgba(247, 242, 232, .45), transparent 70%),
    radial-gradient(30% 12% at 86% 30%, rgba(247, 242, 232, .4), transparent 70%),
    radial-gradient(50% 40% at 72% 20%, rgba(247, 242, 232, .7), transparent 70%),
    linear-gradient(180deg, transparent 60%, rgba(138, 106, 85, .18));
}
.street-sky--inner {
  background:
    linear-gradient(180deg, #EDE3D5 0%, var(--surface-3) 36%, var(--surface-3) 66%, var(--brown) 100%);
}

.sun {
  display: none;
  position: absolute;
  left: 880px;
  top: 12%;
  width: clamp(90px, 12vw, 170px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, var(--paper) 0 26%, #D9C4A8 58%, #C0A68D 100%);
  box-shadow: 0 0 90px 38px rgba(199, 180, 156, .5);
  opacity: 1;
}
.sun--low { top: 22%; left: 1040px; opacity: .75; }

.far-roofs {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 14%;
  height: 230px;
  pointer-events: none;
  opacity: .2;
  filter: blur(2.5px);
}
.far-hall {
  position: absolute;
  bottom: 0;
  width: 190px;
  height: 100px;
  opacity: .8;
}
.far-hall__roof {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 42px;
  background: linear-gradient(180deg, #8E7C6F, var(--muted));
  clip-path: polygon(2% 100%, 14% 12%, 86% 12%, 98% 100%);
  opacity: .85;
}
.far-hall__body {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 62px;
  background: var(--muted);
  opacity: .7;
}
.far-hall__body::after {
  content: "";
  position: absolute;
  left: 26%;
  right: 26%;
  bottom: 0;
  height: 30px;
  background: var(--ink-2);
  opacity: .5;
}
.far-roofs--temple { top: 16%; opacity: .32; }

.temple-wall {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 30%;
  height: 200px;
  background:
    linear-gradient(180deg, rgba(138, 106, 85, 0) 0%, rgba(138, 106, 85, .55) 30%, rgba(138, 106, 85, .72) 100%);
  border-top: 6px solid rgba(199, 180, 156, .55);
  opacity: .6;
}

.shop-row {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.shop {
  position: absolute;
  bottom: 26%;
  width: 300px;
  height: 290px;
  transform-origin: bottom center;
  pointer-events: none;
  filter: drop-shadow(0 18px 18px rgba(138, 106, 85, .18));
}
.shop__roof {
  position: absolute;
  left: -7%;
  top: 0;
  width: 114%;
  height: 66px;
  background: #7D6B5F;
  clip-path: polygon(2% 100%, 14% 18%, 50% 0, 86% 18%, 98% 100%);
  z-index: 3;
}
.shop__roof::before {
  content: "";
  position: absolute;
  inset: 10px 8% 0;
  background: repeating-linear-gradient(90deg, rgba(247, 242, 232, .09) 0 2px, transparent 2px 16px);
  clip-path: polygon(0 100%, 8% 10%, 92% 10%, 100% 100%);
}
.shop__roof::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 6px;
  height: 7px;
  background: var(--ink-2);
  border-radius: 10px;
}
.shop__roof {
  box-shadow: 0 10px 0 -4px var(--muted), 0 15px 20px -10px rgba(138, 106, 85, .5);
}
.shop__body {
  position: absolute;
  left: 4%;
  top: 52px;
  width: 92%;
  height: 238px;
  background: linear-gradient(180deg, var(--paper), var(--surface-3));
  border: 1px solid rgba(138, 106, 85, .25);
  z-index: 2;
}
.shop__body::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0 6%, rgba(138, 106, 85, .5) 6% 8%, transparent 8% 92%, rgba(138, 106, 85, .5) 92% 94%, transparent 94%),
    repeating-linear-gradient(0deg, transparent 0 34px, rgba(138, 106, 85, .08) 34px 35px);
}
.shop__opening {
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 64%;
  background:
    radial-gradient(80% 70% at 52% 14%, rgba(199, 180, 156, .5), transparent 60%),
    linear-gradient(180deg, var(--muted) 0%, var(--ink) 52%, var(--ink) 100%);
  border-top: 4px solid var(--gold);
  box-shadow: inset 0 10px 18px rgba(199, 180, 156, .12);
  overflow: hidden;
}
.shop__opening::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 18%;
  height: 1px;
  background: rgba(199, 180, 156, .4);
  box-shadow: 0 34px 0 rgba(199, 180, 156, .35), 0 68px 0 rgba(199, 180, 156, .3);
}
.shop__opening::after {
  content: "";
  position: absolute;
  inset: 8% 8% auto;
  height: 30%;
  background:
    radial-gradient(circle at 10% 30%, rgba(199, 180, 156, .55) 0 2px, transparent 3px),
    radial-gradient(circle at 30% 60%, rgba(138, 106, 85, .6) 0 2px, transparent 3px),
    radial-gradient(circle at 55% 25%, rgba(142, 140, 121, .55) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 55%, rgba(199, 180, 156, .45) 0 2px, transparent 3px),
    radial-gradient(circle at 92% 20%, rgba(138, 106, 85, .5) 0 2px, transparent 3px);
}
.shop__shelf {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 30%;
  height: 5px;
  background: var(--muted);
  box-shadow: 0 5px 0 rgba(142, 140, 121, .25);
}
.shop__shelf::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 5px;
  height: 18px;
  background:
    radial-gradient(ellipse at 10% 100%, var(--brown) 0 6px, transparent 7px),
    radial-gradient(ellipse at 30% 100%, var(--muted) 0 5px, transparent 6px),
    radial-gradient(ellipse at 52% 100%, var(--sage) 0 6px, transparent 7px),
    radial-gradient(ellipse at 76% 100%, var(--gold-3) 0 5px, transparent 6px);
}
.shop__keeper {
  position: absolute;
  left: 12%;
  bottom: 24px;
  width: 48px;
  height: 106px;
  color: var(--ink);
  opacity: .88;
}
.shop__keeper svg { width: 100%; height: 100%; }
.shop__counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 24px;
  background: linear-gradient(180deg, var(--brown), var(--muted) 55%, var(--ink-2));
  border-top: 2px solid rgba(199, 180, 156, .35);
  box-shadow: 0 -5px 12px rgba(142, 140, 121, .25);
}
.shop__sign {
  position: absolute;
  top: 64px;
  right: 8px;
  z-index: 5;
  width: 32px;
  min-height: 128px;
  padding: 8px 3px;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid rgba(199, 180, 156, .45);
  color: var(--gold-3);
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: .16em;
  line-height: 1.25;
  text-align: center;
  writing-mode: vertical-rl;
  box-shadow: 0 3px 8px rgba(78, 64, 54, .25);
}
.shop__awning {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 112px;
  height: 46px;
  z-index: 4;
  background: repeating-linear-gradient(90deg, var(--accent, var(--muted)) 0 22px, var(--surface-3) 22px 44px);
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
  box-shadow: 0 6px 10px rgba(138, 106, 85, .22);
}
.shop__awning::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 8px;
  background: radial-gradient(circle at 8px 0, transparent 7px, var(--accent, var(--muted)) 8px) 0 0 / 22px 8px repeat-x;
  opacity: .9;
}
.shop__goods {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 12px;
  height: 46px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}
.shop__goods i {
  display: block;
  width: 22px;
  height: 26px;
  border-radius: 40% 40% 30% 30%;
  background: var(--goods, var(--ink-2));
  box-shadow: inset 0 -6px 0 rgba(142, 140, 121, .16);
}
.shop__goods i:nth-child(2n) { width: 26px; height: 22px; border-radius: 50%; background: var(--goods2, var(--brown)); }
.shop__goods i:nth-child(3n) { width: 18px; height: 30px; background: var(--goods3, var(--brown)); }
.shop__lantern {
  position: absolute;
  top: 86px;
  width: 20px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 30%, #C9A78F, var(--muted) 70%);
  box-shadow: 0 0 12px rgba(138, 106, 85, .35);
  z-index: 6;
}
.shop__lantern::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 1px;
  height: 9px;
  background: var(--muted);
}
.shop--lantern-a .shop__lantern { left: 12%; }
.shop--lantern-b .shop__lantern { right: 16%; top: 100px; }

.banners {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.banner {
  position: absolute;
  bottom: 44%;
  width: 44px;
  padding: 12px 4px;
  background: linear-gradient(180deg, #7A5B48, var(--ink-2));
  border: 1px solid rgba(199, 180, 156, .4);
  color: var(--gold-3);
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: .16em;
  text-align: center;
  writing-mode: vertical-rl;
  box-shadow: 0 10px 16px -10px rgba(138, 106, 85, .5);
}
.banner::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 100%;
  width: 2px;
  height: 70px;
  background: var(--muted);
  transform: translateX(-50%);
}
.banner::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 0;
  height: 0;
  border-left: 22px solid transparent;
  border-right: 22px solid transparent;
  border-top: 12px solid var(--ink-2);
  transform: translateX(-50%);
}

.lantern-line {
  position: absolute;
  top: 26%;
  left: 0;
  width: 100%;
  height: 1px;
  background: rgba(138, 106, 85, .28);
  pointer-events: none;
}
.lantern {
  position: absolute;
  top: -4px;
  width: 24px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 28%, #D0B09A, var(--brown) 62%, var(--muted) 100%);
  box-shadow: 0 0 18px rgba(138, 106, 85, .3);
  transform-origin: 50% -40px;
  animation: lantern-sway 5s ease-in-out infinite;
}
.lantern::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -18px;
  width: 1px;
  height: 18px;
  background: var(--muted);
}
.lantern::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 2px;
  height: 9px;
  background: var(--gold);
  transform: translateX(-50%);
}
@keyframes lantern-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(3deg); }
}

.street-ground {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  z-index: 4;
  background:
    linear-gradient(180deg, rgba(138, 106, 85, .1), rgba(138, 106, 85, .35)),
    repeating-linear-gradient(90deg, rgba(78, 64, 54, .16) 0 2px, transparent 2px 120px),
    repeating-linear-gradient(0deg, rgba(78, 64, 54, .14) 0 2px, transparent 2px 42px),
    linear-gradient(180deg, var(--brown), var(--brown));
  box-shadow: inset 0 14px 24px -18px rgba(138, 106, 85, .6);
}
.street-ground::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(138, 106, 85, .22), transparent);
  pointer-events: none;
}
.street-ground--inner {
  background:
    linear-gradient(180deg, rgba(138, 106, 85, .12), rgba(138, 106, 85, .4)),
    repeating-linear-gradient(90deg, rgba(78, 64, 54, .16) 0 2px, transparent 2px 120px),
    repeating-linear-gradient(0deg, rgba(78, 64, 54, .14) 0 2px, transparent 2px 42px),
    linear-gradient(180deg, var(--gold-3), var(--brown));
}

.stall-row {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.stall {
  position: absolute;
  bottom: 4%;
  width: 280px;
  height: 210px;
  z-index: 12;
  pointer-events: auto;
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform .3s var(--ease);
}
.stall:hover { transform: translateY(-6px); }
.stall__ring {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -8px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(138, 106, 85, .55);
  background: rgba(138, 106, 85, .08);
  box-shadow: 0 0 0 0 rgba(138, 106, 85, .28);
  animation: stall-pulse 2.6s ease-out infinite;
}
@keyframes stall-pulse {
  0% { box-shadow: 0 0 0 0 rgba(138, 106, 85, .28); }
  70% { box-shadow: 0 0 0 14px rgba(138, 106, 85, 0); }
  100% { box-shadow: 0 0 0 0 rgba(138, 106, 85, 0); }
}
.stall__awning {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 50px;
  background: repeating-linear-gradient(90deg, var(--stall-a, var(--muted)) 0 24px, var(--surface-3) 24px 48px);
  clip-path: polygon(0 0, 100% 0, 96% 100%, 4% 100%);
  box-shadow: 0 8px 14px rgba(138, 106, 85, .22);
  z-index: 3;
}
.stall__awning::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -8px;
  height: 9px;
  background: radial-gradient(circle at 10px 0, transparent 9px, var(--stall-a, var(--muted)) 10px) 0 0 / 26px 9px repeat-x;
}
.stall__back {
  position: absolute;
  left: 7%;
  right: 7%;
  top: 46px;
  bottom: 22px;
  z-index: 1;
  background:
    radial-gradient(80% 70% at 50% 20%, rgba(199, 180, 156, .35), transparent 65%),
    linear-gradient(180deg, var(--muted), var(--ink));
  border: 1px solid rgba(138, 106, 85, .45);
}
.stall__back::before {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  top: 22%;
  height: 1px;
  background: rgba(199, 180, 156, .35);
  box-shadow: 0 40px 0 rgba(199, 180, 156, .28);
}
.stall__cloth {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 18px;
  height: 40px;
  z-index: 4;
  background: repeating-linear-gradient(90deg, var(--stall-a, var(--muted)) 0 20px, var(--surface-3) 20px 40px);
  clip-path: polygon(0 0, 100% 0, 97% 100%, 3% 100%);
  box-shadow: 0 -4px 10px rgba(138, 106, 85, .2);
}
.stall__lamp {
  position: absolute;
  right: 12%;
  top: 46px;
  z-index: 5;
  width: 16px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #EFE4D4, var(--brown) 60%, var(--muted));
  box-shadow: 0 0 22px 8px rgba(199, 180, 156, .35);
}
.stall__table {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 20px;
  height: 86px;
  background: linear-gradient(180deg, #D5C2A9, var(--brown));
  border: 1px solid rgba(138, 106, 85, .3);
  box-shadow: 0 10px 16px -12px rgba(138, 106, 85, .5);
  z-index: 2;
}
.stall__table::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 8px;
  background: rgba(247, 242, 232, .5);
}
.stall__vendor {
  position: absolute;
  right: 12%;
  bottom: 84px;
  width: 50px;
  height: 110px;
  color: var(--ink-2);
  z-index: 1;
}
.stall__vendor svg { width: 100%; height: 100%; }
.stall__sign {
  position: absolute;
  left: 8%;
  top: 40px;
  z-index: 4;
  padding: 6px 10px;
  background: rgba(247, 242, 232, .94);
  border: 1px solid rgba(138, 106, 85, .4);
  color: var(--red-deep);
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: .12em;
  box-shadow: 0 5px 10px -6px rgba(138, 106, 85, .5);
}
.stall__tag {
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  z-index: 6;
  padding: 6px 12px;
  border-radius: 24px;
  background: var(--red-deep);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .1em;
  white-space: nowrap;
  box-shadow: 0 8px 14px -10px rgba(138, 106, 85, .6);
}
.stall.is-done { opacity: .7; }
.stall.is-done .stall__tag::after { content: " · 已完成"; color: var(--gold-2); }
.stall__goods {
  position: absolute;
  left: 12%;
  bottom: 88px;
  width: 58%;
  height: 48px;
  z-index: 5;
  display: flex;
  align-items: flex-end;
  gap: 7px;
}
.stall__goods i {
  display: block;
  width: 26px;
  height: 30px;
  border-radius: 45% 45% 35% 35%;
  background: var(--g1, var(--ink));
  box-shadow: inset 0 -6px 0 rgba(142, 140, 121, .15);
}
.stall__goods i:nth-child(2n) { background: var(--g2, var(--brown)); width: 30px; height: 26px; border-radius: 50%; }
.stall__goods i:nth-child(3n) { background: var(--g3, var(--brown)); width: 22px; height: 34px; }

.crowd {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
}
.person {
  position: absolute;
  bottom: var(--b, 4%);
  width: var(--w, 44px);
  height: var(--h, 99px);
  color: var(--c, var(--ink-2));
  opacity: var(--o, .95);
  transform-origin: bottom center;
  animation: person-bob 3.4s ease-in-out infinite;
  filter: drop-shadow(0 4px 4px rgba(138, 106, 85, .18));
}
.person svg { width: 100%; height: 100%; }
.person--front {
  z-index: 15;
  filter: blur(.7px) drop-shadow(0 6px 10px rgba(78, 64, 54, .3));
  opacity: .82 !important;
}
.person--hat::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -6%;
  width: 58%;
  height: 12%;
  background: #8B8C78;
  border-radius: 50% 50% 10% 10%;
  transform: translateX(-50%);
}
@keyframes person-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.steam {
  position: absolute;
  inset: 0;
  z-index: 13;
  pointer-events: none;
  overflow: hidden;
}
.steam i {
  position: absolute;
  bottom: var(--b, 12%);
  left: var(--x, 50%);
  width: var(--s, 40px);
  height: var(--s, 40px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(247, 242, 232, .45), transparent 68%);
  filter: blur(6px);
  opacity: 0;
  animation: steam-rise var(--t, 6s) ease-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes steam-rise {
  0% { opacity: 0; transform: translate(0, 0) scale(.6); }
  20% { opacity: .55; }
  100% { opacity: 0; transform: translate(var(--dx, 10px), -120px) scale(1.5); }
}

.street-vignette {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(138, 106, 85, .1), transparent 16%, transparent 78%, rgba(138, 106, 85, .2)),
    linear-gradient(90deg, rgba(138, 106, 85, .12), transparent 10%, transparent 90%, rgba(138, 106, 85, .12));
}

/* ---------------- 街景标题与 HUD ---------------- */

.act-title {
  position: absolute;
  left: var(--pad);
  top: 15vh;
  z-index: 18;
  max-width: min(37vw, 440px);
  padding: 18px 24px 20px 20px;
  border-left: 3px solid var(--red);
  border-radius: 0 var(--r-l) var(--r-l) 0;
  background: linear-gradient(100deg, rgba(247, 242, 232, .94), rgba(247, 242, 232, .75) 62%, rgba(247, 242, 232, 0));
  transition: opacity .5s linear, transform .5s var(--ease);
  pointer-events: none;
}
.act-title.is-hidden { opacity: 0; transform: translateY(-8px); }

.act-title__no {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--red-deep);
}
.act-title h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(32px, 3.8vw, 52px);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: -.02em;
}
.act-title__desc {
  margin: 10px 0 0;
  max-width: 28em;
  font-size: 12px;
  line-height: 1.75;
  color: var(--ink-2);
}

.act-title--inner { top: 13vh; }
.act-title--inner h2 { color: var(--ink); }

.street-hud {
  position: absolute;
  left: var(--pad);
  bottom: 4.5vh;
  z-index: 22;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(246, 241, 232, .88);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(6px);
}
.street-progress {
  width: 96px;
  height: 3px;
  border-radius: var(--r-pill);
  background: rgba(78, 64, 54, .16);
  overflow: hidden;
}
.street-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .1s linear;
}
.street-hud__label {
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--ink-2);
}

.walk-btn {
  position: absolute;
  right: var(--pad);
  bottom: 5vh;
  z-index: 24;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 0 22px;
  border: 1px solid rgba(138, 106, 85, .4);
  border-radius: 10px;
  background: var(--red-deep);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .14em;
  box-shadow: 0 16px 30px -18px rgba(138, 106, 85, .9);
  transition: transform .18s var(--ease), background-color .18s linear;
}
.walk-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s var(--ease);
}
.walk-btn:hover { background: var(--ink-2); transform: translateY(-2px); }
.walk-btn:hover svg { transform: translateX(4px); }
.walk-btn.is-hidden { opacity: 0; pointer-events: none; }

.drag-hint {
  position: absolute;
  left: 50%;
  bottom: 1.8vh;
  z-index: 22;
  margin: 0;
  transform: translateX(-50%);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(246, 241, 232, .78);
  font-size: 12px;
  letter-spacing: .12em;
  color: var(--muted);
  white-space: nowrap;
  box-shadow: 0 10px 24px -18px rgba(78, 64, 54, .35);
}

/* ---------------- 午朝门终点 ---------------- */

.gate-end {
  position: absolute;
  left: 2140px;
  bottom: 17%;
  width: 820px;
  z-index: 9;
}
.gate-end__glow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 0;
  height: 80%;
  background: radial-gradient(60% 60% at 50% 70%, rgba(247, 242, 232, .78), transparent 70%);
  filter: blur(20px);
  pointer-events: none;
}
.gate-svg {
  position: relative;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 40px rgba(138, 106, 85, .35));
}
.gate-end__label {
  position: absolute;
  left: 50%;
  top: -44px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  background: rgba(247, 242, 232, .94);
  border: 1px solid rgba(138, 106, 85, .3);
  white-space: nowrap;
  box-shadow: 0 8px 18px -12px rgba(138, 106, 85, .6);
}
.gate-end__no {
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: .16em;
  color: var(--red-deep);
}
.gate-end__sub { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.gate-end__hit {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 16%;
  bottom: 2%;
  z-index: 3;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.gate-end__hit::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color .2s linear, background-color .2s linear;
}
.gate-end__hit:hover::after {
  border-color: rgba(199, 180, 156, .5);
  background: rgba(230, 220, 207, .06);
}

/* ---------------- 第四幕 ---------------- */

.act--4 {
  background:
    radial-gradient(70% 70% at 70% 40%, rgba(247, 242, 232, .6), transparent 70%),
    linear-gradient(135deg, #E9E1D5, var(--surface-3));
}
.temple-layout {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(300px, 38%) minmax(0, 62%);
  gap: clamp(20px, 3.2vw, 54px);
  padding: clamp(86px, 12vh, 120px) var(--pad) 5vh;
  align-items: center;
}

.temple-info { min-width: 0; }
.temple-info__no {
  margin: 0 0 10px;
  font-size: var(--fs-2xs);
  letter-spacing: .26em;
  color: var(--red-deep);
}
.temple-info h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(36px, 4.2vw, 60px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -.02em;
}
.temple-info__desc {
  margin: 14px 0 0;
  max-width: 28em;
  font-size: var(--fs-sm);
  line-height: 1.85;
  color: var(--ink-2);
}
.temple-stats {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: .08em;
  color: var(--muted);
}
.temple-stats b { font-family: var(--font-serif); font-size: var(--fs-lg); color: var(--red-deep); }

.temple-spots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 16px;
  max-width: 430px;
}
.spot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  background: rgba(247, 242, 232, .45);
  font-size: var(--fs-2xs);
  color: var(--ink-2);
  text-align: left;
  transition: background-color .18s linear, border-color .18s linear;
}
.spot-item:hover { background: var(--paper); border-color: var(--line-strong); }
.spot-item i {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-style: normal;
  font-family: var(--font-serif);
  font-size: var(--fs-2xs);
  color: var(--muted);
}
.spot-item.is-done { border-color: rgba(138, 106, 85, .35); background: rgba(138, 106, 85, .07); color: var(--ink); }
.spot-item.is-done i { background: var(--red-deep); border-color: var(--red-deep); color: var(--paper); }

.btn--finish { margin-top: 20px; }
.temple-info__hint {
  margin: 10px 0 0;
  font-size: var(--fs-2xs);
  letter-spacing: .06em;
  color: var(--muted);
}

.temple-map {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.temple-map__frame {
  position: relative;
  width: 100%;
  max-width: 760px;
  aspect-ratio: 1000 / 780;
  border: 1px solid rgba(78, 64, 54, .24);
  border-radius: var(--r-m);
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    var(--shadow-soft);
}
.temple-map__frame::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(199, 180, 156, .35);
  pointer-events: none;
}
.temple-svg { width: 100%; height: 100%; }
.temple-map__north {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 12px;
  color: var(--red-deep);
  background: rgba(247, 242, 232, .8);
}
.temple-map__caption {
  margin: 0;
  font-size: var(--fs-2xs);
  letter-spacing: .12em;
  color: var(--muted);
}

.hotspots {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: auto;
  border: 0;
  background: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}
.hotspot__seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(138, 106, 85, .55);
  border-radius: 50%;
  background: rgba(247, 242, 232, .94);
  color: var(--red-deep);
  font-family: var(--font-serif);
  font-size: 16px;
  box-shadow: 0 6px 14px -8px rgba(138, 106, 85, .55);
  transition: transform .2s var(--ease), background-color .2s linear, color .2s linear;
}
.hotspot__seal::after {
  content: "";
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(138, 106, 85, .4);
  border-radius: 50%;
  animation: hotspot-pulse 2.4s ease-out infinite;
}
@keyframes hotspot-pulse {
  0% { transform: scale(.9); opacity: .8; }
  70% { transform: scale(1.22); opacity: 0; }
  100% { opacity: 0; }
}
.hotspot:hover .hotspot__seal { transform: scale(1.08); background: var(--red-deep); color: var(--paper); }
.hotspot__label {
  padding: 3px 7px;
  background: rgba(247, 242, 232, .92);
  border: 1px solid rgba(78, 64, 54, .16);
  font-size: var(--fs-2xs);
  letter-spacing: .04em;
  color: var(--ink);
  white-space: nowrap;
}
.hotspot.is-done .hotspot__seal { background: var(--red-deep); border-color: var(--red-deep); color: var(--paper); }
.hotspot.is-done .hotspot__seal::after { display: none; }
.hotspot.is-done .hotspot__label { color: var(--muted); }

/* ---------------- 证书 ---------------- */

.act--final {
  background:
    radial-gradient(80% 80% at 50% 42%, rgba(138, 106, 85, .2), transparent 70%),
    linear-gradient(160deg, var(--ink), var(--ink) 60%, var(--ink));
  display: grid;
  place-items: center;
  padding: 4vh var(--pad);
  overflow: auto;
}
.act--final.is-active { display: grid; }

.cert-wrap {
  width: min(92vw, 820px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.cert {
  position: relative;
  width: 100%;
  padding: clamp(30px, 5vw, 54px) clamp(26px, 5vw, 64px) clamp(26px, 4vw, 44px);
  background:
    linear-gradient(180deg, rgba(247, 242, 232, .5), transparent 40%),
    radial-gradient(80% 80% at 50% 0%, #F7F2E8, var(--paper) 70%, #E2D6C5);
  color: var(--ink);
  box-shadow:
    var(--shadow-lift);
  transform: rotate(-.45deg);
  text-align: center;
}
.cert::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(138, 106, 85, .55);
  pointer-events: none;
}
.cert::after {
  content: "";
  position: absolute;
  inset: 19px;
  border: 1px solid rgba(199, 180, 156, .5);
  pointer-events: none;
}
.cert.is-stamped { animation: cert-shake .45s var(--ease); }
@keyframes cert-shake {
  0% { transform: rotate(-.45deg) translate(0, 0); }
  30% { transform: rotate(-.2deg) translate(2px, -2px); }
  60% { transform: rotate(-.6deg) translate(-2px, 1px); }
  100% { transform: rotate(-.45deg) translate(0, 0); }
}

.cert__corner {
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(138, 106, 85, .65);
  border-style: solid;
  pointer-events: none;
}
.cert__corner--tl { left: 26px; top: 26px; border-width: 1px 0 0 1px; }
.cert__corner--tr { right: 26px; top: 26px; border-width: 1px 1px 0 0; }
.cert__corner--bl { left: 26px; bottom: 26px; border-width: 0 0 1px 1px; }
.cert__corner--br { right: 26px; bottom: 26px; border-width: 0 1px 1px 0; }

.cert__kicker {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: .3em;
  color: var(--red-deep);
}
.cert__title {
  margin: 10px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.4vw, 64px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .16em;
  color: var(--ink);
}
.cert__en {
  margin: 8px 0 0;
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: .34em;
  color: var(--muted);
}
.cert__lead {
  margin: 26px 0 4px;
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: .18em;
  color: var(--ink-2);
}
.cert__name {
  position: relative;
  display: inline-flex;
  justify-content: center;
  min-width: 60%;
  margin: 4px auto 0;
}
.cert__name input {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.4vw, 38px);
  font-weight: 700;
  letter-spacing: .12em;
  color: var(--ink);
  outline: none;
  padding: 0 10px 8px;
}
.cert__name-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(138, 106, 85, .55) 20%, rgba(138, 106, 85, .55) 80%, transparent);
}
.cert__body {
  margin: 16px auto 0;
  max-width: 35em;
  font-size: 12px;
  line-height: 2;
  color: var(--ink-2);
}
.cert__chapters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}
.cert__chapters span {
  padding: 5px 10px;
  border: 1px solid rgba(138, 106, 85, .35);
  border-radius: 10px;
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: .1em;
  color: var(--red-deep);
}
.cert__spots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.cert__spots span {
  font-size: 10px;
  letter-spacing: .06em;
  color: var(--muted);
}
.cert__spots span::before { content: "印 "; color: var(--red); }

.cert__foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid rgba(138, 106, 85, .2);
  text-align: left;
}
.cert__date { margin: 0; font-family: var(--font-serif); font-size: 14px; letter-spacing: .08em; }
.cert__place { margin: 4px 0 0; font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.cert__sign { text-align: right; }
.cert__sign span {
  display: block;
  font-family: var(--font-serif);
  font-size: 20px;
  letter-spacing: .18em;
  color: var(--red-deep);
}
.cert__sign small { display: block; margin-top: 4px; font-size: 8.5px; letter-spacing: .18em; color: var(--muted); }

.cert__bigseal {
  position: absolute;
  right: clamp(130px, 16vw, 170px);
  bottom: clamp(32px, 4vw, 44px);
  width: clamp(86px, 9vw, 100px);
  height: clamp(86px, 9vw, 100px);
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  border: 4px double var(--red);
  border-radius: 50%;
  color: var(--red);
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.05;
  text-align: center;
  opacity: 0;
  transform: rotate(-22deg) scale(2.4);
  mix-blend-mode: multiply;
  pointer-events: none;
}
.cert__bigseal span { width: 50%; font-size: clamp(18px, 2.1vw, 24px); }
.cert__bigseal small {
  width: 100%;
  margin-top: 5px;
  font-size: 9px;
  letter-spacing: .3em;
}
.cert__bigseal.is-stamped { animation: big-seal .7s cubic-bezier(.2, 1.5, .4, 1) .25s forwards; }
@keyframes big-seal {
  0% { opacity: 0; transform: rotate(-30deg) scale(2.6); }
  55% { opacity: .95; transform: rotate(-18deg) scale(.92); }
  75% { transform: rotate(-20deg) scale(1.05); }
  100% { opacity: .9; transform: rotate(-19deg) scale(1); }
}

.cert-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.cert-btn { min-height: 44px; padding: 0 20px; font-size: 12px; }
.cert-tip { margin: 0; font-size: 10px; letter-spacing: .16em; color: rgba(247, 242, 232, .55); }

/* ---------------- 交互面板 ---------------- */

.panel {
  position: absolute;
  inset: 0;
  z-index: 60;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s linear, visibility .25s linear;
}
.panel.is-open { visibility: visible; opacity: 1; }
.panel__scrim {
  position: absolute;
  inset: 0;
  background: rgba(62, 51, 43, .62);
  backdrop-filter: blur(3px);
}
.panel__card {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(440px, 92vw);
  padding: 30px 30px 26px;
  background:
    linear-gradient(180deg, rgba(247, 242, 232, .6), transparent 30%),
    var(--paper);
  border-left: 1px solid rgba(138, 106, 85, .25);
  box-shadow: var(--shadow-lift);
  transform: translateX(100%);
  transition: transform .4s var(--ease-cinema);
  overflow-y: auto;
}
.panel.is-open .panel__card { transform: none; }

.panel__close {
  position: absolute;
  right: 16px;
  top: 16px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
}
.panel__close svg, .drawer__close svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}
.panel__close:hover { background: var(--paper-2); }

.panel__kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--red-deep);
}
.panel__title {
  margin: 10px 0 0;
  padding-right: 36px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .02em;
}
.panel__art {
  position: relative;
  height: 170px;
  margin-top: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 90% at 50% 30%, rgba(247, 242, 232, .8), transparent 70%),
    repeating-linear-gradient(45deg, rgba(138, 106, 85, .04) 0 1px, transparent 1px 9px),
    var(--paper-2);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.panel__art svg { width: 86%; height: 86%; }
.panel__body {
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--ink-2);
}
.panel__stage { margin-top: 16px; }
.panel__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 20px;
}
.panel__actions .btn { min-height: 42px; padding: 0 16px; font-size: 12px; }
.panel__actions .btn--done { background: var(--jade); color: var(--paper); border-color: var(--jade); }

/* 小交互通用 */

.mini-note {
  padding: 10px 12px;
  border-left: 2px solid var(--gold);
  background: rgba(199, 180, 156, .08);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.mini-row { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-choice {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  background: rgba(247, 242, 232, .5);
  font-size: 12px;
  color: var(--ink-2);
}
.mini-choice:hover { background: var(--paper); border-color: var(--ink); }
.mini-choice.is-on { background: var(--red-deep); border-color: var(--red-deep); color: var(--paper); }

.mini-dots { display: flex; gap: 10px; justify-content: center; }
.mini-dot {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(78, 64, 54, .25);
  border-radius: 50%;
  background: var(--dot);
  box-shadow: inset 0 0 0 5px rgba(247, 242, 232, .55);
  transition: transform .18s var(--ease);
}
.mini-dot:hover { transform: scale(1.08); }
.mini-dot.is-on { outline: 2px solid var(--red); outline-offset: 3px; }

.mini-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  font-size: 12px;
  color: var(--ink-2);
}
.mini-count b { font-family: var(--font-serif); font-size: 20px; color: var(--red-deep); }

.mini-tap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--red-deep);
  background: var(--red-deep);
  color: var(--paper);
  font-size: 12px;
  letter-spacing: .08em;
}
.mini-tap:hover { background: var(--ink-2); }

/* ---------------- 打卡册 ---------------- */

.drawer {
  position: absolute;
  inset: 0;
  z-index: 62;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s linear, visibility .25s linear;
}
.drawer.is-open { visibility: visible; opacity: 1; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(78, 64, 54, .45); }
.drawer__card {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(430px, 94vw);
  padding: 28px 26px 22px;
  background: var(--paper);
  border-left: 1px solid rgba(138, 106, 85, .25);
  border-radius: var(--r-l) 0 0 var(--r-l);
  box-shadow: var(--shadow-lift);
  transform: translateX(100%);
  transition: transform .4s var(--ease-cinema);
  display: flex;
  flex-direction: column;
}
.drawer.is-open .drawer__card { transform: none; }
.drawer__head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.drawer__kicker { margin: 0; font-family: Georgia, serif; font-size: 9px; letter-spacing: .28em; color: var(--muted); }
.drawer__head h3 { margin: 6px 0 0; font-family: var(--font-serif); font-size: 26px; letter-spacing: .06em; }
.drawer__close {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
}
.drawer__list { flex: 1; overflow-y: auto; margin-top: 18px; padding-right: 4px; }

.task-group { margin-bottom: 16px; }
.task-group__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-serif);
  font-size: 14px;
  letter-spacing: .08em;
}
.task-group__head span { font-family: var(--font-sans); font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(78, 64, 54, .1);
  font-size: 12px;
  color: var(--ink-2);
}
.task-row i {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-style: normal;
  font-size: 9px;
  color: var(--muted);
}
.task-row.is-done { color: var(--ink); }
.task-row.is-done i { background: var(--red-deep); border-color: var(--red-deep); color: var(--paper); }

.drawer__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.drawer__foot p { margin: 0; font-size: 10px; line-height: 1.6; color: var(--muted); }
.drawer__reset {
  border: 0;
  background: none;
  padding: 6px 0;
  font-size: 10px;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.drawer__reset:hover { color: var(--red-deep); }

/* ---------------- 推门 ---------------- */

.gateway {
  position: absolute;
  inset: 0;
  z-index: 65;
  visibility: hidden;
  opacity: 0;
  transition: opacity .35s linear, visibility .35s linear;
  overflow: hidden;
}
.gateway.is-open { visibility: visible; opacity: 1; }
.gateway__night {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(138, 106, 85, .5), transparent 70%),
    linear-gradient(180deg, var(--ink), var(--ink) 60%, var(--ink));
}
.gateway__doors {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(76vw, 780px);
  height: min(76vh, 720px);
  transform: translate(-50%, -50%);
  perspective: 1400px;
  display: flex;
  border: 12px solid var(--ink-2);
  box-shadow: 0 40px 100px rgba(46, 40, 34, .55), inset 0 0 0 2px rgba(199, 180, 156, .3);
}
.door {
  position: relative;
  width: 50%;
  height: 100%;
  background:
    linear-gradient(180deg, rgba(252, 249, 242, .16), transparent 22%, rgba(46, 40, 34, .28)),
    linear-gradient(90deg, var(--muted), var(--muted) 50%, var(--muted));
  border: 2px solid var(--ink-2);
  box-shadow: inset 0 0 90px rgba(46, 40, 34, .42);
  transform-style: preserve-3d;
  transition: transform 1.5s cubic-bezier(.6, 0, .2, 1);
  overflow: hidden;
}
.door--l { transform-origin: left center; }
.door--r { transform-origin: right center; }
.door__studs {
  position: absolute;
  inset: 6%;
  background-image: radial-gradient(circle, var(--gold-3) 0 6px, transparent 7px);
  background-size: 54px 54px;
  opacity: .85;
}
.door__ring {
  position: absolute;
  top: 50%;
  width: 54px;
  height: 54px;
  border: 6px solid var(--brown);
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(142, 140, 121, .25);
}
.door--l .door__ring { right: 8%; }
.door--r .door__ring { left: 8%; }
.gateway__light {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, var(--paper) 0 10%, rgba(230, 220, 207, .6) 40%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 1.2s linear, width 1.2s var(--ease), height 1.2s var(--ease);
  pointer-events: none;
}
.gateway.is-open-doors .door--l { transform: rotateY(-105deg); }
.gateway.is-open-doors .door--r { transform: rotateY(105deg); }
.gateway.is-open-doors .gateway__light { opacity: 1; width: 140%; height: 140%; }

.gateway__ui {
  position: absolute;
  left: 50%;
  bottom: 6vh;
  transform: translateX(-50%);
  z-index: 3;
  text-align: center;
  color: var(--paper);
  transition: opacity .3s linear;
}
.gateway.is-open-doors .gateway__ui { opacity: 0; pointer-events: none; }
.gateway__ui p {
  margin: 0;
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid rgba(252, 249, 242, .18);
  border-radius: var(--r-pill);
  background: rgba(46, 40, 34, .46);
  font-size: 12px;
  letter-spacing: .16em;
  color: rgba(252, 249, 242, .9);
}
.gateway__ui h3 {
  margin: 8px 0 0;
  font-family: var(--font-serif);
  font-size: clamp(34px, 4.5vw, 56px);
  font-weight: 700;
  letter-spacing: .1em;
}
.gateway__hint { margin: 8px 0 16px !important; font-size: 12px !important; letter-spacing: .08em !important; color: rgba(252, 249, 242, .82) !important; }
.gateway__back {
  display: block;
  margin: 12px auto 0;
  border: 0;
  background: none;
  color: rgba(252, 249, 242, .8);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1100px) {
  .intro { width: min(54vw, 520px); }
  .chapters { gap: 0; }
  .chapter { padding: 0 9px; }
  .chapter span { display: none; }
  .chapter i { font-size: 14px; }
  .temple-layout { grid-template-columns: minmax(260px, 40%) minmax(0, 60%); gap: 20px; }
  .temple-info h2 { font-size: clamp(32px, 4.4vw, 48px); }
}

@media (max-width: 860px) {
  :root { --pad: 18px; }
  .hud { padding: 12px 16px; align-items: center; }
  .brand__seal { width: 34px; height: 34px; font-size: 18px; }
  .brand__txt strong { font-size: 14px; }
  .brand__txt small { display: none; }
  .chapters { display: none; }
  .tasks-btn { min-height: 34px; padding-right: 10px; }
  .tasks-btn__seal { width: 24px; height: 24px; font-size: 12px; }
  .sound-btn { width: 34px; height: 34px; }

  .intro {
    width: min(84vw, 480px);
    bottom: 5vh;
    padding: 20px 24px 22px 20px;
  }
  .intro__title { font-size: clamp(56px, 16vw, 76px); }
  .intro__sub { font-size: 16px; }
  .intro__copy { font-size: 12px; line-height: 1.8; }
  .intro__hint { display: none; }
  .zoom-hint { display: none; }

  .act-title {
    top: 10vh;
    left: 14px;
    right: 14px;
    max-width: none;
    padding: 14px 18px 16px 16px;
    background: linear-gradient(100deg, rgba(247, 242, 232, .95), rgba(247, 242, 232, .82) 75%, rgba(247, 242, 232, 0));
  }
  .act-title h2 { font-size: clamp(28px, 8vw, 38px); }
  .act-title__desc { font-size: 11.5px; }
  .act-title__no { font-size: 10px; }

  .street-hud { left: 14px; bottom: 3.4vh; }
  .street-progress { width: 76px; }
  .street-hud__label { font-size: 9px; }
  .walk-btn {
    right: 14px;
    bottom: 4.5vh;
    min-height: 46px;
    padding: 0 16px;
    font-size: 12px;
  }
  .walk-btn svg { width: 17px; height: 17px; }
  .drag-hint { display: none; }

  .gate-end { width: 560px; left: 2260px; }
  .gate-end__label { top: -34px; padding: 6px 12px; }
  .gate-end__no { font-size: 16px; }

  .temple-layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 76px 16px 20px;
    overflow-y: auto;
    align-items: start;
  }
  .temple-info__desc { font-size: 12px; }
  .temple-spots { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
  .temple-map { width: 100%; }
  .temple-map__frame { max-width: none; }
  .temple-info h2 { font-size: clamp(30px, 8vw, 40px); }
  .btn--finish { width: 100%; }

  .cert-wrap { width: 96vw; }
  .cert { padding: 28px 22px 30px; }
  .cert__title { font-size: clamp(32px, 9vw, 44px); }
  .cert__body { font-size: 11.5px; line-height: 1.9; }
  .cert__foot { flex-direction: column; align-items: flex-start; gap: 14px; }
  .cert__sign { text-align: left; }
  .cert__bigseal { right: 18px; bottom: 46px; width: 84px; height: 84px; }
  .act--final { align-items: start; padding-top: 5vh; }
}

@media (max-width: 520px) {
  .hud__right { gap: 5px; }
  .tasks-btn span:last-child { font-size: 12px; }
  .tasks-btn em { display: none; }
  .intro { width: 88vw; }
  .intro__title { font-size: 56px; }
  .intro__copy { display: none; }
  .intro .btn { margin-top: 16px; }

  .act-title { top: 9vh; }
  .act-title h2 { font-size: 27px; }
  .act-title__desc { display: none; }

  .stall { width: 260px; height: 200px; }
  .shop { width: 270px; height: 290px; }
  .shop__sign { font-size: 16px; min-height: 125px; }
  .gate-end { width: 480px; left: 2300px; }

  .temple-info h2 { font-size: 30px; }
  .temple-stats { gap: 12px; }
  .temple-spots { gap: 5px; }
  .spot-item { font-size: var(--fs-2xs); padding: 4px 6px; }

  .cert__chapters span { font-size: 10px; padding: 4px 7px; }
  .cert__spots span { font-size: 9px; }
  .cert__bigseal { width: 72px; height: 72px; }
  .cert-actions { width: 100%; }
  .cert-btn { flex: 1; }

  .panel__card { width: 100%; padding: 24px 20px; }
  .drawer__card { width: 100%; padding: 22px 18px; }
  .gateway__doors { width: 92vw; height: 62vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .map-camera { animation: none; transform: scale(1.02); }
}

/* ---------------- 打印 ---------------- */

@media print {
  @page { size: A4 landscape; margin: 0; }
  body { overflow: visible; background: var(--white); }
  .app > * { display: none !important; }
  .app > .act--final { display: grid !important; position: static; background: var(--white); padding: 0; }
  .app > .act--final .cert-wrap { width: 100%; }
  .app > .act--final .cert { box-shadow: none; transform: none; width: 100%; }
  .app > .act--final .cert-actions,
  .app > .act--final .cert-tip { display: none !important; }
  .grain, .vignette, .hud, .toast, .veil { display: none !important; }
}


/* ---------------- 收尾补丁 ---------------- */

.app[data-act="final"] .hud {
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s linear;
}

.panel__art.is-lit {
  box-shadow: inset 0 0 60px rgba(199, 180, 156, .25);
}

.mini-stamp {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 70;
  width: 130px;
  height: 130px;
  display: grid;
  place-items: center;
  border: 4px double var(--red);
  border-radius: 50%;
  background: rgba(247, 242, 232, .7);
  color: var(--red);
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .08em;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-16deg) scale(2.2);
  opacity: 0;
  pointer-events: none;
  animation: mini-stamp .65s cubic-bezier(.2, 1.4, .4, 1) forwards;
  mix-blend-mode: multiply;
}
@keyframes mini-stamp {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(-24deg) scale(2.2); }
  60% { opacity: .95; transform: translate(-50%, -50%) rotate(-14deg) scale(.94); }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(-16deg) scale(1.04); }
}

.gateway.is-open ~ .toast { z-index: 90; }

@media (max-width: 860px) {
  .walk-btn--inner { bottom: 4.5vh; }
}


/* 中景小摊，给街面加一层纵深 */
.mid-stall {
  position: absolute;
  bottom: 16%;
  width: 170px;
  height: 128px;
  z-index: 8;
  pointer-events: none;
  filter: drop-shadow(0 12px 12px rgba(138, 106, 85, .18));
}
.mid-stall__awning {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 32px;
  background: repeating-linear-gradient(90deg, var(--stall-a, var(--muted)) 0 16px, var(--surface-3) 16px 32px);
  clip-path: polygon(0 0, 100% 0, 95% 100%, 5% 100%);
  z-index: 3;
}
.mid-stall__table {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 16px;
  height: 60px;
  background: linear-gradient(180deg, var(--gold-3), #8A7663);
  border: 1px solid rgba(138, 106, 85, .3);
  z-index: 2;
}
.mid-stall__goods {
  position: absolute;
  left: 16%;
  bottom: 72px;
  display: flex;
  gap: 5px;
  z-index: 4;
}
.mid-stall__goods i {
  width: 14px;
  height: 16px;
  border-radius: 45% 45% 30% 30%;
  background: var(--g, var(--brown));
}
.mid-stall__goods i:nth-child(2n) { background: var(--muted); width: 16px; height: 13px; border-radius: 50%; }
.mid-stall__goods i:nth-child(3n) { background: var(--sage); }
.mid-stall__vendor {
  position: absolute;
  right: 10%;
  bottom: 64px;
  width: 32px;
  height: 70px;
  color: var(--ink-2);
  z-index: 1;
}
.mid-stall__vendor svg { width: 100%; height: 100%; }
.mid-stall__sign {
  position: absolute;
  left: 6%;
  top: 26px;
  z-index: 5;
  padding: 3px 6px;
  background: rgba(247, 242, 232, .92);
  border: 1px solid rgba(138, 106, 85, .35);
  color: var(--red-deep);
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: .04em;
  white-space: nowrap;
}


.gate-prompt {
  position: absolute;
  left: 50%;
  bottom: 5vh;
  z-index: 26;
  transform: translate(-50%, 10px);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 20px 0 8px;
  border: 1px solid rgba(199, 180, 156, .55);
  background: rgba(78, 64, 54, .92);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: .1em;
  box-shadow: 0 18px 32px -20px rgba(142, 140, 121, .7);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s linear, transform .35s var(--ease);
}
.gate-prompt.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.gate-prompt__seal {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(199, 180, 156, .4);
  border-radius: 10px;
  background: var(--red-deep);
  font-family: var(--font-serif);
  font-size: 16px;
  color: var(--gold-2);
}
.gate-prompt i { font-style: normal; color: var(--gold-2); }
.gate-prompt:hover { background: var(--ink); }

.gate-end__label { display: none; }

@media (max-width: 860px) {
  .gate-prompt { bottom: 9vh; min-height: 46px; font-size: 12px; padding-right: 16px; }
}


.hotspot__label {
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .2s linear, transform .2s var(--ease);
}
.hotspot:hover .hotspot__label,
.hotspot:focus-visible .hotspot__label { opacity: 1; transform: none; }


@media (max-width: 860px) {
  .tasks-btn__word { display: none; }
  .tasks-btn { padding: 0 12px 0 6px; white-space: nowrap; min-width: 120px; justify-content: center; }
  .hud { gap: 8px; }
  .intro {
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    padding: 22px 22px calc(24px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(247, 242, 232, 0) 0%, var(--paper) 10%, var(--paper) 100%);
  }
  .intro::before { top: 18%; bottom: 20px; }
  .intro__eyebrow { margin-bottom: 10px; }
  .intro__title { font-size: clamp(52px, 15vw, 72px); }
  .intro__sub { margin-top: 8px; font-size: 16px; }
  .intro .btn { margin-top: 16px; }
  .intro__copy { display: block; margin-top: 10px; font-size: 12px; line-height: 1.7; }
  .intro__hint { display: block; margin-top: 8px; }
}


.act--1::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  box-shadow: inset 0 0 140px rgba(138, 106, 85, .18);
}


/* ---------------- 浅色证书间（参考图整体偏浅） ---------------- */

.act--final {
  background:
    radial-gradient(80% 70% at 50% 34%, rgba(177, 156, 132, .26), transparent 72%),
    linear-gradient(160deg, #efe9df 0%, #e3d8c9 58%, #f3ede4 100%);
}

.cert {
  border-radius: var(--r-s);
  box-shadow: var(--shadow-lift);
  border: 1px solid rgba(108, 91, 79, .18);
}

.cert__bigseal {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 0;
}
.cert__bigseal.is-stamped { opacity: .82; }

.cert__kicker { color: var(--accent); }
.cert__title { color: var(--ink); }
.cert__en { color: var(--faint); }
.cert__lead { color: var(--ink-2); }
.cert__body { color: var(--ink-2); }
.cert__date { color: var(--ink); }
.cert__place { color: var(--muted); }
.cert__sign span { color: var(--accent); }
.cert__sign small { color: var(--muted); }
.cert-tip { color: var(--muted); }

.cert-actions .btn--ghost {
  background: rgba(247, 242, 233, .78);
  border-color: var(--line-strong);
  color: var(--ink);
}
.cert-actions .btn--ghost:hover { background: var(--surface); }

@media (max-width: 860px) {
  .intro { border-radius: 0; }
  .panel__card, .drawer__card { border-radius: 0; }
}


.act--3 .gate-prompt.is-on ~ .drag-hint--inner {
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
}
.drag-hint { transition: opacity .3s linear, transform .3s var(--ease); }


.btn--primary:disabled {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: rgba(62, 51, 43, .55);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 1;
}


.gateway__ui .btn--primary {
  background: var(--paper);
  border-color: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.gateway__ui .btn--primary:hover { background: var(--white); border-color: var(--white); }

/* ============================================================
   第二幕 · 入市：3D 长街 + 店招 + 互动弹层
   ============================================================ */
.act--2 { background: var(--surface-3); overflow: hidden; }
.market3d { position: absolute; inset: 0; overflow: hidden; }
.market3d__viewport { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.market3d__viewport.is-dragging, .market3d__viewport:active { cursor: grabbing; }
#glscene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.market3d__wash {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 44%, transparent 42%, rgba(62,43,30,.20) 100%),
    linear-gradient(180deg, rgba(246,241,232,.14), transparent 18%, transparent 76%, rgba(62,43,30,.26));
}
.market-title {
  position: absolute; left: var(--pad); top: 11vh; z-index: 6;
  max-width: min(34vw, 420px); pointer-events: none;
  padding: 16px 22px 18px 20px; border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(246,241,232,.94), rgba(246,241,232,.58) 70%, transparent);
  border-radius: 0 var(--r-m) var(--r-m) 0;
}
.market-title__no { margin: 0 0 8px; font: 600 11px/1 var(--font-sans); letter-spacing: .24em; color: var(--coral-deep); }
.market-title h2 { margin: 0; font-family: var(--font-serif); font-size: clamp(28px, 3.2vw, 46px); line-height: 1.16; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.market-title__desc { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); }

.market-tabs { position: absolute; left: var(--pad); right: var(--pad); bottom: 8vh; z-index: 10; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; }
.market-tab {
  pointer-events: auto; display: flex; align-items: center; gap: 12px;
  width: min(30vw, 300px); padding: 12px 16px;
  background: rgba(246,241,232,.94); border: 1px solid var(--line-strong);
  border-radius: var(--r-m); box-shadow: var(--shadow-card);
  cursor: pointer; color: var(--ink); text-align: left; font-family: var(--font-sans);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.market-tab:hover { transform: translateY(-3px); background: var(--white); box-shadow: var(--shadow-lift); }
.market-tab--right { margin-left: auto; flex-direction: row-reverse; text-align: right; }
.market-tab__seal { flex: none; width: 42px; height: 42px; border-radius: var(--r-m); display: grid; place-items: center; background: var(--accent-deep); color: var(--primary-ink); font-family: var(--font-serif); font-size: 20px; }
.market-tab--right .market-tab__seal { background: var(--muted); color: var(--primary-ink); }
.market-tab__txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.market-tab__txt b { font-family: var(--font-serif); font-size: 18px; letter-spacing: .04em; }
.market-tab__txt i { font-style: normal; font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .06em; }
.market-tab__arrow { flex: none; color: var(--accent); font-size: 18px; }
.market-tab--right .market-tab__arrow { color: var(--brown); }

.market-forward {
  pointer-events: auto; position: absolute; left: 50%; bottom: 8vh; transform: translateX(-50%); z-index: 11;
  display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px 12px 12px;
  background: var(--accent-deep); color: var(--paper); border: none; border-radius: var(--r-pill);
  box-shadow: 0 18px 36px -18px rgba(62,43,30,.8); cursor: pointer; font-family: var(--font-sans);
  transition: transform .3s var(--ease), background .3s var(--ease);
}
.market-forward:hover { transform: translateX(-50%) translateY(-3px); background: var(--ink-2); }
.market-forward__seal { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(246,241,232,.18); font-family: var(--font-serif); font-size: 17px; }
.market-forward__txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.market-forward__txt b { font-size: 14px; letter-spacing: .06em; }
.market-forward__txt i { font-style: normal; font-size: 10px; opacity: .72; letter-spacing: .08em; }
.market-forward svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.market-hint { position: absolute; left: 50%; bottom: 3.4vh; transform: translateX(-50%); z-index: 8; margin: 0; font-size: 11px; letter-spacing: .12em; color: rgba(62,43,30,.72); pointer-events: none; white-space: nowrap; }

/* ---------------- 店门弹层 ---------------- */
.shop-detail {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.shop-detail.is-open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.shop-detail__scrim { position: absolute; inset: 0; background: rgba(38,28,20,.52); backdrop-filter: blur(4px); }
.shop-detail__card {
  position: relative; z-index: 1; width: min(920px, 94vw); max-height: 92vh; overflow: auto;
  padding: 26px 30px 28px; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--r-l); box-shadow: var(--shadow-lift);
  transform: translateY(14px) scale(.985); transition: transform .35s var(--ease-out);
}
.shop-detail.is-open .shop-detail__card { transform: none; }
.shop-detail__close {
  position: absolute; right: 14px; top: 12px; width: 34px; height: 34px;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper);
  color: var(--ink-2); font-size: 20px; line-height: 1; cursor: pointer;
}
.shop-detail__kicker { margin: 0 0 8px; font-size: 11px; letter-spacing: .22em; color: var(--coral-deep); }
.shop-detail__card h2 { margin: 0; font-family: var(--font-serif); font-size: clamp(24px, 2.8vw, 36px); font-weight: 700; color: var(--ink); }
.shop-detail__desc { margin: 10px 0 0; max-width: 58em; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
.shop-detail__bar { display: flex; justify-content: space-between; align-items: center; margin: 16px 0 10px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 12px; letter-spacing: .08em; color: var(--muted); }
.shop-detail__bar b { font-family: var(--font-num); font-size: 14px; color: var(--ink); }
.shop-detail__stage {
  position: relative; min-height: 320px; display: grid; place-items: center; padding: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden;
}
.shop-detail__stage svg { width: 100%; height: auto; max-height: 54vh; display: block; }
.shop-detail__actions { display: flex; justify-content: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; position: sticky; bottom: -1px; z-index: 3; padding: 10px 0 2px; background: linear-gradient(180deg, rgba(251,243,228,0), var(--paper) 42%); }

/* ---------------- 布老虎拼装 ---------------- */
.plush-wrap { width: 100%; }
.tiger-piece { cursor: grab; }
.tiger-piece:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }
.tiger-piece.is-drag { cursor: grabbing; }
.tiger-piece.is-placed { cursor: default; }
.fluff { opacity: 0; transition: opacity .3s var(--ease), transform .3s var(--ease); transform-box: fill-box; transform-origin: center; }
.fluff.is-on { opacity: 1; animation: fluff-in .45s var(--ease-out); }
@keyframes fluff-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
#plushTiger { transform-box: fill-box; transform-origin: center; transition: transform .35s var(--ease-out); }
#plushTiger.is-plump-1 { transform: scale(1.03); }
#plushTiger.is-plump-2 { transform: scale(1.06); }
#plushTiger.is-plump-3 { transform: scale(1.09); }
.plush-tip { margin: 10px 0 0; text-align: center; font-size: 11.5px; letter-spacing: .06em; color: var(--muted); }
.shop-done { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px; }
.shop-done__name { margin: 6px 0 0; font-family: var(--font-serif); font-size: 20px; color: var(--ink); }
.shop-done__meta { margin: 0; font-size: 11.5px; letter-spacing: .08em; color: var(--muted); }
.plush-done-svg { width: min(260px, 60%); }

/* ---------------- 压缩馍 ---------------- */
.bun-wrap { width: 100%; }
#bunSvg { cursor: crosshair; }
#bunPlate.is-jiggle { animation: bun-jiggle .42s var(--ease); transform-box: fill-box; transform-origin: center; }
@keyframes bun-jiggle { 0%,100% { transform: translateY(0) scale(1); } 30% { transform: translateY(3px) scale(1.02); } 65% { transform: translateY(-1px) scale(.995); } }
.bun-crumb { transform-box: fill-box; transform-origin: center; animation: bun-crumb .7s var(--ease-out) forwards; }
@keyframes bun-crumb { to { transform: translate(var(--dx, 0), var(--dy, 0)) scale(.3); opacity: 0; } }
.bun-charm { transition: opacity .4s var(--ease); }

/* ---------------- 背包 ---------------- */
.bag {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility 0s linear .35s;
}
.bag.is-open { opacity: 1; visibility: visible; transition: opacity .35s var(--ease); }
.bag__scrim { position: absolute; inset: 0; background: rgba(38,28,20,.52); backdrop-filter: blur(4px); }
.bag__card {
  position: relative; z-index: 1; width: min(460px, 92vw); max-height: 86vh; overflow: auto;
  padding: 24px 24px 22px; background: var(--paper); border: 1px solid var(--line-strong);
  border-radius: var(--r-l); box-shadow: var(--shadow-lift);
}
.bag__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.bag__head p { margin: 0 0 4px; font-size: 10.5px; letter-spacing: .2em; color: var(--coral-deep); }
.bag__head h2 { margin: 0; font-family: var(--font-serif); font-size: 24px; color: var(--ink); }
.bag__close { width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); color: var(--ink-2); font-size: 18px; cursor: pointer; }
.bag__list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.bag__empty { text-align: center; padding: 26px 10px; color: var(--muted); }
.bag__empty span { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px dashed var(--line-strong); border-radius: 50%; font-family: var(--font-serif); font-size: 18px; color: var(--accent); margin-bottom: 8px; }
.bag__empty p { margin: 0; font-size: 12px; line-height: 1.8; }
.bag-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-s); }
.bag-item__icon { flex: none; width: 54px; height: 54px; display: grid; place-items: center; background: var(--paper); border-radius: var(--r-xs); }
.bag-item__icon svg { width: 46px; height: 46px; }
.bag-item h3 { margin: 0 0 3px; font-family: var(--font-serif); font-size: 16px; color: var(--ink); }
.bag-item p { margin: 0; font-size: 11px; color: var(--muted); }
.bag-item__tag { margin-left: auto; font-size: 10px; letter-spacing: .08em; color: var(--accent); border: 1px solid var(--line-strong); border-radius: var(--r-pill); padding: 3px 8px; }
.bag__note { margin: 12px 0 0; font-size: 11px; line-height: 1.7; color: var(--muted); }
.bag-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px 0 4px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill); background: var(--paper);
  color: var(--ink); cursor: pointer; font-family: var(--font-num); font-size: 13px;
}
.bag-btn__seal { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-deep); color: var(--paper); font-family: var(--font-serif); font-size: 13px; }
.bag-btn b { font-family: var(--font-num); font-weight: 700; }

@media (max-width: 860px) {
  .market-title { top: 9vh; max-width: 74vw; padding: 12px 16px 14px; background: rgba(246,241,232,.94); }
  .market-title h2 { font-size: clamp(24px, 6.4vw, 32px); }
  .market-title__desc { font-size: 11px; }
  .market-tabs { left: 14px; right: 14px; bottom: 10vh; gap: 10px; }
  .market-tab { width: calc(50% - 5px); padding: 9px 10px; gap: 8px; }
  .market-tab__seal { width: 34px; height: 34px; font-size: 16px; border-radius: 8px; }
  .market-tab__txt b { font-size: 15px; }
  .market-tab__txt i { font-size: var(--fs-2xs); }
  .market-tab__arrow { display: none; }
  .market-forward { bottom: 4.4vh; padding: 9px 15px 9px 9px; gap: 8px; }
  .market-forward__seal { width: 28px; height: 28px; font-size: 14px; }
  .market-forward__txt b { font-size: 13px; }
  .market-forward__txt i { font-size: var(--fs-2xs); }
  .market-hint { display: none; }
  .shop-detail { padding: 10px; }
  .shop-detail__card { padding: 20px 16px 22px; max-height: 94vh; }
  .shop-detail__stage { min-height: 260px; }
  .shop-detail__stage svg { max-height: 46vh; }
  .shop-detail__bar { margin-top: 12px; }
  .bag { padding: 10px; }
}
/* 第二幕标题只作入场提示，6 秒后让开店铺招牌 */
.act--2.is-active .market-title { animation: market-title-away .9s var(--ease) 6s forwards; }
@keyframes market-title-away {
  to { opacity: 0; visibility: hidden; transform: translateX(-10px); }
}
@media (max-width: 860px) {
  .act--2.is-active .market-title { animation-delay: 4.6s; }
}
.market3d__wash {
  background:
    radial-gradient(60% 38% at 50% 22%, rgba(255, 221, 170, .14), transparent 70%),
    radial-gradient(120% 90% at 50% 44%, transparent 42%, rgba(62,43,30,.20) 100%),
    linear-gradient(180deg, rgba(246,241,232,.14), transparent 18%, transparent 76%, rgba(62,43,30,.26));
}
/* 证书手机端：印章缩小并压到右下角，避免压住落款与日期 */
@media (max-width: 520px) {
  .cert__bigseal {
    width: 74px;
    height: 74px;
    right: 12px;
    bottom: 14px;
    border-width: 3px;
  }
  .cert__bigseal span { font-size: 17px; }
  .cert__bigseal small { font-size: 8px; margin-top: 3px; }
  .cert__sign { padding-right: 78px; }
}
/* ============================================================
   第三幕 · 朝门：纵向 3D 内街 + 午朝门
   ============================================================ */
.act--3 > *:not(.inner3d) { display: none !important; }
.inner3d { position: absolute; inset: 0; overflow: hidden; background: var(--surface-3); }
.inner3d__viewport { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.inner3d__viewport.is-dragging { cursor: grabbing; }
#glsceneInner { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.inner3d__wash {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background:
    radial-gradient(60% 40% at 50% 30%, rgba(255, 214, 160, .16), transparent 70%),
    radial-gradient(120% 90% at 50% 46%, transparent 44%, rgba(52, 34, 22, .26) 100%),
    linear-gradient(180deg, rgba(246,241,232,.1), transparent 18%, transparent 72%, rgba(52,34,22,.3));
}
.inner3d-title {
  position: absolute; left: var(--pad); top: 11vh; z-index: 6; max-width: min(34vw, 420px);
  pointer-events: none; padding: 16px 22px 18px 20px; border-left: 3px solid var(--accent);
  background: linear-gradient(90deg, rgba(246,241,232,.94), rgba(246,241,232,.55) 72%, transparent);
  border-radius: 0 var(--r-m) var(--r-m) 0;
}
.inner3d-title__no { margin: 0 0 8px; font-size: 11px; letter-spacing: .24em; color: var(--coral-deep); }
.inner3d-title h2 { margin: 0; font-family: var(--font-serif); font-size: clamp(28px, 3.2vw, 46px); line-height: 1.16; color: var(--ink); }
.inner3d-title__desc { margin: 10px 0 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.act--3.is-active .inner3d-title { animation: inner-title-away .9s var(--ease) 6s forwards; }
@keyframes inner-title-away { to { opacity: 0; visibility: hidden; transform: translateX(-10px); } }

.inner3d-tabs { position: absolute; left: var(--pad); right: var(--pad); bottom: 8vh; z-index: 10; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; pointer-events: none; }
.inner3d-tab {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; width: min(28vw, 280px);
  padding: 12px 16px; background: rgba(246,241,232,.94); border: 1px solid var(--line-strong);
  border-radius: var(--r-m); box-shadow: var(--shadow-card); cursor: pointer; color: var(--ink);
  text-align: left; font-family: var(--font-sans);
}
.inner3d-tab:hover { background: var(--white); transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.inner3d-tab--right { margin-left: auto; flex-direction: row-reverse; text-align: right; }
.inner3d-tab__seal { flex: none; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--sage); color: var(--paper); font-family: var(--font-serif); font-size: 20px; }
.inner3d-tab--right .inner3d-tab__seal { background: #B88549; }
.inner3d-tab b { display: block; font-family: var(--font-serif); font-size: 18px; letter-spacing: .04em; }
.inner3d-tab i { display: block; margin-top: 3px; font-style: normal; font-size: 11px; color: var(--muted); }

.inner3d-actions { position: absolute; left: 50%; bottom: 8vh; transform: translateX(-50%); z-index: 11; display: flex; gap: 10px; align-items: center; pointer-events: none; }
.inner3d-actions button { pointer-events: auto; border: none; cursor: pointer; font-family: var(--font-sans); border-radius: var(--r-pill); }
.inner3d-walk { padding: 11px 18px; background: rgba(246,241,232,.94); color: var(--ink); border: 1px solid var(--line-strong) !important; font-size: 13px; }
.inner3d-walk:hover { background: var(--white); }
.inner3d-gate { padding: 12px 20px; background: #6c3a2e; color: var(--paper); font-size: 13px; letter-spacing: .04em; box-shadow: 0 16px 34px -18px rgba(50,25,18,.8); }
.inner3d-gate:hover { background: #4e2a20; }
.inner3d-hint { position: absolute; left: 50%; bottom: 3vh; transform: translateX(-50%); z-index: 8; margin: 0; font-size: 11px; letter-spacing: .1em; color: rgba(62,43,30,.7); pointer-events: none; white-space: nowrap; }

@media (max-width: 860px) {
  .inner3d-title { top: 9vh; max-width: 74vw; padding: 12px 16px 14px; background: rgba(246,241,232,.94); }
  .inner3d-title h2 { font-size: clamp(24px, 6.2vw, 32px); }
  .inner3d-tabs { left: 12px; right: 12px; bottom: 12vh; gap: 8px; }
  .inner3d-tab { width: calc(50% - 4px); padding: 9px 10px; gap: 8px; }
  .inner3d-tab__seal { width: 34px; height: 34px; font-size: 16px; border-radius: 8px; }
  .inner3d-tab b { font-size: 15px; }
  .inner3d-tab i { font-size: 10px; }
  .inner3d-actions { bottom: 4.6vh; gap: 8px; width: calc(100% - 24px); justify-content: center; }
  .inner3d-walk { padding: 9px 12px; font-size: 12px; }
  .inner3d-gate { padding: 10px 13px; font-size: 12px; }
  .inner3d-hint { display: none; }
}
.inner3d-tab.is-done { opacity: .72; }
.inner3d-tab.is-done::after {
  content: "✓";
  margin-left: auto;
  color: #5e6a58;
  font-weight: 700;
}
.inner3d-tab--right.is-done::after { margin-left: 0; margin-right: auto; }
/* 第二幕：前进按钮改为路中央 3D 木牌，DOM 按钮隐藏 */
.market-forward { display: none !important; }
.market-hint { color: rgba(62,43,30,.66); }
/* 压缩馍：口型 / 芝麻 / 蒸汽 */
.bun-mouth { transform-box: fill-box; transform-origin: center; animation: bun-mouth-bite .72s var(--ease) both; }
@keyframes bun-mouth-bite {
  0% { opacity: 0; transform: scale(.35); }
  22% { opacity: 1; transform: scale(1.12); }
  58% { opacity: 1; transform: scale(.96); }
  100% { opacity: 0; transform: scale(.55); }
}
.bun-seed { transform-box: fill-box; transform-origin: center; animation: bun-seed-fly .82s var(--ease-out) forwards; }
@keyframes bun-seed-fly { to { transform: translate(var(--dx, 0), var(--dy, 0)) rotate(220deg) scale(.5); opacity: 0; } }
#bunSteam { transform-box: fill-box; transform-origin: center; animation: bun-steam 3.4s ease-in-out infinite; }
@keyframes bun-steam {
  0%, 100% { opacity: .3; transform: translateY(5px) scale(.96); }
  50% { opacity: .62; transform: translateY(-8px) scale(1.04); }
}
/* 路中央木牌的透明点击热区（视觉由 3D 木牌本身承担） */
.market-sign-hot {
  position: absolute;
  left: 50%;
  top: 21%;
  transform: translateX(-50%);
  width: 96px;
  height: 268px;
  z-index: 9;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.market-sign-hot span {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.market-sign-hot::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 12px;
  background: transparent;
  transition: background .2s ease, box-shadow .2s ease;
}
.market-sign-hot:hover::after,
.market-sign-hot:focus-visible::after {
  background: rgba(255, 247, 228, .14);
  box-shadow: inset 0 0 0 2px rgba(255, 244, 220, .5);
}
.market-sign-hot:focus-visible { outline: none; }
/* 压缩馍：Q 弹 + 任意位置咬 */
#bunGroup.is-spring { animation: bun-spring .55s cubic-bezier(.2,1.5,.4,1); transform-origin: 320px 260px; }
@keyframes bun-spring {
  0% { scale: 1 1; }
  22% { scale: 1.06 .92; }
  46% { scale: .96 1.05; }
  68% { scale: 1.02 .985; }
  84% { scale: .995 1.005; }
  100% { scale: 1 1; }
}
.bun-seed { transform-box: fill-box; transform-origin: center; animation: bun-seed-fly .82s var(--ease-out) forwards; }
.shop-pattern-link { color: var(--red-deep); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.shop-pattern-link:hover { color: var(--ink); }
/* 路中央竖牌已改为地面箭头，旧透明热区隐藏 */
#marketSign { display: none !important; }
/* 地上箭头：透明点击热区（视觉由地面木牌承担） */
#marketSign.market-sign-hot {
  display: flex !important;
  position: absolute;
  left: 50%;
  top: auto;
  bottom: 88px;
  width: 176px;
  height: 58px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #6b4a32, var(--ink));
  border: 2px solid var(--gold-2);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(40, 24, 14, .35), inset 0 0 0 3px rgba(40, 24, 14, .35);
  color: #f2e6d2;
  z-index: 12;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-serif);
  font-size: 16px;
  letter-spacing: .18em;
  cursor: pointer;
  animation: sign-breathe 2.4s ease-in-out infinite;
}
#marketSign.market-sign-hot::after {
  content: '▼';
  position: absolute;
  left: 50%;
  bottom: -15px;
  transform: translateX(-50%);
  color: var(--primary);
  font-size: 13px;
  letter-spacing: 0;
}
@keyframes sign-breathe {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-3px); }
}
.market-sign-hot span {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  white-space: normal !important;
}
/* 布老虎：针线缝制 */
#plushSvg { cursor: default; }
.seam-guide { fill: none; stroke: var(--gold-2); stroke-width: 3; stroke-dasharray: 10 9; opacity: .55; }
.seam-guide.is-waiting { opacity: .28; }
.seam-guide.is-active { stroke: var(--primary); opacity: .95; stroke-dasharray: 7 7; animation: seam-march 1.1s linear infinite; }
.seam-guide.is-done { opacity: .16; }
@keyframes seam-march { to { stroke-dashoffset: -28; } }
.seam-stitch { fill: none; stroke: var(--paper); stroke-width: 3.4; stroke-linecap: round; filter: drop-shadow(0 1px 0 rgba(58,42,30,.25)); }
.seam-stitch.is-done { stroke: var(--gold-2); }
.seam-start { fill: var(--gold-2); stroke: var(--primary); stroke-width: 2; opacity: .5; transform-box: fill-box; transform-origin: center; }
.seam-start.is-active { opacity: 1; animation: seam-pulse 1.3s ease-in-out infinite; }
@keyframes seam-pulse { 0%,100% { transform: scale(1); opacity: .95; } 50% { transform: scale(1.4); opacity: .5; } }
.seam-end { fill: var(--paper); stroke: var(--primary); stroke-width: 1.4; opacity: .45; }
#plushNeedle { pointer-events: none; transition: transform .1s linear; filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)); }
#plushThread { pointer-events: none; }
#sewOverlay { transition: opacity .4s var(--ease); }
/* 布虎缝合完成：干扁 → 点它塞三次棉花 */
#plushTiger.is-flat { cursor: pointer; animation: flat-breathe 2.2s ease-in-out infinite; }
@keyframes flat-breathe {
  0%, 100% { transform: scale(1.04, .8) translateY(10px); }
  50% { transform: scale(1.05, .78) translateY(11px); }
}
#plushTiger.is-assembled { cursor: pointer; }
/* 前进按钮已移到屏幕底部，地上不再显示提示文字 */
.market-hint { display: none !important; }
/* 布老虎：裁片拼图 → 干扁照片 → 点三下塞棉 */
#plushPhoto { opacity: 0; transition: opacity .35s var(--ease), transform .55s var(--ease); transform-box: fill-box; transform-origin: center bottom; }
#plushPhoto.is-flat { transform: scale(1.02, .6); }
#plushPhoto.is-plump-1 { transform: scale(1.02, .76); }
#plushPhoto.is-plump-2 { transform: scale(1.02, .88); }
#plushPhoto.is-plump-3 { transform: scale(1); }
.plush-done-img { width: min(320px, 72%); border-radius: 14px; box-shadow: 0 12px 26px rgba(58, 42, 30, .22); }
/* 第三幕：头顶彩绸遮阳（与第二幕莲叶区分） */
.inner-canopy { position: absolute; left: 0; right: 0; top: 0; height: 46%; pointer-events: none; z-index: 2; overflow: hidden; opacity: .92; }
.inner-canopy svg { width: 100%; height: 100%; display: block; animation: canopy-sway 9s ease-in-out infinite alternate; transform-origin: top center; filter: blur(.2px); }
@keyframes canopy-sway {
  from { transform: translateX(-1.4%) skewX(-.7deg) scaleY(1); }
  to { transform: translateX(1.4%) skewX(.7deg) scaleY(1.02); }
}
/* 第三幕：香囊 / 泥泥狗 互动 */
.sachet-game { display: flex; gap: 18px; align-items: stretch; width: 100%; }
.sachet-left { flex: 0 0 240px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.sachet-svg { width: 100%; max-height: 300px; }
.sachet-left p { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.sachet-right { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sachet-label { margin: 4px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.sachet-mats { display: flex; flex-wrap: wrap; gap: 7px; }
.sachet-mat { border: 1px solid rgba(110,90,68,.3); background: rgba(255,250,240,.7); border-radius: 8px; padding: 6px 10px; font-family: var(--font-serif); font-size: 13px; color: var(--ink); cursor: grab; touch-action: none; }
.sachet-mat.is-added { opacity: .35; cursor: default; }
.sachet-swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sachet-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px rgba(90,62,42,.25); cursor: pointer; padding: 0; }
.sachet-swatch.is-on { box-shadow: 0 0 0 2px var(--red-deep); }
.sachet-pat { width: 44px; height: 30px; border-radius: 6px; border: 1px solid rgba(110,90,68,.3); background: var(--surface); cursor: pointer; font-size: 11px; font-family: var(--font-serif); color: var(--ink); }
.sachet-pat.is-on { border-color: var(--red-deep); background: #f4e2c8; }
.clay-game { width: 100%; }
.clay-shop-svg { width: 100%; display: block; border-radius: 12px; }
.clay-dog { cursor: pointer; }
.clay-dog:hover { filter: brightness(1.08); }
.clay-bubble { margin: 8px auto 0; max-width: 560px; padding: 10px 14px; border-radius: 12px; background: #fff7e8; border: 1px solid rgba(157,74,54,.28); font-size: 13px; line-height: 1.7; color: var(--ink); min-height: 42px; }
.clay-bubble strong { color: var(--red-deep); }
.clay-actions { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.inner-canopy { position: absolute; left: 0; right: 0; top: 0; height: 46%; pointer-events: none; z-index: 2; overflow: hidden; opacity: .92; }
.inner-canopy svg { width: 100%; height: 100%; display: block; animation: canopy-sway 9s ease-in-out infinite alternate; transform-origin: top center; filter: blur(.2px); }
@keyframes canopy-sway { from { transform: translateX(-1.4%) skewX(-.7deg) scaleY(1); } to { transform: translateX(1.4%) skewX(.7deg) scaleY(1.02); } }
/* 第二街道返回上一页 */
.inner3d-actions .inner3d-back { border: 1px solid rgba(90,62,42,.3); background: rgba(255,250,240,.78); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-family: var(--font-serif); font-size: 13px; letter-spacing: .06em; cursor: pointer; }
.inner3d-actions .inner3d-back:hover { background: var(--surface); }
/* 街道边粉色花丛 */
/* 泥泥狗 3D 观赏 */
.clay3d { position: fixed; inset: 0; z-index: 120; background: radial-gradient(circle at 50% 35%, #fff5e2 0%, #e7d4b6 55%, var(--ink) 100%); display: none; align-items: center; justify-content: center; }
.clay3d.is-open { display: flex; }
.clay3d canvas { width: min(760px, 92vw); height: min(640px, 82vh); display: block; touch-action: none; cursor: grab; }
.clay3d canvas:active { cursor: grabbing; }
.clay3d__close { position: absolute; top: 22px; right: 26px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(90,62,42,.35); background: var(--surface); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.clay3d__hint { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); margin: 0; font-family: var(--font-serif); font-size: 13px; color: #5a3e2a; letter-spacing: .12em; background: rgba(255,246,232,.76); padding: 7px 16px; border-radius: 999px; }
/* 香囊香药实物小图 */
.sachet-mat { display: inline-flex; align-items: center; gap: 6px; }
.sachet-herb { width: 26px; height: 26px; flex: 0 0 26px; }
.clay-shop-svg .clay-dog { filter: drop-shadow(0 3px 2px rgba(58,36,24,.16)); }
.clay-shop-svg { border-radius: 14px; box-shadow: inset 0 0 0 1px rgba(90,62,42,.12); }
/* 第三幕全局回集市按钮（不依赖场景内部 HUD） */
.app-back { position: fixed; right: 18px; left: auto; top: 70px; z-index: 80; display: none; border: 1px solid rgba(90,62,42,.32); background: rgba(255,250,240,.9); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-family: var(--font-serif); font-size: 13px; letter-spacing: .06em; cursor: pointer; box-shadow: 0 6px 16px rgba(58,42,30,.12); }
.app-back.is-on { display: block; }
.plush-done__replay { display: flex; justify-content: center; margin: 4px 0 6px; }
.plush-done__replay .btn { padding: 7px 18px; }
/* 内联 SVG 的 fill/stroke 属性里使用设计变量 */
[fill="var(--muted)"] { fill: var(--muted); }
[stroke="var(--muted)"] { stroke: var(--muted); }
[stop-color="var(--muted)"] { stop-color: var(--muted); }
[fill="var(--ink)"] { fill: var(--ink); }
[stroke="var(--ink)"] { stroke: var(--ink); }
[stop-color="var(--ink)"] { stop-color: var(--ink); }
[fill="var(--ink-2)"] { fill: var(--ink-2); }
[stroke="var(--ink-2)"] { stroke: var(--ink-2); }
[stop-color="var(--ink-2)"] { stop-color: var(--ink-2); }
[fill="var(--primary)"] { fill: var(--primary); }
[stroke="var(--primary)"] { stroke: var(--primary); }
[stop-color="var(--primary)"] { stop-color: var(--primary); }
[fill="var(--brown)"] { fill: var(--brown); }
[stroke="var(--brown)"] { stroke: var(--brown); }
[stop-color="var(--brown)"] { stop-color: var(--brown); }
[fill="var(--sage)"] { fill: var(--sage); }
[stroke="var(--sage)"] { stroke: var(--sage); }
[stop-color="var(--sage)"] { stop-color: var(--sage); }
[fill="var(--gold-3)"] { fill: var(--gold-3); }
[stroke="var(--gold-3)"] { stroke: var(--gold-3); }
[stop-color="var(--gold-3)"] { stop-color: var(--gold-3); }
[fill="var(--surface-3)"] { fill: var(--surface-3); }
[stroke="var(--surface-3)"] { stroke: var(--surface-3); }
[stop-color="var(--surface-3)"] { stop-color: var(--surface-3); }
[fill="var(--paper)"] { fill: var(--paper); }
[stroke="var(--paper)"] { stroke: var(--paper); }
[stop-color="var(--paper)"] { stop-color: var(--paper); }
[fill="var(--white)"] { fill: var(--white); }
[stroke="var(--white)"] { stroke: var(--white); }
[stop-color="var(--white)"] { stop-color: var(--white); }
[fill="var(--water)"] { fill: var(--water); }
[stroke="var(--water)"] { stroke: var(--water); }
[stop-color="var(--water)"] { stop-color: var(--water); }
[fill="var(--water-2)"] { fill: var(--water-2); }
[stroke="var(--water-2)"] { stroke: var(--water-2); }
[stop-color="var(--water-2)"] { stop-color: var(--water-2); }
[fill="var(--teal)"] { fill: var(--teal); }
[stroke="var(--teal)"] { stroke: var(--teal); }
[stop-color="var(--teal)"] { stop-color: var(--teal); }
[fill="var(--gold-2)"] { fill: var(--gold-2); }
[stroke="var(--gold-2)"] { stroke: var(--gold-2); }
[stop-color="var(--gold-2)"] { stop-color: var(--gold-2); }
[fill="var(--primary-ink)"] { fill: var(--primary-ink); }
[stroke="var(--primary-ink)"] { stroke: var(--primary-ink); }
[stop-color="var(--primary-ink)"] { stop-color: var(--primary-ink); }

/* 国潮标题：粗宋；金只做图形/边线，不做文字色 */
h1, h2, h3, .intro__title, .act-title h2, .panel__title,
.shop-detail__title, .inner3d-title h1, .cert h1, .drawer h2,
.chapter__title, .shop-done__name, .stall__tag, .gate-prompt {
  font-family: var(--font-serif);
  font-weight: var(--font-weight-title);
}
/* 金色只做图形/边线，不用于文字；深底文字统一米白 */
.shop__sign, .banner, .chapter.is-done i, .gate-prompt__seal { color: var(--primary-ink); }
.stall.is-done .stall__tag::after, .gate-prompt i { color: var(--primary); }
/* 布老虎拼图：隐藏的照片不能挡拖拽 */
#plushPhoto { pointer-events: none; }
/* 泥泥狗沉浸式店铺：去掉外围标题/说明/进度 */
.shop-detail.is-immersive .shop-detail__head,
.shop-detail.is-immersive .shop-detail__progress,
.shop-detail.is-immersive .shop-detail__desc { display: none; }
.shop-detail.is-immersive .shop-detail__kicker,
.shop-detail.is-immersive #shopDetailTitle,
.shop-detail.is-immersive .shop-detail__desc,
.shop-detail.is-immersive .shop-detail__bar { display: none; }
.shop-detail.is-immersive .shop-detail__card { max-width: min(1180px, 94vw); width: min(1180px, 94vw); background: transparent; border: 0; box-shadow: none; padding: 0; }
.shop-detail.is-immersive .shop-detail__stage { margin: 0; }
.shop-detail.is-immersive .shop-detail__close { top: 18px; right: 18px; z-index: 5; background: rgba(255,250,240,.92); }
/* ===== 泥泥狗 V1 工笔店铺（主流程沉浸页） ===== */
.clay-v1-wrap { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; }
.clay-v1-svg { width: 100%; height: auto; max-height: 68vh; display: block; border-radius: 10px; overflow: hidden; }
.clay-v1-info { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 4; width: min(860px, 94%); padding: 12px 18px 10px; background: rgba(251,243,228,.96); border: 1px solid #d6bb8f; border-radius: 8px; box-shadow: 0 14px 34px rgba(80,45,25,.18); display: grid; grid-template-columns: 180px 1fr; column-gap: 18px; color: var(--ink); font-family: var(--font-sans); }
.clay-v1-info__head { border-right: 1px solid #e0c9a2; padding-right: 14px; display: flex; flex-direction: column; gap: 4px; }
.clay-v1-info__head b { font-family: var(--font-serif); font-size: 22px; font-weight: 800; letter-spacing: .08em; }
.clay-v1-info__head span { font-size: 12px; color: var(--muted); letter-spacing: .12em; }
.clay-v1-info dl { margin: 0; display: grid; grid-template-columns: 38px 1fr; gap: 3px 8px; font-size: 12px; line-height: 1.55; align-content: start; }
.clay-v1-info dt { color: var(--muted); letter-spacing: .08em; }
.clay-v1-info dd { margin: 0; color: var(--ink-2); }
.clay-v1-info__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; padding-top: 6px; border-top: 1px solid #e0c9a2; font-size: 12px; color: var(--muted); }
.clay-v1-info__foot .btn { padding: 5px 12px; font-size: 12px; }
.clay-v1-svg .clayDogHit { cursor: pointer; }
.clay-v1-svg .clayDogHit:hover { filter: drop-shadow(0 8px 8px rgba(70,40,20,.2)); }
.clay-v1-svg .dogUse { cursor: pointer; }
.clay-v1-svg .float { transform-box: fill-box; transform-origin: center bottom; animation: clayDogFloat 4.6s ease-in-out infinite; }
.clay-v1-svg .swing { transform-box: fill-box; transform-origin: top center; animation: claySwing 5.2s ease-in-out infinite; }
.clay-v1-svg .glow { animation: clayGlow 4.6s ease-in-out infinite; }
@keyframes clayDogFloat { 0%,100% { transform: translateY(0) rotate(-.4deg); } 50% { transform: translateY(-7px) rotate(.5deg); } }
@keyframes claySwing { 0%,100% { transform: rotate(-2.4deg); } 50% { transform: rotate(2.4deg); } }
@keyframes clayGlow { 0%,100% { opacity: .35; } 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { .clay-v1-svg .float, .clay-v1-svg .swing, .clay-v1-svg .glow { animation: none; } }
/* 让 V1 店铺在沉浸弹层里真正铺满、狗不被信息卡压住 */
.shop-detail.is-immersive .shop-detail__stage { height: min(70vh, 700px); min-height: 480px; }
.shop-detail.is-immersive .clay-v1-svg { height: 100%; max-height: none; }
.shop-detail.is-immersive .clay-v1-wrap { height: 100%; }
.shop-detail.is-immersive .clay-v1-info { bottom: 10px; }
/* V1 店铺：左侧店铺、右侧信息卡，避免信息卡压住柜台和泥泥狗 */
.shop-detail.is-immersive .shop-detail__stage { height: min(72vh, 720px); min-height: 500px; }
.shop-detail.is-immersive .clay-v1-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: stretch; height: 100%; width: 100%; }
.shop-detail.is-immersive .clay-v1-svg { grid-column: 1; width: 100%; height: 100%; max-height: none; }
.shop-detail.is-immersive .clay-v1-info { position: static; transform: none; grid-column: 2; width: auto; bottom: auto; overflow: auto; display: block; }
.shop-detail.is-immersive .clay-v1-info__head { border-right: 0; border-bottom: 1px solid #e0c9a2; padding: 0 0 8px; }
.shop-detail.is-immersive .clay-v1-info__foot { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
@media (max-width: 900px) {
  .shop-detail.is-immersive .clay-v1-wrap { grid-template-columns: 1fr; }
  .shop-detail.is-immersive .clay-v1-info { max-height: 30vh; }
}
/* ===== 第二街道：3D 锦缎随风飘动 ===== */
.inner-canopy > svg { display: none; }
.canopy3d { position: absolute; inset: 0; perspective: 1000px; transform-style: preserve-3d; pointer-events: none; }
.ribbon { position: absolute; top: -5%; left: var(--x); width: var(--w); height: var(--h); display: block; transform-origin: top center; border-radius: 0 0 3px 3px; background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 2px, transparent 2px 15px, rgba(0,0,0,.05) 15px 17px, transparent 17px 30px),
    linear-gradient(180deg, rgba(255,255,255,.28) 0%, transparent 22%, rgba(0,0,0,.1) 100%),
    linear-gradient(90deg, var(--c2), var(--c1) 18%, var(--c1) 82%, var(--c2));
  box-shadow: 0 8px 18px rgba(60,30,20,.12), inset 0 0 24px rgba(255,246,220,.18);
  clip-path: polygon(0 0, 100% 0, 98% 100%, 74% 95%, 50% 100%, 26% 94%, 2% 99%);
  opacity: .9;
  animation: ribbonWave var(--d) ease-in-out infinite alternate;
  animation-delay: var(--delay);
  will-change: transform;
}
.ribbon::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.2) 0 1px, transparent 1px 18px); mix-blend-mode: soft-light; }
.ribbon::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: 0; height: 16%; background: linear-gradient(180deg, transparent, rgba(60,24,16,.22)); clip-path: polygon(0 0, 100% 0, 94% 100%, 62% 86%, 30% 100%); }
@keyframes ribbonWave {
  0% { transform: rotateX(7deg) rotateY(var(--ry)) rotateZ(var(--rz)) translate3d(0,0,0) skewY(-.6deg); }
  45% { transform: rotateX(2deg) rotateY(calc(var(--ry) * -.7)) rotateZ(calc(var(--rz) * -.55)) translate3d(var(--sway), 7px, 4px) skewY(.9deg); }
  100% { transform: rotateX(8deg) rotateY(calc(var(--ry) * .8)) rotateZ(calc(var(--rz) * .4)) translate3d(calc(var(--sway) * -.5), -4px, 2px) skewY(-.4deg); }
}
@media (prefers-reduced-motion: reduce) { .ribbon { animation: none; } }
/* 锦缎的云纹织花与顶部帷幔 */
.canopy3d::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 28px; background: linear-gradient(180deg, #6e2f28, #8e3a2e 60%, #c8952e 62%, #8e3a2e 66%, #6e2f28); box-shadow: 0 4px 10px rgba(40,20,12,.25); z-index: 3; }
.canopy3d::after { content: ""; position: absolute; left: 0; right: 0; top: 28px; height: 14px; background: repeating-linear-gradient(90deg, rgba(200,149,46,.85) 0 2px, transparent 2px 18px), linear-gradient(180deg, rgba(200,149,46,.5), transparent); z-index: 3; }
.ribbon { opacity: .94; background-image:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'><g fill='none' stroke='%23e8d3b5' stroke-width='1.2' opacity='.35'><path d='M8 40c4-12 16-12 18-3 2 8-6 14-12 10-5-3-3-10 3-11 7-1 10 7 5 12'/><path d='M40 18c3-7 11-7 12-1 1 5-4 9-8 6-3-2-2-7 2-8 5-1 7 5 4 8'/></g></svg>"),
    repeating-linear-gradient(90deg, rgba(255,255,255,.16) 0 2px, transparent 2px 15px, rgba(0,0,0,.06) 15px 17px, transparent 17px 30px),
    linear-gradient(180deg, rgba(255,255,255,.3) 0%, transparent 22%, rgba(0,0,0,.12) 100%),
    linear-gradient(90deg, var(--c2), var(--c1) 18%, var(--c1) 82%, var(--c2));
  background-size: 64px 64px, auto, auto, auto;
}
/* 获得挂件：从下方跳出来的小动画 */
.reward-showcase { position: fixed; inset: 0; z-index: 340; display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity .25s ease; background: radial-gradient(circle at 50% 44%, rgba(46,28,16,.66) 0%, rgba(16,9,5,.94) 58%, rgba(8,4,2,.98) 100%); backdrop-filter: blur(7px) saturate(.85); -webkit-backdrop-filter: blur(7px) saturate(.85); }
.reward-showcase.is-on { opacity: 1; }
.reward-showcase.is-out { opacity: 0; }
.reward-showcase__panel { position: relative; display: flex; flex-direction: column; align-items: center; transform: translateY(8px); }
.reward-showcase__seal { width: 42px; height: 42px; border-radius: 7px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-family: var(--font-serif); font-size: 20px; font-weight: 800; box-shadow: 0 8px 20px rgba(120,20,16,.35); margin-bottom: 12px; transform: rotate(-3deg); }
.reward-showcase__stage { position: relative; width: 260px; height: 260px; display: grid; place-items: center; perspective: 900px; transform-style: preserve-3d; transition: transform .75s cubic-bezier(.5,0,.2,1), opacity .5s; }
.reward-showcase__ring { position: absolute; width: 210px; height: 210px; border-radius: 50%; border: 1px solid rgba(200,149,46,.45); box-shadow: inset 0 0 40px rgba(255,220,150,.2), 0 0 60px rgba(255,210,140,.25); animation: rewardRing 2.4s ease-in-out infinite; }
.reward-showcase__art { position: relative; z-index: 2; width: 168px; height: 168px; display: grid; place-items: center; filter: drop-shadow(0 18px 22px rgba(20,10,4,.45)); animation: pendantSpin 1.15s cubic-bezier(.2,.8,.2,1) both, pendantFloat 2.6s 1.15s ease-in-out infinite; transform-style: preserve-3d; }
.reward-showcase__art svg { width: 168px; height: 168px; display: block; }
.reward-showcase__shine { position: absolute; width: 170px; height: 170px; border-radius: 50%; background: radial-gradient(circle at 38% 30%, rgba(255,255,240,.45), rgba(255,245,210,0) 62%); mix-blend-mode: screen; animation: shineSweep 2.2s ease-in-out infinite; }
.reward-showcase__title { margin: 2px 0 0; font-family: var(--font-serif); font-weight: 800; font-size: 26px; color: #fff7e6; letter-spacing: .12em; text-shadow: 0 4px 18px rgba(0,0,0,.35); }
.reward-showcase__meta { margin: 6px 0 0; font-size: 12px; color: rgba(255,240,214,.78); letter-spacing: .16em; }
.reward-showcase__hint { margin: 12px 0 0; font-size: 11px; color: rgba(255,232,200,.55); letter-spacing: .1em; }
@keyframes pendantSpin {
  0% { opacity: 0; transform: rotateY(-72deg) rotateX(14deg) translateZ(-260px) scale(.28); }
  38% { opacity: 1; transform: rotateY(22deg) rotateX(-4deg) translateZ(54px) scale(1.14); }
  72% { opacity: 1; transform: rotateY(-10deg) rotateX(3deg) translateZ(12px) scale(1.03); }
  100% { opacity: 1; transform: rotateY(0) rotateX(0) translateZ(0) scale(1.06); }
}
@keyframes pendantFloat { 0%,100% { transform: translateY(0) rotateY(-4deg) scale(1.06); } 50% { transform: translateY(-8px) rotateY(4deg) scale(1.08); } }
@keyframes rewardRing { 0%,100% { transform: scale(.96); opacity: .55; } 50% { transform: scale(1.04); opacity: .95; } }
@keyframes shineSweep { 0%,100% { opacity: .35; transform: translate(-4px, -3px) scale(.92); } 50% { opacity: .8; transform: translate(4px, 3px) scale(1.04); } }
.reward-showcase.is-flying .reward-showcase__stage { transform: translate(var(--fly-x, 0px), var(--fly-y, 0px)) scale(.06) rotateY(120deg); opacity: .15; }
.reward-showcase.is-flying .reward-showcase__title, .reward-showcase.is-flying .reward-showcase__meta, .reward-showcase.is-flying .reward-showcase__hint, .reward-showcase.is-flying .reward-showcase__seal { opacity: 0; transition: opacity .25s; }
#bagBtn.is-pop { animation: bagPulse .65s ease 1; }
@keyframes bagPulse { 0%,100% { transform: scale(1); } 35% { transform: scale(1.14); } 65% { transform: scale(.97); } }
/* 第二街道不再用锦缎顶棚 */
.inner-canopy { display: none !important; }


/* ===== 第一街道：参考图同款手绘长街 ===== */
#market3d .market3d__viewport { display: none !important; }
.market-painted { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: #f3e6c9; }
.market-painted img { width: 100%; height: 100%; object-fit: cover; object-position: center 54%; display: block; animation: paintedDrift 28s ease-in-out infinite alternate; will-change: transform; }
.market-painted::after { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(ellipse at 50% 46%, rgba(255,248,230,0) 45%, rgba(92,64,40,.16) 100%),
  linear-gradient(180deg, rgba(255,249,233,.14) 0%, transparent 22%, transparent 74%, rgba(80,52,32,.2) 100%); }
@keyframes paintedDrift { 0% { transform: scale(1.008) translate3d(0,0,0); } 100% { transform: scale(1.038) translate3d(-.5%,-.45%,0); } }
@media (prefers-reduced-motion: reduce) { .market-painted img { animation: none; } }

/* ===== 第一街道：手绘背景上的行人 + 店铺点击区 ===== */
.market-walkers { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.walker { position: absolute; left: 0; top: 0; width: 44px; height: 100px; transform-origin: 50% 100%; opacity: 0; animation-duration: var(--dur); animation-delay: var(--delay); animation-timing-function: linear; animation-iteration-count: infinite; animation-fill-mode: both; }
.walker--away { animation-name: walkerAway; }
.walker--near { animation-name: walkerNear; }
.walker__bob { display: block; width: 100%; height: 100%; transform-origin: 50% 100%; animation: walkerBob .58s ease-in-out infinite alternate; }
.walker svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 3px rgba(50,30,20,.2)); }
@keyframes walkerAway {
  0% { left: var(--x1); top: var(--y1); opacity: 0; transform: translate(-50%, -100%) scale(var(--s1)); }
  7% { opacity: .96; }
  90% { opacity: .92; }
  100% { left: var(--x2); top: var(--y2); opacity: 0; transform: translate(-50%, -100%) scale(var(--s2)); }
}
@keyframes walkerNear {
  0% { left: var(--x1); top: var(--y1); opacity: 0; transform: translate(-50%, -100%) scale(var(--s1)); }
  7% { opacity: .95; }
  92% { opacity: .95; }
  100% { left: var(--x2); top: var(--y2); opacity: 0; transform: translate(-50%, -100%) scale(var(--s2)); }
}
@keyframes walkerBob { from { transform: translateY(0) rotate(-.7deg); } to { transform: translateY(-3px) rotate(.7deg); } }

.market-stalls { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.market-stall { position: absolute; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; pointer-events: auto; transition: border-color .3s, box-shadow .3s, background .3s; }
.market-stall > span { position: absolute; left: 50%; bottom: 7%; transform: translate(-50%, 7px); opacity: 0; pointer-events: none; padding: 6px 12px; border-radius: 999px; background: rgba(255,250,240,.95); border: 1px solid rgba(200,149,46,.7); color: var(--ink); font-family: var(--font-serif); font-size: 12px; letter-spacing: .08em; white-space: nowrap; box-shadow: 0 6px 16px rgba(70,40,20,.18); transition: opacity .3s, transform .3s; }
.market-stall:hover, .market-stall:focus-visible { outline: none; border-color: rgba(200,149,46,.9); background: radial-gradient(ellipse at 50% 55%, rgba(255,246,220,.14), rgba(255,246,220,0) 72%); box-shadow: inset 0 0 0 1px rgba(200,149,46,.4), 0 14px 30px rgba(70,40,20,.14); }
.market-stall:hover > span, .market-stall:focus-visible > span { opacity: 1; transform: translate(-50%, 0); }
.market-stall--left { left: 18.2%; top: 31%; width: 23.5%; height: 47%; }
.market-stall--right { left: 60.8%; top: 31%; width: 23%; height: 47%; }
@media (prefers-reduced-motion: reduce) {
  .walker { animation: none; opacity: .92; left: var(--x1); top: var(--y1); transform: translate(-50%, -100%) scale(var(--s1)); }
  .walker--near { left: var(--x2); top: var(--y2); transform: translate(-50%, -100%) scale(var(--s2)); }
  .walker__bob { animation: none; }
  .market-painted img { animation: none; }
}

/* 第一街道回到之前的 3D 模板，不再用贴图 */
#market3d .market3d__viewport { display: block !important; }
.market-painted, .market-walkers, .market-stalls { display: none !important; }



/* ================= 第一街道：2D 手绘互动场景 ================= */
#market3d .market3d__viewport,
#market3d .market3d__wash,
#market3d .market-painted,
#market3d .market-walkers,
#market3d .market-stalls { display: none !important; }

.market2d { position: absolute; inset: 0; z-index: 1; overflow: hidden; transform-origin: var(--ox, 50%) var(--oy, 56%); transition: transform .5s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.market2d::before { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: rgba(28,18,10,.3); transition: opacity .3s; }
.act--2.is-entering-shop .market2d::before, .act--2.is-shop-open .market2d::before { opacity: 1; }
.market2d__img { position: absolute; inset: -2%; width: 104%; height: 104%; object-fit: cover; object-position: center 54%; display: block; transform: translate(calc(var(--mx, 0) * -8px), calc(var(--my, 0) * -5px)) scale(1.01); transition: transform .4s ease-out; will-change: transform; }
.market2d::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 48%, rgba(255,248,230,0) 52%, rgba(76,50,30,.16) 100%), linear-gradient(180deg, rgba(255,249,233,.08), transparent 24%, transparent 76%, rgba(70,44,26,.15)); }
.market2d__crowd { position: absolute; inset: 0; z-index: 2; pointer-events: none; transform: translate(calc(var(--mx, 0) * 4px), calc(var(--my, 0) * 3px)); transition: transform .5s ease-out; }
.bg-walker { position: absolute; width: 30px; height: auto; opacity: 0; transform-origin: 50% 100%; animation-name: bgWalk; animation-duration: var(--dur); animation-delay: var(--delay); animation-timing-function: linear; animation-iteration-count: infinite; animation-fill-mode: both; filter: saturate(.93) blur(.15px); }
@keyframes bgWalk {
  0% { left: var(--x1); top: var(--y1); opacity: 0; transform: translate(-50%, -100%) scale(var(--s1)); }
  8% { opacity: .95; } 90% { opacity: .92; }
  100% { left: var(--x2); top: var(--y2); opacity: 0; transform: translate(-50%, -100%) scale(var(--s2)); }
}
.market2d__ambient { position: absolute; inset: 0; z-index: 2; pointer-events: none; transform: translate(calc(var(--mx, 0) * 3px), calc(var(--my, 0) * 2px)); transition: transform .5s ease-out; }
.market2d__ambient .lantern-glow { position: absolute; width: 12%; height: 12%; border-radius: 50%; background: radial-gradient(circle, rgba(255,190,110,.18), rgba(255,170,90,0) 70%); animation: glowPulse 3.6s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes glowPulse { 0%,100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.market2d__ambient .steam { position: absolute; width: 30px; height: 90px; border-radius: 50%; background: radial-gradient(ellipse at 50% 80%, rgba(255,252,242,.5), rgba(255,250,240,0) 70%); filter: blur(5px); animation: steamRise 4.2s ease-in-out infinite; }
@keyframes steamRise { 0% { opacity: 0; transform: translateY(10px) scaleX(.7); } 25% { opacity: .8; } 100% { opacity: 0; transform: translateY(-55px) scaleX(1.4); } }
.market2d__ambient .petal { position: absolute; width: 9px; height: 6px; border-radius: 60% 40% 55% 45%; background: rgba(226,178,170,.8); animation: petalFall var(--dur, 12s) linear infinite; animation-delay: var(--delay, 0s); opacity: 0; }
@keyframes petalFall { 0% { opacity: 0; transform: translate(0, -20px) rotate(0); } 10% { opacity: .8; } 85% { opacity: .7; } 100% { opacity: 0; transform: translate(var(--drift, 60px), 420px) rotate(320deg); } }
.market2d__ambient .bird { position: absolute; width: 44px; height: 18px; animation: birdFly var(--dur, 18s) linear infinite; animation-delay: var(--delay, 0s); opacity: .55; }
@keyframes birdFly { 0% { transform: translate(-60px, 0); } 100% { transform: translate(1350px, -40px); } }
.market2d__ambient .light-drift { position: absolute; left: -10%; top: -10%; width: 70%; height: 70%; border-radius: 50%; background: radial-gradient(circle, rgba(255,250,232,.16), rgba(255,250,232,0) 65%); animation: lightDrift 26s ease-in-out infinite alternate; }
@keyframes lightDrift { 0% { transform: translate(0,0) scale(1); } 100% { transform: translate(28%, 8%) scale(1.12); } }

.market2d-shops { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.market2d-shop { position: absolute; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; pointer-events: auto; transition: border-color .3s, box-shadow .3s, background .3s; }
.market2d-shop--left { left: 18.2%; top: 31%; width: 23.5%; height: 47%; }
.market2d-shop--right { left: 60.8%; top: 31%; width: 23%; height: 47%; }
.market2d-shop > span { position: absolute; left: 50%; bottom: 7%; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 6px 13px; border-radius: 999px; background: rgba(255,250,240,.96); border: 1px solid rgba(200,149,46,.7); color: var(--ink); font-family: var(--font-serif); font-size: 12px; letter-spacing: .08em; white-space: nowrap; box-shadow: 0 6px 16px rgba(70,40,20,.18); transition: opacity .3s, transform .3s; }
.market2d-shop:hover, .market2d-shop:focus-visible { outline: none; border-color: rgba(200,149,46,.9); background: radial-gradient(ellipse at 50% 55%, rgba(255,246,220,.13), rgba(255,246,220,0) 72%); box-shadow: inset 0 0 0 1px rgba(200,149,46,.4), 0 14px 30px rgba(70,40,20,.14); }
.market2d-shop:hover > span, .market2d-shop:focus-visible > span { opacity: 1; transform: translate(-50%, 0); }

.market2d-wipe { position: absolute; inset: 0; z-index: 8; pointer-events: none; opacity: 0; transform: translateX(-115%); background: linear-gradient(90deg, rgba(251,243,228,0) 0%, #fbf3e4 35%, #fbf3e4 65%, rgba(251,243,228,0) 100%); transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .2s; }
.act--2.is-entering-shop .market2d { transform: scale(1.06); }
.act--2.is-entering-shop .market2d-wipe { opacity: 1; transform: translateX(0); }
.act--2.is-entering-shop .market-tabs,
.act--2.is-entering-shop .market-title,
.act--2.is-entering-shop #marketSign,
.act--2.is-entering-shop .market-hint { opacity: 0; pointer-events: none; transition: opacity .25s; }
.act--2.is-shop-open .market2d { transform: scale(1.06); }
.act--2.is-shop-open .market-tabs,
.act--2.is-shop-open .market-title,
.act--2.is-shop-open #marketSign { opacity: 0; pointer-events: none; transition: opacity .25s; }
.market2d-shop:active { transform: scale(.997); }

/* 行人始终播放固定循环动画，不因系统“减少动态效果”而停住 */
.bg-walker { animation-play-state: running !important; }


/* 背景行人改由 JS 固定循环驱动 */
.market2d .bg-walker { animation: none !important; }

/* 第一街道背景视频 */
.market2d__video { position: absolute; inset: -2%; width: 104%; height: 104%; object-fit: cover; object-position: center 54%; display: block; transform: translate(calc(var(--mx, 0) * -6px), calc(var(--my, 0) * -4px)) scale(1.01); transition: transform .4s ease-out; will-change: transform; }

/* 布老虎塞棉花前：先在虎身上显示棉花轮廓，提示这里能点 */
#shopStage.is-stuffing #plushCotton .fluff { opacity: .92; fill: rgba(255,250,240,.5); stroke: #9d4a36; stroke-width: 2; stroke-dasharray: 7 5; animation: cottonCuePulse 1.8s ease-in-out infinite; }
@keyframes cottonCuePulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
#shopStage.is-stuffing #plushCotton .fluff.is-on { opacity: 1; fill: #fbf6ea; stroke: #c9a063; stroke-width: 2; stroke-dasharray: none; }
#shopStage.is-stuffing #plushPhoto { cursor: pointer; }
#shopStage.is-stuffing #plushCotton { filter: drop-shadow(0 2px 3px rgba(90,60,30,.12)); }

.plush-stuff-cue { position: absolute; left: 50%; top: 66%; transform: translate(-50%, -50%); z-index: 6; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; background: rgba(255,250,240,.97); border: 1px dashed #9d4a36; color: #8e2a24; font-family: var(--font-serif); font-size: 13px; letter-spacing: .06em; box-shadow: 0 8px 20px rgba(80,45,25,.22); pointer-events: none; animation: plushCueFloat 1.7s ease-in-out infinite; }
.plush-stuff-cue svg { width: 34px; height: 17px; display: block; }
@keyframes plushCueFloat { 0%,100% { transform: translate(-50%, -50%) translateY(0); } 50% { transform: translate(-50%, -50%) translateY(-5px); } }

/* ================= 第二街道：2D 手绘内街 + 假 3D 视差 ================= */
.act--3 #viewportInner,
.act--3 #glsceneInner,
.act--3 .inner3d__wash,
.act--3 .inner-canopy,
.act--3 #innerViewport { display: none !important; }

.act--3 .inner2d { position: absolute; inset: 0; z-index: 1; overflow: hidden; perspective: 1200px; background: #efe2c6; }
.inner2d__stage { position: absolute; inset: -3%; transform-style: preserve-3d; will-change: transform; transition: transform .35s ease-out;
  transform: translate3d(calc(var(--ix, 0) * -9px), calc(var(--iy, 0) * -6px), 0) rotateX(calc(var(--iy, 0) * -1.2deg)) rotateY(calc(var(--ix, 0) * 1.6deg)) scale(1.03); }
.inner2d__img { width: 100%; height: 100%; object-fit: cover; object-position: center 55%; display: block; }
.inner2d__vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background:
  radial-gradient(ellipse at 50% 48%, rgba(255,248,230,0) 48%, rgba(46,28,16,.26) 100%),
  linear-gradient(180deg, rgba(255,249,233,.1) 0%, transparent 24%, transparent 70%, rgba(36,22,12,.26) 100%); }

.inner2d-hot { position: absolute; z-index: 3; padding: 0; border: 1px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; transition: border-color .25s, box-shadow .25s, background .25s; }
.inner2d-hot--sachet { left: 1.5%; top: 30%; width: 33%; height: 56%; }
.inner2d-hot--clay { left: 62%; top: 30%; width: 36%; height: 58%; }
.inner2d-hot--gate { left: 38.5%; top: 24%; width: 20%; height: 46%; }
.inner2d-hot > span { position: absolute; left: 50%; bottom: 6%; transform: translate(-50%, 8px); opacity: 0; pointer-events: none; padding: 7px 14px; border-radius: 999px; background: rgba(255,250,240,.96); border: 1px solid rgba(200,149,46,.7); color: var(--ink); font-family: var(--font-serif); font-size: 13px; letter-spacing: .08em; white-space: nowrap; box-shadow: 0 8px 20px rgba(60,36,20,.22); transition: opacity .25s, transform .25s; }
.inner2d-hot:hover, .inner2d-hot:focus-visible { outline: none; border-color: rgba(200,149,46,.9); background: radial-gradient(ellipse at 50% 55%, rgba(255,246,220,.13), rgba(255,246,220,0) 72%); box-shadow: inset 0 0 0 1px rgba(200,149,46,.4), 0 14px 30px rgba(60,36,20,.16); }
.inner2d-hot:hover > span, .inner2d-hot:focus-visible > span { opacity: 1; transform: translate(-50%, 0); }
.inner2d-hot--gate { border-radius: 14px; }
.inner2d-hot--gate > span { border-color: rgba(158,43,38,.65); color: #8e2a24; }

.act--3 .inner3d-title,
.act--3 .inner3d-tabs,
.act--3 .inner3d-actions,
.act--3 .inner3d-hint { z-index: 6; }

/* ================= 两条街：竖版手绘背景（桌面居中，两侧虚化纹样） ================= */
.market2d, .market2d-shops {
  top: 0; bottom: 0; left: 50%; right: auto;
  width: calc(100vh * 1152 / 2047); max-width: 100%; height: 100%;
  transform: translateX(-50%);
}
.market2d { z-index: 2; }
.market2d__video { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: none; }
.market2d-shops { z-index: 6; }
.market2d-shop--left { left: 1.5%; top: 46%; width: 35%; height: 39%; }
.market2d-shop--right { left: 62.5%; top: 44%; width: 36.5%; height: 41%; }

.act--3 .inner2d {
  top: 0; bottom: 0; left: 50%; right: auto;
  width: calc(100vh * 1152 / 2047); max-width: 100%; height: 100%;
  transform: translateX(-50%); z-index: 2;
}
.inner2d__stage { inset: 0; transform: none; }
.inner2d__video { width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

.act--2 .market3d::before,
.act--3 .inner3d::before { content: ""; position: absolute; inset: 0; z-index: 0; background-position: center; background-size: cover; filter: blur(26px) brightness(.48) saturate(.9); transform: scale(1.12); }
.act--2 .market3d::before { background-image: url(assets/street1-painted.jpg); }
.act--3 .inner3d::before { background-image: url(assets/street2-painted.jpg); }
.act--2 .market3d::after,
.act--3 .inner3d::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .65; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46' viewBox='0 0 46 46'%3E%3Cpath d='M6 40V6h34v28H14V14h18v14H22V20h6' fill='none' stroke='%23c8952e' stroke-opacity='.26' stroke-width='1.2'/%3E%3C/svg%3E"); background-size: 46px 46px; }
.market3d, .inner3d { background: #2e2118; }

/* 竖版画面里的店铺热区：和画面里的左右店铺对齐 */
.inner2d-hot--sachet { left: 0; top: 54%; width: 34%; height: 39%; }
.inner2d-hot--clay { left: 62%; top: 52%; width: 38%; height: 41%; }
.inner2d-hot--gate { left: 36%; top: 28%; width: 28%; height: 38%; }

/* ================= 手机竖屏：竖版画面铺满，按钮叠在画面上 ================= */
@media (max-width: 900px) {
  /* 第一街道：16:9 集市视频居中 */
  .market2d, .market2d-shops { top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; transform: none; }
  .market2d__video { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; transform: none; }
  .market-sign-hot { top: auto; bottom: 66px; }
  .market-tabs { top: auto; bottom: 148px; left: 12px; right: 12px; }

  /* 第二街道：竖版内街铺满 */
  .act--3 .inner2d { top: 0; bottom: 0; left: 0; right: 0; width: 100%; height: 100%; transform: none; }
  .inner2d__video { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .act--3 .inner3d::before, .act--3 .inner3d::after { display: none; }
  .act--3 .inner3d-title { top: 108px; }
  .inner3d-tabs { top: auto; bottom: 148px; left: 12px; right: 12px; }
  .act--3 .inner3d-actions { top: auto; bottom: 66px; left: 10px; right: 10px; transform: none; justify-content: center; }

  .inner3d-hint { display: none !important; }
  .act--2 .market-title, .act--3 .inner3d-title {
    display: block !important; position: absolute; z-index: 5; left: 14px; right: 14px;
    padding: 12px 15px 11px; background: rgba(251,243,228,.93); border: 1px solid rgba(200,149,46,.5);
    border-radius: 10px; box-shadow: 0 10px 24px rgba(60,36,20,.18);
  }
  .market-title h2, .inner3d-title h2 { margin: 3px 0 0; font-size: 20px; line-height: 1.3; }
  .market-title__desc, .inner3d-title__desc { margin: 6px 0 0; font-size: 11px; line-height: 1.6; }
  .market-title__no, .inner3d-title__no { font-size: 10px; letter-spacing: .16em; }
  .act--2.is-active .market-title { animation: none !important; opacity: 1 !important; visibility: visible !important; transform: none !important; }

  .market-tab { width: calc(50% - 6px); padding: 8px 10px; }
  .market-tab__txt b { font-size: 14px; }
  .market-tab__txt i { font-size: 11px; }
  .inner3d-tab { padding: 8px 10px; }
  .inner3d-actions { gap: 7px; flex-wrap: wrap; }
  .inner3d-actions .inner3d-walk, .inner3d-actions .inner3d-back, .inner3d-actions .inner3d-gate { padding: 7px 10px; font-size: 11.5px; }
  .app-back { top: 70px; right: 12px; font-size: 12px; padding: 6px 12px; }
  .hud { padding-top: calc(12px + env(safe-area-inset-top, 0px) + 24px); }
}

@media (min-width: 901px) {
  .market-tabs, .inner3d-tabs { left: calc(50% - 100vh * 1152 / 4094); right: calc(50% - 100vh * 1152 / 4094); }
  .inner3d-actions { left: 50%; right: auto; transform: translateX(-50%); }
}

/* ================= 布老虎 2：设计图拼布片 ================= */
.tiger2-game { display: flex; gap: 18px; align-items: flex-start; width: 100%; }
.tiger2-left { flex: 0 0 320px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tiger2-cap { margin: 0; font-size: 11.5px; letter-spacing: .08em; color: var(--muted); }
.tiger2-board { position: relative; width: 300px; height: 400px; }
.tiger2-outline { position: absolute; left: 0; top: 0; width: 100%; height: 310px; object-fit: contain; display: block; }
.tiger2-slot { position: absolute; border: 1.5px dashed rgba(150,110,70,.5); border-radius: 10px; display: grid; place-items: center; overflow: hidden; transition: border-color .2s, background .2s; }
.tiger2-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tiger2-slot--bodyL { left: 2%; top: 2%; width: 46%; height: 73%; }
.tiger2-slot--bodyR { left: 52%; top: 2%; width: 46%; height: 73%; }
.tiger2-slot--c1 { left: 5%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot--c2 { left: 29%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot--c3 { left: 53%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot--c4 { left: 77%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot.is-over { border-color: var(--red-deep); background: rgba(200,149,46,.14); }
.tiger2-slot.is-filled { border-color: transparent; background: transparent; }
.tiger2-final { display: none; position: absolute; inset: 0; place-items: center; }
.tiger2-final img { width: 92%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 18px 26px rgba(70,40,20,.25)); transition: filter .25s; }
.tiger2-board.is-done .tiger2-outline, .tiger2-board.is-done .tiger2-slot { display: none; }
.tiger2-board.is-done .tiger2-final { display: grid; animation: tiger2Pop .55s cubic-bezier(.2,1.4,.4,1); }
@keyframes tiger2Pop { 0% { opacity: 0; transform: scale(.82); } 100% { opacity: 1; transform: scale(1); } }
.tiger2-fill { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.tiger2-colors { display: none; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.tiger2-colors.is-on { display: flex; }
.tiger2-color { width: 27px; height: 27px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px rgba(90,62,42,.25); cursor: pointer; padding: 0; }
.tiger2-color.is-on { box-shadow: 0 0 0 2px var(--red-deep); }
.tiger2-right { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.tiger2-pieces { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tiger2-piece { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 6px; border: 1px solid rgba(110,90,68,.3); border-radius: 10px; background: rgba(255,250,240,.82); cursor: grab; touch-action: none; user-select: none; transition: transform .2s, box-shadow .2s, opacity .2s; }
.tiger2-piece:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(80,45,25,.14); }
.tiger2-piece:active { cursor: grabbing; }
.tiger2-piece img { width: 74px; height: 74px; object-fit: contain; pointer-events: none; }
.tiger2-piece span { font-family: var(--font-serif); font-size: 11px; color: var(--ink); letter-spacing: .04em; pointer-events: none; }
.tiger2-piece.is-used { opacity: .26; cursor: default; transform: none; box-shadow: none; }
.tiger2-ghost { position: fixed; z-index: 9999; width: 86px; height: 86px; display: grid; place-items: center; pointer-events: none; transform: translate(-50%, -50%) rotate(-6deg); filter: drop-shadow(0 10px 18px rgba(60,36,20,.35)); }
.tiger2-ghost img { width: 100%; height: 100%; object-fit: contain; }
.tiger2-done { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tiger2-done img { width: 280px; height: 280px; object-fit: contain; filter: drop-shadow(0 16px 24px rgba(70,40,20,.22)); }
.tiger2-done__name { margin: 0; font-family: var(--font-serif); font-size: 16px; color: var(--ink); letter-spacing: .06em; }
.bag-tiger-img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 900px) {
  .tiger2-game { flex-direction: column; gap: 14px; }
  .tiger2-left { flex: none; width: 100%; }
  .tiger2-board { width: 270px; height: 360px; margin: 0 auto; }
  .tiger2-outline { height: 280px; }
  .tiger2-slot--bodyL, .tiger2-slot--bodyR { height: 73%; }
  .tiger2-slot--c1 { top: 81%; height: 12%; }
  .tiger2-slot--c2 { top: 81%; }
  .tiger2-slot--c3 { top: 81%; }
  .tiger2-slot--c4 { top: 81%; }
  .tiger2-piece img { width: 58px; height: 58px; }
  .tiger2-piece span { font-size: 10.5px; }
  .tiger2-done img { width: 230px; height: 230px; }
}

.tiger2-pieces.is-hidden { display: none; }
.tiger2-right .tiger2-colors { margin-top: 4px; }

/* ================= 布老虎：完整设计图 + 下边布片 ================= */
.tiger2-game { display: flex; flex-direction: column; gap: 10px; align-items: stretch; width: 100%; }
.tiger2-design { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tiger2-board { position: relative; width: min(620px, 100%); height: auto; aspect-ratio: 720 / 540; margin: 0 auto; }
.tiger2-sheet { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.tiger2-slot { position: absolute; border: 1.5px dashed rgba(150,110,70,.45); border-radius: 10px; display: grid; place-items: center; overflow: hidden; transition: border-color .2s, background .2s; }
.tiger2-slot img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tiger2-slot--bodyL { left: 26%; top: 27%; width: 32.5%; height: 51%; }
.tiger2-slot--bodyR { left: 58.5%; top: 27%; width: 32.5%; height: 51%; }
.tiger2-slot--c1 { left: 38.5%; top: 78%; width: 4.5%; height: 10%; border-radius: 50%; }
.tiger2-slot--c2 { left: 46%; top: 78%; width: 4.5%; height: 10%; border-radius: 50%; }
.tiger2-slot--c3 { left: 53.5%; top: 78%; width: 4.5%; height: 10%; border-radius: 50%; }
.tiger2-slot--c4 { left: 61%; top: 78%; width: 4.5%; height: 10%; border-radius: 50%; }
.tiger2-slot.is-over { border-color: var(--red-deep); background: rgba(200,149,46,.14); }
.tiger2-slot.is-filled { border-color: transparent; background: transparent; }
.tiger2-final { display: none; position: absolute; inset: 0; place-items: center; }
.tiger2-final img { width: 70%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 18px 26px rgba(70,40,20,.25)); }
.tiger2-board.is-done .tiger2-sheet, .tiger2-board.is-done .tiger2-slot { display: none; }
.tiger2-board.is-done .tiger2-final { display: grid; animation: tiger2Pop .55s cubic-bezier(.2,1.4,.4,1); }
.tiger2-tray { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tiger2-pieces { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: 100%; }
.tiger2-piece img { width: 64px; height: 64px; }
.tiger2-piece { padding: 6px 4px; }
.tiger2-pieces.is-hidden { display: none; }
@media (max-width: 900px) {
  .tiger2-pieces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiger2-piece img { width: 54px; height: 54px; }
  .tiger2-design .tiger2-cap { font-size: 11px; }
  .tiger2-slot--c1, .tiger2-slot--c2, .tiger2-slot--c3, .tiger2-slot--c4 { height: 9%; top: 79%; }
}

/* 布老虎：空白纸样 + 下方布片，布片按纸样虚线位置严丝合缝 */
.tiger2-board { width: 300px; height: 400px; aspect-ratio: auto; }
.tiger2-outline { position: absolute; left: 0; top: 0; width: 100%; height: 310px; object-fit: contain; display: block; }
.tiger2-slot--bodyL { left: 2%; top: 2%; width: 46%; height: 73%; }
.tiger2-slot--bodyR { left: 52%; top: 2%; width: 46%; height: 73%; }
.tiger2-slot--c1 { left: 5%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot--c2 { left: 29%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot--c3 { left: 53%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-slot--c4 { left: 77%; top: 80%; width: 16%; height: 12%; border-radius: 50%; }
.tiger2-final img { width: 88%; }
.tiger2-board.is-done .tiger2-outline { display: none; }
.tiger2-pieces { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) {
  .tiger2-board { width: 270px; height: 360px; }
  .tiger2-outline { height: 279px; }
  .tiger2-slot--bodyL, .tiger2-slot--bodyR { height: 73%; }
  .tiger2-slot--c1, .tiger2-slot--c2, .tiger2-slot--c3, .tiger2-slot--c4 { top: 81%; height: 11.5%; }
  .tiger2-pieces { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 手机端泥泥狗 V1：画面在上、说明在下，卡片内滚动 */
@media (max-width: 900px) {
  .shop-detail.is-immersive .shop-detail__card { width: 94vw; max-width: 94vw; max-height: 94vh; padding: 12px 12px 14px; overflow: auto; }
  .shop-detail.is-immersive .clay-v1-wrap { display: flex; flex-direction: column; height: auto; width: 100%; gap: 10px; }
  .shop-detail.is-immersive .clay-v1-svg { width: 100%; height: auto; max-height: none; aspect-ratio: 1280 / 800; }
  .shop-detail.is-immersive .clay-v1-info { position: static; transform: none; width: 100%; max-height: none; overflow: visible; display: block; padding: 10px 12px; }
  .shop-detail.is-immersive .clay-v1-info dl { grid-template-columns: 34px 1fr; font-size: 11.5px; }
  .shop-detail.is-immersive .clay-v1-info__head b { font-size: 19px; }
  .shop-detail.is-immersive .clay-v1-info__foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ================= 回到最初的 16:9 舞台，只保留新背景 ================= */
.market2d, .market2d-shops, .act--3 .inner2d {
  top: 0; bottom: 0; left: 0; right: 0;
  width: auto; max-width: none; height: auto;
  transform: none;
}
.market2d__video, .inner2d__video { inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; transform: none; }
.act--2 .market3d::before, .act--3 .inner3d::before { display: block; }
.act--2 .market3d::after, .act--3 .inner3d::after { display: block; }
.market2d { z-index: 2; }
.market2d-shops { z-index: 6; }

@media (max-width: 900px) {
  .market2d, .market2d-shops, .act--3 .inner2d {
    top: 50%; bottom: auto; left: 0; right: 0;
    width: auto; height: calc(100vw * 9 / 16);
    transform: translateY(-50%);
  }
  .market2d__video, .inner2d__video { object-fit: contain; }
  .act--2 .market-title, .act--3 .inner3d-title { top: calc(50% - 100vw * 9 / 32 - 172px); }
  .market-tabs, .inner3d-tabs { top: calc(50% + 100vw * 9 / 32 + 14px); bottom: auto; left: 12px; right: 12px; }
  .market-sign-hot, .act--3 .inner3d-actions { top: calc(50% + 100vw * 9 / 32 + 96px); bottom: auto; }
  .act--3 .inner3d-actions { left: 10px; right: 10px; transform: none; }
}
@media (min-width: 901px) {
  .market-tabs, .inner3d-tabs { left: 14px; right: 14px; }
}

/* ================= 最终：手机也使用网页版满屏布局，只整体缩小 ================= */
@media (max-width: 900px) {
  .market2d, .market2d-shops, .act--3 .inner2d {
    top: 0; bottom: 0; left: 0; right: 0;
    width: auto; height: 100%; transform: none;
  }
  .market2d__video, .inner2d__video { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .act--2 .market-title, .act--3 .inner3d-title {
    top: 72px; left: 12px; right: auto; width: auto; max-width: 76vw;
    padding: 10px 14px 9px; background: rgba(251,243,228,.92); border: 1px solid rgba(200,149,46,.45); border-radius: 10px;
    box-shadow: 0 8px 20px rgba(60,36,20,.16);
  }
  .market-title h2, .inner3d-title h2 { font-size: 19px; line-height: 1.25; }
  .market-title__desc, .inner3d-title__desc { margin: 5px 0 0; font-size: 11px; line-height: 1.6; }
  .market-title__no, .inner3d-title__no { font-size: 10px; }
  .market-tabs, .inner3d-tabs { top: auto; bottom: 18px; left: 12px; right: 12px; }
  .market-tab, .inner3d-tab { padding: 7px 9px; }
  .market-tab__txt b, .inner3d-tab b { font-size: 13px; }
  .market-tab__txt i, .inner3d-tab i { font-size: 10.5px; }
  .market-sign-hot { top: auto; bottom: 96px; left: 50%; transform: translateX(-50%); }
  .act--3 .inner3d-actions { top: auto; bottom: 88px; left: 10px; right: 10px; transform: none; justify-content: center; }
  .app-back { top: 70px; right: 12px; }
}

/* 第一街道：网页版满屏视频；手机端用 16:9 画幅完整显示，不拉伸 */
.market2d__video { object-fit: cover; }
@media (max-width: 900px) {
  .market2d, .market2d-shops {
    top: 50%; bottom: auto; left: 0; right: 0;
    width: auto; height: calc(100vw * 9 / 16);
    transform: translateY(-50%);
  }
  .market2d__video { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .act--2 .market-title { top: calc(50% - 100vw * 9 / 32 - 172px); left: 12px; right: 12px; max-width: none; width: auto; }
  .market-tabs { top: calc(50% + 100vw * 9 / 32 + 14px); bottom: auto; left: 12px; right: 12px; }
  .market-sign-hot { top: calc(50% + 100vw * 9 / 32 + 96px); bottom: auto; left: 50%; transform: translateX(-50%); }
}

/* 第二街道回到香囊互动那一版：横版内街 + 16:9 舞台；香囊页面保持新版 */
.act--3 .inner2d__video { object-fit: cover; }
@media (max-width: 900px) {
  .act--3 .inner2d {
    top: 50%; bottom: auto; left: 0; right: 0;
    width: auto; height: calc(100vw * 9 / 16);
    transform: translateY(-50%);
  }
  .inner2d__video { inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .act--3 .inner3d-title { top: calc(50% - 100vw * 9 / 32 - 172px); left: 12px; right: 12px; max-width: none; width: auto; }
  .inner3d-tabs { top: calc(50% + 100vw * 9 / 32 + 14px); bottom: auto; left: 12px; right: 12px; }
  .act--3 .inner3d-actions { top: calc(50% + 100vw * 9 / 32 + 96px); bottom: auto; left: 10px; right: 10px; transform: none; }
}
/* 横版内街的店铺热区 */
.inner2d-hot--sachet { left: 1.5%; top: 48%; width: 36%; height: 40%; }
.inner2d-hot--clay { left: 62%; top: 46%; width: 36%; height: 42%; }
.inner2d-hot--gate { left: 37%; top: 22%; width: 26%; height: 40%; }


/* ================= 香囊互动页样式（之前被截掉，现在补回） ================= */
.sachet2-game { display: flex; gap: 16px; align-items: stretch; width: 100%; }
.sachet2-left { flex: 0 0 212px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sachet2-scene { position: relative; width: 100%; display: grid; place-items: center; padding: 6px 6px 2px; border-radius: 14px; background: radial-gradient(ellipse at 50% 58%, rgba(255,246,226,.85), rgba(246,231,198,.35) 68%, transparent 100%); transition: background .2s, box-shadow .2s; }
.sachet2-scene.is-over { background: radial-gradient(ellipse at 50% 58%, rgba(255,238,196,.98), rgba(244,215,156,.55) 68%, transparent 100%); box-shadow: 0 0 0 2px rgba(200,149,46,.45), 0 12px 28px rgba(120,78,36,.18); }
.sachet2-img { width: 188px; height: 188px; object-fit: contain; display: block; filter: drop-shadow(0 14px 18px rgba(78,46,26,.22)); transform-origin: 50% 92%; transition: filter .25s ease, transform .3s cubic-bezier(.2,1.4,.4,1); }
.sachet2-img.is-plump { animation: sachetPlump .42s cubic-bezier(.2,1.3,.4,1); }
@keyframes sachetPlump { 0% { transform: scale(.96,.92); } 55% { transform: scale(1.06,1.04); } 100% { transform: scale(1,1); } }
.sachet2-img.is-done { transform: scale(1.06,1.12); }
.sachet2-fill { margin: 4px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.sachet2-left .sachet-label { margin-top: 6px; }
.sachet2-left .sachet-swatches { gap: 6px; justify-content: center; flex-wrap: nowrap; }
.sachet2-left .sachet-swatch { width: 25px; height: 25px; flex: 0 0 25px; }
.sachet2-right { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.sachet2-mats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.sachet2-mat { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 5px; border: 1px solid rgba(110,90,68,.28); border-radius: 10px; background: rgba(255,250,240,.8); cursor: grab; touch-action: none; user-select: none; transition: transform .2s, box-shadow .2s, opacity .2s; }
.sachet2-mat:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(80,45,25,.14); }
.sachet2-mat:active { cursor: grabbing; }
.sachet2-mat img { width: 58px; height: 58px; object-fit: contain; border-radius: 8px; pointer-events: none; }
.sachet2-mat span { font-family: var(--font-serif); font-size: 12px; color: var(--ink); letter-spacing: .06em; pointer-events: none; }
.sachet2-mat.is-added { opacity: .32; cursor: default; transform: none; box-shadow: none; }
.sachet2-tip { margin: 2px 0 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; line-height: 1.6; }
.sachet2-ghost { position: fixed; z-index: 9999; width: 58px; height: 58px; display: grid; place-items: center; padding: 5px; border-radius: 50%; background: #fffaf0; border: 1px solid rgba(200,149,46,.6); box-shadow: 0 10px 24px rgba(60,36,20,.28); pointer-events: none; transform: translate(-50%,-50%) rotate(-8deg); }
.sachet2-ghost svg { width: 44px; height: 44px; display: block; }
.sachet2-game--done .sachet2-right { justify-content: center; }
.sachet2-done-mat { margin: 0 0 6px; font-family: var(--font-serif); font-size: 16px; color: var(--ink); letter-spacing: .06em; line-height: 1.7; }
.sachet2-done-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.bag-sachet-img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(60,36,20,.18)); }
@media (max-width: 900px) {
  .sachet2-game { flex-direction: column; gap: 12px; }
  .sachet2-left { flex: none; width: 100%; }
  .sachet2-img { width: 170px; height: 170px; }
  .sachet2-mats { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .sachet2-mat img { width: 52px; height: 52px; }
  .sachet2-mat span { font-size: 11px; }
  .shop-detail__actions { position: sticky; bottom: -1px; z-index: 3; padding: 10px 0 2px; background: linear-gradient(180deg, rgba(251,243,228,0), var(--paper) 42%); }
}

/* 精确对齐背景里的店铺 */
.market2d-shop--left { left: 20%; top: 47%; width: 22%; height: 35%; }
.market2d-shop--right { left: 64.5%; top: 46%; width: 23%; height: 36%; }
.inner2d-hot--sachet { left: 4%; top: 38%; width: 42%; height: 47%; }
.inner2d-hot--clay { left: 56%; top: 36%; width: 38%; height: 47%; }
.inner2d-hot--gate { left: 37%; top: 22%; width: 23%; height: 40%; }

/* 布老虎：按新编号设计图重排 7 个零件位置 */
.tiger2-board { width: min(680px, 100%); height: auto; aspect-ratio: 1706 / 1279; }
.tiger2-sheet { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.tiger2-slot--sil { left: 3%; top: 27%; width: 22%; height: 55%; }
.tiger2-slot--bodyL { left: 26%; top: 23%; width: 33%; height: 51%; }
.tiger2-slot--bodyR { left: 59%; top: 23%; width: 32%; height: 51%; }
.tiger2-slot--c1 { left: 39.5%; top: 60%; width: 6%; height: 11%; border-radius: 50%; }
.tiger2-slot--c2 { left: 55%; top: 60%; width: 6%; height: 11%; border-radius: 50%; }
.tiger2-slot--c3 { left: 50%; top: 60%; width: 4.5%; height: 11%; border-radius: 50%; }
.tiger2-slot--c4 { left: 60%; top: 60%; width: 4.5%; height: 11%; border-radius: 50%; }
.tiger2-pieces { grid-template-columns: repeat(7, minmax(0,1fr)); }
.tiger2-piece img { width: 56px; height: 56px; }
@media (max-width: 900px) {
  .tiger2-board { width: 96%; }
  .tiger2-pieces { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .tiger2-piece img { width: 48px; height: 48px; }
}

/* 布老虎：身体不含圆片，圆片独立且放大；纸样按编号 7 区域 */
.tiger2-slot--bodyL { left: 26%; top: 23%; width: 33%; height: 39%; }
.tiger2-slot--bodyR { left: 59%; top: 23%; width: 32%; height: 39%; }
.tiger2-slot--c1 { left: 39%; top: 64%; width: 9.5%; height: 18%; }
.tiger2-slot--c2 { left: 55%; top: 64%; width: 9.5%; height: 18%; }
.tiger2-slot--c3 { left: 49.5%; top: 64%; width: 8%; height: 18%; }
.tiger2-slot--c4 { left: 60.5%; top: 64%; width: 8%; height: 18%; }
.tiger2-slot--sil { left: 3%; top: 27%; width: 22%; height: 55%; }
.tiger2-piece img { width: 56px; height: 56px; }

/* ================= 布老虎：重新设计的缝针脚小游戏 ================= */
.tiger3-game { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; }
.tiger3-board { position: relative; width: min(680px, 100%); aspect-ratio: 1706 / 1279; margin: 0 auto; }
.tiger3-design { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; transition: opacity .8s; }
.tiger3-thread { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.tiger3-stitch { stroke: #662C18; stroke-width: 1.1; stroke-linecap: round; stroke-dasharray: 1.6 1.1; opacity: .95; }
.tiger3-dot { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid #b8763d; background: #fffaf0; color: #662C18; font: 700 12px/1 var(--font-num); display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 6px rgba(60,36,20,.16); z-index: 3; padding: 0; transition: background .2s, color .2s, box-shadow .2s, opacity .3s; }
.tiger3-dot.is-next { border-color: var(--red-deep); background: #fff3dd; box-shadow: 0 0 0 3px rgba(184,32,42,.18); animation: tiger3Next 1.2s ease-in-out infinite; }
.tiger3-dot.is-done { background: #662C18; color: #fff6e8; border-color: #662C18; cursor: default; }
@keyframes tiger3Next { 0%,100% { transform: translate(-50%,-50%) scale(1); } 50% { transform: translate(-50%,-50%) scale(1.13); } }
.tiger3-done { position: absolute; inset: 3%; display: grid; place-items: center; opacity: 0; transition: opacity .8s; pointer-events: none; }
.tiger3-done img { width: 68%; max-height: 92%; object-fit: contain; filter: drop-shadow(0 18px 26px rgba(70,40,20,.25)); }
.tiger3-board.is-done .tiger3-dot { opacity: 0; pointer-events: none; }
.tiger3-board.is-done .tiger3-design { opacity: .18; }
.tiger3-progress { margin: 0; font-size: 12px; color: var(--muted); letter-spacing: .08em; }
.tiger3-hint { margin: 0; font-size: 11px; color: var(--muted); letter-spacing: .04em; }
@media (max-width: 900px) {
  .tiger3-board { width: 100%; }
  .tiger3-dot { width: 22px; height: 22px; font-size: 11px; }
  .tiger3-done img { width: 72%; }
}

/* 泥泥狗铺：整屏店铺画面 + 左侧黑狗点击介绍 */
.clay-shop { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.clay-shop__img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.clay-shop__dog { position: absolute; left: 23.5%; top: 35%; width: 13.5%; height: 34%; border: 0; background: transparent; cursor: pointer; border-radius: 12px; transition: box-shadow .2s, background .2s; }
.clay-shop__dog:hover, .clay-shop__dog:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(200,149,46,.75), 0 10px 24px rgba(60,36,20,.18); background: rgba(255,246,220,.08); }
.clay-shop__info { position: absolute; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 4; width: min(640px, 92%); padding: 14px 18px 16px; background: rgba(251,243,228,.97); border: 1px solid #d6bb8f; border-radius: 10px; box-shadow: 0 14px 34px rgba(80,45,25,.22); }
.clay-shop__info[hidden] { display: none; }
.clay-shop__info-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.clay-shop__info-head b { font-family: var(--font-serif); font-size: 19px; letter-spacing: .08em; color: var(--ink); }
.clay-shop__info-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d6bb8f; background: #fffaf0; color: var(--ink-2); font-size: 18px; line-height: 1; cursor: pointer; }
.clay-shop__info p { margin: 6px 0 0; font-size: 12.5px; line-height: 1.8; color: var(--ink-2); }
@media (max-width: 900px) {
  .shop-detail.is-immersive .shop-detail__card { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; padding: 8px; background: #2e2118; border: 0; }
  .clay-shop__img { object-fit: contain; }
  .clay-shop__info { bottom: 12px; width: 94%; padding: 12px 14px 14px; }
  .clay-shop__info p { font-size: 11.5px; }
}

/* 泥泥狗铺：整屏铺满店铺画面，图片完整显示，四周用同图虚化补满 */
.shop-detail.is-immersive .shop-detail__card { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.clay-shop { background: #2e2118; overflow: hidden; }
.clay-shop::before { content: ""; position: absolute; inset: -4%; background: url(assets/clay-shop-web.jpg) center / cover no-repeat; filter: blur(24px) brightness(.5) saturate(.9); transform: scale(1.05); }
.clay-shop__img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; border-radius: 0; }
.clay-shop__dog { z-index: 3; }
.clay-shop__info { z-index: 4; }
@media (max-width: 900px) {
  .shop-detail.is-immersive .shop-detail__card { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; padding: 0; }
  .clay-shop { width: 100vw; height: 100vh; }
}

/* 黑狗信息卡固定在视口底部，避免被画布裁掉 */
.clay-shop__info { position: fixed !important; left: 50% !important; bottom: 18px !important; transform: translateX(-50%) !important; z-index: 999 !important; width: min(640px, 92vw) !important; }
@media (max-width: 900px) {
  .clay-shop__info { bottom: 16px !important; width: 94vw !important; max-height: 52vh; overflow: auto; }
}

/* 黑狗热区：用狗本身抠图，不再用大矩形 */
.clay-shop__dog { border: 0 !important; background: transparent !important; box-shadow: none !important; overflow: visible; }
.clay-shop__dog-img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; filter: drop-shadow(0 6px 8px rgba(30,18,10,.22)); transition: filter .2s, transform .2s; }
.clay-shop__dog:hover .clay-shop__dog-img, .clay-shop__dog:focus-visible .clay-shop__dog-img { filter: drop-shadow(0 0 8px rgba(200,149,46,.95)) drop-shadow(0 6px 8px rgba(30,18,10,.22)); transform: translateY(-2px); }
.clay-shop__dog:hover, .clay-shop__dog:focus-visible { box-shadow: none !important; background: transparent !important; }

/* 泥泥狗铺：用一个 16:9 画框承载图片和黑狗热区，热区按图片内坐标定位 */
.clay-shop { display: flex; align-items: center; justify-content: center; background: #2e2118; }
.clay-shop__frame { position: relative; width: min(100%, calc(100vh * 16 / 9)); max-height: 100%; aspect-ratio: 16 / 9; }
.clay-shop__img { width: 100%; height: 100%; object-fit: contain; display: block; }
/* 泥泥狗热区位置由脚本内联写入 */
.clay-shop__dog-img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 900px) {
  .clay-shop__frame { width: 100%; max-height: none; }
}

/* 黑狗热区改为完全隐形，只保留极轻的暖光提示，与画面融合 */
.clay-shop__dog { background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; overflow: visible; }
.clay-shop__dog::after { content: ""; position: absolute; inset: 8% 6%; border-radius: 50%; background: radial-gradient(ellipse at 50% 55%, rgba(255,224,160,.22), rgba(255,224,160,0) 68%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.clay-shop__dog:hover::after, .clay-shop__dog:focus-visible::after { opacity: 1; }

/* 泥泥狗铺：多只小狗隐形热区，悬停只泛暖光 */
.clay-shop__dog { position: absolute; background: transparent !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; padding: 0; cursor: pointer; }
.clay-shop__dog::after { content: ""; position: absolute; inset: 10% 8%; border-radius: 50%; background: radial-gradient(ellipse at 50% 55%, rgba(255,224,160,.22), rgba(255,224,160,0) 68%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.clay-shop__dog:hover::after, .clay-shop__dog:focus-visible::after { opacity: 1; }

/* 午朝门：隐形热区 + 信息卡 */
.inner2d-hot--gate { background: transparent !important; border: 0 !important; }
.inner2d-hot--gate > span { display: none !important; }
.inner2d-hot--gate::after { content: ""; position: absolute; inset: 4%; border-radius: 18px; background: radial-gradient(ellipse at 50% 55%, rgba(255,224,160,.16), rgba(255,224,160,0) 70%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.inner2d-hot--gate:hover::after, .inner2d-hot--gate:focus-visible::after { opacity: 1; }
.gate-info { position: fixed; inset: 0; z-index: 95; display: grid; place-items: end center; padding: 18px; background: rgba(30,18,10,.32); }
.gate-info[hidden] { display: none; }
.gate-info__card { width: min(520px, 94vw); background: var(--paper); border: 1px solid #d6bb8f; border-radius: 12px; padding: 16px 18px 18px; box-shadow: 0 18px 44px rgba(60,30,15,.32); }
.gate-info__head { display: flex; justify-content: space-between; align-items: center; }
.gate-info__head b { font-family: var(--font-serif); font-size: 22px; letter-spacing: .1em; color: var(--ink); }
.gate-info__close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d6bb8f; background: #fffaf0; color: var(--ink-2); font-size: 18px; cursor: pointer; }
.gate-info__card p { margin: 8px 0 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.gate-info__go { margin-top: 14px; width: 100%; padding: 12px 16px; border: 0; border-radius: 8px; background: var(--red-deep); color: #fff6e8; font-family: var(--font-serif); font-size: 15px; letter-spacing: .12em; cursor: pointer; }
@media (max-width: 900px) { .gate-info { padding: 12px; } }

/* 午朝门信息卡是第三幕的直接子元素，覆盖“只显示 .inner3d”的隐藏规则 */
.act--3 > .gate-info { display: grid !important; }
.act--3 > .gate-info[hidden] { display: none !important; }

/* 泥泥狗：集齐小狗后的打卡成功页 */
.clay-checkin { position: fixed; inset: 0; z-index: 96; display: grid; place-items: center; padding: 18px; background: url(assets/clay-checkin-bg.jpg) center / cover no-repeat; overflow: auto; }
.clay-checkin::before { content: ""; position: absolute; inset: 0; background: rgba(70,45,28,.22); backdrop-filter: blur(1.5px); }
.clay-checkin__card { position: relative; width: min(680px, 94vw); padding: 30px 28px 26px; background: #f7ecd2; border: 2px solid #c9a468; border-radius: 6px; box-shadow: 0 26px 70px rgba(40,20,10,.4); text-align: center; }
.clay-checkin__card::before { content: ""; position: absolute; inset: 10px; border: 1px solid #d8bd8e; border-radius: 3px; pointer-events: none; }
.clay-checkin__title { position: relative; font-family: var(--font-serif); font-size: clamp(28px, 5vw, 46px); font-weight: 700; letter-spacing: .1em; color: #6f261f; }
.clay-checkin__tick { display: inline-grid; place-items: center; width: .72em; height: .72em; margin-left: .18em; border-radius: 50%; background: #b8202a; color: #fff6e8; font-size: .55em; vertical-align: .18em; }
.clay-checkin__charm { position: relative; width: min(300px, 52vw); margin: 6px auto 4px; display: block; filter: drop-shadow(0 14px 24px rgba(110,55,25,.28)); }
.clay-checkin__btn { position: relative; margin-top: 10px; min-width: min(380px, 80%); padding: 12px 30px; border: 1px solid #662C18; border-radius: 4px; background: linear-gradient(180deg, #7C4D30, #662C18); color: #F6E9CF; font-family: var(--font-serif); font-size: 16px; letter-spacing: .12em; cursor: pointer; box-shadow: 0 8px 20px rgba(120,40,25,.3); }
.clay-checkin__btn:hover { background: linear-gradient(180deg, #cc4436, #a8332c); }

/* 打卡成功页背景改成店铺暖景虚化，避免参考照片里的字透出来 */
.clay-checkin { background: url(assets/clay-shop-web.jpg) center / cover no-repeat !important; }
.clay-checkin::before { background: rgba(70,45,28,.32); backdrop-filter: blur(6px); }
.clay-checkin__charm { filter: drop-shadow(0 14px 24px rgba(110,55,25,.28)); }

/* 挂件图羽化边缘，融进纸卡 */
.clay-checkin__charm { width: min(330px, 58vw) !important; padding: 6px; -webkit-mask-image: radial-gradient(ellipse 60% 56% at 50% 54%, #000 50%, rgba(0,0,0,0) 78%); mask-image: radial-gradient(ellipse 60% 56% at 50% 54%, #000 50%, rgba(0,0,0,0) 78%); }

/* 全局「回到上一步」：固定左上角，全过程可见 */
.global-back { position: fixed; left: 14px; top: 74px; z-index: 300; display: inline-flex; align-items: center; gap: 4px; padding: 7px 13px; border-radius: 999px; border: 1px solid rgba(150,110,70,.45); background: rgba(251,243,228,.94); color: var(--ink-2); font-family: var(--font-serif); font-size: 13px; letter-spacing: .08em; box-shadow: 0 4px 14px rgba(60,36,20,.14); cursor: pointer; backdrop-filter: blur(4px); }
.global-back:hover { background: #fff7e6; color: var(--red-deep); }
/* 撤销旧的返回按钮 */
#appBack, #innerBack, .inner3d-back { display: none !important; }
@media (max-width: 900px) { .global-back { top: 66px; left: 10px; font-size: 12px; padding: 6px 11px; } }

/* 泥泥狗铺：小字提示 + 小狗互动更明显一点（仍保持轮廓柔和） */
.clay-shop__hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 4; margin: 0; padding: 7px 18px; border-radius: 999px; background: rgba(35,22,12,.46); color: #ffe9c2; font-size: 15px; letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.clay-shop__hint span { display: inline-block; margin-left: 2px; animation: clayHintBob 1.6s ease-in-out infinite; }
@keyframes clayHintBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(3px); } }
/* 前台小狗常驻一层很淡的暖光，悬停再亮一点 */
.clay-shop__dog::after { opacity: .34; }
.clay-shop__dog:hover::after, .clay-shop__dog:focus-visible::after { opacity: 1; }
@media (max-width: 900px) { .clay-shop__hint { top: 10px; font-size: 14px; padding: 6px 16px; } }

/* ================= 午朝门近景 + 开门动画 ================= */
.gate-photo { position: fixed; inset: 0; z-index: 97; display: grid; place-items: center; background: #1b110b; overflow: hidden; }
.gate-photo[hidden] { display: none; }
.gate-photo__bg { position: absolute; inset: -4%; background: url(assets/gate-closeup.jpg) center / cover no-repeat; filter: blur(24px) brightness(.45) saturate(.9); }
.gate-photo__frame { position: relative; width: min(100vw, calc(100vh * 1706 / 1279)); aspect-ratio: 1706 / 1279; transform-origin: 50% 62%; transition: transform 1.9s cubic-bezier(.4,.05,.2,1); }
.gate-photo__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gate-photo__beyond { position: absolute; left: 42.4%; top: 61.1%; width: 15.8%; height: 25.8%; opacity: 0; z-index: 1; border-radius: 50% 50% 0 0 / 28% 28% 0 0; transition: opacity .25s ease .2s; background: radial-gradient(ellipse at 50% 60%, #f3d39a 0%, #cf9a5c 14%, #8a5233 34%, #4a2616 62%, #23120a 100%); }
.gate-photo__leaf { position: absolute; top: 61.1%; height: 25.8%; z-index: 2; background-size: 100% 100%; background-repeat: no-repeat; transition: transform 1.7s cubic-bezier(.45,.05,.2,1), box-shadow .6s ease, filter .6s ease, opacity .8s ease .9s; box-shadow: 0 0 16px rgba(0,0,0,.22); will-change: transform; }
.gate-photo__leaf--left { left: 42.9%; width: 7.5%; background-image: url(assets/gate-door-left.jpg); transform-origin: left center; }
.gate-photo__leaf--right { left: 50.4%; width: 7.6%; background-image: url(assets/gate-door-right.jpg); transform-origin: right center; }
.gate-photo.is-opening .gate-photo__leaf--left { transform: scaleX(.08); box-shadow: 6px 3px 14px rgba(0,0,0,.28); filter: brightness(.95); opacity: 0; }
.gate-photo.is-opening .gate-photo__leaf--right { transform: scaleX(.08); box-shadow: -6px 3px 14px rgba(0,0,0,.28); filter: brightness(.95); opacity: 0; transition-delay: .08s; }
.gate-photo.is-opening .gate-photo__beyond { opacity: 1; transform: scale(1); }
.gate-photo__beyond { transform: scale(.94); transition: opacity .9s ease .3s, transform 1.5s ease .2s; }
.gate-photo.is-opening .gate-photo__hint { opacity: 0; transition: opacity .35s; }
.gate-photo.is-opening .gate-photo__frame { transform: scale(1.14); }
.gate-photo__door { position: absolute; left: 40%; top: 58%; width: 20%; height: 33%; z-index: 3; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: pointer; transition: box-shadow .2s; }
.gate-photo__door:hover, .gate-photo__door:focus-visible { outline: none; box-shadow: 0 0 0 2px rgba(255,220,150,.6), 0 0 26px rgba(255,200,120,.35); }
.gate-photo.is-opening .gate-photo__door { pointer-events: none; }
.gate-photo__hint { position: absolute; left: 50%; bottom: 2.5%; transform: translateX(-50%); margin: 0; z-index: 4; padding: 6px 16px; border-radius: 999px; background: rgba(35,20,12,.52); color: #ffe9c2; font-size: 13px; letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.gate-photo__close { position: fixed; top: 14px; right: 14px; z-index: 5; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,235,200,.35); background: rgba(30,18,10,.5); color: #ffe9c2; font-size: 21px; line-height: 1; cursor: pointer; }
.gate-photo__close:hover { background: rgba(60,35,20,.7); }
@media (max-width: 900px) {
  .gate-photo__frame { width: 100vw; }
  .gate-photo__hint { font-size: 12px; padding: 5px 13px; }
  .gate-photo__close { top: 10px; right: 10px; width: 34px; height: 34px; }
}

/* ================= 八卦坛：整屏八卦图 + 卦象解释 ================= */
.bagua-photo { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; background: #17100a; overflow: hidden; }
.bagua-photo[hidden] { display: none; }
.bagua-photo__bg { position: absolute; inset: -4%; background: url(assets/bagua-altar.jpg) center / cover no-repeat; filter: blur(26px) brightness(.5) saturate(.85); }
.bagua-photo__frame { position: relative; width: min(100vw, 100vh); aspect-ratio: 1 / 1; }
.bagua-photo__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.bagua-photo__gua { position: absolute; z-index: 2; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: 10px; transition: box-shadow .2s, background .2s; }
.bagua-photo__gua:hover, .bagua-photo__gua:focus-visible { outline: none; background: rgba(255,235,190,.16); box-shadow: 0 0 0 2px rgba(200,149,46,.65), 0 0 22px rgba(255,210,130,.35); }
.bagua-photo__gua.is-seen { background: rgba(255,235,190,.1); }
.bagua-photo__hint { position: absolute; left: 50%; top: 2.2%; transform: translateX(-50%); margin: 0; z-index: 3; padding: 6px 16px; border-radius: 999px; background: rgba(35,20,12,.5); color: #ffe9c2; font-size: 13px; letter-spacing: .08em; white-space: nowrap; backdrop-filter: blur(3px); }
.bagua-photo__info { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; width: min(560px, 92vw); padding: 14px 18px 16px; border: 1px solid #d6bb8f; border-radius: 12px; background: rgba(251,243,228,.97); box-shadow: 0 18px 44px rgba(50,28,12,.35); }
.bagua-photo__info[hidden] { display: none; }
.bagua-photo__info-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bagua-photo__info-head b { font-family: var(--font-serif); font-size: 20px; letter-spacing: .1em; color: var(--ink); }
.bagua-photo__info-close { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #d6bb8f; background: #fffaf0; color: var(--ink-2); font-size: 18px; cursor: pointer; }
.bagua-photo__sym { margin-top: 2px; font-size: 34px; line-height: 1.1; color: #7a2a22; letter-spacing: .08em; }
.bagua-photo__text { margin: 6px 0 0; font-size: 13px; line-height: 1.8; color: var(--ink-2); }
.bagua-photo__close { position: fixed; top: 14px; right: 14px; z-index: 7; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,235,200,.35); background: rgba(30,18,10,.5); color: #ffe9c2; font-size: 21px; line-height: 1; cursor: pointer; }
.bagua-photo__close:hover { background: rgba(60,35,20,.7); }
@media (max-width: 900px) {
  .bagua-photo__hint { font-size: 12px; padding: 5px 13px; top: 1.6%; }
  .bagua-photo__info { bottom: 10px; width: 94vw; padding: 12px 14px 14px; }
  .bagua-photo__text { font-size: 12px; }
  .bagua-photo__close { top: 10px; right: 10px; width: 34px; height: 34px; }
}

/* ================= 祈福按钮 + 祈福树 + 福牌 ================= */
.pray-btn { position: absolute; left: 39.5%; top: 59%; transform: translate(-100%, -50%); z-index: 60; display: none; flex-direction: column; align-items: center; gap: 3px; width: 46px; padding: 10px 5px; border-radius: 999px; border: 1px solid rgba(150,110,70,.45); background: linear-gradient(180deg, #fbf3e4, #f2e2c4); color: #7a2a22; font-family: var(--font-serif); box-shadow: 0 8px 22px rgba(60,36,20,.18); cursor: pointer; writing-mode: vertical-rl; letter-spacing: .16em; font-size: var(--fs-sm); }
.act--4.is-active .pray-btn { display: flex; }
.temple-map__frame { position: relative; }
.pray-btn:hover { background: #fff6e2; box-shadow: 0 10px 26px rgba(60,36,20,.24); }
.pray-btn__icon { writing-mode: horizontal-tb; font-size: var(--fs-sm); color: #b8202a; }
.pray-page { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; overflow: hidden; background: #1a100a; }
.pray-page[hidden] { display: none; }
.pray-page__bg { position: absolute; inset: -4%; background-position: center; background-size: cover; filter: blur(26px) brightness(.5) saturate(.9); }
.pray-tree .pray-page__bg { background-image: url(assets/pray-tree.jpg); }
.pray-card .pray-page__bg { background-image: url(assets/pray-card.jpg); }
.pray-page__frame { position: relative; width: min(100vw, calc(100vh * 1290 / 1703)); aspect-ratio: 1290 / 1703; }
.pray-card .pray-page__frame { width: min(100vw, calc(100vh * 1280 / 1706)); aspect-ratio: 1280 / 1706; }
.pray-page__img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pray-page__hint { position: absolute; left: 50%; bottom: 2.4%; transform: translateX(-50%); margin: 0; padding: 6px 16px; border-radius: 999px; background: rgba(35,20,12,.5); color: #ffe9c2; font-size: 13px; letter-spacing: .08em; white-space: nowrap; backdrop-filter: blur(3px); }
.pray-page__close { position: fixed; top: 14px; right: 14px; z-index: 8; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,235,200,.35); background: rgba(30,18,10,.5); color: #ffe9c2; font-size: 21px; line-height: 1; cursor: pointer; }
.pray-page__close:hover { background: rgba(60,35,20,.7); }
/* 女孩手里的红牌 */
.pray-tree__knot { position: absolute; left: 45.5%; top: 45.5%; width: 15%; height: 13%; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
.pray-tree__knot::after { content: ""; position: absolute; inset: 0; border-radius: 14px; background: radial-gradient(ellipse at 50% 50%, rgba(255,220,150,.4), rgba(255,220,150,0) 70%); opacity: 0; transition: opacity .2s; pointer-events: none; }
.pray-tree__knot:hover::after, .pray-tree__knot:focus-visible::after { opacity: 1; }
/* 福牌文字区 */
.pray-card__patch { position: absolute; left: 33.6%; top: 21.4%; width: 33%; height: 49.6%; display: grid; place-items: center; background: linear-gradient(180deg, #F1E7D8, #f3e2c0); border: 0; border-radius: 4px; box-shadow: inset 0 0 22px rgba(170,130,80,.12); }
.pray-card__phrases { display: flex; flex-direction: row-reverse; justify-content: center; align-items: center; gap: 8%; width: 100%; height: 92%; }
.pray-card__phrase { writing-mode: vertical-rl; text-orientation: upright; font-family: var(--font-serif); font-size: clamp(26px, 7.2vw, 40px); line-height: 1.25; letter-spacing: .12em; color: #5a2a18; text-shadow: 0 1px 0 rgba(255,250,235,.6); }
.pray-card__actions { position: absolute; left: 50%; bottom: 1.6%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 3; }
.pray-card__btn { padding: 10px 22px; border-radius: 999px; font-family: var(--font-serif); font-size: 14px; letter-spacing: .1em; cursor: pointer; border: 1px solid rgba(150,110,70,.5); }
.pray-card__btn--ghost { background: rgba(251,243,228,.92); color: #6a3a20; }
.pray-card__btn--primary { background: linear-gradient(180deg, #7C4D30, #662C18); color: #F6E9CF; border-color: #662C18; }
@media (max-width: 900px) {
  .pray-btn { left: 39.5%; width: 42px; padding: 9px 4px; font-size: 13px; }
  .pray-page__hint { font-size: 12px; padding: 5px 13px; }
  .pray-page__close { top: 10px; right: 10px; width: 34px; height: 34px; }
  .pray-card__btn { padding: 9px 16px; font-size: 13px; }
}
/* 八卦热区：去掉硬框，仅保留柔和暖光 */
.bagua-photo__gua { background: transparent !important; border: 0 !important; box-shadow: none !important; }
.bagua-photo__gua::after { content: ""; position: absolute; inset: -10%; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,226,170,.34), rgba(255,226,170,0) 68%); opacity: 0; transition: opacity .22s; pointer-events: none; }
.bagua-photo__gua:hover::after, .bagua-photo__gua:focus-visible::after { opacity: 1; }
.bagua-photo__gua.is-seen::after { opacity: .35; }

/* 祈福树：顶部说明 + 贴合红牌的热区 */
.pray-tree .pray-page__frame { overflow: visible; }
.pray-page__top { position: absolute; left: 50%; top: 2.2%; transform: translateX(-50%); z-index: 4; margin: 0; max-width: 92%; padding: 7px 16px; border-radius: 10px; background: rgba(35,20,12,.55); color: #ffe9c2; font-size: 13px; letter-spacing: .05em; line-height: 1.5; text-align: center; white-space: nowrap; backdrop-filter: blur(3px); }
.pray-tree__knot { left: 48.2%; top: 45.6%; width: 9.6%; height: 9.2%; border-radius: 6px; }
.pray-tree__knot::after { border-radius: 6px; inset: -6%; background: radial-gradient(ellipse at 50% 50%, rgba(255,220,150,.55), rgba(255,220,150,0) 66%); }
.pray-tree__knot:hover::after, .pray-tree__knot:focus-visible::after { opacity: 1; }
@media (max-width: 900px) {
  .pray-page__top { font-size: 12px; padding: 6px 12px; white-space: normal; max-width: 92vw; }
}

/* 午朝门：暖色过渡，衔接更顺 */
.veil--warm { background: radial-gradient(90% 80% at 50% 52%, #fdf2d9, #e9cfa4); transition: opacity .85s ease; }
.gate-photo:not([hidden]) { animation: gatePhotoIn .5s ease both; }
@keyframes gatePhotoIn { from { opacity: 0; } to { opacity: 1; } }
.gate-photo__frame { will-change: transform; }
.gate-photo__leaf { will-change: transform, opacity; }
.gate-photo.is-opening .gate-photo__frame { transform: scale(1.16); }
.gate-photo.is-opening .gate-photo__beyond { opacity: 1; }

/* ================= 统一互动按钮：木牌 / 纸签质感，贴合场景 ================= */
.market-tab, .inner3d-tab {
  position: relative;
  background: linear-gradient(180deg, #F1E7D8 0%, #E6DACA 100%) !important;
  border: 1px solid #9C8878 !important;
  border-radius: 4px !important;
  box-shadow: inset 0 0 0 1px rgba(255,250,235,.55), inset 0 -12px 18px rgba(170,130,80,.16), 0 3px 0 rgba(120,85,50,.5), 0 10px 18px -10px rgba(60,36,20,.38) !important;
  transform: rotate(-.55deg);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease !important;
}
.market-tab:nth-child(2), .inner3d-tab:nth-child(2) { transform: rotate(.55deg); }
.market-tab:hover, .inner3d-tab:hover {
  transform: rotate(0deg) translateY(-2px);
  background: #f7ead0 !important;
  box-shadow: inset 0 0 0 1px rgba(255,250,235,.6), 0 3px 0 rgba(120,85,50,.5), 0 14px 24px -10px rgba(60,36,20,.42) !important;
}
.market-tab::before, .inner3d-tab::before {
  content: ""; position: absolute; top: -5px; left: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: #7a5230; box-shadow: 0 0 0 1px #c9a36d; transform: translateX(-50%);
}
.market-tab__seal, .inner3d-tab__seal {
  background: #662C18 !important; border-radius: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(255,240,210,.35), 0 2px 4px rgba(60,30,20,.25);
}
.inner3d-tab--right .inner3d-tab__seal { background: #B88549 !important; }
.market-tab__arrow { color: #7C4D30 !important; font-size: 16px !important; }
.inner3d-tab b, .market-tab__txt b { text-shadow: 0 1px 0 rgba(255,250,235,.55); }
/* 午朝门推门按钮：木牌 */
.inner3d-gate {
  background: linear-gradient(180deg, #f0dfbf 0%, #e3ca9d 100%) !important;
  color: #5a2a18 !important;
  border: 1px solid #9C8878 !important;
  border-radius: 4px !important;
  font-family: var(--font-serif) !important;
  letter-spacing: .08em;
  box-shadow: inset 0 0 0 1px rgba(255,250,235,.5), 0 3px 0 rgba(120,85,50,.5), 0 10px 20px -10px rgba(60,36,20,.4) !important;
}
.inner3d-gate:hover { background: #f6e9cf !important; color: #4a2012 !important; }
/* 祈福：木牌 + 红绳 */
.pray-btn {
  border-radius: 4px !important;
  background: linear-gradient(180deg, #f8ead0 0%, #eed7ad 100%) !important;
  border: 1px solid #B88549 !important;
  box-shadow: inset 0 0 0 1px rgba(255,250,235,.5), 0 3px 0 rgba(120,85,50,.42), 0 8px 18px -8px rgba(60,36,20,.38) !important;
}
.pray-btn::before {
  content: ""; position: absolute; top: -10px; left: 50%; width: 2px; height: 10px;
  background: #b8202a; transform: translateX(-50%); box-shadow: 0 0 0 1px rgba(120,40,30,.25);
}
.pray-btn:hover { background: #fbf0da !important; }
/* 陵庙五处打卡：纸签 */
.spot-item {
  background: rgba(251,243,228,.6) !important;
  border: 1px solid rgba(150,110,70,.35) !important;
  border-radius: 3px !important;
  box-shadow: inset 0 0 0 1px rgba(255,250,235,.4);
}
.spot-item:hover { background: #f8efdc !important; border-color: rgba(150,110,70,.55) !important; }
/* 商店里的通用按钮：纸签 */
.btn { border-radius: 4px !important; box-shadow: inset 0 0 0 1px rgba(255,250,235,.5), 0 2px 0 rgba(120,85,50,.35), 0 8px 16px -10px rgba(60,36,20,.3) !important; }
.btn--primary { background: linear-gradient(180deg, #7C4D30, #662C18) !important; }
.btn--ghost { background: rgba(251,243,228,.85) !important; }
@media (max-width: 900px) {
  .market-tab, .inner3d-tab { transform: rotate(-.35deg); }
  .market-tab:nth-child(2), .inner3d-tab:nth-child(2) { transform: rotate(.35deg); }
}

/* 店铺弹层顶部让开全局返回按钮 */
@media (max-width: 900px) {
  .shop-detail__card { padding-top: 82px; }
  .shop-detail__close { top: 12px; }
}
@media (min-width: 901px) {
  .shop-detail__card { padding-top: 78px; }
}

/* ================= 第二街道：热区贴合店铺与午朝门 ================= */
.inner2d-hot--sachet {
  left: 1%; top: 34%; width: 33%; height: 52%;
  border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 16px;
}
.inner2d-hot--clay {
  left: 64%; top: 34%; width: 35%; height: 52%;
  border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 16px;
}
.inner2d-hot--gate { left: 42.5%; top: 37%; width: 15%; height: 33%; border-radius: 16px; }
.inner2d-hot--sachet::after, .inner2d-hot--clay::after {
  content: ""; position: absolute; inset: 4%; border-radius: 18px;
  background: radial-gradient(ellipse at 50% 55%, rgba(255,226,170,.2), rgba(255,226,170,0) 70%);
  opacity: 0; transition: opacity .25s; pointer-events: none;
}
.inner2d-hot--sachet:hover::after, .inner2d-hot--sachet:focus-visible::after,
.inner2d-hot--clay:hover::after, .inner2d-hot--clay:focus-visible::after { opacity: 1; }
.inner2d-hot:hover, .inner2d-hot:focus-visible { background: transparent !important; box-shadow: none !important; border-color: transparent !important; }
.inner2d-hot > span {
  padding: 5px 12px !important; border-radius: 3px !important;
  background: linear-gradient(180deg, #F1E7D8, #E6DACA) !important;
  border: 1px solid #9C8878 !important;
  box-shadow: 0 2px 0 rgba(120,85,50,.4), 0 8px 16px -8px rgba(60,36,20,.4) !important;
  color: #5a2a18 !important; font-size: 12px !important; letter-spacing: .1em !important;
}
.inner2d-hot--gate > span { display: none !important; }

/* ================= 压缩馍：水彩三口 ================= */
.bun2-game { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 8px; }
.bun2-card { position: relative; width: min(520px, 100%); aspect-ratio: 903 / 853; border-radius: 8px; overflow: hidden; border: 1px solid #c9ad86; background: #f6ecda; box-shadow: 0 14px 30px -16px rgba(60,36,20,.45), inset 0 0 0 1px rgba(255,250,240,.6); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease; }
.bun2-card:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -16px rgba(60,36,20,.5); }
.bun2-card.is-biting { animation: bun2-bite .42s ease; }
@keyframes bun2-bite { 0%{transform:scale(1) rotate(0)} 30%{transform:scale(.962) rotate(-1.2deg)} 62%{transform:scale(1.014) rotate(.8deg)} 100%{transform:scale(1) rotate(0)} }
.bun2-img { width: 100%; height: 100%; object-fit: contain; display: block; user-select: none; -webkit-user-drag: none; }
.bun2-hint { margin: 0; font-family: var(--font-serif); font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.bun2-done-img { width: min(210px, 48%); height: auto; filter: drop-shadow(0 10px 16px rgba(60,36,20,.28)); }
/* ================= 布老虎：九宫格拼图 ================= */
.jigsaw2-game { position: relative; display: flex; gap: 18px; align-items: flex-start; justify-content: center; width: 100%; padding: 4px 0 8px; }
.jigsaw2-board { position: relative; width: min(54%, 480px); aspect-ratio: 1; border: 1px solid #c9ad86; border-radius: 6px; overflow: hidden; background: #f6ecda; box-shadow: 0 14px 30px -18px rgba(60,36,20,.45); }
.jigsaw2-ghost { width: 100%; height: 100%; object-fit: cover; opacity: .55; display: block; }
.jigsaw2-done { position: absolute; inset: 0; background-size: 100% 100%; opacity: 0; transition: opacity .45s ease; pointer-events: none; }
.jigsaw2-done.is-on { opacity: 1; }
.jigsaw2-slots { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 2px; }
.jigsaw2-slot { padding: 0; border: 1px dashed rgba(150,110,70,.5); background: rgba(255,250,235,.12); cursor: pointer; transition: background .2s, border-color .2s; }
.jigsaw2-slot.is-filled { border-color: transparent; background-size: 100% 100%; background-repeat: no-repeat; }
.jigsaw2-slot.is-hover { border-color: rgba(184,58,50,.8); background: rgba(255,244,220,.35); }
.jigsaw2-tray { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; max-width: 300px; }
.jigsaw2-tile { position: relative; aspect-ratio: 1; padding: 0; border: 1px solid #c9ad86; border-radius: 3px; background-size: 100% 100%; background-repeat: no-repeat; cursor: grab; touch-action: none; box-shadow: 0 3px 8px -4px rgba(60,36,20,.35); transition: transform .18s ease, opacity .25s ease, box-shadow .18s; }
.jigsaw2-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 12px -6px rgba(60,36,20,.4); }
.jigsaw2-tile.is-drag { cursor: grabbing; z-index: 9; pointer-events: none; box-shadow: 0 14px 24px -10px rgba(60,36,20,.55); }
.jigsaw2-tile.is-placed { opacity: 0; pointer-events: none; }
.jigsaw2-hint { position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%); margin: 0; font-family: var(--font-serif); font-size: 12px; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
@media (max-width: 900px) {
  .jigsaw2-game { flex-direction: row; align-items: center; gap: 10px; padding-bottom: 26px; }
  .jigsaw2-board { width: 46%; }
  .jigsaw2-tray { width: 48%; max-width: none; gap: 4px; }
}

/* ================= 压缩馍：逐口动画（参考图逐帧） ================= */
.bun4-game { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0 8px; }
.bun4-card { position: relative; width: min(520px, 100%); aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid #c9ad86; background: #f6ecda; box-shadow: 0 14px 30px -16px rgba(60,36,20,.45); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.bun4-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.bun4-img--old { z-index: 1; opacity: 0; }
.bun4-img--new { z-index: 2; opacity: 1; }
.bun4-card.is-biting .bun4-img--old { opacity: 1; }
.bun4-card.is-biting .bun4-img--new { animation: bun4-reveal .5s ease forwards; }
@keyframes bun4-reveal {
  0% { clip-path: circle(0% at 74% 45%); }
  100% { clip-path: circle(150% at 74% 45%); }
}
.bun4-card.is-biting { animation: bun4-shake .4s ease; }
@keyframes bun4-shake { 0%{transform:scale(1) rotate(0)} 25%{transform:scale(.99) rotate(-.5deg)} 55%{transform:scale(1.006) rotate(.4deg)} 100%{transform:scale(1) rotate(0)} }
.bun4-card.is-finished .bun4-img--new { animation: bun4-finish .8s ease forwards; }
@keyframes bun4-finish { 0%{filter:none} 100%{filter:saturate(.94)} }
.bun4-crumbs { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.bun4-crumb { position: absolute; width: 6px; height: 5px; border-radius: 40% 60% 55% 45%; background: #d9a35e; opacity: .95; animation: bun4-crumb-fly .62s ease-out forwards; }
@keyframes bun4-crumb-fly { 0%{opacity:1; transform:translate(0,0) scale(1) rotate(0)} 100%{opacity:0; transform:translate(var(--dx), var(--dy)) scale(.5) rotate(180deg)} }
.bun4-hint { margin: 0; font-family: var(--font-serif); font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.bun4-done-img { width: min(250px, 58%); height: auto; border-radius: 6px; border: 1px solid #c9ad86; }

/* 拼图拖拽反馈 */
.jigsaw2-slot.is-target { border-color: rgba(184,58,50,.85) !important; background: rgba(255,244,220,.55) !important; box-shadow: inset 0 0 0 2px rgba(184,58,50,.35), 0 0 18px rgba(184,58,50,.25); }
.jigsaw2-slot.is-hover { border-color: rgba(184,58,50,.9) !important; background: rgba(255,244,220,.45) !important; }
.jigsaw2-tile.is-drag { z-index: 30 !important; transform-origin: center; box-shadow: 0 18px 28px -12px rgba(60,36,20,.55) !important; }
.jigsaw2-tile.is-return { animation: jig2-return .34s ease; }
@keyframes jig2-return { 0%,100%{transform:scale(1)} 40%{transform:scale(.94) translateX(-3px)} 70%{transform:scale(1.02) translateX(2px)} }

/* ================= 压缩馍：图片遮罩咬痕动画 ================= */
.bun5-game { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 4px 0 8px; }
.bun5-card { position: relative; width: min(520px, 100%); aspect-ratio: 903 / 853; border-radius: 8px; overflow: hidden; border: 1px solid #c9ad86; background: #f2e7d3; box-shadow: 0 14px 30px -16px rgba(60,36,20,.45); cursor: pointer; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.bun5-svg { display: block; width: 100%; height: 100%; }
.bun5-svg image { pointer-events: none; }
.bun5-card.is-biting .bun5-bun { animation: bun5-shake .4s ease; }
@keyframes bun5-shake { 0%{transform:scale(1) rotate(0)} 25%{transform:scale(.992) rotate(-.35deg)} 55%{transform:scale(1.004) rotate(.3deg)} 100%{transform:scale(1) rotate(0)} }
.bun5-bun { transform-box: fill-box; transform-origin: center; transition: transform .32s cubic-bezier(.2,.8,.2,1); }
.bun5-bite-pop { animation: bun5-bite-pop .26s cubic-bezier(.3,1.3,.5,1) both; transform-box: fill-box; transform-origin: center; }
@keyframes bun5-bite-pop { from { transform: scale(.12); } 60% { transform: scale(1.06); } to { transform: scale(1); } }
.bun5-crumb { position: absolute; width: 6px; height: 5px; border-radius: 40% 60% 55% 45%; background: #d9a35e; pointer-events: none; animation: bun5-crumb-fly .62s ease-out forwards; }
@keyframes bun5-crumb-fly { 0%{opacity:1; transform:translate(0,0) scale(1)} 100%{opacity:0; transform:translate(var(--dx), var(--dy)) scale(.5)} }
.bun5-hint { margin: 0; font-family: var(--font-serif); font-size: 13px; letter-spacing: .12em; color: var(--muted); }
.bun5-done-img { width: min(250px, 58%); height: auto; border-radius: 6px; border: 1px solid #c9ad86; }

/* 拼图：拿起碎片的幽灵副本 + 放大手机端碎片 */
.jigsaw2-ghostpiece { position: fixed; left: -999px; top: -999px; z-index: 999; pointer-events: none; background-size: 100% 100%; background-repeat: no-repeat; border-radius: 4px; box-shadow: 0 18px 30px -12px rgba(60,36,20,.6), 0 0 0 1px rgba(255,246,228,.7); transform: scale(1.07); will-change: left, top; }
.jigsaw2-tile.is-source { opacity: .25; filter: saturate(.75); }
@media (max-width: 900px) {
  .jigsaw2-board { width: 42%; }
  .jigsaw2-tray { width: 55%; gap: 5px; }
  .jigsaw2-slot { min-height: 0; }
}

/* ================= 碑林：擦碑场景 ================= */
.beilin-scene { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; overflow: hidden; background: #16120d; }
.beilin-scene[hidden] { display: none; }
.beilin-scene__bg { position: absolute; inset: -8%; background: radial-gradient(60% 55% at 50% 45%, #4a4033, #1c1712 75%); filter: blur(26px); }
.beilin-scene__frame { position: relative; width: min(92vw, calc(100vh * 1280 / 1706 * 0.94)); aspect-ratio: 1280 / 1706; box-shadow: 0 26px 60px -20px rgba(0,0,0,.75), inset 0 0 0 1px rgba(220,205,175,.25); cursor: none; touch-action: none; }
.beilin-scene__clean { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.beilin-scene__dirty { position: absolute; inset: 0; opacity: 1; transition: opacity .9s ease; }
.beilin-scene.is-clean .beilin-scene__dirty { opacity: 0; }
.beilin-scene__dirty svg { width: 100%; height: 100%; display: block; }
.beilin-scene__rag { position: absolute; left: 50%; top: 50%; width: 118px; height: 118px; margin: -59px 0 0 -59px; pointer-events: none; z-index: 6; opacity: 0; transition: opacity .25s ease; }
.beilin-scene.is-wiping .beilin-scene__rag { opacity: 1; }
.beilin-scene__rag svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 6px 8px rgba(0,0,0,.45)); }
.beilin-scene__hint { position: absolute; left: 50%; bottom: 2.6%; transform: translateX(-50%); margin: 0; padding: 7px 18px; border-radius: 999px; background: rgba(30,22,14,.62); color: #f2e5c8; font-family: var(--font-serif); font-size: 13px; letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.beilin-scene__close { position: absolute; top: 14px; right: 14px; z-index: 8; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(240,225,195,.4); background: rgba(30,22,14,.55); color: #f2e5c8; font-size: 21px; line-height: 1; cursor: pointer; }
.beilin-scene__close:hover { background: rgba(70,52,34,.8); }
.beilin-webs { pointer-events: none; }
.beilin-hole { animation: beilin-wipe .55s cubic-bezier(.25,.8,.4,1) both; transform-box: fill-box; transform-origin: center; }
@keyframes beilin-wipe { from { transform: scale(.15); opacity: .3; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 900px) {
  .beilin-scene__frame { cursor: pointer; }
  .beilin-scene__rag { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
  .beilin-scene__hint { font-size: 12px; padding: 6px 14px; }
}

/* 擦碑：真实擦拭动画 */
.beilin-scene__rag.is-pressed { opacity: 1 !important; transform: translate(-50%,-50%) scale(.94); filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
@keyframes beilin-rub {
  0%   { transform: translate(-50%,-50%) scale(1.05) rotate(-3deg); }
  12%  { transform: translate(-62%,-42%) scale(1.12) rotate(7deg); }
  26%  { transform: translate(-40%,-58%) scale(1.08) rotate(-8deg); }
  40%  { transform: translate(-60%,-58%) scale(1.14) rotate(6deg); }
  54%  { transform: translate(-40%,-42%) scale(1.08) rotate(-6deg); }
  68%  { transform: translate(-60%,-46%) scale(1.12) rotate(7deg); }
  82%  { transform: translate(-42%,-55%) scale(1.06) rotate(-4deg); }
  100% { transform: translate(-50%,-50%) scale(1) rotate(0); }
}
.beilin-scene__rag.is-rubbing::after { content: ""; position: absolute; inset: -18%; border-radius: 50%; background: radial-gradient(circle, rgba(255,245,220,.35), rgba(255,245,220,0) 70%); animation: beilin-shine .92s ease-out both; }
@keyframes beilin-shine { 0%{opacity:0; transform:scale(.6)} 30%{opacity:.9; transform:scale(1)} 100%{opacity:0; transform:scale(1.25)} }
.beilin-dust-puff { position: absolute; pointer-events: none; z-index: 7; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(214,198,168,.85), rgba(214,198,168,0)); animation: beilin-puff .9s ease-out forwards; }
@keyframes beilin-puff { 0%{opacity:.9; transform:translate(-50%,-50%) scale(.4)} 60%{opacity:.55} 100%{opacity:0; transform:translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(2.2)} }
.beilin-hole { animation-duration: .9s; }

/* 擦碑：按住拖动连续擦拭 */
.beilin-scene__rag { transition: opacity .2s ease, transform .12s ease, filter .12s ease; }
.beilin-scene__rag.is-wiping { opacity: .95; }
.beilin-dust-puff { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .beilin-scene__rag { width: 96px; height: 96px; margin: -48px 0 0 -48px; }
}

/* ================= 通天殿：供奉 ================= */
.tongtian-scene { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; overflow: hidden; background: #140e08; }
.tongtian-scene[hidden] { display: none; }
.tongtian-scene__bg { position: absolute; inset: -8%; background: radial-gradient(60% 55% at 50% 40%, #6a4a20, #170f08 75%); filter: blur(28px); }
.tongtian-scene__frame { position: relative; width: min(100vw, calc(100vh * 1344 / 2912)); aspect-ratio: 1344 / 2912; overflow: hidden; box-shadow: 0 30px 70px -24px rgba(0,0,0,.8); }
.tongtian-scene__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tongtian-scene__table { position: absolute; left: 2%; width: 96%; top: 62%; height: 31%; z-index: 3; cursor: pointer; border-radius: 14px; background: transparent; }
.tongtian-scene__table::after { content: ""; position: absolute; inset: 0; border-radius: 14px; box-shadow: inset 0 0 0 1.5px rgba(255,214,140,.0), inset 0 0 40px rgba(255,208,120,.0); transition: box-shadow .3s; }
.tongtian-scene__table:hover::after, .tongtian-scene.is-choosing .tongtian-scene__table::after { box-shadow: inset 0 0 0 1.5px rgba(255,214,140,.55), inset 0 0 40px rgba(255,208,120,.18); }
.tongtian-scene__table-hint { position: absolute; left: 50%; top: 42%; transform: translate(-50%,-50%); color: #ffe9c2; font-family: var(--font-serif); font-size: 12px; letter-spacing: .12em; background: rgba(30,18,8,.55); border: 1px solid rgba(255,214,150,.35); padding: 5px 12px; border-radius: 999px; white-space: nowrap; pointer-events: none; animation: tongtian-hint-pulse 2s ease-in-out infinite; }
@keyframes tongtian-hint-pulse { 0%,100% { opacity: .65; } 50% { opacity: 1; } }
.tongtian-scene__slots { position: absolute; left: 0; right: 0; top: 81%; height: 14%; z-index: 4; pointer-events: none; }
.tongtian-scene__slot { position: absolute; top: 50%; transform: translate(-50%,-50%); width: 27%; aspect-ratio: 1; border-radius: 50%; border: 1.5px dashed rgba(255,226,170,.55); display: grid; place-items: center; color: rgba(255,232,190,.7); font-size: 18px; }
.tongtian-scene__slot.is-filled { border-color: transparent; }
.tongtian-scene__slot img { position: absolute; inset: -10%; width: 120%; height: 120%; object-fit: contain; filter: drop-shadow(0 8px 12px rgba(0,0,0,.45)); animation: tongtian-place .5s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes tongtian-place { 0% { transform: translateY(-60px) scale(.4); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }
.tongtian-scene__hint { position: absolute; left: 50%; bottom: 2.2%; transform: translateX(-50%); margin: 0; padding: 7px 18px; border-radius: 999px; background: rgba(28,18,8,.62); color: #ffe9c2; font-family: var(--font-serif); font-size: 13px; letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.tongtian-scene__close { position: absolute; top: 14px; right: 14px; z-index: 9; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,226,180,.4); background: rgba(28,18,8,.55); color: #ffe9c2; font-size: 21px; line-height: 1; cursor: pointer; }
.tongtian-scene__close:hover { background: rgba(80,55,25,.8); }
.tongtian-scene__chooser { position: absolute; left: 0; right: 0; bottom: 0; z-index: 8; padding: 14px 16px 20px; background: linear-gradient(180deg, rgba(30,20,10,.2), rgba(24,15,7,.94) 30%); backdrop-filter: blur(4px); transform: translateY(0); transition: transform .3s ease, opacity .3s ease; }
.tongtian-scene__chooser[hidden] { display: none; }
.tongtian-scene__chooser-head { display: flex; align-items: center; justify-content: space-between; margin: 0 0 10px; color: #ffe9c2; font-family: var(--font-serif); font-size: 14px; letter-spacing: .12em; }
.tongtian-scene__chooser-close { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(255,226,180,.4); background: transparent; color: #ffe9c2; font-size: 16px; line-height: 1; cursor: pointer; }
.tongtian-scene__cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tongtian-scene__card { position: relative; padding: 6px 6px 8px; border-radius: 10px; border: 1px solid rgba(255,214,150,.45); background: radial-gradient(120% 100% at 50% 0%, rgba(255,232,190,.16), rgba(40,24,10,.7)); color: #ffe9c2; font-family: var(--font-serif); font-size: 12px; letter-spacing: .1em; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; transition: transform .2s, border-color .2s, box-shadow .2s; }
.tongtian-scene__card:hover { transform: translateY(-3px); border-color: rgba(255,226,170,.85); box-shadow: 0 10px 22px -10px rgba(0,0,0,.7); }
.tongtian-scene__card img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 7px; }
.tongtian-scene__card--flower img { object-position: 50% 42%; }
@media (max-width: 900px) {
  .tongtian-scene__hint { font-size: 12px; padding: 6px 14px; }
  .tongtian-scene__cards { gap: 8px; }
  .tongtian-scene__card { font-size: 11px; padding: 5px 4px 6px; }
  .tongtian-scene__slot { font-size: 15px; }
}

/* ================= 碑林：碑亭（先看亭子，再走近石碑） ================= */
.beilin-hall { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; overflow: hidden; background: #14100b; }
.beilin-hall[hidden] { display: none; }
.beilin-hall__bg { position: absolute; inset: -8%; background: radial-gradient(60% 55% at 50% 45%, #4a4033, #1a1510 75%); filter: blur(26px); }
.beilin-hall__frame { position: relative; width: min(96vw, calc(100vh * 1706 / 1280 * 0.94)); aspect-ratio: 1706 / 1280; box-shadow: 0 26px 60px -20px rgba(0,0,0,.7), inset 0 0 0 1px rgba(220,205,175,.22); }
.beilin-hall__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.beilin-hall__stele { position: absolute; left: 34%; top: 42.5%; width: 35%; height: 26%; padding: 0; border: 0; border-radius: 14px; background: transparent; cursor: pointer; }
.beilin-hall__stele::after { content: ""; position: absolute; inset: -6%; border-radius: 16px; background: radial-gradient(ellipse at 50% 55%, rgba(255,226,170,.25), rgba(255,226,170,0) 70%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.beilin-hall__stele:hover::after, .beilin-hall__stele:focus-visible::after { opacity: 1; }
.beilin-hall__hint { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); margin: 0; padding: 7px 18px; border-radius: 999px; background: rgba(30,22,14,.6); color: #f2e5c8; font-family: var(--font-serif); font-size: 13px; letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.beilin-hall__close { position: absolute; top: 14px; right: 14px; z-index: 8; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(240,225,195,.4); background: rgba(30,22,14,.55); color: #f2e5c8; font-size: 21px; line-height: 1; cursor: pointer; }
.beilin-hall__close:hover { background: rgba(70,52,34,.8); }
@media (max-width: 900px) {
  .beilin-hall__hint { font-size: 12px; padding: 6px 14px; }
}

/* ================= 第四幕：新陵庙图 + 贴合背景的热区 ================= */
.temple-map__frame { width: auto !important; height: min(68vh, 680px); max-width: 100%; aspect-ratio: 1728 / 2304; }
.temple-map__frame::before { display: none; }
.temple-bg { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--r-m); box-shadow: var(--shadow-card); }
.hotspot { width: 118px; height: 94px; border: 0; background: transparent; padding: 0; gap: 0; }
.hotspot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,236,196,.5), rgba(255,236,196,0) 70%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.hotspot:hover::before, .hotspot:focus-visible::before { opacity: 1; }
.hotspot__seal { display: none; }
.hotspot__label { position: absolute; left: 50%; bottom: -6px; transform: translate(-50%, 6px); }
.hotspot:hover .hotspot__label, .hotspot:focus-visible .hotspot__label { transform: translate(-50%, 0); }
.hotspot.is-done::after { content: "✓"; position: absolute; right: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-deep); color: var(--primary-ink); font-size: 11px; opacity: .9; }
.pray-btn { left: 19% !important; top: 35% !important; transform: translate(-50%, -50%) !important; }
@media (max-width: 900px) {
  .temple-map__frame { width: 100% !important; height: auto; aspect-ratio: 1728 / 2304; }
  .hotspot { width: 100px; height: 80px; }
  .pray-btn { left: 18% !important; top: 34% !important; }
}

/* ================= 第四幕：推开城门直接看陵庙图 ================= */
.act--4 .temple-layout { grid-template-columns: minmax(0, 1fr); padding: calc(78px + 3vh) var(--pad) 3vh; }
.act--4 .temple-info { display: none !important; }
.act--4 .temple-map { width: 100%; height: 100%; justify-content: center; }
.act--4 .temple-map__frame { height: calc(100dvh - 132px); max-height: 900px; width: auto; max-width: 100%; }
.act--4 .temple-map__caption { display: none; }
.temple-finish { position: absolute; left: 50%; bottom: 1.6%; transform: translateX(-50%); z-index: 8; padding: 10px 22px; border-radius: var(--r-pill); border: 1px solid rgba(100,69,50,.5); background: linear-gradient(180deg, #7C4D30, #644532); color: var(--primary-ink); font-family: var(--font-serif); font-size: var(--fs-sm); letter-spacing: .08em; box-shadow: var(--shadow-card); cursor: pointer; white-space: nowrap; }
.temple-finish:disabled { background: rgba(100,69,50,.35); color: rgba(255,247,230,.7); border-color: rgba(100,69,50,.25); cursor: default; }
.temple-finish:not(:disabled):hover { background: linear-gradient(180deg, #8a5a38, #6e4a2c); }
@media (max-width: 900px) {
  .act--4 .temple-layout { padding: calc(72px + 2vh) 8px 2vh; }
  .act--4 .temple-map__frame { height: auto; width: 100%; max-width: 100%; }
  .temple-finish { padding: 9px 16px; font-size: 12px; bottom: 1.2%; }
}

/* 第四幕热区：按点位大小框住建筑，八卦坛为圆形 */
.hotspot { width: auto; height: auto; }
.hotspot.is-round { border-radius: 50%; }
.hotspot.is-round::before { border-radius: 50%; }
.hotspot.is-round .hotspot__label { top: calc(100% + 2px); bottom: auto; }

/* ================= 蓍草园（参考图：white 蓍草 + 春荣园） ================= */
.shicao-scene { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; overflow: hidden; background: radial-gradient(60% 55% at 50% 42%, #FDF7D0, #E9E2B9 70%, #D7D08C 100%); }
.shicao-scene__bg { position: absolute; inset: -10%; background: radial-gradient(50% 42% at 50% 40%, rgba(255,255,255,.55), rgba(253,247,208,0) 70%); pointer-events: none; }
.shicao-scene__frame { position: relative; width: min(92vw, calc(100vh * 0.88)); aspect-ratio: 1; box-shadow: 0 22px 54px -22px rgba(139,138,76,.55), inset 0 0 0 1px rgba(139,138,76,.25); border-radius: var(--r-s); overflow: hidden; background: var(--shicao-paper); }
.shicao-scene__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shicao-scene__hot { position: absolute; left: 12%; top: 21%; width: 76%; height: 58%; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.shicao-scene__hot::after { content: ""; position: absolute; inset: -4%; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,255,240,.42), rgba(255,255,240,0) 72%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.shicao-scene__hot:hover::after, .shicao-scene__hot:focus-visible::after { opacity: 1; }
.shicao-scene__hint { position: absolute; left: 50%; bottom: 3.4%; transform: translateX(-50%); margin: 0; padding: 7px 18px; border-radius: var(--r-pill); background: rgba(139,138,76,.28); color: #3E3A22; font-family: var(--font-serif); font-size: var(--fs-sm); letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.shicao-scene__close { position: absolute; top: 14px; right: 14px; z-index: 8; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(139,138,76,.45); background: rgba(253,247,208,.7); color: #4A4428; font-size: 21px; line-height: 1; cursor: pointer; }
.shicao-scene__close:hover { background: #FDF7D0; }

.shicao-intro { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 18px; overflow: auto; background: rgba(40,38,22,.52); backdrop-filter: blur(5px); }
.shicao-intro__card { position: relative; width: min(92vw, 452px); max-height: 88vh; overflow: auto; padding: 22px 22px 20px; border-radius: var(--r-l); border: 1px solid rgba(139,138,76,.35); background: linear-gradient(180deg, #FDF7D0 0%, #F1F1EF 100%); box-shadow: 0 26px 60px -24px rgba(60,58,30,.6); text-align: center; }
.shicao-intro__close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(139,138,76,.35); background: rgba(255,255,255,.6); color: #6B6742; font-size: 17px; line-height: 1; cursor: pointer; }
.shicao-intro__herb { display: block; width: 124px; height: auto; margin: 4px auto 6px; mix-blend-mode: multiply; }
.shicao-intro__kicker { margin: 0; font-size: var(--fs-2xs); letter-spacing: .26em; color: var(--shicao-olive); }
.shicao-intro__title { margin: 6px 0 0; font-family: var(--font-serif); font-size: 24px; letter-spacing: .06em; color: #3A3620; }
.shicao-intro__text { margin: 10px 0 0; font-size: var(--fs-sm); line-height: 1.92; color: #4A462E; text-align: left; }
.shicao-intro__text + .shicao-intro__text { margin-top: 7px; }
.shicao-intro__btn { width: 100%; margin-top: 18px; padding: 13px 16px; border-radius: var(--r-pill); border: 1px solid rgba(139,138,76,.55); background: linear-gradient(180deg, #A19E74, #8B8A4C); color: #FDF7D0; font-family: var(--font-serif); font-size: var(--fs-base); letter-spacing: .12em; cursor: pointer; box-shadow: 0 10px 22px -14px rgba(60,58,30,.8); }
.shicao-intro__btn:hover { background: linear-gradient(180deg, #AEAB7E, #979654); }
@media (max-width: 900px) {
  .shicao-scene__hint { font-size: 12px; padding: 6px 14px; }
  .shicao-intro__card { padding: 18px 16px 16px; }
  .shicao-intro__title { font-size: 21px; }
}

/* ================= 伏羲陵：陵前上香 ================= */
.tomb-scene { position: fixed; inset: 0; z-index: 98; display: grid; place-items: center; overflow: hidden; background: radial-gradient(60% 55% at 50% 42%, #F6EDD6, #E9DEC2 70%, #DCCEA8 100%); }
.tomb-scene__bg { position: absolute; inset: -10%; background: radial-gradient(50% 42% at 50% 40%, rgba(255,250,235,.5), rgba(246,237,214,0) 70%); pointer-events: none; }
.tomb-scene__frame { position: relative; width: min(92vw, calc(100vh * 0.88)); aspect-ratio: 1; box-shadow: 0 22px 54px -22px rgba(90,70,40,.55), inset 0 0 0 1px rgba(150,110,70,.22); border-radius: var(--r-s); overflow: hidden; background: #EFE6CE; }
.tomb-scene__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tomb-scene__altar { position: absolute; left: 15%; top: 73%; width: 70%; height: 17%; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.tomb-scene__altar::after { content: ""; position: absolute; inset: -6%; border-radius: 50%; background: radial-gradient(ellipse at 50% 60%, rgba(255,214,150,.36), rgba(255,214,150,0) 72%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.tomb-scene__altar:hover::after, .tomb-scene__altar:focus-visible::after { opacity: 1; }
.tomb-scene__hint { position: absolute; left: 50%; bottom: 3.4%; transform: translateX(-50%); margin: 0; padding: 7px 18px; border-radius: var(--r-pill); background: rgba(100,69,50,.32); color: #FBF3E1; font-family: var(--font-serif); font-size: var(--fs-sm); letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(3px); }
.tomb-scene__close { position: absolute; top: 14px; right: 14px; z-index: 8; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(150,110,70,.45); background: rgba(251,243,225,.75); color: #5A3E28; font-size: 21px; line-height: 1; cursor: pointer; }
.tomb-scene__close:hover { background: #FBF3E1; }

.tomb-intro { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 18px; overflow: auto; background: rgba(38,26,14,.55); backdrop-filter: blur(5px); }
.tomb-intro__card { position: relative; width: min(92vw, 470px); max-height: 88vh; overflow: auto; padding: 22px 22px 20px; border-radius: var(--r-l); border: 1px solid rgba(150,110,70,.32); background: linear-gradient(180deg, #FBF3E1 0%, #F2E5C9 100%); box-shadow: 0 26px 60px -24px rgba(60,40,20,.6); text-align: center; }
.tomb-intro__close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(150,110,70,.3); background: rgba(255,250,238,.7); color: #6B5038; font-size: 17px; line-height: 1; cursor: pointer; }
.tomb-intro__kicker { margin: 0; font-size: var(--fs-2xs); letter-spacing: .26em; color: var(--muted); }
.tomb-intro__title { margin: 6px 0 0; font-family: var(--font-serif); font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.tomb-intro__text { margin: 10px 0 0; font-size: var(--fs-sm); line-height: 1.92; color: var(--ink-2); text-align: left; }
.tomb-intro__text + .tomb-intro__text { margin-top: 7px; }
.tomb-intro__incense { display: flex; gap: 16px; align-items: flex-start; justify-content: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(150,110,70,.22); }
.tomb-intro__incense figure { margin: 0; width: 76px; }
.tomb-intro__incense img { display: block; width: 100%; height: 92px; object-fit: cover; border-radius: var(--r-s); mix-blend-mode: multiply; }
.tomb-intro__incense figcaption { margin-top: 4px; font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .1em; }
.tomb-intro__incense-label { align-self: center; font-family: var(--font-serif); font-size: var(--fs-sm); color: var(--muted); letter-spacing: .12em; }
.tomb-intro__btn { width: 100%; margin-top: 16px; padding: 13px 16px; border-radius: var(--r-pill); border: 1px solid rgba(100,69,50,.5); background: linear-gradient(180deg, #7C4D30, #644532); color: var(--primary-ink); font-family: var(--font-serif); font-size: var(--fs-base); letter-spacing: .12em; cursor: pointer; box-shadow: 0 10px 22px -14px rgba(60,40,20,.8); }
.tomb-intro__btn:hover { background: linear-gradient(180deg, #8A5A38, #6E4A2C); }

.tomb-incense { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; overflow: hidden; background: radial-gradient(58% 52% at 50% 54%, #2A1C10, #0E0906 78%); }
.tomb-incense__frame { position: relative; width: min(92vw, calc(100vh * 0.9)); aspect-ratio: 1; }
.tomb-incense__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--r-s); filter: brightness(.78) saturate(.92); }
.tomb-incense__glow { position: absolute; left: 50%; top: 87%; width: 46%; height: 26%; transform: translate(-50%,-50%); border-radius: 50%; background: radial-gradient(ellipse, rgba(255,196,110,.6), rgba(255,196,110,0) 70%); opacity: 0; transition: opacity .9s; pointer-events: none; }
.is-lit .tomb-incense__glow { opacity: 1; }
.tomb-incense__sticks { position: absolute; left: 50%; top: 87%; height: 33%; width: auto; transform: translate(-50%, -100%); filter: drop-shadow(0 8px 18px rgba(0,0,0,.45)); transition: filter .8s; cursor: pointer; }
.is-lit .tomb-incense__sticks { filter: drop-shadow(0 0 22px rgba(255,190,110,.7)); }
.tomb-incense__smoke { position: absolute; left: 50%; top: 20%; width: 70%; height: 44%; transform: translateX(-50%); pointer-events: none; opacity: 0; transition: opacity 1s; }
.is-lit .tomb-incense__smoke { opacity: 1; }
.tomb-incense__smoke i { position: absolute; bottom: 0; left: 50%; width: 34px; height: 100%; border-radius: 50%; background: radial-gradient(ellipse at 50% 100%, rgba(236,238,232,.5), rgba(236,238,232,0) 72%); filter: blur(9px); animation: tomb-smoke 6s linear infinite; opacity: 0; }
.tomb-incense__smoke i:nth-child(1) { margin-left: -12%; animation-delay: -1.4s; }
.tomb-incense__smoke i:nth-child(2) { margin-left: 0; animation-delay: -3.2s; width: 40px; }
.tomb-incense__smoke i:nth-child(3) { margin-left: 12%; animation-delay: -5s; }
@keyframes tomb-smoke {
  0% { transform: translate(-50%, 55%) scale(.55); opacity: 0; }
  25% { opacity: .75; }
  70% { opacity: .3; }
  100% { transform: translate(-50%, -55%) scale(1.5); opacity: 0; }
}
.tomb-incense__altar { position: absolute; left: 15%; top: 73%; width: 70%; height: 17%; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.tomb-incense__hint { position: absolute; left: 50%; bottom: 3.4%; transform: translateX(-50%); margin: 0; padding: 7px 18px; border-radius: var(--r-pill); background: rgba(251,243,225,.14); color: #FBF3E1; font-family: var(--font-serif); font-size: var(--fs-sm); letter-spacing: .1em; white-space: nowrap; backdrop-filter: blur(4px); border: 1px solid rgba(251,243,225,.18); }
.tomb-incense__close { position: absolute; top: 14px; right: 14px; z-index: 8; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(251,243,225,.35); background: rgba(30,20,12,.6); color: #FBF3E1; font-size: 21px; line-height: 1; cursor: pointer; }
@media (max-width: 900px) {
  .tomb-scene__hint, .tomb-incense__hint { font-size: 12px; padding: 6px 14px; }
  .tomb-intro__card { padding: 18px 16px 16px; }
  .tomb-intro__title { font-size: 21px; }
  .tomb-intro__incense figure { width: 64px; }
  .tomb-intro__incense img { height: 78px; }
}

/* 碑林：点石碑后镜头缓缓推进（无黑幕，交叉淡化到石碑） */
.beilin-hall__frame { transition: transform 1.85s cubic-bezier(.32,.02,.24,1); transform-origin: 51.5% 55%; will-change: transform; }
.beilin-hall__frame.is-zooming { transform: scale(3.15); }
.beilin-hall.is-zooming .beilin-hall__hint, .beilin-hall.is-zooming .beilin-hall__close { opacity: 0; transition: opacity .35s linear; }
.beilin-scene { animation: beilin-scene-in .65s cubic-bezier(.22,.9,.3,1) both; }
@keyframes beilin-scene-in { from { opacity: 0; transform: scale(1.015); } to { opacity: 1; transform: none; } }

/* ================= 八卦坛：点太极抽卦问签 ================= */
.bagua-photo__taiji { position: absolute; left: 41%; top: 41%; width: 14%; height: 13%; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; z-index: 3; }
.bagua-photo__taiji::after { content: ""; position: absolute; inset: -8%; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,226,170,.36), rgba(255,226,170,0) 70%); opacity: 0; transition: opacity .22s; pointer-events: none; }
.bagua-photo__taiji:hover::after, .bagua-photo__taiji:focus-visible::after { opacity: 1; }
.bagua-photo__taiji.is-spinning::after { opacity: 1; animation: taiji-spin .6s ease-in-out; }
@keyframes taiji-spin { from { transform: rotate(0) scale(1); } 60% { transform: rotate(300deg) scale(1.18); } to { transform: rotate(360deg) scale(1.08); } }

.bagua-quiz { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 18px; overflow: auto; background: rgba(20,12,6,.62); backdrop-filter: blur(6px); }
.bagua-quiz__card { position: relative; width: min(92vw, 440px); max-height: 88vh; overflow: auto; padding: 24px 22px 20px; border-radius: var(--r-l); border: 1px solid rgba(200,160,100,.42); background: linear-gradient(180deg, #FBF3E1 0%, #F2E5C9 100%); box-shadow: 0 26px 60px -24px rgba(50,28,12,.65); animation: bagua-quiz-in .55s cubic-bezier(.22,.9,.3,1) both; }
@keyframes bagua-quiz-in { from { opacity: 0; transform: translateY(16px) scale(.96) rotate(-1.2deg); } to { opacity: 1; transform: none; } }
.bagua-quiz__close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(150,110,70,.35); background: rgba(255,250,238,.7); color: #6B5038; font-size: 17px; line-height: 1; cursor: pointer; }
.bagua-quiz__kicker { margin: 0; font-size: var(--fs-2xs); letter-spacing: .2em; color: var(--muted); }
.bagua-quiz__title { margin: 6px 0 0; font-family: var(--font-serif); font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.bagua-quiz__quote { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--gold); border-radius: 0 var(--r-s) var(--r-s) 0; background: rgba(255,250,235,.78); font-family: var(--font-serif); font-size: var(--fs-md); line-height: 1.8; color: var(--ink); text-align: left; letter-spacing: .02em; }
.bagua-quiz__ask { margin: 12px 0 0; font-size: var(--fs-sm); color: var(--ink-2); line-height: 1.7; }
.bagua-quiz__opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.bagua-quiz__opt { padding: 14px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid rgba(150,110,70,.35); border-radius: var(--r-m); background: rgba(255,250,235,.62); cursor: pointer; transition: transform .18s, border-color .18s, background .18s, box-shadow .18s, opacity .25s; }
.bagua-quiz__opt:hover { border-color: var(--gold); background: #fffaf0; transform: translateY(-2px); box-shadow: 0 10px 22px -14px rgba(150,110,70,.7); }
.bagua-quiz__sym { font-size: 34px; line-height: 1.05; color: #7a2a22; }
.bagua-quiz__name { font-family: var(--font-serif); font-size: 17px; letter-spacing: .08em; color: var(--ink); }
.bagua-quiz__pinyin { font-size: var(--fs-2xs); color: var(--muted); letter-spacing: .06em; }
.bagua-quiz__opt.is-right { border-color: #B88549; background: #FBF0D2; box-shadow: 0 0 0 2px rgba(184,133,73,.45), 0 10px 24px -12px rgba(184,133,73,.65); }
.bagua-quiz__opt.is-dim { opacity: .38; }
.bagua-quiz__opt.is-wrong { border-color: #a33; animation: bagua-shake .45s ease; }
@keyframes bagua-shake { 0%,100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(6px); } 75% { transform: translateX(-3px); } }
.bagua-quiz__result { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-s); border: 1px solid rgba(150,110,70,.25); background: rgba(255,250,235,.78); font-size: var(--fs-sm); line-height: 1.8; color: var(--ink-2); text-align: left; }
.bagua-quiz__result b { display: block; margin-bottom: 2px; font-family: var(--font-serif); font-size: var(--fs-md); letter-spacing: .08em; color: var(--red-deep); }
.bagua-quiz__result b.is-wrong { color: #a33; }
.bagua-quiz__btn { width: 100%; margin-top: 14px; padding: 13px 16px; border-radius: var(--r-pill); border: 1px solid rgba(100,69,50,.5); background: linear-gradient(180deg, #7C4D30, #644532); color: var(--primary-ink); font-family: var(--font-serif); font-size: var(--fs-base); letter-spacing: .1em; cursor: pointer; box-shadow: 0 10px 22px -14px rgba(60,40,20,.8); }
.bagua-quiz__btn:hover { background: linear-gradient(180deg, #8A5A38, #6E4A2C); }
@media (max-width: 900px) {
  .bagua-quiz__card { padding: 20px 16px 16px; }
  .bagua-quiz__title { font-size: 21px; }
  .bagua-quiz__sym { font-size: 30px; }
}

/* 八卦问卦：四选项 2×2 布局 */
.bagua-quiz__opts { grid-template-columns: 1fr 1fr; gap: 8px; }
.bagua-quiz__opt { padding: 11px 6px 9px; }
.bagua-quiz__sym { font-size: 28px; }
.bagua-quiz__name { font-size: 15px; }
.bagua-quiz__pinyin { font-size: 11px; }
@media (max-width: 900px) {
  .bagua-quiz__opt { padding: 10px 5px 8px; }
  .bagua-quiz__sym { font-size: 25px; }
  .bagua-quiz__name { font-size: 14px; }
}

/* 首屏加载态：app 初始化前禁用入陵，避免点了没反应 */
#app:not(.is-ready) #enterBtn { cursor: progress; opacity: .78; filter: none; }
#app.is-ready #enterBtn { opacity: 1; filter: none; }
#app:not(.is-ready) #enterBtn .enter-loading { letter-spacing: .12em; }
#app.is-ready #enterBtn .enter-loading { display: none; }
/* 第二/三幕的大背景图改成进入该幕才加载 */
.act--2 .market3d::before, .act--3 .inner3d::before { background-image: none; }
.act--2.is-active .market3d::before { background-image: url(assets/street1-painted.jpg); }
.act--3.is-active .inner3d::before { background-image: url(assets/street2-painted.jpg); }

/* ================= 祈福树：点树干抽福牌（新图） ================= */
.pray-tree .pray-page__frame { width: min(100vw, calc(100vh * 899 / 1200)); aspect-ratio: 899 / 1200; }
.pray-card .pray-page__frame { width: min(100vw, calc(100vh * 900 / 1200)); aspect-ratio: 900 / 1200; }
.pray-tree__knot { left: 40%; top: 53%; width: 20%; height: 45%; border-radius: 50%; }
.pray-tree__knot::after { border-radius: 50%; inset: -4%; background: radial-gradient(ellipse at 50% 55%, rgba(255,214,150,.42), rgba(255,214,150,0) 70%); }
.pray-card__patch, .pray-card__phrases { display: none !important; }
.pray-card .pray-page__img.is-in { animation: pray-wish-in .55s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes pray-wish-in { from { opacity: .2; transform: scale(.965) rotate(-.6deg); } to { opacity: 1; transform: none; } }

/* ================= 八卦坛：点太极看「一画开天」================= */
.bagua-intro { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 18px; overflow: auto; background: rgba(20,12,6,.62); backdrop-filter: blur(6px); }
.bagua-intro__card { position: relative; width: min(92vw, 460px); max-height: 88vh; overflow: auto; padding: 24px 22px 20px; border-radius: var(--r-l); border: 1px solid rgba(200,160,100,.42); background: linear-gradient(180deg, #FBF3E1 0%, #F2E5C9 100%); box-shadow: 0 26px 60px -24px rgba(50,28,12,.65); animation: bagua-quiz-in .55s cubic-bezier(.22,.9,.3,1) both; }
.bagua-intro__close { position: absolute; top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(150,110,70,.35); background: rgba(255,250,238,.7); color: #6B5038; font-size: 17px; line-height: 1; cursor: pointer; }
.bagua-intro__kicker { margin: 0; font-size: var(--fs-2xs); letter-spacing: .2em; color: var(--muted); }
.bagua-intro__title { margin: 6px 0 0; font-family: var(--font-serif); font-size: 24px; letter-spacing: .08em; color: var(--ink); }
.bagua-intro__text { margin: 10px 0 0; font-size: var(--fs-sm); line-height: 1.92; color: var(--ink-2); text-align: left; }
.bagua-intro__text + .bagua-intro__text { margin-top: 7px; }
.bagua-intro__btn { width: 100%; margin-top: 18px; padding: 13px 16px; border-radius: var(--r-pill); border: 1px solid rgba(100,69,50,.5); background: linear-gradient(180deg, #7C4D30, #644532); color: var(--primary-ink); font-family: var(--font-serif); font-size: var(--fs-base); letter-spacing: .08em; cursor: pointer; box-shadow: 0 10px 22px -14px rgba(60,40,20,.8); }
.bagua-intro__btn:hover { background: linear-gradient(180deg, #8A5A38, #6E4A2C); }
@media (max-width: 900px) {
  .bagua-intro__card { padding: 20px 16px 16px; }
  .bagua-intro__title { font-size: 21px; }
}

/* 完成页的说明文字 */
.shop-done__text { margin: 10px auto 0; max-width: 92%; font-size: var(--fs-sm); line-height: 1.85; color: var(--ink-2); text-align: left; }
.clay-checkin__text { margin: 10px auto 4px; max-width: 92%; font-size: var(--fs-sm); line-height: 1.8; color: var(--ink-2); text-align: left; }
/* 统天殿：供奉完成后的文字解释页 */
.tongtian-done { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 18px; overflow: auto; background: rgba(20,12,6,.62); backdrop-filter: blur(6px); }
.tongtian-done__card { position: relative; width: min(92vw, 480px); max-height: 88vh; overflow: auto; padding: 24px 22px 20px; border-radius: var(--r-l); border: 1px solid rgba(200,160,100,.42); background: linear-gradient(180deg, #FBF3E1 0%, #F2E5C9 100%); box-shadow: 0 26px 60px -24px rgba(50,28,12,.65); animation: bagua-quiz-in .55s cubic-bezier(.22,.9,.3,1) both; }
.tongtian-done__kicker { margin: 0; font-size: var(--fs-2xs); letter-spacing: .2em; color: var(--muted); }
.tongtian-done__title { margin: 6px 0 0; font-family: var(--font-serif); font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.tongtian-done__text { margin: 12px 0 0; font-size: var(--fs-sm); line-height: 1.92; color: var(--ink-2); text-align: left; }
.tongtian-done__btn { width: 100%; margin-top: 18px; padding: 13px 16px; border-radius: var(--r-pill); border: 1px solid rgba(100,69,50,.5); background: linear-gradient(180deg, #7C4D30, #644532); color: var(--primary-ink); font-family: var(--font-serif); font-size: var(--fs-base); letter-spacing: .08em; cursor: pointer; }
.tongtian-done__btn:hover { background: linear-gradient(180deg, #8A5A38, #6E4A2C); }
@media (max-width: 900px) { .tongtian-done__card { padding: 20px 16px 16px; } .tongtian-done__title { font-size: 21px; } }

/* 禁止手机浏览器下拉刷新误触（会把整局进度刷掉） */
html, body { overscroll-behavior-y: none; }

/* 伏羲陵：点击陵墓（土丘+石碑）而不是香坛 */
.tomb-scene__altar { left: 33%; top: 24%; width: 34%; height: 52%; border-radius: 26% 26% 40% 40%; }
.tomb-scene__altar::after { inset: -4%; border-radius: 26% 26% 40% 40%; background: radial-gradient(ellipse at 50% 45%, rgba(255,214,150,.4), rgba(255,214,150,0) 72%); }
.tomb-scene__img { object-fit: cover; }

/* 伏羲陵：上香后的介绍卡 */
.tomb-story { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; overflow: auto; background: rgba(20,12,6,.62); backdrop-filter: blur(6px); }
.tomb-story__card { position: relative; width: min(92vw, 480px); max-height: 88vh; overflow: auto; padding: 24px 22px 20px; border-radius: var(--r-l); border: 1px solid rgba(200,160,100,.42); background: linear-gradient(180deg, #FBF3E1 0%, #F2E5C9 100%); box-shadow: 0 26px 60px -24px rgba(50,28,12,.65); animation: bagua-quiz-in .55s cubic-bezier(.22,.9,.3,1) both; }
.tomb-story__kicker { margin: 0; font-size: var(--fs-2xs); letter-spacing: .2em; color: var(--muted); }
.tomb-story__title { margin: 6px 0 0; font-family: var(--font-serif); font-size: 24px; letter-spacing: .06em; color: var(--ink); }
.tomb-story__text { margin: 12px 0 0; font-size: var(--fs-sm); line-height: 1.92; color: var(--ink-2); text-align: left; }
.tomb-story__btn { width: 100%; margin-top: 18px; padding: 13px 16px; border-radius: var(--r-pill); border: 1px solid rgba(100,69,50,.5); background: linear-gradient(180deg, #7C4D30, #644532); color: var(--primary-ink); font-family: var(--font-serif); font-size: var(--fs-base); letter-spacing: .08em; cursor: pointer; }
.tomb-story__btn:hover { background: linear-gradient(180deg, #8A5A38, #6E4A2C); }
@media (max-width: 900px) { .tomb-story__card { padding: 20px 16px 16px; } .tomb-story__title { font-size: 21px; } }

/* 伏羲陵：供香照片（单图，无选择） + 播视频 */
.tomb-intro__photo { margin: 16px auto 0; width: 128px; }
.tomb-intro__photo img { display: block; width: 100%; height: auto; border-radius: var(--r-s); mix-blend-mode: multiply; }
.tomb-video { position: fixed; inset: 0; z-index: 101; display: grid; place-items: center; background: #120b06; }
.tomb-video__media { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 伏羲陵：互动热区在香炉（三只香炉那一排），不在土丘 */
.tomb-scene__altar { left: 10%; top: 76%; width: 80%; height: 16%; border-radius: 50%; }
.tomb-scene__altar::after { inset: -4%; border-radius: 50%; background: radial-gradient(ellipse at 50% 50%, rgba(255,214,150,.45), rgba(255,214,150,0) 72%); }
