/* ============================================================
 * 开局流程 · 神都春风录（照 docs/opening-prototype-v2.html 复刻）
 * 全部选择器限定在 #opening-root 内，避免污染正式游戏 UI。
 * PC：1440×900 画布等比缩放；手机横屏：流式铺满视口，不缩放。
 * ============================================================ */

body.opening-active { overflow: hidden !important; }
body.opening-active #start-screen { display: none !important; }
body.opening-active #orientation-tip { display: none !important; }

#opening-root {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #0c0806;
  color: #3b2f24;
  font-family: 'Noto Serif SC', serif;
  overflow: hidden;
}
#opening-root * { box-sizing: border-box; margin: 0; padding: 0; }

#opening-root .stage { position: absolute; left: 50%; top: 50%; width: 1440px; height: 900px; overflow: hidden;
  transform: translate(-50%,-50%); box-shadow: 0 30px 90px rgba(0,0,0,.75), 0 0 0 1px rgba(196,165,106,.16); }
#opening-root .screen { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; }
#opening-root .screen.active { display: flex; }
#opening-root .scene { background: url('../assets/opening-bg-wall.webp') 50% 46%/cover no-repeat,#0e0906;
  background-image: image-set(url('../assets/opening-bg-wall.webp') type('image/webp'),url('../assets/opening-bg-wall.jpg') type('image/jpeg')); }
#opening-root #op-s7, #opening-root #op-s8 { background-image: image-set(url('../assets/opening-bg-wall.webp') type('image/webp'),url('../assets/opening-bg-wall.jpg') type('image/jpeg')); }
#opening-root .scene::before { content: ''; position: absolute; inset: 0; backdrop-filter: blur(.5px);
  background: radial-gradient(118% 118% at 50% 38%,rgba(20,13,8,.14),rgba(8,5,3,.48)); }

/* ---------- 通用组件 ---------- */
#opening-root .paper { position: relative; z-index: 2; display: flex; flex-direction: column; overflow: hidden;
  width: 760px; max-height: 88vh; padding: 32px 38px 22px;
  background: linear-gradient(180deg,#fbf5ea,#efe4d2);
  border: 1px solid rgba(184,146,76,.5);
  box-shadow: 0 26px 60px rgba(0,0,0,.55),inset 0 0 0 1px rgba(255,255,255,.35); }
#opening-root .paper::before, #opening-root .paper::after { content: ''; position: absolute; z-index: -1; pointer-events: none;
  width: 290px; height: 290px; background: url('../assets/decor/blossom.png') center/contain no-repeat; opacity: .46; }
#opening-root .paper::before { top: -62px; right: -76px; transform: rotate(-7deg); }
#opening-root .paper::after { bottom: -70px; left: -80px; transform: scaleX(-1) rotate(-3deg); opacity: .32; }
#opening-root .paper.name::before { width: 190px; height: 190px; top: -48px; right: -54px; opacity: .55; }
#opening-root .paper.name::after { width: 170px; height: 170px; bottom: -52px; left: -58px; opacity: .3; }
#opening-root .paper.story::before { width: 220px; height: 220px; top: -74px; right: -84px; opacity: .3; }
#opening-root .paper.story::after { width: 190px; height: 190px; bottom: -78px; left: -86px; opacity: .18; }
#opening-root .paper.ai::before { width: 250px; height: 250px; opacity: .4; }
#opening-root .paper.ai::after { width: 230px; height: 230px; opacity: .26; }
#opening-root .paper.consorts::before { width: 230px; height: 230px; top: -70px; right: -80px; opacity: .32; }
#opening-root .paper.consorts::after { width: 200px; height: 200px; bottom: -76px; left: -84px; opacity: .2; }
#opening-root .paper.end::before { width: 200px; height: 200px; opacity: .4; }
#opening-root .paper.end::after { width: 180px; height: 180px; opacity: .28; }
#opening-root .kicker { font-size: 10.5px; letter-spacing: .32em; color: #8a6a34; }
#opening-root .paper h2 { font-family: 'Ma Shan Zheng',cursive; font-weight: 400; font-size: 2rem; letter-spacing: .12em; color: #33281e; margin-top: 6px; }
#opening-root .paper-sub { font-size: 12px; color: #8b7d6b; margin-top: 5px; letter-spacing: .03em; }
#opening-root .paper-body { flex: 1; min-height: 0; margin-top: 16px; overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
#opening-root .paper-body::-webkit-scrollbar { width: 4px; }
#opening-root .paper-body::-webkit-scrollbar-thumb { background: rgba(184,146,76,.35); }
#opening-root .paper-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 14px; margin-top: 14px; border-top: 1px solid rgba(184,146,76,.22); }
#opening-root .btn { font-family: inherit; font-size: 13.5px; letter-spacing: .2em; color: #fdf3e0; padding: 10px 30px; border: 1px solid rgba(120,86,36,.55); border-radius: 2px;
  background: linear-gradient(180deg,#c2a05f,#a07f3e); box-shadow: 0 4px 12px rgba(90,64,24,.3); cursor: pointer; }
#opening-root .btn-text { font-family: inherit; font-size: 13px; letter-spacing: .18em; color: #7c6a54; background: none; border: 0; cursor: pointer; padding: 8px 4px; }
#opening-root .btn-text:hover { color: #8a6a34; }
#opening-root .read-block h3 { font-size: 13px; letter-spacing: .1em; color: #4a3a29; margin-bottom: 6px; }
#opening-root .read-block h3::before { content: '·'; color: #b8924c; margin-right: 6px; }
#opening-root .read-block p { font-size: 12.5px; line-height: 1.85; color: #6b5d50; text-align: justify; }
#opening-root .callout { margin-top: 12px; padding: 9px 13px; font-size: 11px; line-height: 1.7; color: #7a5a2a; background: rgba(184,146,76,.1); border-left: 2px solid #b8924c; }

/* ---------- 屏一 · 启幕 ---------- */
#opening-root .start { background: url('../assets/start-bg.jpg') center/cover no-repeat; }
#opening-root .start::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg,rgba(10,6,4,.62),rgba(10,6,4,.18) 46%,rgba(10,6,4,.58)); }
#opening-root .brand { position: absolute; top: 8.5%; right: 7.5%; z-index: 3; text-align: right; color: #f3e6cb; }
#opening-root .brand h1 { font-family: 'Ma Shan Zheng',cursive; font-weight: 400; font-size: 92px; line-height: 1.06; letter-spacing: .06em;
  text-shadow: 0 6px 26px rgba(0,0,0,.6),0 0 40px rgba(184,146,76,.22); }
#opening-root .brand h1 span { display: inline-block; }
#opening-root .brand h1 span:nth-child(1) { transform: translateY(-8px); }
#opening-root .brand h1 span:nth-child(2) { transform: translateY(4px); }
#opening-root .brand h1 span:nth-child(3) { transform: translateY(-4px); }
#opening-root .brand h1 span:nth-child(4) { transform: translateY(6px); }
#opening-root .brand-sub { margin-top: 16px; font-size: 12px; letter-spacing: .3em; line-height: 1.6; white-space: nowrap;
  color: rgba(248,235,212,.95); text-shadow: 0 2px 12px rgba(0,0,0,.55); }
#opening-root .main-menu { position: absolute; left: 50%; bottom: 15%; transform: translateX(-50%); display: flex; gap: 16px; z-index: 3; }
#opening-root .menu-btn { width: 64px; height: 170px; writing-mode: vertical-rl; font-family: 'Noto Serif SC',serif; font-size: 16px; letter-spacing: .32em;
  color: #f4e8d2; background: rgba(26,17,12,.5); border: 1px solid rgba(196,165,106,.5); backdrop-filter: blur(4px);
  padding: 16px 0; cursor: pointer; transition: background .2s; }
#opening-root .menu-btn:hover { background: rgba(184,146,76,.26); }
#opening-root .menu-btn.primary { border-color: #e9ce97;
  box-shadow: inset 0 0 0 1px rgba(233,206,151,.55),0 8px 22px rgba(196,165,106,.16); }
#opening-root .menu-btn.primary:hover { background: rgba(184,146,76,.26); border-color: #f5e0b4; }
#opening-root .statusbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; height: 36px; display: flex; align-items: center; justify-content: center;
  padding: 0 18px; font-size: 11px; letter-spacing: .05em; color: rgba(232,217,194,.78); text-align: center;
  background: rgba(20,14,10,.55); border-top: 1px solid rgba(196,165,106,.28); }
