:root {
  --night: #140f2e;
  --gold: #ffd36b;
  --gold-2: #f3a93b;
  --red: #e8503a;
  --red-deep: #a92c27;
  --jade: #3fc2a5;
  --paper: #fff6e2;
  --ink: #2a1d2f;
  --muted: #d6c8f0;
  --serif: 'Kaiti SC', 'STKaiti', 'Songti SC', 'Noto Serif CJK SC', serif;
  --round: 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --vh: 1vh;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--night); }
body { margin: 0; overflow-x: hidden; font: 16px/1.6 var(--round); color: var(--paper); background: var(--night); }
h1, h2, h3, h4, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }
img { display: block; max-width: 100%; }
button { font: inherit; }

/* ---------- 全局层：粒子 / 转场 / 闪光 / 光标 / HUD ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 40; }

/* ---------- 场景骨架：容器很高，舞台吸顶 ---------- */


/* ---------- 01 推开阁门 ---------- */

.moon {
  position: absolute; top: 9vh; right: 12vw; width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff9e0, #ffe39a 60%, #f6c35b); box-shadow: 0 0 80px 26px rgba(255, 214, 120, .35);
}
.lanterns { position: absolute; inset: 0 0 auto; display: flex; justify-content: space-between; padding: 0 6vw; }
.lanterns span {
  position: relative; width: 46px; height: 58px; margin-top: 40px; border-radius: 45%;
  background: radial-gradient(circle at 50% 40%, #ff9a6b, var(--red) 55%, var(--red-deep)); box-shadow: 0 0 34px 8px rgba(255, 110, 70, .45);
  transform-origin: 50% -40px; animation: swing 3.2s ease-in-out infinite;
}
.lanterns span::before { content: ''; position: absolute; left: 50%; top: -40px; width: 2px; height: 40px; background: #e7b75c; }
.lanterns span::after { content: ''; position: absolute; left: 50%; bottom: -16px; width: 8px; height: 16px; margin-left: -4px; background: var(--gold); border-radius: 0 0 4px 4px; }
.lanterns span:nth-child(2) { margin-top: 90px; animation-delay: -.8s; }
.lanterns span:nth-child(3) { margin-top: 70px; animation-delay: -1.6s; }
.lanterns span:nth-child(4) { animation-delay: -2.4s; }
.gate-copy { position: relative; z-index: 2; }
.gate-copy::before { content: ''; position: absolute; inset: -6% -14% -10%; z-index: -1; background: radial-gradient(ellipse at 50% 55%, rgba(12, 8, 36, .78), rgba(12, 8, 36, .45) 50%, transparent 72%); }
.eyebrow { color: var(--gold); letter-spacing: 6px; font-size: clamp(12px, 1.4vw, 16px); }
.title .ch {
  display: inline-block; will-change: transform, opacity, filter;
  background: linear-gradient(100deg, #ffb347 0%, #fff1b8 35%, #ffd36b 50%, #fff1b8 65%, #ffb347 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 0 var(--red-deep)); animation: shimmer 4s linear infinite;
}
.intro { max-width: 38em; margin: 0 auto; color: var(--muted); font-size: clamp(14px, 1.4vw, 17px); }
.phases { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.phase { display: flex; flex-direction: column; align-items: center; padding: 10px 22px 8px; border-radius: 22px; background: linear-gradient(180deg, #fff6e2, #ffe1a6); color: var(--ink); box-shadow: 0 6px 0 var(--gold-2), 0 12px 26px rgba(0, 0, 0, .3); }
.phase b { font: 800 clamp(18px, 2vw, 26px)/1.2 var(--serif); color: var(--red-deep); }
.phase span { font-size: 14px; font-weight: 700; }
.phase-arrow { font-style: normal; font-size: 22px; color: var(--gold); }
.countdown { margin-top: 14px; color: var(--gold); font-weight: 700; }
.ring { position: absolute; top: 50%; width: 9vh; height: 9vh; margin-top: -4.5vh; border-radius: 50%; border: 1.1vh solid #f2c14e; box-shadow: 0 0 0 .5vh #8a5a12, inset 0 0 0 .5vh #8a5a12, 0 6px 14px rgba(0, 0, 0, .5); }

/* ---------- 02 时间线 ---------- */


/* ---------- 03 底池共建 ---------- */

.coin {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  font: 900 13px/1 var(--round); color: #7a3d12; background: radial-gradient(circle at 35% 30%, #fff4c2, var(--gold) 45%, var(--gold-2));
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .4), inset 0 -4px 0 rgba(160, 80, 20, .35), 0 0 20px rgba(255, 200, 90, .55);
}
.coin.fun { font-size: 34px; color: #fff; background: radial-gradient(circle at 35% 30%, #c9fff0, var(--jade) 50%, #1f8b74); box-shadow: inset 0 0 0 7px rgba(255, 255, 255, .3), 0 0 50px rgba(63, 194, 165, .9); }
.say { position: absolute; bottom: 100%; left: 10%; padding: 8px 14px; border-radius: 16px; white-space: nowrap; font-weight: 800; color: var(--ink); background: #fff; }
.say::after { content: ''; position: absolute; left: 30%; top: 100%; border: 7px solid transparent; border-top-color: #fff; }

/* ---------- 04 盟主令合成 ---------- */

.gauge { --g: 0; --gc: #ffd36b; position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gc) calc(var(--g) * 1%), rgba(255, 255, 255, .12) 0); box-shadow: 0 0 60px rgba(255, 211, 107, .25); }
.gauge-in span { font-size: 14px; opacity: .75; }
.gauge-in b { font: 900 96px/1 var(--round); font-variant-numeric: tabular-nums; }
.gauge-in em { font-style: normal; font: 800 18px var(--serif); color: var(--gold); }
.gauge.pop { animation: gpop .45s cubic-bezier(.2, 1.6, .4, 1); }
.tier-txt b { display: block; font-size: 16px; }
.tier-txt small { display: block; font-size: 13.5px; opacity: .88; }

/* ---------- 05 邀请关系 ---------- */

.inv-card { position: relative; width: 340px; min-height: 400px; padding: 22px 20px; border-radius: 28px; text-align: center; background: var(--paper); color: var(--ink); box-shadow: 0 8px 0 #e7c48a, 0 22px 40px rgba(120, 40, 70, .25); will-change: transform, opacity; }
.inv-old { background: #efe6de; }
.inv-label { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; color: #fff; background: #8f7aa8; }
.inv-new .inv-label { background: var(--jade); }
.inv-card h3 { margin-top: 10px; font: 800 24px var(--serif); }
.pair { display: flex; align-items: center; justify-content: center; margin-top: 46px; filter: grayscale(.9) opacity(.7); }
.pair img { width: 118px; }
.pair .link { width: 54px; height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, #8a6a55 0 10px, transparent 10px 16px); }
.inv-desc { margin-top: 30px; font-size: 15px; color: #6b5562; }
.tree { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 14px; }
.tree-row { position: relative; display: flex; justify-content: center; will-change: transform, opacity; }
.tree-row.root { margin-bottom: 6px; }
.tree-row + .tree-row::before { content: ''; position: absolute; top: -14px; left: 50%; width: 4px; height: 14px; margin-left: -2px; border-radius: 4px; background: var(--gold-2); }
.node { position: relative; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: #ffe9b8; box-shadow: inset 0 0 0 3px var(--gold-2); }
.node img { width: 54px; margin-top: -8px; }
.lv .node img { filter: brightness(.2); }
.node.me { width: 72px; height: 72px; background: #c9f3e7; box-shadow: inset 0 0 0 3px var(--jade); }
.node.me img { width: 64px; }
.node.me span { position: absolute; bottom: -8px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: var(--jade); }
.q { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 900 14px var(--round); font-style: normal; color: #fff; background: var(--red); animation: bob 1.4s ease-in-out infinite; }
.lv-tag { position: absolute; right: calc(50% + 44px); top: 50%; transform: translateY(-50%); font-size: 13px; color: #8a6a55; white-space: nowrap; }
.ceiling { position: relative; width: 82%; height: 22px; }
.ceiling i { position: absolute; left: 0; top: 0; height: 0; width: 100%; border-top: 3px dashed var(--red); transform-origin: left; }
.ceiling span { position: absolute; left: 0; right: 0; top: 4px; font-size: 13px; font-weight: 800; color: var(--red); }
.tree-row.over .node { background: #e6dcd3; box-shadow: inset 0 0 0 3px #c9b9ad; }
.tree-row.over { opacity: .5; }
.cross { font-style: normal; font-size: 26px; font-weight: 900; color: var(--red); }

/* ---------- 06/07 普通段落 ---------- */

.mega { font: 900 clamp(48px, 9vw, 130px)/1.05 var(--serif); letter-spacing: .06em; background: linear-gradient(180deg, #fff1c4, var(--gold) 60%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plain-sub { margin-top: 14px; color: var(--muted); }
.js .reveal { opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .8s ease, transform .8s cubic-bezier(.2, 1.4, .4, 1); }
.reveal.in { opacity: 1; transform: none; }
.wall { max-width: 1100px; margin: 50px auto 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 18px; perspective: 900px; }
.wall li { position: relative; }
.wall button {
  width: 100%; padding: 10px 6px 8px; border: 0; border-radius: 22px; color: var(--paper);
  background: rgba(255, 255, 255, .07); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .1);
  transform-style: preserve-3d; transition: transform .15s ease-out, background .2s;
}
.wall button:hover { background: rgba(255, 211, 107, .18); }
.wall button:focus-visible { background: rgba(255, 211, 107, .18); outline: 3px solid var(--gold); outline-offset: 3px; }
.wall button.jump { animation: jump .5s cubic-bezier(.2, 1.6, .4, 1); }
.wall img { width: 100%; aspect-ratio: 1; object-fit: contain; transform: translateZ(30px); }
.wall .name { display: block; margin-top: 2px; font: 700 15px var(--serif); }
.wall .no { position: absolute; top: 8px; left: 12px; font-size: 11px; color: var(--gold); }
.bubble { position: absolute; left: 50%; bottom: 100%; z-index: 5; padding: 6px 12px; border-radius: 14px; white-space: nowrap; background: #fff; color: var(--ink); font-size: 14px; font-weight: 700; transform: translate(-50%, 6px) scale(.6); opacity: 0; transition: .25s cubic-bezier(.2, 1.6, .4, 1); pointer-events: none; }
.bubble::after { content: ''; position: absolute; left: 50%; top: 100%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff; }
.bubble.show { transform: translate(-50%, -4px) scale(1); opacity: 1; }
.cta { padding-bottom: 6vh; }
.btn { margin-top: 36px; padding: 20px 60px; border: 0; border-radius: 999px; font: 800 24px/1 var(--serif); letter-spacing: 6px; color: #fff; background: linear-gradient(180deg, #ff7b5c, var(--red)); box-shadow: 0 7px 0 var(--red-deep), 0 0 50px rgba(255, 100, 70, .55); animation: breathe 2.2s ease-in-out infinite; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--red-deep); animation: none; }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.btn.done { background: linear-gradient(180deg, #6fe0c4, var(--jade)); box-shadow: 0 7px 0 #22806c; animation: none; }
/* DeBox 拜帖卡：和时间线卡片同一套 Q 版纸卡语言 */
.contact { position: relative; display: flex; align-items: center; gap: 22px; width: min(590px, calc(100vw - 40px)); margin: 56px auto 0; padding: 22px 24px; text-align: left; border-radius: 28px; background: linear-gradient(180deg, #fff6e2, #ffe1a6); color: var(--ink); box-shadow: 0 8px 0 var(--gold-2), 0 22px 46px rgba(0, 0, 0, .4); }
.contact-k { position: absolute; top: -16px; left: 22px; padding: 7px 16px; border-radius: 999px; font: 800 15px/1 var(--serif); letter-spacing: 2px; color: #fff; background: var(--red); box-shadow: 0 4px 0 var(--red-deep); transform: rotate(-4deg); }
.contact-peek { position: absolute; right: 14px; bottom: calc(100% - 26px); width: 92px; pointer-events: none; }
.contact-peek img { display: block; width: 100%; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .18)); }
.contact-peek .say { left: auto; right: 78%; bottom: 62%; font-size: 14px; box-shadow: 0 4px 0 rgba(0, 0, 0, .12); }
.contact-qr { flex: none; padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 5px 0 #e7c48a; }
.contact-qr img { display: block; width: 132px; height: 132px; border-radius: 12px; }
.contact-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.contact-who { display: flex; align-items: center; gap: 8px; }
.contact-who img { width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 2px #fff; }
.contact-who b { font: 800 24px/1.2 var(--serif); color: var(--red-deep); }
.contact-who i { font-style: normal; padding: 3px 8px; border-radius: 8px; font-size: 12px; font-weight: 800; color: var(--ink); background: var(--gold); }
.contact-id { padding: 6px 10px; border-radius: 10px; font: 12px/1.45 ui-monospace, Menlo, monospace; color: #6b5562; background: rgba(255, 255, 255, .65); word-break: break-all; user-select: all; }
.contact-copy { align-self: flex-start; margin-top: 2px; padding: 11px 22px; border: 0; border-radius: 999px; font: 800 16px/1 var(--serif); letter-spacing: 2px; color: var(--ink); background: linear-gradient(180deg, #ffe58f, var(--gold)); box-shadow: 0 5px 0 var(--gold-2); cursor: pointer; }
.contact-copy:hover { filter: brightness(1.08); }
.contact-copy:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-2); }
.contact-copy:focus-visible { outline: 3px solid var(--red-deep); outline-offset: 3px; }
.contact-note { font-size: 12px; color: #8a6f5c; }
/* 非官方声明、来源标注 */

.src-tag { display: table; margin: 12px auto 0; padding: 4px 14px; border-radius: 999px; font-size: 13px; font-weight: 800; letter-spacing: 1px; }
.src-tag.known { color: #fff; background: #23806c; }
.src-tag.guess { color: var(--ink); background: var(--gold); }
.src-tag::before { content: '● '; font-size: 9px; vertical-align: 2px; }
.foot-decl { max-width: 640px; margin: 0 auto 14px; font-size: 13.5px; line-height: 1.7; color: rgba(255, 255, 255, .72); }
/* 合成期望计算器 */
.calc { background: linear-gradient(180deg, #10201c, #142a24 60%, #1d140f); }
.calc-box { position: relative; width: min(860px, 100%); margin: 56px auto 0; padding: 30px 26px 22px; text-align: center; border-radius: 28px; background: linear-gradient(180deg, #fff6e2, #ffe1a6); color: var(--ink); box-shadow: 0 8px 0 var(--gold-2), 0 22px 46px rgba(0, 0, 0, .4); }
.calc-k { position: absolute; top: -16px; left: 22px; padding: 7px 16px; border-radius: 999px; font: 800 15px/1 var(--serif); letter-spacing: 2px; color: #fff; background: #23806c; box-shadow: 0 4px 0 #17594b; transform: rotate(-3deg); }
.calc-form { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px; }
.calc-label { font: 800 22px var(--serif); }
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; box-shadow: 0 4px 0 #e7c48a; }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: 50%; font: 900 24px/1 var(--round); color: #fff; background: linear-gradient(180deg, #ff7b5c, var(--red)); box-shadow: 0 3px 0 var(--red-deep); cursor: pointer; }
.stepper button:active { transform: translateY(3px); box-shadow: none; }
.stepper output { min-width: 56px; font: 900 30px/1 var(--round); font-variant-numeric: tabular-nums; color: var(--red-deep); }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(42, 29, 47, .12); }
.seg button { padding: 11px 20px; border: 0; border-radius: 999px; font: 800 17px/1 var(--serif); color: var(--ink); background: transparent; cursor: pointer; }
.seg button.on { color: #fff; background: var(--ink); }
.stepper button:focus-visible, .seg button:focus-visible { outline: 3px solid #23806c; outline-offset: 2px; }
.calc-need { margin-top: 14px; font-size: 14.5px; color: #6b5562; }
.calc-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.calc-card { position: relative; display: flex; flex-direction: column; align-items: center; padding: 16px 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, .72); box-shadow: inset 0 0 0 2px rgba(42, 29, 47, .08); }
.calc-card.best { background: #fff; box-shadow: inset 0 0 0 3px #23806c, 0 5px 0 #bfe6dc; }
.calc-tier { font-size: 14px; font-weight: 800; color: #6b5562; }
.calc-card b { margin-top: 6px; font: 900 clamp(34px, 5vw, 50px)/1.1 var(--round); font-variant-numeric: tabular-nums; color: var(--red-deep); }
.calc-card.best b { color: #23806c; }
.calc-unit { font-size: 14px; font-weight: 700; }
.calc-card small { margin-top: 8px; font-size: 13px; line-height: 1.5; color: #6b5562; }
.calc-best { position: absolute; top: -12px; right: -8px; padding: 3px 12px; border-radius: 8px; font: 900 15px var(--serif); font-style: normal; color: #fff; background: #23806c; transform: rotate(8deg); }
.calc-note { margin-top: 16px; font-size: 12.5px; line-height: 1.6; color: #8a6f5c; }
.foot-contact { display: block; margin-top: 8px; user-select: all; word-break: break-all; }
.foot { padding: 30px 20px 60px; text-align: center; font-size: 13px; color: rgba(255, 255, 255, .4); background: var(--night); }


/* =========================================================
   场景美术（js/scenery.js 生成）
   ========================================================= */
.bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.bg > svg { display: block; width: 100%; height: 100%; }

/* 01 夜空 · 凌烟阁 · 宫墙 */


/* 02 长安西市全景 */


/* 03 夜色荷花池 · 聚宝盆 */

.ripples { animation: drift 7s ease-in-out infinite alternate; }
.koi { animation: swim 30s linear infinite; }
.koi.k2 { animation: swim-l 38s linear infinite; animation-delay: -14s; }
.koi.k3 { animation-duration: 44s; animation-delay: -26s; }
@keyframes drift { from { transform: translateX(-30px); } to { transform: translateX(30px); } }
@keyframes swim { from { transform: translate(-220px, var(--y)); } to { transform: translate(1820px, var(--y)); } }
@keyframes swim-l { from { transform: translate(1820px, var(--y)) scaleX(-1); } to { transform: translate(-220px, var(--y)) scaleX(-1); } }

/* 04 铸令坊 · 金殿藻井 */

.fret { position: absolute; left: 0; right: 0; height: 28px; opacity: .5; background-repeat: repeat-x; }
.fret.top { top: 14px; }
.fret.bottom { bottom: 14px; }
.embers i { position: absolute; bottom: -10px; border-radius: 50%; background: #ffb35c; box-shadow: 0 0 8px 2px rgba(255, 150, 60, .8); animation: ember linear infinite; }
@keyframes ember { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: 1; } 100% { transform: translate(var(--dx), -95vh); opacity: 0; } }
.flames { transform-origin: 50% 100%; transform-box: fill-box; animation: flicker .5s ease-in-out infinite alternate; }
@keyframes flicker { from { transform: scaleY(.88); } to { transform: scaleY(1.1); } }

/* 05 宣纸 · 卷轴 · 远山 · 红梅 */
.rod { position: absolute; left: 0; right: 0; z-index: 4; height: 20px; background: linear-gradient(180deg, #6a3f26, #2e1a10 60%, #5a3420); box-shadow: 0 4px 10px rgba(60, 30, 10, .35); }
.rod.top { top: 0; }
.rod.bottom { bottom: 0; }
.rod::before, .rod::after { content: ''; position: absolute; top: -4px; width: 22px; height: 28px; border-radius: 6px; background: linear-gradient(180deg, #ffe08a, #b97a1c); }
.rod::before { left: -2px; }
.rod::after { right: -2px; }

/* 06 凌烟阁内堂 · 画像卷轴 */
#heroes {
  overflow: hidden;
  background:
    repeating-linear-gradient(0deg, rgba(217, 162, 58, .06) 0 2px, transparent 2px 56px),
    repeating-linear-gradient(90deg, rgba(217, 162, 58, .06) 0 2px, transparent 2px 56px),
    radial-gradient(ellipse at 50% 0%, #4a1c12, #1f0c08 70%);
}
.plain > :not(.bg) { position: relative; z-index: 2; }
.pillar { position: absolute; top: 0; bottom: 0; width: clamp(18px, 3.2vw, 48px); background: repeating-linear-gradient(180deg, transparent 0 260px, #d9a23a 260px 274px), linear-gradient(90deg, #5e1410, #c2402f 45%, #e0604a 55%, #7a1a14); box-shadow: 0 0 30px rgba(0, 0, 0, .55); }
.pillar.left { left: 3vw; }
.pillar.right { right: 3vw; }
.plaque { display: inline-block; padding: 12px 44px; border: 6px solid #d9a23a; border-radius: 6px; outline: 3px solid #7a4a12; background: linear-gradient(180deg, #2a1810, #140a06); box-shadow: 0 14px 30px rgba(0, 0, 0, .5), inset 0 0 0 3px #5a3418; }
.plaque .mega { font-size: clamp(38px, 7vw, 96px); }
#heroes .wall { row-gap: 40px; }
#heroes .wall li::before { content: ''; position: absolute; top: -18px; left: 50%; width: 34px; height: 20px; margin-left: -17px; border: 2px solid #d9a23a; border-bottom: 0; border-radius: 17px 17px 0 0; }
#heroes .wall button { padding: 18px 8px 16px; border-radius: 4px; color: var(--ink); background: linear-gradient(180deg, #f6ead0, #ead7ad); box-shadow: 0 12px 22px rgba(0, 0, 0, .45); }
#heroes .wall button::before, #heroes .wall button::after { content: ''; position: absolute; left: -6px; right: -6px; height: 10px; border-radius: 5px; background: linear-gradient(180deg, #6a3f26, #2e1a10); }
#heroes .wall button::before { top: -5px; }
#heroes .wall button::after { bottom: -5px; }
#heroes .wall button:hover, #heroes .wall button:focus-visible { background: linear-gradient(180deg, #fff3da, #f1dfb8); }
#heroes .wall .name { color: var(--ink); }
#heroes .wall .no { color: var(--red-deep); font-weight: 800; }

/* 07 孔明灯 */
#cta { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; background: linear-gradient(180deg, #120d2a, #2b1a4a 55%, #5a2a48); }
.sky-lantern { position: absolute; bottom: -70px; width: 40px; height: 52px; border-radius: 45% 45% 22% 22%; background: radial-gradient(circle at 50% 72%, #fff3b0, #ffb347 45%, #d9502f 92%); box-shadow: 0 0 36px 12px rgba(255, 170, 80, .55), 0 0 90px 30px rgba(255, 140, 60, .18); opacity: 0; animation: lantern-rise linear infinite; }
.sky-lantern.launched { bottom: 26%; animation-iteration-count: 1; }
@keyframes lantern-rise { 0% { transform: translate(0, 0) scale(var(--s)); opacity: 0; } 8% { opacity: .95; } 50% { transform: translate(var(--sway), -60vh) scale(var(--s)); } 100% { transform: translate(0, -125vh) scale(calc(var(--s) * .6)); opacity: 0; } }
.skyline { position: absolute; left: 0; right: 0; bottom: 0; height: 18vh; }
.skyline svg { display: block; width: 100%; height: 100%; }
.foot { background: #0b0820; }

/* 盟主令 SVG */
.jade { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .3)); }

/* 屏幕震动 */


/* ---------- 关键帧 ---------- */
@keyframes shimmer { to { background-position: -250% 0; } }
@keyframes swing { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes gpop { 40% { transform: scale(1.12); } }
@keyframes stamp { from { transform: rotate(12deg) scale(3); opacity: 0; } }
@keyframes jump { 40% { transform: translateY(-22px) scale(1.08, .94); } 70% { transform: translateY(0) scale(.94, 1.06); } }
@keyframes breathe { 50% { box-shadow: 0 7px 0 var(--red-deep), 0 0 80px rgba(255, 120, 80, .85); } }

/* ---------- 平板 ---------- */


/* 平板竖屏：熔炉两侧放不下，配方表挪到熔炉下方 */


/* ---------- 手机 ---------- */

/* 很矮的屏幕（手机横屏）：标题区收紧，熔炉和配方表左右分开 */

/* =========================================================
   普通滚动版式（v3）
   ========================================================= */
html { scroll-behavior: smooth; scroll-padding-top: 30px; }

/* ---------- 顶部导航 ---------- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 60; display: flex; align-items: center; gap: 18px; height: 54px; padding: 0 18px; background: rgba(12, 8, 26, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 1px 0 rgba(255, 211, 107, .22); }
.nav-brand { flex: none; font: 900 22px/1 var(--serif); letter-spacing: 3px; color: var(--gold); text-decoration: none; }
.nav-links { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { flex: none; padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 700; color: #e6dcf7; text-decoration: none; white-space: nowrap; }
.nav-links a:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.nav-links a.on { color: var(--ink); background: var(--gold); }
.nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.unofficial { flex: none; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #ffe9b8; box-shadow: inset 0 0 0 1px rgba(255, 211, 107, .45); }

/* ---------- 每一节的骨架 ---------- */
.sec { position: relative; }
.stage { position: relative; overflow: hidden; padding: 104px 20px 84px; }
.stage > :not(.bg) { position: relative; z-index: 1; }
.sec.light .stage { color: var(--ink); background-color: #efe0bf; }
.sec-head { text-align: center; }
.sec-head h2 { font: 900 clamp(38px, 5.4vw, 72px)/1.1 var(--serif); letter-spacing: .08em; text-shadow: 0 5px 0 rgba(0, 0, 0, .18); }
.sec-head p { margin-top: 10px; font-size: clamp(15px, 1.5vw, 19px); opacity: .92; }
.plain { position: relative; z-index: 1; padding: 104px 20px 84px; text-align: center; background: var(--night); }
.plain .mega { font-size: clamp(38px, 5.4vw, 72px); }
.plaque .mega { font-size: clamp(34px, 5vw, 64px); }

/* ---------- 开场阁门（自动推开一次） ---------- */
.doors { display: none; position: fixed; inset: 0; z-index: 90; perspective: 1600px; pointer-events: none; }
.intro .doors { display: block; animation: doors-out .3s linear 1.9s forwards; }
.door { position: absolute; top: 0; bottom: 0; width: 50.5%; background: radial-gradient(circle at 50% 50%, #ffe08a 0 5px, #b37a1c 6px 7px, transparent 8px) 0 0 / 9vh 9vh, linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 12%, transparent 88%, rgba(0, 0, 0, .25)), linear-gradient(180deg, #b32a20, #861a14); box-shadow: inset 0 0 0 1.4vh #6d140f, inset 0 0 0 1.8vh #d9a23a, inset 0 0 60px rgba(0, 0, 0, .5); }
.door.left { left: 0; transform-origin: left center; animation: door-l 1.5s cubic-bezier(.6, 0, .3, 1) .45s forwards; }
.door.right { right: 0; transform-origin: right center; animation: door-r 1.5s cubic-bezier(.6, 0, .3, 1) .45s forwards; }
.door.left .ring { right: 3vh; }
.door.right .ring { left: 3vh; }
@keyframes door-l { to { transform: rotateY(-100deg); } }
@keyframes door-r { to { transform: rotateY(100deg); } }
@keyframes doors-out { to { opacity: 0; visibility: hidden; } }

/* ---------- 01 首屏 ---------- */
#gate .stage { padding: 0; background: linear-gradient(180deg, #0c0824 0%, #1d1240 50%, #46203f 100%); }
.zoom { position: relative; min-height: max(100vh, 660px); min-height: max(100svh, 660px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 84px 20px 25vh; }
.zoom > :not(.bg) { z-index: 1; }
.gate-hall { top: auto; bottom: 13vh; height: 54vh; }
.gate-wall { top: auto; height: 15vh; }
.title { margin: 10px 0 12px; font: 900 clamp(60px, 12vw, 170px)/1 var(--serif); letter-spacing: .06em; white-space: nowrap; }
.js .title .ch { animation: ch-in .7s cubic-bezier(.2, 1.4, .4, 1) both, shimmer 4s linear infinite; }
@keyframes ch-in { from { opacity: 0; transform: translateY(-60px) scale(1.6); } }
.lineup { position: absolute; left: 0; right: 0; bottom: 3vh; display: flex; justify-content: center; align-items: flex-end; gap: clamp(0px, 1vw, 14px); z-index: 2; }
.slot img { width: clamp(64px, 12vw, 160px); animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .25)); }
.slot.mid img { width: clamp(90px, 16vw, 200px); }

/* ---------- 02 时间线：五个节点一次看完 ---------- */
#timeline .stage { background: #1a2a3a; }
.timeline-bg { overflow: hidden; }
.market { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 100%; }
.market-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14, 10, 38, .86) 0%, rgba(14, 10, 38, .62) 45%, rgba(14, 10, 38, .5) 100%); }
.tl { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; max-width: 1280px; margin: 54px auto 0; }
.tl::before { content: ''; position: absolute; left: 4%; right: 4%; top: 61px; height: 6px; border-radius: 6px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .35) 0 18px, transparent 18px 30px); }
.tl-item { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.tl-when { height: 44px; font: 900 clamp(22px, 2.3vw, 32px)/44px var(--serif); white-space: nowrap; color: #fff; text-shadow: 0 3px 0 rgba(0, 0, 0, .3); }
.tl-item.upcoming .tl-when { color: #f3ecff; }
.tl-dot { position: relative; width: 22px; height: 22px; margin: 9px 0 26px; border-radius: 50%; background: #8f7aa8; box-shadow: 0 0 0 5px rgba(20, 15, 46, .85); }
.tl-item.now .tl-dot { background: var(--red); box-shadow: 0 0 0 5px rgba(20, 15, 46, .85), 0 0 0 9px rgba(232, 80, 58, .45); animation: pulse 1.6s ease-in-out infinite; }
.tl-item.done .tl-dot { background: var(--jade); }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(20, 15, 46, .85), 0 0 0 15px rgba(232, 80, 58, 0); } }
.tl-card { position: relative; width: 100%; flex: 1; padding: 46px 16px 18px; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 7px 0 #e7c48a, 0 18px 34px rgba(0, 0, 0, .3); }
.tl-card img { position: absolute; left: 50%; top: -44px; width: 88px; margin-left: -44px; filter: drop-shadow(0 5px 0 rgba(0, 0, 0, .15)); }
.tl-item.upcoming .tl-card img { filter: grayscale(.55) brightness(.9); }
.tl-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #fff; background: #8f7aa8; }
.now .tl-badge { background: var(--red); }
.done .tl-badge { background: var(--jade); }
.tl-card h3 { margin: 6px 0 4px; font: 800 21px/1.3 var(--serif); }
.tl-card p { font-size: 14px; line-height: 1.6; color: #6b5562; }
.tl-item .tl-card { margin-top: 26px; }

/* ---------- 03 底池共建：四步流程 ---------- */
#pool .stage { background: linear-gradient(180deg, #051522 0%, #0a2c3b 42%, #0b3a47 100%); }
.flow { display: flex; align-items: stretch; justify-content: center; gap: 10px; max-width: 1120px; margin: 54px auto 0; }
.flow-step { flex: 1; max-width: 240px; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 26px 14px 22px; border-radius: 26px; background: rgba(4, 22, 32, .72); box-shadow: inset 0 0 0 2px rgba(190, 233, 239, .16), 0 16px 30px rgba(0, 0, 0, .3); }
.flow-ico { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.flow-ico .coin { font-size: 17px; }
.flow-ico .coin.fun { font-size: 24px; }
.flow-ico.hero img { width: 124px; max-width: none; animation: bob 2s ease-in-out infinite; }
.flow-ico.hero .say { left: auto; right: 46%; bottom: 92%; font-size: 13px; }
.flow-ico.hero .say::after { left: auto; right: 22%; }
.flow-ico.jar { align-items: end; }
.jar-heap { position: absolute; left: 20px; right: 20px; bottom: 44px; height: 46px; border-radius: 50% 50% 8px 8px / 100% 100% 8px 8px; background: radial-gradient(circle at 40% 40%, rgba(255, 255, 255, .85) 0 1.5px, transparent 2.5px) 0 0 / 12px 10px, radial-gradient(ellipse at 50% 100%, #fff3b0, #f2b845 50%, #c98a1b); box-shadow: 0 0 26px rgba(255, 211, 107, .6); }
.jar-bowl { position: relative; width: 104px; height: 54px; border-radius: 0 0 52px 52px / 0 0 46px 46px; background: linear-gradient(180deg, #c2402f, #6e1611); box-shadow: inset 0 8px 0 -1px #e9b048, inset 0 -8px 14px rgba(0, 0, 0, .35); }
.flow-txt { display: flex; align-items: center; gap: 10px; font: 800 clamp(18px, 1.8vw, 23px) var(--serif); }
.flow-no { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font: 900 16px var(--round); color: #d9442f; background: #fff3dc; }
.flow-arr { align-self: center; font-size: 26px; color: var(--gold); }

/* ---------- 04 盟主令合成：规则卡 ---------- */
#forge .stage { background: radial-gradient(ellipse at 50% 108%, rgba(255, 120, 40, .3), transparent 52%), linear-gradient(180deg, #0a1412, #16302a); }
.forge-b-bg { display: none; }
#forge-kicker { color: var(--gold); font-weight: 700; }
.forge-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 1120px; margin: 50px auto 0; }
.rule { display: flex; flex-direction: column; align-items: center; padding: 28px 22px 26px; border-radius: 28px; text-align: center; background: rgba(6, 18, 15, .78); box-shadow: inset 0 0 0 2px rgba(201, 162, 90, .32), 0 18px 36px rgba(0, 0, 0, .35); }
.rule h3 { font: 900 clamp(26px, 3vw, 38px)/1.2 var(--serif); letter-spacing: .06em; }
.rule-sub { margin-top: 6px; font-size: 15px; color: #cfe3d8; }
.furnace { position: relative; isolation: isolate; width: 230px; height: 230px; margin: 34px auto 150px; }
.ding { position: absolute; left: 50%; top: 50%; z-index: -1; width: 150%; transform: translate(-50%, -42%); pointer-events: none; overflow: visible; }
.gauge-in { width: 180px; height: 180px; border-radius: 50%; display: grid; place-content: center; text-align: center; background: radial-gradient(circle at 50% 35%, #1f6b53, #0a3528); box-shadow: inset 0 -10px 30px rgba(0, 0, 0, .4); }
.gauge-in b { font-size: 68px; }
.gauge-in em { font-size: 16px; }
.recipes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; max-width: 440px; }
.recipes button { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border: 0; border-radius: 18px; color: var(--paper); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .16); cursor: pointer; transition: background .2s, transform .2s; }
.recipes button b { font: 900 20px var(--serif); }
.recipes button span { font: 900 28px/1.1 var(--round); color: var(--gold); }
.recipes button i { font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: rgba(232, 80, 58, .45); }
.recipes button.sure i { background: rgba(63, 194, 165, .6); }
.recipes button:hover { background: rgba(255, 255, 255, .14); }
.recipes button.hit { background: rgba(255, 211, 107, .2); box-shadow: inset 0 0 0 3px var(--gold); transform: translateY(-3px); }
.recipes button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.forge-warn { margin-top: 16px; padding: 7px 16px; border-radius: 999px; font-size: 14.5px; font-weight: 800; color: #ffd9cf; background: rgba(60, 14, 8, .8); box-shadow: inset 0 0 0 1px rgba(255, 140, 110, .5); }
.merge-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.nine { display: grid; grid-template-columns: repeat(3, 44px); gap: 6px; }
.merge-arr { font-style: normal; font-size: 30px; color: var(--gold); }
.gold { width: 104px; animation: bob 2.4s ease-in-out infinite; }
.gold .jade { filter: drop-shadow(0 0 22px rgba(255, 220, 120, .85)); }
.sure-badge { margin-top: 18px; padding: 8px 22px; border-radius: 999px; font: 900 clamp(17px, 1.8vw, 22px) var(--serif); color: #fff; background: #23806c; box-shadow: 0 5px 0 #17594b; }
.styles { width: 100%; margin-top: 22px; padding: 14px 14px 12px; border-radius: 18px; background: rgba(255, 255, 255, .07); }
.styles p { font-size: 14.5px; color: #e6f1ea; }
.styles-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; max-width: 380px; margin: 10px auto 0; }
.tier-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px; max-width: 1120px; margin: 26px auto 0; }
.tier-row li { display: flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: 18px; background: rgba(0, 0, 0, .36); text-align: left; }
.tier-row li .tk { width: 30px; flex: none; }
.tier-row .arr { padding: 0; background: none; color: var(--gold); }
.calc { background: linear-gradient(180deg, #16302a, #142a24 55%, #1d140f); padding-top: 70px; }

/* ---------- 05 邀请关系 ---------- */
.invite { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: 50px; }
.tree-row.unknown { gap: 14px; margin-top: 8px; }
.tree-tbd { margin-top: 16px; padding: 5px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #8a6a55; background: rgba(42, 29, 47, .07); }
.inv-new .tree { margin-top: 30px; }
.stamp { position: absolute; left: 50%; top: 46%; padding: 6px 22px; border: 6px solid var(--red); border-radius: 14px; white-space: nowrap; font: 900 46px/1.1 var(--serif); letter-spacing: 6px; color: var(--red); background: rgba(255, 246, 226, .7); transform: translate(-50%, -50%) rotate(-14deg); }
.inv-arrow { font-size: 40px; color: var(--red-deep); }
.invite-note { max-width: 40em; margin: 34px auto 0; text-align: center; font: 800 clamp(16px, 1.6vw, 19px) var(--serif); color: var(--red-deep); }
.seal { position: absolute; right: 3vw; bottom: 46px; z-index: 2; width: 58px; height: 58px; display: grid; place-items: center; text-align: center; border-radius: 6px; font: 900 15px/1.15 var(--serif); color: #fff3d6; background: #b8322a; opacity: .85; transform: rotate(-6deg); }
#invite .stage { padding-top: 120px; padding-bottom: 100px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 1040px) {
  .tl { grid-template-columns: 1fr; gap: 16px; max-width: 560px; }
  .tl::before { left: 10px; right: auto; top: 12px; bottom: 30px; width: 6px; height: auto; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .35) 0 14px, transparent 14px 24px); }
  .tl-item { display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; align-items: start; text-align: left; }
  .tl-dot { grid-column: 1; grid-row: 1; margin: 11px 0 0 2px; }
  .tl-when { grid-column: 2; grid-row: 1; height: auto; line-height: 44px; }
  .tl-item .tl-card { grid-column: 2; margin-top: 2px; display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
  .tl-card img { position: static; flex: none; width: 76px; margin: 0; }
}
@media (max-width: 860px) {
  .forge-grid { grid-template-columns: 1fr; max-width: 520px; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 50px; }
  .nav { flex-wrap: wrap; height: auto; gap: 4px 10px; padding: 8px 12px 6px; }
  .nav-brand { font-size: 19px; }
  .unofficial { order: 2; margin-left: auto; font-size: 11px; padding: 4px 10px; }
  .nav-links { order: 3; flex: 0 0 100%; margin: 0 -12px; padding: 0 8px; }
  .nav-links a { padding: 7px 12px; font-size: 14px; }
  .stage, .plain { padding: 128px 16px 64px; }
  #invite .stage { padding-top: 140px; padding-bottom: 80px; }
  .zoom { padding: 110px 16px 26vh; }
  .title { font-size: clamp(54px, 17vw, 96px); }
  .intro { font-size: 15px; }
  .lanterns span:nth-child(n+3) { display: none; }
  .moon { width: 64px; height: 64px; top: 104px; right: auto; left: 50%; margin-left: -32px; }
  .gate-hall { bottom: 12vh; height: 44vh; }
  .slot img { width: 17vw; }
  .slot.mid img { width: 25vw; }
  .pillar { display: none; }
  .flow { flex-direction: column; align-items: stretch; max-width: 420px; gap: 6px; margin-top: 36px; }
  .flow-step { max-width: none; flex-direction: row; gap: 18px; padding: 14px 18px; }
  .flow-ico { flex: none; width: 76px; height: 76px; }
  .flow-ico .coin { font-size: 13px; }
  .flow-ico .coin.fun { font-size: 18px; }
  .flow-ico.hero img { width: 92px; }
  .flow-ico.hero .say { display: none; }
  .jar-heap { left: 14px; right: 14px; bottom: 32px; height: 34px; }
  .jar-bowl { width: 76px; height: 40px; }
  .flow-arr { transform: rotate(90deg); font-size: 20px; line-height: 1; }
  .forge-grid { margin-top: 34px; }
  .rule { padding: 24px 14px 22px; }
  .tier-row { flex-direction: column; align-items: stretch; max-width: 520px; }
  .tier-row .arr { display: none; }
  .invite { flex-direction: column; gap: 6px; margin-top: 34px; }
  .inv-card { width: min(320px, 100%); min-height: 0; padding: 16px 16px 18px; }
  .pair { margin-top: 12px; }
  .pair img { width: 84px; }
  .inv-desc { margin-top: 10px; font-size: 14px; }
  .stamp { top: 54%; font-size: 34px; border-width: 4px; padding: 4px 16px; }
  .inv-arrow { transform: rotate(90deg); font-size: 28px; line-height: 1; }
  .seal { display: none; }
  .wall { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; }
  .src-tag { font-size: 12px; margin-top: 8px; }
  .contact { flex-direction: column; text-align: center; gap: 14px; padding: 30px 18px 20px; }
  .contact-info { align-items: center; width: 100%; }
  .contact-copy { align-self: stretch; }
  .contact-peek { width: 76px; right: 8px; }
  .calc-box { padding: 30px 14px 18px; margin-top: 40px; }
  .calc-cards { grid-template-columns: 1fr; gap: 12px; }
  .calc-card { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: baseline; column-gap: 8px; }
  .calc-tier, .calc-card small { width: 100%; }
  .calc-label { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