#opening-root .statusbar b { font-weight: 400; color: #d9c6a4; }
#opening-root .state-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #8a6a34; margin-right: 7px; vertical-align: 1px; }

/* ---------- 屏二 · 定名 ---------- */
#opening-root .paper.name { width: 420px; padding: 32px 32px 24px; }
#opening-root .paper.name .btn { width: 160px; padding-left: 0; padding-right: 0; }
#opening-root .field-row { display: flex; gap: 24px; margin-top: 20px; }
#opening-root .field { flex: 1; min-width: 0; }
#opening-root .field label { display: block; font-size: 11px; letter-spacing: .24em; color: #8a6a34; margin-bottom: 8px; }
#opening-root .line-input { width: 100%; font-family: inherit; font-size: 21px; letter-spacing: .08em; color: #3b2f24; background: transparent; border: 0;
  border-bottom: 1px solid rgba(184,146,76,.55); padding: 4px 2px 7px; outline: none; }
#opening-root .name-field { flex: 1.35; }
#opening-root .name-split { display: flex; align-items: flex-end; border-bottom: 1px solid rgba(184,146,76,.55); }
#opening-root .name-split .line-input { border-bottom: 0; padding: 4px 2px 7px; }
#opening-root .name-split .n-xing { flex: 0 0 64px; text-align: center; margin-right: 10px; border-right: 1px dashed rgba(150,112,52,.7); }
#opening-root .name-split .n-ming { flex: 1; min-width: 0; }
#opening-root .name-hint { margin-top: 16px; font-size: 10.5px; line-height: 1.8; color: #93826d; }

/* ---------- 屏三 · 游玩需知 ---------- */
#opening-root .rule { margin-bottom: 18px; }
#opening-root .rule h3 { font-size: 12.5px; letter-spacing: .1em; color: #4a3a29; margin-bottom: 6px; }
#opening-root .rule h3::before { content: '·'; color: #b8924c; margin-right: 6px; }
#opening-root .rule p { font-size: 13px; line-height: 1.9; color: #6b5d50; text-align: justify; text-indent: 2em; }
#opening-root .qr-row { display: flex; gap: 28px; margin-top: 12px; align-items: flex-start; }
#opening-root .qr { width: 160px; flex: 0 0 auto; padding: 4px; border: 1px solid rgba(184,146,76,.45); background: #fffdf7; }
#opening-root .qr img { display: block; width: 100%; height: 150px; object-fit: contain; background: #fff; }
#opening-root .qr-cap { font-size: 10px; line-height: 1.6; color: #8b7d6b; letter-spacing: .04em; text-align: center; margin-top: 6px; }

/* ---------- 屏四 · AI 配置 ---------- */
#opening-root .ai-grid { display: grid; grid-template-columns: 286px 1fr; gap: 26px; }
#opening-root .ai-col h3 { font-size: 12px; letter-spacing: .12em; color: #4a3a29; margin-bottom: 6px; }
#opening-root .ai-col h3 em { font-style: normal; color: #b8924c; margin-right: 5px; }
#opening-root .ai-col p { font-size: 11px; line-height: 1.75; color: #6b5d50; text-align: justify; margin-bottom: 8px; }
#opening-root .ai-col p b { color: #7a5a2a; font-weight: 600; }
#opening-root .now { display: flex; align-items: center; gap: 7px; font-size: 11px; color: #6b5d50; padding: 8px 10px; background: rgba(184,146,76,.09); border: 1px solid rgba(184,146,76,.25); }
#opening-root .now i { width: 6px; height: 6px; border-radius: 50%; background: #8b7d6b; flex: 0 0 auto; }
#opening-root .now.ok i { background: #7fae83; }
#opening-root .ai-field { margin-top: 9px; }
#opening-root .ai-field label { display: block; font-size: 10px; letter-spacing: .18em; color: #8a6a34; margin-bottom: 4px; }
#opening-root .ai-field input { width: 100%; font-family: 'Noto Serif SC',serif; font-size: 11px; color: #4a3b2c; padding: 6px 8px;
  background: rgba(255,253,248,.92); border: 1px solid rgba(184,146,76,.32); border-radius: 2px; outline: none; }
#opening-root .chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
#opening-root .chip { font-family: inherit; font-size: 9.5px; letter-spacing: .06em; color: #7a5a2a; padding: 4px 8px;
  background: rgba(184,146,76,.1); border: 1px solid rgba(184,146,76,.38); border-radius: 2px; cursor: pointer; }
#opening-root .chip.on { background: rgba(184,146,76,.28); }
#opening-root .ai-ops { display: flex; gap: 8px; margin-top: 10px; }
#opening-root .ai-ops .btn { padding: 7px 16px; font-size: 11px; letter-spacing: .14em; }
#opening-root .ai-ops .btn-text { font-size: 11px; padding: 7px 2px; }
#opening-root .fee-row { display: flex; justify-content: space-between; font-size: 10.5px; color: #6b5d50; padding: 5px 0; border-bottom: 1px dashed rgba(184,146,76,.22); }
#opening-root .fee-row span:last-child { color: #8a6a34; letter-spacing: .04em; }
#opening-root .paper.ai { width: 720px; max-height: 80vh; padding: 26px 32px 20px; }
#opening-root .chips-label { font-size: 9.5px; letter-spacing: .16em; color: #8a6a34; margin-top: 10px; }
#opening-root .spec-table { width: 100%; border-collapse: collapse; margin: 5px 0 8px; font-size: 9.5px; line-height: 1.55; color: #6b5d50; }
#opening-root .spec-table th, #opening-root .spec-table td { border: 1px solid rgba(184,146,76,.25); padding: 3px 5px; text-align: left; vertical-align: top; }
#opening-root .spec-table th { background: rgba(184,146,76,.1); font-weight: 400; color: #7a5a2a; }
#opening-root .tut-box { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 11px; padding: 9px 12px; font-family: inherit; text-align: left; cursor: pointer;
  background: linear-gradient(90deg,rgba(184,146,76,.20),rgba(184,146,76,.05));
  border: 1px solid rgba(184,146,76,.6); border-left: 3px solid #b8924c; border-radius: 2px; transition: background .18s; }
#opening-root .tut-box:hover { background: linear-gradient(90deg,rgba(184,146,76,.30),rgba(184,146,76,.10)); }
#opening-root .tut-ico { width: 19px; height: 19px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center;
  font-size: 11px; color: #fff8ea; background: #b8924c; }
#opening-root .tut-txt { font-size: 10.5px; line-height: 1.6; color: #7a5a2a; letter-spacing: .02em; }
#opening-root .tut-txt b { color: #8a5d2c; font-weight: 600; margin-right: 5px; }
#opening-root .tut-arrow { margin-left: auto; font-size: 12px; color: #8a5d2c; }
#opening-root .ai-sec { margin-top: 12px; }
#opening-root .ai-sec h3 { font-size: 12.5px; letter-spacing: .1em; color: #4a3a29; margin-bottom: 6px; }
#opening-root .ai-row { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
#opening-root .ai-row label { width: 56px; flex: 0 0 auto; font-size: 10px; letter-spacing: .12em; color: #8a6a34; }
#opening-root .ai-row input { flex: 1; min-width: 0; font-family: inherit; font-size: 11px; color: #4a3b2c; padding: 5px 8px;
  background: rgba(255,253,248,.92); border: 1px solid rgba(184,146,76,.32); outline: none; }
#opening-root .ai-chips-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 9px; }
#opening-root .ai-chips-line .chips { margin-top: 0; }
#opening-root .ai-chips-line .ai-ops { margin-top: 0; margin-left: auto; }
#opening-root .ai-note { font-size: 10.5px; line-height: 1.7; color: #7a6a58; margin-top: 6px; }
#opening-root .rule p b { color: #7a5a2a; font-weight: 600; }
#opening-root .now { margin-top: 9px; }

/* ---------- 屏四 · 视觉强化 ---------- */
#opening-root .paper.ai { width: 760px; padding: 28px 36px 20px; }
#opening-root .paper.ai h2 { font-size: 2.06rem; letter-spacing: .09em; }
#opening-root .paper.ai h2 .latin { font-family: Georgia,'Times New Roman',serif; font-weight: 600; font-size: .76em; letter-spacing: .02em;
  display: inline-block; margin-right: 3px; transform: translateY(-3px); color: #8a5d2c; }
#opening-root .paper.ai .paper-sub { font-size: 13.5px; color: #7d6d5c; letter-spacing: .02em; }
#opening-root #op-s4 .callout { margin-top: 14px; padding: 12px 15px 12px 13px; font-size: 12.5px; line-height: 1.9; color: #7a4f22;
  background: linear-gradient(90deg,rgba(184,146,76,.22),rgba(184,146,76,.05));
  border-left: 4px solid #b8924c; border-top: 1px solid rgba(184,146,76,.22); border-bottom: 1px solid rgba(184,146,76,.22); }
#opening-root #op-s4 .ai-sec h3, #opening-root #op-s4 .rule h3 { position: relative; padding-left: 10px; font-size: 15px; font-weight: 600; letter-spacing: .12em; color: #33281e; margin-bottom: 8px; }
#opening-root #op-s4 .ai-sec h3::before, #opening-root #op-s4 .rule h3::before { content: ''; position: absolute; left: 0; top: 1px; bottom: 1px; width: 3px;
  background: linear-gradient(180deg,#c2a05f,#8a6a34); }
#opening-root #op-s4 .rule { margin: 18px 0 20px; }
#opening-root #op-s4 .rule:first-of-type { margin-top: 16px; }
#opening-root #op-s4 .rule p { font-size: 13.5px; line-height: 1.95; color: #5f5347; }
#opening-root #op-s4 .rule p b { color: #8a5d2c; }
#opening-root #op-s4 .ai-row label { width: 66px; font-size: 11px; letter-spacing: .14em; color: #8a6a34; }
#opening-root #op-s4 .ai-row input { font-size: 12.5px; padding: 7px 10px; background: #fffdf9; border: 1px solid rgba(184,146,76,.34); }
#opening-root #op-s4 .ai-row input:focus { border-color: #b8924c; box-shadow: 0 0 0 3px rgba(184,146,76,.13); background: #fff; }
#opening-root #op-s4 .ai-row { margin-top: 7px; padding: 5px 10px; border: 1px solid transparent; border-left: 3px solid transparent; }
#opening-root #op-s4 .ai-row.filled { background: rgba(150,128,96,.10); border-color: rgba(150,128,96,.20); }
#opening-root #op-s4 .ai-row.filled label { color: #a08d75; }
#opening-root #op-s4 .ai-row.filled input { background: transparent; border-color: transparent; color: #7d6c58; }
#opening-root #op-s4 .ai-row.filled input:focus { background: #fff; border-color: rgba(168,148,120,.6); box-shadow: none; }
#opening-root #op-s4 .ai-row.key { background: linear-gradient(90deg,rgba(194,160,95,.22),rgba(194,160,95,.05));
  border-color: rgba(184,146,76,.5); border-left-color: #c2a05f; box-shadow: 0 2px 8px rgba(120,86,36,.08); }
#opening-root #op-s4 .ai-row.key label { color: #8a5d2c; font-weight: 600; }
#opening-root #op-s4 .ai-row.key input { background: #fff; border-color: rgba(184,146,76,.55); }
#opening-root #op-s4 .ai-row.key input::placeholder { color: #b3a07f; letter-spacing: .16em; }
#opening-root #op-s4 .chips-label { font-size: 11px; letter-spacing: .14em; color: #8a6a34; }
#opening-root #op-s4 .chip { font-size: 11px; padding: 5px 11px; background: #fffdf9; border: 1px solid rgba(184,146,76,.42); color: #7a5a2a; }
#opening-root #op-s4 .chip:hover { border-color: #b8924c; background: rgba(184,146,76,.12); }
#opening-root #op-s4 .chip.on { background: rgba(184,146,76,.24); border-color: #b8924c; color: #6b4a1e; font-weight: 600; }
#opening-root #op-s4 .ai-ops .btn { padding: 8px 22px; font-size: 13px; letter-spacing: .18em; }
#opening-root #op-s4 #op-aiTest { border: 1px solid rgba(184,146,76,.55); padding: 8px 16px; border-radius: 2px; font-size: 12.5px;
  letter-spacing: .14em; color: #8a5d2c; background: none; }
#opening-root #op-s4 #op-aiTest:hover { background: rgba(184,146,76,.12); color: #7a4f22; }
#opening-root #op-s4 .now { margin-top: 10px; padding: 9px 12px; font-size: 12.5px; color: #8e2f26;
  background: rgba(176,64,52,.12); border-left: 3px solid #b04034; }
#opening-root #op-s4 .now i { background: #b04034; }
#opening-root #op-s4 .now.ok { background: rgba(76,140,88,.14); border-left-color: #4c8c58; color: #2f6b3c; }
#opening-root #op-s4 .now.ok i { background: #4c8c58; }
#opening-root #op-s4 .now.err { background: rgba(176,64,52,.12); border-left-color: #b04034; color: #8e2f26; }
#opening-root #op-s4 .now.err i { background: #b04034; }
#opening-root #op-s4 .ai-note { font-size: 11.5px; color: #7a6a58; margin-top: 7px; }
#opening-root #op-s4 .tut-box { margin-top: 12px; padding: 11px 14px; border: 1px solid rgba(120,86,36,.5);
  background: linear-gradient(90deg,#b8924c,#95722e); box-shadow: 0 3px 10px rgba(120,86,36,.18); }
#opening-root #op-s4 .tut-box:hover { background: linear-gradient(90deg,#c2a05f,#a5813c); }
#opening-root #op-s4 .tut-ico { color: #fff8e9; border-color: rgba(255,248,233,.7); }
#opening-root #op-s4 .tut-txt { font-size: 12px; color: #fdf3e0; }
#opening-root #op-s4 .tut-txt b { color: #fff; font-weight: 600; }
#opening-root #op-s4 .tut-arrow { color: #fff8e9; transition: transform .18s; }
#opening-root #op-s4 .tut-box:hover .tut-arrow { transform: translateX(3px); }

/* ---------- 屏五 · 开局说明 ---------- */
#opening-root .paper.story { width: 640px; padding: 34px 44px 26px; }
#opening-root .story p { font-size: 17px; line-height: 2; color: #4a3b2c; text-indent: 2em; text-align: justify; margin-bottom: 22px; }
#opening-root .story .sign { text-indent: 0; text-align: right; font-size: 12.5px; color: #8a6a34; letter-spacing: .12em; margin-top: 20px; }

/* ---------- 屏五 · 初登大宝 · 登基动效 ---------- */
#opening-root #op-s5::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(102deg,rgba(255,244,214,0) 38%,rgba(255,238,196,.4) 50%,rgba(255,244,214,0) 62%);
  transform: translateX(-120%); opacity: 0; }
#opening-root #op-s5.active { animation: opThroneIn .8s ease both; }
#opening-root #op-s5.active::after { animation: opThroneSweep 1.7s cubic-bezier(.3,.55,.3,1) .16s both; }
#opening-root #op-s5.active .paper.story { animation: opThronePaper 1.05s cubic-bezier(.22,.68,.2,1) both; }
#opening-root #op-s5 .paper.story h2 { position: relative; }
#opening-root #op-s5 .paper.story h2::after { content: ''; position: absolute; left: 2px; bottom: -7px; width: 100%; height: 2px;
  background: linear-gradient(90deg,#c2a05f,rgba(194,160,95,0)); transform: scaleX(0); transform-origin: left center; }
#opening-root #op-s5.active .paper.story h2 { animation: opThroneTitle 1.45s cubic-bezier(.2,.8,.2,1) .2s both; }
#opening-root #op-s5.active .paper.story h2::after { animation: opThroneRule 1.1s cubic-bezier(.2,.7,.2,1) .62s both; }
#opening-root #op-s5.active .paper.story .kicker { animation: opThroneLine .9s ease .46s both; }
#opening-root #op-s5.active .paper.story .paper-body p { animation: opThroneLine .9s cubic-bezier(.2,.7,.2,1) both; }
#opening-root #op-s5.active .paper.story .paper-body p:nth-child(1) { animation-delay: .62s; }
#opening-root #op-s5.active .paper.story .paper-body p:nth-child(2) { animation-delay: .76s; }
#opening-root #op-s5.active .paper.story .paper-body p:nth-child(3) { animation-delay: .90s; }
#opening-root #op-s5.active .paper.story .paper-body p:nth-child(4) { animation-delay: 1.04s; }
#opening-root #op-s5.active .paper.story .paper-body p:nth-child(5) { animation-delay: 1.18s; }
#opening-root #op-s5.active .paper.story .paper-body p:nth-child(6) { animation-delay: 1.32s; }
#opening-root #op-s5.active .paper.story .paper-foot { animation: opThroneLine .8s ease 1.52s both; }
@keyframes opThroneIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes opThroneSweep { 0% { transform: translateX(-120%); opacity: 0; } 18% { opacity: 1; } 100% { transform: translateX(120%); opacity: 0; } }
@keyframes opThronePaper { 0% { opacity: 0; transform: translateY(26px) scale(.985); filter: blur(6px); }
  100% { opacity: 1; transform: none; filter: blur(0); } }
@keyframes opThroneTitle { 0% { opacity: 0; letter-spacing: .52em; filter: blur(8px); transform: translateY(6px); }
  60% { opacity: 1; } 100% { opacity: 1; letter-spacing: .12em; filter: blur(0); transform: none; } }
@keyframes opThroneRule { to { transform: scaleX(1); } }
@keyframes opThroneLine { from { opacity: 0; transform: translateY(14px); filter: blur(3px); }
  to { opacity: 1; transform: none; filter: blur(0); } }
@media (prefers-reduced-motion: reduce) {
  #opening-root #op-s5.active, #opening-root #op-s5.active::after,
  #opening-root #op-s5.active .paper.story, #opening-root #op-s5.active .paper.story h2,
  #opening-root #op-s5.active .paper.story h2::after, #opening-root #op-s5.active .paper.story .kicker,
  #opening-root #op-s5.active .paper.story .paper-body p, #opening-root #op-s5.active .paper.story .paper-foot { animation: none; }
  #opening-root #op-s5 .paper.story h2::after { transform: scaleX(1); }
}

/* ---------- 屏六 · 初定内廷 ---------- */
#opening-root .paper.consorts { width: 860px; max-height: 84vh; padding: 22px 30px 16px; }
#opening-root .consorts .paper-body { margin-top: 10px; }
#opening-root .rank-head { padding-bottom: 10px; border-bottom: 1px solid rgba(184,146,76,.22); }
#opening-root .select-hint { margin-top: 5px; font-size: 12.5px; line-height: 1.7; color: #8b7d6b; letter-spacing: .01em; }
#opening-root .select-hint + .select-hint { margin-top: 2px; }
#opening-root .rank-list { display: flex; flex-direction: column; gap: 8px; }
#opening-root .rank-list.dimmed { opacity: .42; filter: grayscale(.9); pointer-events: none; user-select: none; }
#opening-root .rank-row { display: flex; gap: 14px; padding: 10px 12px; position: relative;
  background: linear-gradient(180deg,rgba(255,253,248,.86),rgba(252,246,236,.68));
  border: 1px solid rgba(184,146,76,.38); transition: border-color .18s,box-shadow .18s; }
#opening-root .rank-row:hover { border-color: rgba(184,146,76,.68); box-shadow: 0 4px 14px rgba(120,86,36,.10); }
#opening-root .rank-row::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: linear-gradient(180deg,#c2a05f,#8a6a34); }
#opening-root .rank-row.dismiss { opacity: .62; }
#opening-root .rank-row.dismiss::before { background: rgba(120,110,100,.4); }
#opening-root .rank-face { position: relative; flex: 0 0 auto; width: 72px; height: 96px; overflow: hidden;
  border: 1px solid rgba(138,106,52,.7); background: #efe2cc;
  box-shadow: 0 2px 8px rgba(90,64,24,.18); }
#opening-root .rank-face img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; filter: saturate(.94) contrast(1.02); }
#opening-root .rank-row:hover .rank-face { border-color: rgba(184,146,76,.95); }
#opening-root .rank-row.dismiss .rank-face img { filter: grayscale(.85) brightness(1.04); }
#opening-root .rank-meta { flex: 1; min-width: 0; display: flex; align-items: center; gap: 16px; }
#opening-root .rank-info { flex: 0 0 224px; min-width: 0; }
#opening-root .rank-info b { display: block; font-size: 16px; letter-spacing: .1em; color: #3b2f24; font-weight: 400; }
#opening-root .rank-info > span { display: block; margin-top: 3px; font-size: 11.5px; color: #8b7d6b; letter-spacing: .02em; line-height: 1.55; }
#opening-root .rank-fields { flex: 1; max-width: 490px; display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr); gap: 6px 10px; align-items: center; }
#opening-root .rank-fields label { font-size: 11.5px; letter-spacing: .14em; color: #8a6a34; white-space: nowrap; }
#opening-root .rank-fields select, #opening-root .rank-fields input { width: 100%; min-width: 0; font-family: inherit; font-size: 12.5px; color: #5a4a3a;
  padding: 4px 6px; background: rgba(255,253,248,.95); border: 1px solid rgba(184,146,76,.32); border-radius: 2px; outline: none; }
#opening-root .rank-fields select:focus, #opening-root .rank-fields input:focus { border-color: #b8924c; box-shadow: 0 0 0 2px rgba(184,146,76,.14); }
#opening-root .rank-fields select:disabled, #opening-root .rank-fields input:disabled { opacity: .45; }
#opening-root .rank-actions { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(184,146,76,.22); }
#opening-root .rank-tip { margin: 0; font-size: 9.5px; line-height: 1.65; color: #93826d; letter-spacing: .02em; max-width: 540px; }
#opening-root .birth-group { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(184,146,76,.25); display: flex; flex-direction: column; gap: 9px; }
#opening-root .birth { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
#opening-root .birth b { font-size: 14px; letter-spacing: .16em; color: #4a3a29; }
#opening-root .birth b small { font-weight: 400; font-size: 11.5px; letter-spacing: .05em; color: #93826d; margin-left: 4px; }
#opening-root .birth-opt { display: flex; align-items: flex-start; gap: 7px; font-size: 13px; color: #4a3b2c; cursor: pointer; }
#opening-root .birth-opt .radio { width: 11px; height: 11px; border-radius: 50%; border: 1px solid #b8924c; margin-top: 3px; position: relative; flex: 0 0 auto; }
#opening-root .birth-opt.on .radio::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: #8a6a34; }
#opening-root .birth-opt span.d { display: block; font-size: 11px; color: #93826d; margin-top: 1px; letter-spacing: .02em; }
#opening-root .consort-tip { font-size: 9.5px; line-height: 1.7; color: #93826d; letter-spacing: .02em; max-width: 520px; }

/* ---------- 屏七 / 屏八 · 登基前史（水墨书页） ---------- */
#opening-root .paper.pro { width: 780px; height: 580px; padding: 24px 40px 18px;
  background-color: #f7f0df;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.14'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cfilter id='w' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.008' numOctaves='3' seed='7'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='90' xChannelSelector='R' yChannelSelector='G'/%3E%3CfeGaussianBlur stdDeviation='26'/%3E%3C/filter%3E%3Cellipse cx='280' cy='260' rx='175' ry='130' fill='%235c6154' opacity='0.30' filter='url(%23w)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560'%3E%3Cfilter id='w' x='-40%25' y='-40%25' width='180%25' height='180%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.01' numOctaves='3' seed='21'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='90' xChannelSelector='R' yChannelSelector='G'/%3E%3CfeGaussianBlur stdDeviation='30'/%3E%3C/filter%3E%3Cellipse cx='280' cy='270' rx='185' ry='140' fill='%23525848' opacity='0.25' filter='url(%23w)'/%3E%3C/svg%3E"),
    linear-gradient(168deg,#fbf6e9 0%,#f3ebd8 52%,#e9ddc4 100%);
  background-repeat: repeat,no-repeat,no-repeat,no-repeat;
  background-size: 200px 200px,560px 560px,580px 580px,100% 100%;
  background-position: 0 0,left -170px top -200px,right -190px bottom -200px,0 0;
  background-blend-mode: multiply,multiply,multiply,normal;
  border: 1px solid rgba(120,104,80,.55);
  outline: 1px solid rgba(126,110,86,.28); outline-offset: -11px;
  box-shadow: 0 26px 60px rgba(0,0,0,.6),inset 0 0 0 1px rgba(255,255,255,.4),inset 0 0 70px rgba(122,98,66,.12); }
#opening-root .paper.pro.chapter { height: 560px; box-shadow: 0 26px 60px rgba(0,0,0,.6),inset 0 0 0 1px rgba(255,255,255,.4),
  inset 0 0 70px rgba(122,98,66,.12),inset 34px 0 46px -34px rgba(88,70,46,.5); }
#opening-root .paper.pro::before, #opening-root .paper.pro::after { filter: saturate(.55) contrast(.96); opacity: .4; }
#opening-root .paper.pro::after { opacity: .24; }
#opening-root .paper.pro .pro-head { color: #8a7a63; border-bottom-color: rgba(110,96,76,.28); }
#opening-root .paper.pro .watermark { color: rgba(80,92,84,.1); font-size: 128px; top: 18px; right: 0; }
#opening-root .paper.pro .pro-chapter { color: #7a6642; }
#opening-root .paper.pro .pro-chapter::before { background: #9d8a66; }
#opening-root .paper.pro .pro-text { color: #3d362d; line-height: 2.05; }
#opening-root .paper.pro .pro-text .name { color: #96301f; font-weight: 700; }
#opening-root .paper.pro .pro-foot { border-top-color: rgba(110,96,76,.26); }
#opening-root .paper.pro .dot { background: rgba(110,100,84,.35); }
#opening-root .paper.pro .dot.on { background: #8a7650; }
#opening-root .paper.pro .dot.done { border-color: #9d8a66; }
#opening-root .pro-cover { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; position: relative; }
#opening-root .pro-cover::before { content: ''; position: absolute; left: 50%; top: 47%; width: 340px; height: 340px; pointer-events: none;
  transform: translate(-50%,-50%); border-radius: 50%;
  background: radial-gradient(circle at 44% 40%,rgba(80,92,84,.14),rgba(80,92,84,.05) 58%,rgba(80,92,84,0) 72%);
  filter: blur(3px); }
#opening-root .pro-cover > * { position: relative; z-index: 1; }
#opening-root .seal { position: absolute; right: 38px; bottom: 24px; z-index: 2; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-rl; font-family: 'Ma Shan Zheng',cursive; font-size: 16px; line-height: 1.1; letter-spacing: .1em; color: #fbf1e2;
  background: linear-gradient(160deg,#a8302a,#8b1f19); border-radius: 2px; transform: rotate(-5deg); opacity: .9;
  box-shadow: 0 2px 10px rgba(110,25,18,.28),inset 0 0 0 1px rgba(255,235,215,.35); }
#opening-root .pro-cover h2 { font-family: 'Ma Shan Zheng',cursive; font-size: 56px; letter-spacing: .2em; font-weight: 400; color: #33281e; margin: 0; }
#opening-root .pro-cover .sub { margin-top: 18px; font-size: 14px; letter-spacing: .42em; color: #8a6a34; }
#opening-root .pro-cover .cta { display: flex; gap: 14px; margin-top: 30px; align-items: center; }
#opening-root .pro-skip { position: absolute; top: 8px; right: 10px; z-index: 6; font-family: inherit; font-size: 12.5px; color: #8b2a22; letter-spacing: .14em; background: rgba(255,250,240,.62); border: 1px solid rgba(168,48,42,.5); border-radius: 2px; padding: 3px 10px; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
#opening-root .pro-skip:hover { background: rgba(168,48,42,.14); border-color: rgba(168,48,42,.8); color: #6f1a13; }
#opening-root .pro-page { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
#opening-root .pro-head { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #8b7d6b; letter-spacing: .12em;
  padding-bottom: 8px; border-bottom: 1px solid rgba(184,146,76,.22); }
#opening-root .pro-head button { font-family: inherit; font-size: 12px; color: #8b2a22; letter-spacing: .12em; background: rgba(255,250,240,.55); border: 1px solid rgba(168,48,42,.45); border-radius: 2px; padding: 2px 9px; cursor: pointer; transition: background .18s, border-color .18s, color .18s; }
#opening-root .pro-head button:hover { background: rgba(168,48,42,.13); border-color: rgba(168,48,42,.78); color: #6f1a13; }
#opening-root .watermark { position: absolute; right: 6px; top: 26px; font-family: 'Ma Shan Zheng',cursive; font-size: 120px; line-height: 1;
  color: rgba(184,146,76,.06); pointer-events: none; }
#opening-root .pro-chapter { font-size: 16px; letter-spacing: .2em; color: #8a6a34; margin: 16px 0 10px; display: flex; align-items: center; gap: 10px; }
#opening-root .pro-chapter::before { content: ''; width: 22px; height: 1px; background: #b8924c; }
#opening-root .pro-text { flex: 1; font-size: 17px; line-height: 2; color: #4a3b2c; text-align: justify; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
#opening-root .pro-text p { text-indent: 2em; margin-bottom: 8px; }
#opening-root .pro-text .name { color: #96301f; font-weight: 700; }
#opening-root .pro-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 9px; margin-top: 8px; border-top: 1px solid rgba(184,146,76,.22); }
#opening-root .dots { display: flex; gap: 6px; }
#opening-root .dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(120,105,88,.3); }
#opening-root .dot.done { background: transparent; border: 1px solid #b8924c; }
#opening-root .dot.on { background: #b8924c; }
#opening-root .pro-nav { display: flex; gap: 8px; }
#opening-root .pro-nav .btn { min-width: 88px; padding: 7px 14px; font-size: 12px; }
#opening-root .dot { border: 0; padding: 0; font-size: 0; line-height: 0; min-height: 0; min-width: 0; cursor: default; }
#opening-root .dot.done { cursor: pointer; }
#opening-root .pro-page.flip-next { animation: opFlipNext .26s ease both; }
#opening-root .pro-page.flip-prev { animation: opFlipPrev .26s ease both; }
@keyframes opFlipNext { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes opFlipPrev { from { opacity: 0; transform: translateX(-24px); } to { opacity: 1; transform: none; } }
#opening-root .lock-note { font-size: 10.5px; letter-spacing: .06em; color: #93826d; }
#opening-root .statusbar.clickable { cursor: pointer; }

/* ---------- 交互层 ---------- */
#opening-root .screen.active { animation: opScreenIn .36s ease both; }
@keyframes opScreenIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#opening-root .toast { position: fixed; left: 50%; bottom: 52px; transform: translate(-50%,10px); z-index: 97;
  padding: 9px 18px; font-size: 12px; letter-spacing: .06em; color: #f1e3cc; background: rgba(24,16,11,.9);
  border: 1px solid rgba(196,165,106,.4); opacity: 0; pointer-events: none; transition: opacity .25s,transform .25s; }
#opening-root .toast.on { opacity: 1; transform: translate(-50%,0); }
#opening-root .op-mask { position: fixed; inset: 0; z-index: 95; display: none; align-items: center; justify-content: center; background: rgba(8,5,3,.62); }
#opening-root .op-mask.on { display: flex; }
#opening-root .op-modal { width: 480px; max-width: 92vw; max-height: 72vh; overflow-y: auto; padding: 24px 26px 18px; background: linear-gradient(180deg,#fbf5ea,#efe4d2);
  border: 1px solid rgba(184,146,76,.55); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
#opening-root .op-modal h3 { font-family: 'Ma Shan Zheng',cursive; font-weight: 400; font-size: 1.5rem; letter-spacing: .1em; color: #33281e; }
#opening-root .op-modal p { font-size: 11px; line-height: 1.8; color: #6b5d50; margin-top: 6px; }
#opening-root .op-modal textarea { width: 100%; height: 88px; margin-top: 8px; padding: 8px 9px; resize: none; font-family: 'Noto Serif SC',serif;
  font-size: 11px; line-height: 1.7; color: #4a3b2c; background: rgba(255,253,248,.92); border: 1px solid rgba(184,146,76,.35); outline: none; }
#opening-root .op-modal .fb-field { margin-top: 9px; }
#opening-root .op-modal .fb-field > label { display: block; font-size: 9.5px; letter-spacing: .16em; color: #8a6a34; margin-bottom: 4px; }
#opening-root .op-modal input[type=text] { width: 100%; padding: 6px 8px; font-family: 'Noto Serif SC',serif; font-size: 10.5px; color: #4a3b2c;
  background: rgba(255,253,248,.92); border: 1px solid rgba(184,146,76,.35); outline: none; }
#opening-root .fb-types { display: flex; gap: 7px; margin-top: 6px; }
#opening-root .fb-type { font-family: inherit; font-size: 10px; letter-spacing: .06em; color: #7a5a2a; padding: 5px 11px; cursor: pointer;
  border: 1px solid rgba(184,146,76,.4); background: rgba(184,146,76,.08); }
#opening-root .fb-type.on { background: rgba(184,146,76,.28); color: #5a3f18; }
#opening-root .op-modal .fb-qr { display: flex; gap: 14px; align-items: center; margin-top: 12px; padding: 10px 12px;
  border: 1px solid rgba(184,146,76,.3); background: #fffdf7; }
#opening-root .op-modal .fb-qr-img { width: 104px; flex: 0 0 auto; padding: 4px; background: #fff; border: 1px solid rgba(184,146,76,.35); }
#opening-root .op-modal .fb-qr-img img { display: block; width: 100%; height: auto; }
#opening-root .op-modal .fb-qr-txt p { margin-top: 0; }
#opening-root .op-modal .fb-qr-txt .fb-qr-t { font-size: 13px; font-weight: 600; letter-spacing: .06em; color: #4a3b2c; }
#opening-root .op-modal .fb-qr-txt .fb-qr-warm { margin-top: 4px; color: #8a6a34; }
#opening-root .op-modal.fb-min { width: 430px; }
#opening-root .op-modal.fb-min .op-mf { justify-content: center; }
#opening-root .btn:disabled { opacity: .45; cursor: not-allowed; }
#opening-root .op-mf { display: flex; justify-content: space-between; align-items: center; margin-top: 14px; }
#opening-root .op-modal.confirm { width: 420px; padding: 26px 28px 18px; text-align: center; }
#opening-root .op-modal.confirm h3 { font-family: 'Noto Serif SC',serif; font-weight: 600; font-size: 1.25rem; letter-spacing: .14em;
  color: #33281e; margin-bottom: 14px; }
#opening-root .op-modal.log { width: 520px; }
#opening-root .log-item { margin-top: 12px; padding-left: 11px; border-left: 2px solid rgba(184,146,76,.45); }
#opening-root .log-item b { display: block; font-size: 12px; letter-spacing: .08em; color: #7a5a2a; margin-bottom: 4px; }
#opening-root .log-item ul { margin: 0; padding-left: 16px; }
#opening-root .log-item li { font-size: 12px; line-height: 1.85; color: #5f5347; }
#opening-root #op-aiWarnBack { border: 1px solid rgba(184,146,76,.6); border-radius: 2px; padding: 10px 22px; font-size: 13px;
  letter-spacing: .18em; color: #8a5d2c; background: rgba(255,253,248,.72); min-width: 126px; text-align: center; }
#opening-root #op-aiWarnBack:hover { background: rgba(184,146,76,.16); color: #7a4f22; border-color: #b8924c; }
#opening-root .op-modal.confirm .btn { min-width: 126px; text-align: center; }
#opening-root .latin { font-family: Georgia,'Times New Roman',serif; font-weight: 600; }
#opening-root .op-modal.confirm h3 .latin { font-size: .8em; color: #8a5d2c; letter-spacing: .02em; }
#opening-root .op-modal.confirm .warn-line { font-size: 14px; line-height: 1.8; color: #3b2f24; letter-spacing: .04em; }
#opening-root .op-modal.confirm .warn-ask { margin-top: 6px; font-size: 12.5px; color: #8a6a34; letter-spacing: .14em; }
#opening-root .op-modal.confirm .op-mf { justify-content: space-between; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid rgba(184,146,76,.22); }
#opening-root .curtain { position: fixed; inset: 0; z-index: 92; display: none; align-items: center; justify-content: center;
  background: radial-gradient(50% 50% at 50% 50%,#1a120c,#0a0604 75%); opacity: 0; }
#opening-root .curtain.play { display: flex; animation: opCurtainFade 1.25s ease forwards; }
#opening-root .curtain .goldline { width: 0; height: 1px; background: linear-gradient(90deg,transparent,#e0c084,transparent);
  box-shadow: 0 0 22px rgba(224,192,132,.85); }
#opening-root .curtain.play .goldline { animation: opLineGrow 1.1s ease forwards; }
@keyframes opCurtainFade { 0% { opacity: 1; } 72% { opacity: 1; } 100% { opacity: 0; } }
@keyframes opLineGrow { 0% { width: 0; opacity: 0; } 22% { opacity: 1; } 62% { width: 72vw; opacity: 1; } 100% { width: 100vw; opacity: .12; } }
#opening-root .screen.end { background: radial-gradient(120% 120% at 50% 0%,#1d1511,#0a0604 70%); }
#opening-root .paper.end { width: 520px; text-align: center; align-items: center; padding: 40px 40px 30px; }
#opening-root .paper.end h2 { margin-top: 4px; }
#opening-root .paper.end p { font-size: 12.5px; line-height: 2; color: #6b5d50; margin-top: 10px; }
#opening-root .paper.end .cta { margin-top: 22px; display: flex; gap: 14px; align-items: center; justify-content: center; }
#opening-root .op-mf > div { display: flex; gap: 10px; align-items: center; }
#opening-root.mobile .toast { font-size: 11px; bottom: 36px; padding: 6px 12px; }
#opening-root.mobile .op-modal { width: min(560px,94vw); max-height: 88vh; padding: 16px 20px 12px; }
#opening-root.mobile .op-modal h3 { font-size: 1.25rem; }
#opening-root.mobile .op-modal p { font-size: 10.5px; }
#opening-root.mobile .op-modal textarea { height: 96px; font-size: 10px; margin-top: 8px; }
#opening-root.mobile .op-mf { margin-top: 8px; }
#opening-root.mobile .paper.end { width: min(560px,calc(100% - 12px)); padding: 24px 28px 18px; }
#opening-root.mobile .paper.end p { font-size: 12.5px; line-height: 1.8; margin-top: 6px; }

/* ================= 手机横屏 · 流式铺满视口（不整体缩放） ================= */
#opening-root.mobile { background: radial-gradient(70% 70% at 50% 50%,#14100b,#050302 78%); }
#opening-root.mobile .stage { width: 100vw; height: 100vh; max-width: 960px; max-height: 460px; }
#opening-root .rotate-tip { display: none; position: fixed; inset: 0; z-index: 99; background: #0a0604;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  color: #e8d7b8; font-size: 13px; letter-spacing: .2em; text-align: center; }
#opening-root .rotate-tip small { font-size: 10px; letter-spacing: .1em; color: rgba(232,215,184,.55); }
@media (orientation:portrait) and (max-width:900px) {
  #opening-root.mobile .rotate-tip { display: flex; }
  #opening-root.mobile .stage { visibility: hidden; }
}
#opening-root.mobile .paper { width: calc(100% - 12px); max-width: calc(100% - 12px); max-height: calc(100% - 8px); padding: 12px 16px 8px; }
#opening-root.mobile .kicker { font-size: 10.5px; letter-spacing: .26em; }
#opening-root.mobile .paper h2 { font-size: 1.7rem; letter-spacing: .1em; margin-top: 2px; }
#opening-root.mobile .paper-sub { font-size: 12px; margin-top: 3px; }
#opening-root.mobile .paper-body { margin-top: 8px; padding-bottom: 4px; touch-action: pan-y; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#opening-root.mobile .paper.ai { display: block; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#opening-root.mobile .paper.ai .paper-body { overflow: visible; max-height: none; padding-right: 0; }
#opening-root.mobile .paper-foot { padding-top: 7px; margin-top: 7px; }
#opening-root.mobile .btn { font-size: 12px; letter-spacing: .16em; padding: 7px 22px; }
#opening-root.mobile .btn-text { font-size: 12px; padding: 7px 2px; }
#opening-root.mobile .read-block h3 { font-size: 12.5px; margin-bottom: 4px; }
#opening-root.mobile .read-block p { font-size: 12px; line-height: 1.7; }
#opening-root.mobile .callout { margin-top: 8px; padding: 7px 10px; font-size: 11px; line-height: 1.65; }
#opening-root.mobile .rule { margin-bottom: 12px; }
#opening-root.mobile .rule h3 { font-size: 12.5px; margin-bottom: 3px; }
#opening-root.mobile .rule p { font-size: 12px; line-height: 1.75; }
#opening-root.mobile .qr { width: 104px; height: auto; padding: 3px; }
#opening-root.mobile .qr img { height: 104px; }
#opening-root.mobile .qr-row { margin-top: 8px; gap: 18px; }
#opening-root.mobile .qr-cap { font-size: 9.5px; margin-top: 4px; }

#opening-root.mobile .brand { top: 6%; right: 5%; }
#opening-root.mobile .brand h1 { font-size: 52px; letter-spacing: .04em; }
#opening-root.mobile .brand h1 span:nth-child(n) { transform: translateY(0); }
#opening-root.mobile .brand-sub { font-size: 10.5px; letter-spacing: .22em; margin-top: 6px; }
#opening-root.mobile .main-menu { bottom: 13%; gap: 12px; }
#opening-root.mobile .menu-btn { width: 50px; height: 118px; font-size: 14.5px; letter-spacing: .2em; padding: 10px 0; }
#opening-root.mobile .statusbar { height: 30px; font-size: 10.5px; padding: 0 10px; line-height: 1.3; flex-wrap: wrap; }
#opening-root.mobile .state-dot { width: 5px; height: 5px; margin-right: 5px; }

#opening-root.mobile .paper.name { width: min(560px,calc(100% - 12px)); padding: 16px 24px 12px; }
#opening-root.mobile .field-row { margin-top: 14px; gap: 20px; }
#opening-root.mobile .field label { font-size: 10px; margin-bottom: 5px; }
#opening-root.mobile .line-input { font-size: 16px; padding: 2px 1px 5px; }
#opening-root.mobile .name-hint { margin-top: 10px; font-size: 9.5px; line-height: 1.65; }

#opening-root.mobile .ai-grid { grid-template-columns: 236px 1fr; gap: 18px; }
#opening-root.mobile .ai-col h3 { font-size: 11px; margin-bottom: 4px; }
#opening-root.mobile .ai-col p { font-size: 10px; line-height: 1.6; margin-bottom: 5px; }
#opening-root.mobile .now { font-size: 10px; padding: 5px 8px; }
#opening-root.mobile .ai-field { margin-top: 6px; }
#opening-root.mobile .ai-field label { font-size: 9px; margin-bottom: 3px; }
#opening-root.mobile .ai-field input { font-size: 10.5px; padding: 5px 7px; }
#opening-root.mobile .chips { gap: 5px; margin-top: 6px; }
#opening-root.mobile .chip { font-size: 9.5px; padding: 4px 7px; }
#opening-root.mobile .ai-ops { margin-top: 7px; gap: 7px; }
#opening-root.mobile .ai-ops .btn { font-size: 10.5px; padding: 5px 12px; }
#opening-root.mobile .ai-ops .btn-text { font-size: 10.5px; padding: 5px 1px; }
#opening-root.mobile .fee-row { font-size: 9.5px; padding: 3px 0; }

#opening-root.mobile .paper.story { width: min(720px,calc(100% - 12px)); }
#opening-root.mobile .story p { font-size: 14px; line-height: 1.9; margin-bottom: 11px; }
#opening-root.mobile .story .sign { font-size: 11.5px; margin-top: 8px; }

#opening-root.mobile .paper.consorts { width: calc(100vw - 12px); padding: 10px 14px 8px; }
#opening-root.mobile .select-hint { font-size: 11px; line-height: 1.55; }
#opening-root.mobile .rank-list { gap: 5px; }
#opening-root.mobile .rank-row { gap: 9px; padding: 4px 8px; }
#opening-root.mobile .rank-face { width: 44px; height: 58px; }
#opening-root.mobile .rank-meta { gap: 10px; }
#opening-root.mobile .rank-info { flex: 0 0 124px; }
#opening-root.mobile .rank-info b { font-size: 14.5px; }
#opening-root.mobile .rank-info > span { font-size: 10px; margin-top: 2px; }
#opening-root.mobile .rank-fields { max-width: none; grid-template-columns: auto minmax(0,1fr) auto minmax(0,1fr); gap: 4px 8px; }
#opening-root.mobile .rank-fields label { font-size: 9.6px; letter-spacing: .08em; }
#opening-root.mobile .rank-fields select, #opening-root.mobile .rank-fields input { font-size: 10.5px; padding: 2px 4px; }
#opening-root.mobile .rank-actions { margin-top: 6px; padding-top: 6px; gap: 10px; }
#opening-root.mobile .rank-tip { font-size: 8.6px; line-height: 1.4; max-width: 430px; }
#opening-root.mobile .birth-group { margin-top: 7px; padding-top: 6px; gap: 5px; }
#opening-root.mobile .birth { gap: 14px; }
#opening-root.mobile .birth b { font-size: 12.5px; letter-spacing: .1em; }
#opening-root.mobile .birth b small { font-size: 9.6px; }
#opening-root.mobile .birth-opt { font-size: 11.5px; gap: 5px; }
#opening-root.mobile .birth-opt span.d { font-size: 9.6px; }
#opening-root.mobile .birth-opt .radio { width: 10px; height: 10px; margin-top: 2px; }
#opening-root.mobile .consort-tip { font-size: 8.6px; margin-top: 5px; }
#opening-root.mobile .paper.ai { width: calc(100vw - 12px); padding: 12px 18px 9px; }
#opening-root.mobile #op-s4 .callout { margin-top: 7px; padding: 7px 10px 7px 9px; font-size: 10.4px; line-height: 1.65; }
#opening-root.mobile .spec-table { font-size: 8.6px; margin: 3px 0 5px; }
#opening-root.mobile .spec-table th, #opening-root.mobile .spec-table td { padding: 2px 4px; }
#opening-root.mobile #op-s4 .tut-box { margin-top: 6px; padding: 7px 10px; }
#opening-root.mobile .tut-ico { width: 17px; height: 17px; font-size: 10px; }
#opening-root.mobile #op-s4 .tut-txt { font-size: 9.8px; line-height: 1.5; }
#opening-root.mobile .tut-arrow { font-size: 9.5px; }
#opening-root.mobile .ai-sec { margin-top: 8px; }
#opening-root.mobile #op-s4 .ai-sec h3, #opening-root.mobile #op-s4 .rule h3 { font-size: 11px; margin-bottom: 4px; padding-left: 8px; }
#opening-root.mobile #op-s4 .ai-sec h3::before, #opening-root.mobile #op-s4 .rule h3::before { width: 2px; }
#opening-root.mobile #op-s4 .rule { margin: 9px 0; }
#opening-root.mobile #op-s4 .rule p { font-size: 10.6px; line-height: 1.7; }
#opening-root.mobile .ai-row { margin-top: 4px; gap: 6px; }
#opening-root.mobile #op-s4 .ai-row label { width: 46px; font-size: 9.4px; }
#opening-root.mobile #op-s4 .ai-row input { font-size: 10.5px; padding: 3px 6px; }
#opening-root.mobile .ai-chips-line { margin-top: 5px; gap: 6px; }
#opening-root.mobile #op-s4 .chips-label { font-size: 9.4px; }
#opening-root.mobile #op-s4 .chip { font-size: 9.4px; padding: 3px 8px; }
#opening-root.mobile .ai-ops { margin-top: 7px; gap: 7px; }
#opening-root.mobile #op-s4 .ai-ops .btn { padding: 5px 14px; font-size: 10.8px; }
#opening-root.mobile #op-s4 #op-aiTest { font-size: 10.5px; padding: 5px 10px; }
#opening-root.mobile #op-s4 .ai-note { font-size: 9.4px; margin-top: 3px; }
#opening-root.mobile #op-s4 .now { font-size: 10px; padding: 5px 8px; margin-top: 5px; }
#opening-root.mobile .fb-types { flex-wrap: wrap; gap: 5px; }
#opening-root.mobile .op-modal .fb-qr { gap: 10px; padding: 8px 10px; margin-top: 8px; }
#opening-root.mobile .op-modal .fb-qr-img { width: 86px; }
#opening-root.mobile .fb-type { font-size: 9.6px; padding: 4px 9px; }
#opening-root.mobile .op-modal .fb-field { margin-top: 5px; }
#opening-root.mobile .op-modal.confirm { width: min(360px,90vw); padding: 16px 20px 12px; }
#opening-root.mobile .op-modal.confirm h3 { font-size: 1.05rem; margin-bottom: 8px; }
#opening-root.mobile .op-modal.confirm .warn-line { font-size: 12.5px; line-height: 1.7; }
#opening-root.mobile .op-modal.confirm .warn-ask { font-size: 11.5px; margin-top: 4px; }
#opening-root.mobile .op-modal.confirm .op-mf { margin-top: 10px; padding-top: 8px; gap: 8px; }
#opening-root.mobile #op-aiWarnBack { padding: 5px 12px; font-size: 11px; letter-spacing: .14em; }
#opening-root.mobile .op-modal .fb-field > label { font-size: 9px; }
#opening-root.mobile .op-modal input[type=text] { font-size: 10px; padding: 4px 6px; }

#opening-root.mobile .paper.pro { width: calc(100% - 12px); height: calc(100% - 10px); max-height: calc(100% - 10px); padding: 12px 20px 10px; }
#opening-root.mobile .paper.pro.chapter { height: calc(100% - 10px); }
#opening-root.mobile .pro-cover h2 { font-size: 2.35rem; }
#opening-root.mobile .pro-cover .sub { font-size: 11.5px; letter-spacing: .32em; margin-top: 6px; }
#opening-root.mobile .pro-cover .cta { margin-top: 14px; gap: 10px; }
#opening-root.mobile .pro-skip { font-size: 12px; top: 6px; right: 8px; padding: 3px 8px; }
#opening-root.mobile .pro-head { font-size: 10.5px; padding-bottom: 5px; }
#opening-root.mobile .pro-head button { font-size: 11.5px; padding: 2px 8px; }
#opening-root.mobile .watermark { font-size: 56px; top: 10px; right: 8px; }
#opening-root.mobile .pro-chapter { font-size: 13.5px; margin: 7px 0 5px; gap: 6px; }
#opening-root.mobile .pro-chapter::before { width: 16px; }
#opening-root.mobile .pro-text { font-size: 13.5px; line-height: 1.9; }
#opening-root.mobile .pro-text p { margin-bottom: 4px; }
#opening-root.mobile .pro-foot { padding-top: 6px; margin-top: 5px; }
#opening-root.mobile .dot { width: 6px; height: 6px; }
#opening-root.mobile .pro-nav .btn { min-width: 72px; padding: 4px 12px; font-size: 11.5px; }

/* 小屏手机横屏：字号略收，避免长章节溢出 */
@media (max-height: 390px) {
  #opening-root.mobile .pro-text { font-size: 12.8px; line-height: 1.8; }
  #opening-root.mobile .pro-chapter { font-size: 13px; }
}

/* 手机端装饰缩放 */
#opening-root.mobile .paper::before, #opening-root.mobile .paper::after { width: 170px; height: 170px; }
#opening-root.mobile .paper::before { top: -40px; right: -46px; }
#opening-root.mobile .paper::after { bottom: -44px; left: -50px; }
#opening-root.mobile .paper.story::before, #opening-root.mobile .paper.story::after { width: 140px; height: 140px; }
#opening-root.mobile .paper.name::before { width: 122px; height: 122px; top: -34px; right: -40px; opacity: .4; }
#opening-root.mobile .paper.name::after { width: 112px; height: 112px; bottom: -38px; left: -44px; opacity: .22; }
#opening-root.mobile .paper.consorts::before, #opening-root.mobile .paper.consorts::after { width: 150px; height: 150px; }
#opening-root.mobile .seal { width: 34px; height: 34px; font-size: 12px; right: 18px; bottom: 14px; }
#opening-root.mobile .pro-cover::before { width: 210px; height: 210px; }

/* ================= 屏四 · 接入 API 图文教程弹窗 ================= */
#opening-root .op-modal.tut { width: 860px; max-width: 94vw; max-height: 86vh; padding: 0; display: flex; flex-direction: column; overflow: hidden; }
#opening-root .op-modal.tut .tut-head { display: flex; align-items: flex-start; gap: 14px; padding: 20px 24px 14px;
  border-bottom: 1px solid rgba(184,146,76,.3);
  background: linear-gradient(180deg,rgba(255,252,244,.94),rgba(250,244,233,.74)); }
#opening-root .op-modal.tut .tut-head-txt { flex: 1; min-width: 0; }
#opening-root .op-modal.tut h3 { font-size: 1.62rem; letter-spacing: .12em; }
#opening-root .op-modal.tut h3 .latin { font-size: .82em; color: #8a5d2c; }
#opening-root .op-modal.tut .tut-lead { margin-top: 5px; font-size: 12px; line-height: 1.75; color: #7a6a58; }
#opening-root .op-modal.tut .tut-lead b { color: #8a5d2c; font-weight: 600; }
#opening-root .tut-close { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
  font-family: inherit; font-size: 21px; line-height: 1; color: #8a5d2c; background: rgba(255,253,248,.7);
  border: 1px solid rgba(184,146,76,.45); border-radius: 50%; transition: background .18s,color .18s,border-color .18s; }
#opening-root .tut-close:hover { background: rgba(184,146,76,.22); color: #6b4a1e; border-color: #b8924c; }
#opening-root .tut-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 24px 22px;
  scrollbar-width: thin; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
#opening-root .tut-body::-webkit-scrollbar { width: 5px; }
#opening-root .tut-body::-webkit-scrollbar-thumb { background: rgba(184,146,76,.38); }
#opening-root .tut-step { padding: 14px 0 16px; border-bottom: 1px dashed rgba(184,146,76,.3); }
#opening-root .tut-step:first-child { padding-top: 0; }
#opening-root .tut-step:last-of-type { border-bottom: 0; padding-bottom: 4px; }
#opening-root .tut-step-head { display: flex; align-items: center; gap: 9px; }
#opening-root .tut-no { flex: 0 0 auto; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
  font-size: 12px; color: #fff8ea; background: #b8924c; box-shadow: 0 1px 4px rgba(120,86,36,.28); }
#opening-root .tut-step-head b { font-size: 15px; font-weight: 600; letter-spacing: .06em; color: #3b2f24; }
#opening-root .tut-tip { margin-top: 7px; font-size: 12.5px; line-height: 1.8; color: #6b5d50; }
#opening-root .tut-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 7px 14px;
  font-size: 12.5px; letter-spacing: .06em; color: #7a4f22; text-decoration: none;
  border: 1px solid rgba(184,146,76,.55); background: rgba(184,146,76,.12); transition: background .18s,border-color .18s; }
#opening-root .tut-link:hover { background: rgba(184,146,76,.24); border-color: #b8924c; }
#opening-root .tut-fig { margin-top: 10px; }
#opening-root .tut-fig picture { display: block; }
#opening-root .tut-fig img { display: block; width: 100%; height: auto; cursor: zoom-in; background: #fff;
  border: 1px solid rgba(120,86,36,.38); box-shadow: 0 3px 12px rgba(90,64,24,.12); }
#opening-root .tut-fig figcaption { margin-top: 5px; font-size: 10.5px; line-height: 1.6; color: #93826d;
  text-align: center; letter-spacing: .02em; }
#opening-root .tut-faq { margin-top: 14px; padding: 13px 16px; background: rgba(184,146,76,.1); border-left: 3px solid #b8924c; }
#opening-root .tut-faq h4 { font-size: 13px; letter-spacing: .1em; color: #4a3a29; margin-bottom: 6px; }
#opening-root .tut-faq p { margin-top: 4px; font-size: 12px; line-height: 1.8; color: #6b5d50; }
#opening-root .tut-faq p b { color: #7a5a2a; font-weight: 600; }
#opening-root .tut-zoom { position: fixed; inset: 0; z-index: 120; display: none; align-items: center; justify-content: center;
  padding: 14px; background: rgba(6,4,3,.9); cursor: zoom-out; }
#opening-root .tut-zoom.on { display: flex; }
#opening-root .tut-zoom img { max-width: 96vw; max-height: 94vh; width: auto; height: auto; background: #fff;
  border: 1px solid rgba(196,165,106,.6); box-shadow: 0 20px 60px rgba(0,0,0,.7); }

/* ---------- 教程弹窗 · 手机横屏 / 平板 ---------- */
#opening-root.mobile .op-modal.tut { width: 96vw; max-width: 96vw; max-height: 92vh; padding: 0; }
#opening-root.mobile .op-modal.tut .tut-head { padding: 12px 16px 10px; gap: 10px; }
#opening-root.mobile .op-modal.tut h3 { font-size: 1.3rem; }
#opening-root.mobile .op-modal.tut .tut-lead { font-size: 10.5px; line-height: 1.65; margin-top: 3px; }
#opening-root.mobile .tut-close { width: 28px; height: 28px; font-size: 17px; }
#opening-root.mobile .tut-body { padding: 12px 16px 16px; }
#opening-root.mobile .tut-step { padding: 10px 0 12px; }
#opening-root.mobile .tut-no { width: 21px; height: 21px; font-size: 11px; }
#opening-root.mobile .tut-step-head b { font-size: 13px; }
#opening-root.mobile .tut-tip { font-size: 11.5px; line-height: 1.7; margin-top: 5px; }
#opening-root.mobile .tut-link { margin-top: 7px; padding: 5px 11px; font-size: 11.5px; }
#opening-root.mobile .tut-fig { margin-top: 8px; }
#opening-root.mobile .tut-fig figcaption { font-size: 9.5px; }
#opening-root.mobile .tut-faq { margin-top: 10px; padding: 10px 12px; }
#opening-root.mobile .tut-faq h4 { font-size: 12px; }
#opening-root.mobile .tut-faq p { font-size: 11px; line-height: 1.7; }
