/* ============================================================
 * 《逃离程丽》UI — Steam / 3A / 黑白极简
 * 设计语言：纯黑底 · 冷白字 · 1px 细描边 · 等宽数据 · 极少点缀
 * 游戏外壳界面统一黑白；纸质道具与新闻页保留真实质感（内容需要）
 * ============================================================ */

/* ============ 基础 ============ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: #000; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #ededed; user-select: none; -webkit-user-select: none;
  --ink: #f2f2f2; --ink-2: #a6a6a6; --ink-3: #6b6b6b;
  --line: rgba(255,255,255,.14); --line-soft: rgba(255,255,255,.07);
  --panel: rgba(10,10,11,.86); --mono: "SF Mono", "JetBrains Mono", Consolas, "Courier New", monospace;
}
#app { position: fixed; inset: 0; overflow: hidden; }
#glcanvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.hidden { display: none !important; }
.layer { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.screen { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; }

button { font-family: inherit; cursor: pointer; border: none; outline: none; color: inherit; }

/* ============ 通用按钮：Steam 扁平 + 细描边 ============ */
.big-btn {
  pointer-events: auto; position: relative; min-width: 210px;
  padding: 14px 40px; font-size: 14px; font-weight: 600; letter-spacing: 6px;
  color: #ededed; background: #141416;
  border: 1px solid rgba(255,255,255,.32); border-radius: 2px;
  transition: background .18s, color .18s, border-color .18s, transform .08s;
}
.big-btn::before {
  content: ""; position: absolute; left: -1px; top: 20%; height: 60%; width: 2px;
  background: #ededed; transition: height .18s, top .18s;
}
.big-btn:hover { background: #ededed; color: #0a0a0a; border-color: #ededed; }
.big-btn:hover::before { height: 100%; top: 0; }
.big-btn:active { transform: translateY(1px) scale(.995); }
.back { background: none; color: var(--ink-2); font-size: 14px; padding: 6px; }
.back:hover { color: #fff; }

/* Steam 风格细线标头 */
.steam-eyebrow { font-family: var(--mono); font-size: 10px; letter-spacing: 4px; color: var(--ink-3); text-transform: uppercase; }
.hairline { height: 1px; background: var(--line); width: 100%; }
.corner-frame { position: relative; }
.corner-frame::before, .corner-frame::after {
  content: ""; position: absolute; width: 10px; height: 10px; border-color: rgba(255,255,255,.35); border-style: solid;
}
.corner-frame::before { top: -6px; left: -6px; border-width: 1px 0 0 1px; }
.corner-frame::after { bottom: -6px; right: -6px; border-width: 0 1px 1px 0; }

/* ============ 启动①：工作室 Logo（极简黑白） ============ */
.boot-screen { position: absolute; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000; }
#studio-logo { background: #000; }
#studio-logo .logo-inner { opacity: 0; text-align: center; }
#studio-logo .logo-inner.animate { animation: logoSeq 2.6s ease-in-out forwards; }
@keyframes logoSeq {
  0%   { opacity: 0; transform: scale(.99); letter-spacing: 2px; }
  20%  { opacity: 1; transform: scale(1); letter-spacing: 8px; }
  62%  { opacity: 1; transform: scale(1.004); letter-spacing: 9px; }
  100% { opacity: 0; transform: scale(1.01); letter-spacing: 10px; }
}
.logo-name { font-size: clamp(30px, 7vw, 52px); font-weight: 200; color: #fff; font-family: "Helvetica Neue", Arial, sans-serif; padding-left: 10px; }
.logo-sub { margin-top: 18px; font-family: var(--mono); font-size: 9px; letter-spacing: 6px; color: #555; text-transform: uppercase; }

/* ============ 启动②：全屏提示（点击继续） ============ */
#fs-gate { background: #000; z-index: 91; }
.fs-glyph { pointer-events: auto; position: relative; width: 104px; height: 104px; background: none; padding: 0; }
.fs-glyph .corner { position: absolute; width: 34px; height: 34px; border: 1px solid #e6e6e6; transition: border-color .2s; }
.fs-glyph .ctl { top: 0; left: 0; border-right: none; border-bottom: none; }
.fs-glyph .ctr { top: 0; right: 0; border-left: none; border-bottom: none; }
.fs-glyph .cbl { bottom: 0; left: 0; border-right: none; border-top: none; }
.fs-glyph .cbr { bottom: 0; right: 0; border-left: none; border-top: none; }
.fs-glyph .fs-core { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #fff; box-shadow: 0 0 14px rgba(255,255,255,.55); }
.fs-glyph .corner { animation: cornerBreath 2.2s ease-in-out infinite; }
.fs-glyph .ctr { animation-name: cornerBreathTR; } .fs-glyph .cbl { animation-name: cornerBreathBL; } .fs-glyph .cbr { animation-name: cornerBreathBR; }
@keyframes cornerBreath { 0%,100%{transform:translate(0,0);opacity:.4} 50%{transform:translate(-5px,-5px);opacity:1} }
@keyframes cornerBreathTR { 0%,100%{transform:translate(0,0);opacity:.4} 50%{transform:translate(5px,-5px);opacity:1} }
@keyframes cornerBreathBL { 0%,100%{transform:translate(0,0);opacity:.4} 50%{transform:translate(-5px,5px);opacity:1} }
@keyframes cornerBreathBR { 0%,100%{transform:translate(0,0);opacity:.4} 50%{transform:translate(5px,5px);opacity:1} }
.fs-caption { margin-top: 34px; font-size: 11px; letter-spacing: 8px; color: #cfcfcf; animation: capBreath 2.2s ease-in-out infinite; }
.fs-note { margin-top: 12px; font-family: var(--mono); font-size: 9px; letter-spacing: 3px; color: #4a4a4a; }
@keyframes capBreath { 0%,100%{opacity:.45} 50%{opacity:1} }

/* 进入图标动效：旋转扫描环 + 外扩散脉冲 + 核心呼吸 */
.fs-glyph .fs-scan {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px; margin: -21px 0 0 -21px;
  border: 1px solid transparent; border-top-color: rgba(255,255,255,.55);
  border-right-color: rgba(255,255,255,.12); border-radius: 50%;
  animation: fsSpin 2.6s linear infinite; pointer-events: none;
}
.fs-glyph::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 104px; height: 104px;
  margin: -52px 0 0 -52px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%;
  animation: fsPulse 2.8s cubic-bezier(.22,.61,.36,1) infinite; pointer-events: none;
}
.fs-glyph .fs-core { animation: corePulse 2.8s ease-in-out infinite; }
@keyframes fsSpin { to { transform: rotate(360deg); } }
@keyframes fsPulse { 0%{transform:scale(.7);opacity:.5} 72%{transform:scale(1.3);opacity:0} 100%{transform:scale(1.3);opacity:0} }
@keyframes corePulse {
  0%,100% { transform: scale(1); box-shadow: 0 0 9px rgba(255,255,255,.4); }
  50%     { transform: scale(1.6); box-shadow: 0 0 22px rgba(255,255,255,.92); }
}
.fs-glyph:hover .corner { border-color: #fff; }
.fs-glyph:active { transform: scale(.97); }

/* ============ 启动③：加载（等宽代码滚动） ============ */
#loading-screen { background: #060607; }
.load-inner { width: min(600px, 88vw); text-align: left; }
.load-title { font-size: 30px; font-weight: 300; letter-spacing: 12px; color: #f0f0f0; text-align: center; padding-left: 12px; }
.load-sub { margin: 10px 0 34px; font-family: var(--mono); font-size: 10px; letter-spacing: 5px; color: #5a5a5a; text-align: center; text-transform: uppercase; }
.boot-log { font-family: var(--mono); font-size: clamp(10px, 2.8vw, 12px); line-height: 1.95; color: #b9b9b9; min-height: 220px; border-left: 1px solid var(--line); padding-left: 16px; }
.boot-log .bl-row { white-space: pre-wrap; word-break: break-all; opacity: 0; animation: blIn .16s forwards; }
.boot-log .bl-row .bl-ok { color: #eaeaea; }
.boot-log .bl-row.dim { color: #5a5a5a; }
.boot-log .bl-cursor { display: inline-block; width: 7px; height: 13px; background: #eaeaea; vertical-align: -2px; animation: blCursor .9s steps(1) infinite; }
@keyframes blIn { from { opacity: 0; transform: translateX(-4px); } to { opacity: 1; transform: none; } }
@keyframes blCursor { 0%,49%{opacity:1} 50%,100%{opacity:0} }

/* 预加热进度：真实渲染管线进度，带自左向右的流光 */
.boot-progress { position: relative; height: 1px; margin-top: 20px; background: #17171a; overflow: visible; }
.boot-progress > i {
  display: block; position: relative; height: 1px; width: 0; background: #ededed;
  box-shadow: 0 0 12px rgba(255,255,255,.5);
  transition: width .34s cubic-bezier(.22,.61,.36,1);
}
.boot-progress > i::after {
  content: ""; position: absolute; top: -1px; right: 0; width: 1px; height: 3px;
  background: #fff; box-shadow: 0 0 10px #fff;
}
.boot-pct { margin-top: 11px; font-family: var(--mono); font-size: 9px; letter-spacing: 2px; color: #6a6a6a; }
.boot-pct #boot-pct-txt { color: #dcdcdc; }
.boot-pct .boot-stage {
  float: right; color: #454545; letter-spacing: 1px; max-width: 64%;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.load-title { animation: loadTitleIn .9s cubic-bezier(.22,.61,.36,1) both; }
.load-sub { animation: loadTitleIn .9s cubic-bezier(.22,.61,.36,1) .12s both; }
@keyframes loadTitleIn { from { opacity: 0; letter-spacing: 22px; } to { opacity: 1; } }

/* ============ 启动④：开始页（Steam 库风格） ============ */
#start-screen { background: #050506; }
#start-screen::before {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, transparent, transparent 79px, rgba(255,255,255,.025) 80px),
              repeating-linear-gradient(0deg, transparent, transparent 79px, rgba(255,255,255,.025) 80px);
  pointer-events: none;
}
.start-top { position: absolute; top: calc(26px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 clamp(20px, 6vw, 72px); }
.start-top span { font-family: var(--mono); font-size: 9px; letter-spacing: 4px; color: #565656; text-transform: uppercase; }
.start-inner { position: relative; text-align: left; width: min(760px, 86vw); }
.start-kicker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.start-kicker .hairline { width: 56px; }
.start-title { font-size: clamp(46px, 9vw, 88px); font-weight: 800; letter-spacing: 6px; color: #f4f4f4; line-height: 1; }
.start-title .dot { color: #6a6a6a; }
.start-sub { margin: 18px 0 0; font-size: 13px; letter-spacing: 8px; color: #8f8f8f; text-transform: uppercase; }
.start-desc { margin: 26px 0 0; max-width: 520px; font-size: 13px; line-height: 2; color: #7c7c7c; }
.start-meta { min-height: 18px; margin: 30px 0 6px; font-family: var(--mono); font-size: 11px; color: #bdbdbd; letter-spacing: 1px; }
#start-btn { margin-top: 10px; }
.start-hint { margin-top: 42px; font-family: var(--mono); font-size: 10px; line-height: 2; color: #545454; letter-spacing: 1px; }
.start-hint b { color: #9a9a9a; font-weight: 500; }
/* 开始页：逐行上浮入场（Steam 库页式的克制节奏） */
#start-screen:not(.hidden) .start-inner > * { animation: startUp .62s cubic-bezier(.22,.61,.36,1) both; }
#start-screen:not(.hidden) .start-inner > *:nth-child(1) { animation-delay: .04s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(2) { animation-delay: .10s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(3) { animation-delay: .18s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(4) { animation-delay: .24s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(5) { animation-delay: .30s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(6) { animation-delay: .36s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(7) { animation-delay: .42s; }
#start-screen:not(.hidden) .start-inner > *:nth-child(8) { animation-delay: .48s; }
@keyframes startUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============ 启动⑤：输入名字 ============ */
#name-entry { background: #050506; z-index: 93; }
.ne-inner { width: min(400px, 88vw); animation: dlgIn .35s ease; }
.ne-kicker { font-family: var(--mono); font-size: 9px; letter-spacing: 5px; color: #5a5a5a; text-transform: uppercase; margin-bottom: 14px; }
.ne-title { font-size: clamp(22px, 6vw, 30px); color: #f2f2f2; letter-spacing: 3px; font-weight: 600; }
.ne-sub { margin: 10px 0 34px; font-size: 12px; color: #808080; letter-spacing: 1px; }
.ne-input {
  width: 100%; height: 52px; pointer-events: auto; background: #0d0d0f;
  border: 1px solid var(--line); border-radius: 0; color: #f4f4f4;
  font-size: 20px; text-align: center; letter-spacing: 3px; outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.ne-input:focus { border-color: #cfcfcf; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.ne-input::placeholder { color: #4c4c4c; letter-spacing: 2px; }
#ne-ok { margin-top: 22px; width: 100%; }
.ne-note { margin-top: 20px; font-family: var(--mono); font-size: 10px; color: #555; letter-spacing: 2px; text-align: center; }

/* ============ 3D 县城开场：字幕 ============ */
#town-cinema { z-index: 15; display: block; pointer-events: none; background: transparent; }
.cine-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 50%, transparent 45%, rgba(0,0,0,.62) 100%); }
.cine-top { position: absolute; top: calc(24px + env(safe-area-inset-top)); left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(20px, 6vw, 60px); }
.cine-location { font-family: var(--mono); font-size: 11px; letter-spacing: 6px; color: rgba(255,255,255,.8); text-shadow: 0 1px 4px #000; text-transform: uppercase; }
.cine-skip { pointer-events: auto; background: rgba(0,0,0,.4); color: rgba(255,255,255,.85); font-size: 12px; letter-spacing: 2px; padding: 8px 16px; border: 1px solid rgba(255,255,255,.28); border-radius: 0; }
.cine-skip:hover { background: rgba(255,255,255,.12); }
.cine-line { position: absolute; left: 10%; right: 10%; bottom: calc(15% + env(safe-area-inset-bottom)); font-size: clamp(16px, 4vw, 24px); line-height: 1.9; color: #f4f4f4; text-shadow: 0 2px 10px #000, 0 0 22px #000; text-align: center; opacity: 0; transition: opacity .7s; }
.cine-line.show { opacity: 1; }
.cine-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(255,255,255,.1); }
.cine-progress i { display: block; height: 100%; width: 0%; background: #f0f0f0; }
.fade { position: absolute; inset: 0; z-index: 88; background: #000; opacity: 0; pointer-events: none; transition: opacity .8s; }
.fade.on { opacity: 1; }

/* ============ HUD（极简，准星 + 细信息） ============ */
#hud-top { position: absolute; top: calc(16px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font-size: 11px; color: rgba(255,255,255,.8); text-shadow: 0 1px 3px #000; letter-spacing: 3px; font-family: var(--mono); }
#hud-top span { margin: 0 12px; }
#crosshair { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; transform: translate(-50%,-50%); }
#crosshair i { position: absolute; background: rgba(255,255,255,.92); box-shadow: 0 0 3px #000; transition: background .12s, transform .12s; }
#crosshair i:first-child { left: 50%; top: 50%; width: 2px; height: 2px; transform: translate(-50%,-50%); border-radius: 50%; }
#crosshair i:nth-child(2) { left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%,-50%); border: 1px solid rgba(255,255,255,.35); background: none; border-radius: 50%; opacity: 0; }
#crosshair.focus i:first-child { background: #fff; transform: translate(-50%,-50%) scale(1.8); box-shadow: 0 0 8px #fff; }
#crosshair.focus i:nth-child(2) { opacity: 1; border-color: rgba(255,255,255,.8); }
#interact-hint {
  position: absolute; left: 50%; top: calc(50% + 30px); transform: translateX(-50%);
  font-size: 12px; letter-spacing: 2px; padding: 7px 14px; background: rgba(0,0,0,.6);
  border: 1px solid var(--line); white-space: nowrap; opacity: 0; transition: opacity .15s;
}
#interact-hint.show { opacity: 1; }
#lock-tip { position: absolute; left: 50%; bottom: calc(44px + env(safe-area-inset-bottom)); transform: translateX(-50%); font-size: 12px; letter-spacing: 2px; padding: 9px 18px; background: rgba(0,0,0,.7); border: 1px solid var(--line); opacity: 0; transition: opacity .2s; }
#lock-tip.show { opacity: 1; }

/* ============ 移动端触控 ============ */
#touch-ui { z-index: 6; }
#joystick { position: absolute; left: 24px; bottom: calc(30px + env(safe-area-inset-bottom)); width: 116px; height: 116px; border-radius: 50%; border: 1px solid rgba(255,255,255,.24); background: rgba(0,0,0,.16); opacity: 0; transition: opacity .2s; }
#joystick.show { opacity: 1; }
#joystick-knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.5); }
#touch-tip { position: absolute; top: calc(44px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; font-size: 10px; letter-spacing: 2px; color: rgba(255,255,255,.55); }

/* ============ 背包按钮（拿到书包后显示） ============ */
#bag-btn {
  pointer-events: auto; position: absolute; right: calc(20px + env(safe-area-inset-right)); bottom: calc(24px + env(safe-area-inset-bottom));
  width: 58px; height: 58px; background: rgba(8,8,9,.8); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.4); color: #f0f0f0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.6);
  animation: bagIn .45s cubic-bezier(.2,1.3,.4,1); transition: border-color .15s, background .15s;
}
#bag-btn:hover { border-color: #fff; background: rgba(255,255,255,.1); }
#bag-btn:active { transform: scale(.93); }
#bag-btn .bag-ico { font-size: 20px; line-height: 1; }
#bag-btn .bag-label { font-size: 9px; letter-spacing: 2px; margin-top: 3px; }
#bag-btn .bag-key { position: absolute; top: -1px; right: -1px; min-width: 18px; height: 18px; line-height: 17px; padding: 0 3px; text-align: center; background: #ededed; color: #0a0a0a; font-family: var(--mono); font-size: 10px; font-weight: 700; }
@keyframes bagIn { from { opacity: 0; transform: scale(.4) translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
 * 底部对话框（毛玻璃，打字机）
 * ============================================================ */
.dialogue-layer { position: absolute; inset: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px calc(10vh + env(safe-area-inset-bottom)); pointer-events: auto; cursor: pointer; }
.dlg-box {
  width: min(780px, 100%); pointer-events: none; background: var(--panel);
  -webkit-backdrop-filter: blur(16px) saturate(.9); backdrop-filter: blur(16px) saturate(.9);
  border: 1px solid var(--line); border-left: 2px solid #ededed;
  padding: 20px 26px 16px; box-shadow: 0 18px 54px rgba(0,0,0,.65);
  animation: dlgIn .3s cubic-bezier(.2,.8,.3,1);
}
@keyframes dlgIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.dlg-label { font-family: var(--mono); font-size: 10px; letter-spacing: 5px; color: #b0b0b0; margin-bottom: 12px; text-transform: uppercase; }
.dlg-text { font-size: clamp(15px, 4.2vw, 19px); line-height: 1.95; color: #ececec; letter-spacing: .5px; max-height: 34vh; overflow-y: auto; }
.dlg-text p { margin: 0 0 8px; } .dlg-text p:last-child { margin-bottom: 0; }
.dlg-tip { margin-top: 16px; text-align: right; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: rgba(255,255,255,.4); animation: capBreath 2.4s ease-in-out infinite; }
.dialogue-layer.blink .dlg-tip { color: #ededed; }
.dlg-text .type-cursor { display: inline-block; width: 7px; height: 1.05em; background: #ededed; vertical-align: -0.15em; margin-left: 2px; animation: blCursor .8s steps(1) infinite; }

/* ============================================================
 * 全屏沉浸查看层（纸质道具保留真实质感）
 * ============================================================ */
#immersive { z-index: 34; }
#immersive .iv-dim { position: absolute; inset: 0; background: rgba(0,0,0,.94); }
#immersive .iv-stage { position: relative; z-index: 1; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); overflow-y: auto; }
.iv-close { position: fixed; top: calc(14px + env(safe-area-inset-top)); right: 16px; z-index: 3; width: 40px; height: 40px; background: rgba(255,255,255,.08); color: #fff; font-size: 24px; line-height: 38px; text-align: center; border: 1px solid var(--line); }
.iv-close:hover { background: rgba(255,255,255,.16); }
.iv-content { width: min(680px, 100%); animation: ivIn .35s cubic-bezier(.2,.8,.3,1); }
@keyframes ivIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---- 内心独白 ---- */
#immersive.theme-thought .iv-dim { background: radial-gradient(ellipse at 50% 45%, #161616 0%, #000 80%); }
.thought-wrap { text-align: center; padding: 8vh 6px; }
.thought-mark { font-family: Georgia, serif; font-size: 84px; line-height: .6; color: rgba(255,255,255,.14); height: 44px; }
.thought-eye { font-family: var(--mono); font-size: 11px; letter-spacing: 7px; color: #7a7a7a; margin-bottom: 22px; text-transform: uppercase; }
.thought-text { font-size: clamp(18px, 5vw, 26px); line-height: 2; color: #ededed; letter-spacing: 1px; text-align: left; max-width: 540px; margin: 0 auto; }
.thought-note { margin-top: 34px; font-family: var(--mono); font-size: 11px; color: #666; letter-spacing: 4px; animation: capBreath 2.6s ease-in-out infinite; }

/* ---- 报名须知（公文纸，保留真实） ---- */
#immersive.theme-notice .iv-dim { background: rgba(8,8,8,.95); }
.doc-paper { position: relative; background:#fbf7ec; color:#241f1a; padding: 34px 30px 30px; box-shadow: 0 24px 70px rgba(0,0,0,.7); font-family: "Songti SC", "STSong", SimSun, serif; overflow: hidden; }
.doc-paper::before { content:""; position:absolute; inset:0; background: repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(120,100,60,.045) 28px); pointer-events:none; }
.doc-redline { border-top: 5px solid #b3261e; border-bottom: 1px solid #b3261e; height: 8px; margin-bottom: 22px; }
.doc-org { text-align: center; font-size: 15px; letter-spacing: 4px; color: #8c2b22; }
.doc-no { text-align: center; font-size: 12px; color: #8a8172; margin: 8px 0 18px; }
.doc-title { text-align: center; font-size: clamp(22px,6vw,30px); font-weight: 700; margin: 6px 0 24px; letter-spacing: 2px; }
.doc-body { font-size: clamp(15px,4vw,17px); line-height: 2.05; }
.doc-body p { margin: 0 0 10px; text-indent: 2em; }
.doc-body .em { color:#b3261e; font-weight:700; }
.doc-sign { text-align: right; margin-top: 24px; font-size: 15px; line-height: 1.9; color: #4a443a; }
.doc-stamp { position: absolute; right: 40px; bottom: 54px; width: 108px; height: 108px; border: 5px double #c0392b; border-radius: 50%; color: #c0392b; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.4; transform: rotate(-16deg); opacity: .78; }

/* ---- 老式奖状（保留真实） ---- */
#immersive.theme-award .iv-dim { background: radial-gradient(ellipse at 50% 45%, #1c1212 0%, #000 80%); }
.award-paper { position: relative; background: radial-gradient(circle at 50% 40%, #fff6df 0%, #f3e3b6 100%); color: #7a1210; padding: 26px 22px 30px; border: 8px solid #c9a227; outline: 2px solid #8c6d16; box-shadow: 0 0 0 5px #a51f18, 0 24px 70px rgba(0,0,0,.7); text-align: center; font-family: "Songti SC", "STSong", SimSun, serif; overflow: hidden; }
.award-paper::after { content:""; position:absolute; inset:14px; border:1px solid rgba(165,31,24,.45); pointer-events:none; }
.award-flags { display:flex; justify-content:space-between; padding: 0 6px 4px; }
.award-flag { width: 54px; height: 40px; position: relative; }
.award-flag i { position:absolute; left:8px; top:0; width:2px; height:40px; background:#8c6d16; }
.award-flag b { position:absolute; left:10px; top:2px; width:34px; height:22px; background:#c0392b; display:block; }
.award-flag b::after { content:"★"; position:absolute; left:9px; top:1px; color:#ffe9a8; font-size:13px; }
.award-title { font-size: clamp(38px,12vw,64px); font-weight: 800; letter-spacing: 10px; margin: 4px 0 8px; color: #b71c16; padding-left: 10px; }
.award-xi { font-size: 30px; color: #c0392b; margin: 2px 0 14px; letter-spacing: 8px; }
.award-body { font-size: clamp(15px,4vw,18px); line-height: 2.1; text-align: left; padding: 0 8px; }
.award-body p { margin: 0 0 6px; text-indent: 2em; }
.award-name { font-size: clamp(18px,5vw,22px); font-weight: 700; color: #8c1210; }
.award-sign { text-align: right; margin-top: 16px; font-size: 14px; line-height: 1.8; color: #6a2a12; }
.award-seal { position: absolute; left: 40px; bottom: 40px; width: 92px; height: 92px; border: 4px double #c0392b; border-radius: 50%; color: #c0392b; display:flex; align-items:center; justify-content:center; text-align:center; font-size: 12px; font-weight: 700; line-height: 1.35; transform: rotate(-14deg); opacity: .8; }

/* ============================================================
 * 手机 2D 界面（外壳深色极简；内部 App 保留真实）
 * ============================================================ */
#phone-ui { z-index: 40; background: #000; }
.phone-frame { pointer-events: auto; position: relative; width: min(390px, 92vw); height: min(780px, 92vh); background: #0a0a0c; border: 6px solid #1c1c1e; border-radius: 40px; box-shadow: 0 20px 70px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.08); overflow: hidden; display: flex; flex-direction: column; }
.phone-notch { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 126px; height: 22px; background: #0a0a0c; border-bottom-left-radius: 14px; border-bottom-right-radius: 14px; z-index: 9; }
.phone-exit { position: absolute; top: 36px; right: 12px; z-index: 12; width: 28px; height: 28px; line-height: 26px; text-align: center; background: #1a1a1c; color: #fff; font-size: 20px; font-weight: 300; padding: 0; border: 1px solid var(--line); }
.phone-exit:hover { background: #2a2a2c; }
.phone-status { height: 40px; padding: 12px 24px 0; display: flex; justify-content: space-between; font-size: 12px; color: #d0d0d2; flex: none; z-index: 2; }
.status-right { font-size: 11px; letter-spacing: 1px; }
.phone-body { flex: 1; position: relative; overflow: hidden; background: #0e1016; }
.phone-page { position: absolute; inset: 0; padding: 16px 18px 24px; overflow-y: auto; background: linear-gradient(160deg,#151a22,#0c0e13 60%); }
.phone-page::-webkit-scrollbar { width: 0; }
.page-head { height: 34px; display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 10px; color: #fff; }
.page-head b { font-size: 16px; }
.page-head .back { position: absolute; left: 0; }
.phone-homebar { position: absolute; bottom: 9px; left: 50%; transform: translateX(-50%); width: 118px; height: 4px; background: rgba(255,255,255,.5); pointer-events: auto; cursor: pointer; z-index: 11; }

/* 桌面 */
.phone-widget { text-align: center; margin: 18px 0 34px; color: #fff; }
.widget-time { font-size: 62px; font-weight: 200; letter-spacing: 2px; }
.widget-date { font-size: 15px; opacity: .8; }
.app-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px 10px; }
.app { text-align: center; color: #fff; font-size: 12px; cursor: pointer; }
.app:active .app-icon { transform: scale(.9); }
.app-icon { width: 56px; height: 56px; margin: 0 auto 6px; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; transition: transform .1s; }
.icon-wx { background: #2dc100; } .icon-browser { background: linear-gradient(135deg,#4a90e2,#2f6fd0); }
.phone-dock { position: absolute; left: 18px; right: 18px; bottom: 26px; height: 60px; background: rgba(255,255,255,.12); display: flex; align-items: center; justify-content: space-around; }
.dock-app { width: 46px; height: 46px; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; }

/* ============ 微信（真实感） ============ */
.wx-page { padding: 0; background: #ededed; }
.wx-content { position: absolute; inset: 0 0 56px 0; overflow: hidden; background: #f7f7f7; }
.wx-tabpane { position: absolute; inset: 0; overflow-y: auto; background: #f7f7f7; }
.wx-tabpane::-webkit-scrollbar { width: 0; }
.wx-head { height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: #ededed; }
.wx-head b { font-size: 18px; color:#1a1a1a; }
.wx-head-actions { font-size: 24px; color: #333; }
.wx-chat-list { background: #fff; }
.wx-chat-row { display: flex; align-items: center; padding: 12px 14px; border-bottom: 1px solid #f2f2f2; cursor: pointer; }
.wx-chat-row:active { background: #f6f6f6; }
.wx-chat-avatar { width: 48px; height: 48px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; margin-right: 12px; flex: none; position: relative; }
.wx-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: #e74c3c; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.wx-chat-info { flex: 1; min-width: 0; }
.wx-chat-info .nm { font-size: 15px; font-weight: 500; color: #1a1a1a; }
.wx-chat-info .pv { font-size: 12px; color: #999; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wx-chat-time { font-size: 11px; color: #bbb; align-self: flex-start; }
.wx-tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 56px; background: #f9f9f9; border-top: 1px solid #d9d9d9; display: flex; z-index: 3; }
.wx-tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; color: #888; gap: 2px; }
.wx-tab.active { color: #2dc100; }
.tb-ico { width: 24px; height: 24px; background: #c9c9c9; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.wx-tab.active .tb-ico { background: #2dc100; }
.wx-me { display: flex; align-items: center; padding: 18px 16px; background: #fff; margin: 10px 0; }
.wx-avatar { width: 56px; height: 56px; background: #2dc100; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 22px; margin-right: 14px; flex: none; }
.wx-nick { font-size: 17px; font-weight: 700; color: #1a1a1a; }
.wx-id { font-size: 12px; color: #aaa; margin-top: 4px; }
.wx-gender { font-size: 12px; color: #888; margin-top: 4px; }
.wx-menu { background: #fff; }
.wx-row { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid #f0f0f0; color: #222; cursor: pointer; }
.wx-row:last-child { border-bottom: none; }
.wx-row b { font-size: 15px; flex: 1; }
.wx-ico { width: 26px; height: 26px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; margin-right: 12px; flex: none; }
.wx-arrow { color: #c8c8c8; font-size: 18px; }
.wx-contacts { background: #fff; }
.wx-discover { background: #fff; margin-top: 10px; }
.wx-login-layer { position: absolute; inset: 0; z-index: 6; background: #ededed; overflow-y: auto; }
.wx-login { padding: 30px 22px; color: #222; text-align: center; }
.wx-logo { font-size: 32px; font-weight: 700; color: #2dc100; margin: 20px 0 6px; }
.wx-tip { color: #888; font-size: 13px; margin: 0 0 30px; }
.wx-login input[type=text] { width: 100%; height: 44px; padding: 0 14px; font-size: 16px; margin-bottom: 18px; }
.gender-row { display: flex; gap: 30px; justify-content: center; margin-bottom: 28px; font-size: 15px; }
.gender-row label { cursor: pointer; }
.wx-btn { width: 100%; height: 44px; background: #2dc100; color: #fff; font-size: 16px; font-weight: 700; }
.wx-note { margin-top: 20px; font-size: 11px; color: #aaa; line-height: 1.6; }
.wx-chat-layer { position: absolute; inset: 0; z-index: 7; background: #ececec; display: flex; flex-direction: column; }
.chat-head { height: 52px; display: flex; align-items: center; padding: 0 8px; background: #ededed; flex: none; border-bottom:1px solid #dcdcdc; }
.chat-head b { flex: 1; text-align: center; padding-right: 60px; font-size: 16px; color: #1a1a1a; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; }
.chat-msgs::-webkit-scrollbar { width: 0; }
.chat-time-sep { text-align:center; font-size:11px; color:#b2b2b2; margin: 4px 0 12px; }
.msg-bubble-row { display: flex; margin-bottom: 16px; align-items: flex-start; }
.msg-bubble-row.them { justify-content: flex-start; } .msg-bubble-row.me { justify-content: flex-end; }
.msg-bubble-av { width: 38px; height: 38px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; flex: none; margin: 0 8px; }
.msg-bubble { max-width: 68%; padding: 10px 12px; font-size: 14px; line-height: 1.6; background: #fff; color: #1a1a1a; position: relative; word-break: break-word; }
.msg-bubble-row.me .msg-bubble { background: #95ec69; }
.chat-replies { flex: none; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: #f7f7f7; border-top: 1px solid #e5e5e5; display: flex; flex-wrap: wrap; gap: 8px; max-height: 130px; overflow-y: auto; }
.reply-chip { padding: 8px 12px; background: #fff; border: 1px solid #d9d9d9; font-size: 13px; color: #333; }
.reply-chip:active { background: #e2e2e2; }

/* ============ 浏览器 ============ */
.browser-page { background: #fff; padding: 0; }
.browser-home { text-align: center; padding-top: 60px; }
.baidu-logo { font-size: 52px; font-weight: 800; letter-spacing: -4px; margin-bottom: 30px; }
.bai { color: #2932e1; } .du { color: #e33; }
.baidu-search { display: flex; align-items: center; border: 2px solid #4e6ef2; margin: 0 16px; overflow: hidden; height: 42px; }
.baidu-search input { flex: 1; height: 100%; border: none; outline: none; padding: 0 12px; font-size: 15px; min-width: 0; }
.baidu-search button { height: 100%; padding: 0 16px; background: #4e6ef2; color: #fff; font-size: 14px; white-space: nowrap; }
.baidu-hot { margin-top: 20px; font-size: 12px; color: #9195a3; padding: 0 16px; line-height: 1.8; }
.res-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid #eee; }
.res-head input { flex: 1; height: 34px; border: 1px solid #ddd; padding: 0 10px; font-size: 14px; min-width: 0; }
.res-head button { background: #4e6ef2; color: #fff; padding: 0 14px; height: 34px; font-size: 13px; }
.res-list { padding: 8px 14px; }
.res-item { padding: 12px 0; border-bottom: 1px solid #f2f2f2; cursor: pointer; }
.res-title { font-size: 16px; color: #2440b3; line-height: 1.5; }
.res-url { font-size: 12px; color: #008000; margin: 4px 0; }
.res-desc { font-size: 13px; color: #555; line-height: 1.6; }
.res-snapshot { font-size: 11px; color: #888; border: 1px solid #ddd; padding: 1px 5px; margin-top: 6px; }

/* ============ 设置 ============ */
.settings-list { background: #fff; padding: 8px 16px 16px; color: #222; }
.setting-row { padding: 14px 0; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
.setting-row label { display: block; margin-bottom: 8px; }
.setting-row input[type=range] { width: calc(100% - 44px); vertical-align: middle; }
.setting-row span { display: inline-block; width: 36px; text-align: right; color: #888; font-size: 13px; }
.setting-note { font-size: 11px; color: #aaa; padding: 12px 0; line-height: 1.6; }
.set-btn { display: block; width: 100%; padding: 13px; margin-top: 10px; background: #f2f2f2; font-size: 15px; color: #222; }
.set-btn.primary { background: #1a1a1a; color: #fff; }
.set-btn.danger { color: #e74c3c; }

/* ============================================================
 * 全屏新闻页：开冮网（内联真实政府网站，样式隔离前缀 nw-）
 * ============================================================ */
#news-page { z-index: 44; flex-direction: column; background: #1a1a1a; }
.news-browser-bar { height: 48px; flex: none; background: #222; display: flex; align-items: center; padding: 0 12px; gap: 12px; border-bottom: 1px solid #000; z-index: 2; }
.news-browser-bar .back { color: #cfcfcf; white-space: nowrap; }
.news-url { flex: 1; text-align: center; font-size: 11px; color: #bbb; background: #141414; padding: 7px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.news-dots { color: #aaa; font-size: 20px; }
.news-scroll { flex: 1; overflow-y: auto; background: #f4f5f7; }
.news-scroll::-webkit-scrollbar { width: 0; }
.nw { --red:#b81c22; --red-dark:#9e1b23; --text:#333; --gray:#888; --border:#e3e3e3; color:var(--text); font-size:15px; line-height:1.7; background:#f4f5f7; font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif; }
.nw a{color:inherit;text-decoration:none;}
.nw .nw-container{max-width:1000px;margin:0 auto;padding:0 14px;}
.nw-topbar{background:var(--red-dark);color:#fff;font-size:12px;line-height:32px;}
.nw-topbar .nw-container{display:flex;justify-content:space-between;flex-wrap:wrap;}
.nw-topbar a{margin-left:14px;color:#ffe9e9;}
.nw-header{background:#fff;border-bottom:3px solid var(--red);}
.nw-header .nw-container{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;padding:16px 14px;}
.nw-logo{display:flex;flex-direction:column;}
.nw-logo-cn{font-size:32px;font-weight:800;color:var(--red);letter-spacing:3px;line-height:1.1;}
.nw-logo-sub{font-size:11px;color:var(--gray);letter-spacing:1px;margin-top:2px;}
.nw-search{display:flex;border:1px solid var(--border);overflow:hidden;}
.nw-search input{width:180px;height:34px;border:0;outline:none;padding:0 12px;font-size:14px;background:#fafafa;}
.nw-search button{height:34px;padding:0 18px;border:0;background:var(--red);color:#fff;font-size:14px;}
.nw-nav{background:var(--red);box-shadow:0 2px 4px rgba(0,0,0,.08);}
.nw-nav ul{display:flex;overflow-x:auto;list-style:none;}
.nw-nav::-webkit-scrollbar{display:none;}
.nw-nav li{flex:0 0 auto;}
.nw-nav a{display:block;color:#fff;font-size:15px;line-height:44px;padding:0 18px;white-space:nowrap;}
.nw-nav a.on{background:var(--red-dark);}
.nw-body{margin:16px auto 30px;}
.nw-crumb{font-size:13px;color:var(--gray);padding-bottom:14px;border-bottom:1px solid var(--border);margin-bottom:16px;}
.nw-crumb a{color:var(--gray);}.nw-crumb span{margin:0 6px;color:#c9c9c9;}
.nw-layout{display:flex;align-items:flex-start;gap:20px;}
.nw-article{flex:1;min-width:0;background:#fff;border:1px solid var(--border);padding:26px 28px 30px;}
.nw-article h1{font-size:25px;line-height:1.5;font-weight:700;color:#1a1a1a;text-align:center;margin:0 0 16px;}
.nw-meta{text-align:center;font-size:13px;color:var(--gray);padding-bottom:16px;border-bottom:1px dashed var(--border);margin-bottom:20px;}
.nw-meta span{margin:0 8px;}
.nw-content p{font-size:17px;line-height:2;text-indent:2em;margin-bottom:16px;color:#2b2b2b;}
.nw-content strong{color:#b81c22;}
.nw-content .nw-source{font-size:14px;color:var(--gray);text-indent:0;margin-top:24px;text-align:right;}
.nw-rel{margin-top:28px;border-top:1px solid var(--border);padding-top:16px;}
.nw-rel h4{font-size:16px;margin-bottom:10px;padding-left:10px;border-left:4px solid var(--red);line-height:1.2;}
.nw-rel ul{list-style:none;}
.nw-rel li{font-size:14px;line-height:2;border-bottom:1px dashed #eee;color:#555;}
.nw-rel li a::before{content:"·";color:var(--red);font-weight:700;margin-right:8px;}
.nw-side{flex:0 0 280px;width:280px;}
.nw-side-box{background:#fff;border:1px solid var(--border);margin-bottom:16px;}
.nw-side-title{height:42px;display:flex;align-items:center;border-bottom:2px solid var(--red);background:#fbfbfb;}
.nw-side-title h3{font-size:15px;font-weight:700;padding-left:12px;border-left:4px solid var(--red);line-height:1.1;}
.nw-inner{padding:12px 14px 14px;}
.nw-entry{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.nw-entry a{text-align:center;font-size:13px;line-height:32px;border:1px solid #e0e0e0;color:#444;background:#fcfcfc;}
.nw-rank{counter-reset:rank;list-style:none;}
.nw-rank li{counter-increment:rank;font-size:13px;line-height:1.9;padding-left:26px;position:relative;margin-bottom:4px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.nw-rank li::before{content:counter(rank);position:absolute;left:0;top:2px;width:18px;height:18px;line-height:18px;text-align:center;font-size:11px;color:#999;background:#f0f0f0;}
.nw-rank li:nth-child(1)::before{background:var(--red);color:#fff;}
.nw-footer{background:#2f2f2f;color:#b9b9b9;font-size:13px;line-height:2;}
.nw-foot-links{border-bottom:1px solid #444;padding:14px 0;text-align:center;}
.nw-foot-links a{color:#dcdcdc;margin:0 8px;}
.nw-foot-main{padding:16px 0 22px;text-align:center;}

/* ============ 背包 3D 检视层（Steam 面板） ============ */
#backpack-ui { z-index: 46; background: rgba(4,4,5,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.bp-panel { pointer-events: auto; width: min(920px, 94vw); height: min(600px, 88vh); background: #0b0b0d; border: 1px solid var(--line); box-shadow: 0 30px 90px rgba(0,0,0,.8); display: flex; flex-direction: column; overflow: hidden; animation: dlgIn .3s cubic-bezier(.2,.8,.3,1); }
.bp-head { height: 54px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; border-bottom: 1px solid var(--line-soft); color: #f0f0f0; }
.bp-head b { font-size: 15px; letter-spacing: 6px; font-weight: 600; text-transform: uppercase; }
.bp-head button { background: rgba(255,255,255,.08); color: #fff; width: 34px; height: 34px; font-size: 22px; }
.bp-head button:hover { background: rgba(255,255,255,.18); }
.bp-body { flex: 1; display: flex; min-height: 0; }
.bp-list { flex: 0 0 176px; border-right: 1px solid var(--line-soft); padding: 12px 10px; overflow-y: auto; }
.bp-item { padding: 12px; margin-bottom: 8px; background: rgba(255,255,255,.03); color: #a9a9a9; font-size: 14px; cursor: pointer; border: 1px solid transparent; display: flex; align-items: center; gap: 10px; transition: background .15s, color .15s; }
.bp-item:hover { background: rgba(255,255,255,.08); color: #eee; }
.bp-item.active { background: rgba(255,255,255,.11); border-color: #cfcfcf; color: #fff; }
.bp-item .bp-dot { width: 20px; height: 20px; flex: none; }
.bp-view { flex: 1; position: relative; min-width: 0; display: flex; flex-direction: column; }
#bp-canvas { flex: 1; width: 100%; min-height: 0; display: block; cursor: grab; touch-action: none; background: radial-gradient(circle at 50% 42%, #1a1a1e 0%, #08080a 72%); }
#bp-canvas:active { cursor: grabbing; }
.bp-hint { position: absolute; top: 14px; left: 0; right: 0; text-align: center; font-family: var(--mono); font-size: 10px; letter-spacing: 3px; color: rgba(255,255,255,.35); pointer-events: none; }
.bp-desc { flex: none; padding: 18px 24px; min-height: 92px; font-size: clamp(14px,3.6vw,17px); line-height: 1.9; color: #dcdcdc; border-top: 1px solid var(--line-soft); }
@media (max-width: 640px) {
  .bp-list { flex-basis: 120px; padding: 8px 6px; }
  .bp-item { padding: 9px 8px; font-size: 12px; gap: 6px; }
  .bp-desc { padding: 12px 16px; min-height: 80px; }
}

/* ============ 电梯楼层显示层 ============ */
#lift-ui { z-index: 18; pointer-events: none; background: rgba(0,0,0,.35); flex-direction: column; }
.lift-floor { font-family: var(--mono); font-size: clamp(72px, 20vw, 120px); font-weight: 300; color: #fff; text-shadow: 0 0 30px rgba(255,255,255,.25); letter-spacing: 6px; }
.lift-label { font-family: var(--mono); font-size: 11px; letter-spacing: 8px; color: rgba(255,255,255,.5); margin-top: 10px; text-transform: uppercase; }

/* ============ 退出 ============ */
#exit-screen { background: #050506; z-index: 50; }
.exit-box { text-align: center; width: min(400px, 88vw); border: 1px solid var(--line); padding: 46px 30px; position: relative; }
.exit-box::before { content:""; position:absolute; left:0; top:0; width:40px; height:2px; background:#fff; }
.exit-title { font-size: 26px; font-weight: 700; letter-spacing: 6px; margin-bottom: 18px; color: #f0f0f0; }
.exit-box p { color: #888; margin-bottom: 36px; font-size: 13px; }
#exit-back { background: #141416; border: 1px solid var(--line); }

/* ============ toast ============ */
#toast { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(8,8,9,.92); color: #ededed; padding: 11px 22px; border: 1px solid var(--line); font-size: 13px; letter-spacing: 1px; z-index: 80; opacity: 0; transition: opacity .25s; pointer-events: none; white-space: nowrap; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }

/* ============ 响应式 ============ */
@media (max-width: 768px) {
  .nw-layout { flex-direction: column; }
  .nw-side { flex: 1 1 auto; width: 100%; display: flex; gap: 12px; }
  .nw-side-box { flex: 1; }
  .nw-article { padding: 20px 18px 24px; }
  .nw-article h1 { font-size: 21px; }
  .nw-content p { font-size: 16px; }
  .nw-search input { width: 130px; }
  .start-desc { font-size: 12px; }
}
@media (max-width: 420px) {
  .start-title { font-size: 44px; }
  .app-icon { width: 52px; height: 52px; }
  .big-btn { min-width: 180px; padding: 13px 30px; }
}

/* ============ 金币 HUD（右上角） ============ */
.hud-coin { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border: 1px solid rgba(255,255,255,.22); font-family: var(--mono); font-size: 12px; color: #f0e4c0; letter-spacing: 1px; }
.hud-coin b { font-weight: 700; color: #fff; }
.hud-coin.flash { animation: coinFlash .6s ease; }
@keyframes coinFlash { 0% { background: rgba(240,228,192,.35); } 100% { background: transparent; } }

/* ============ RPG 选项框（底部，毛玻璃黑，选项按钮） ============ */
.rpg-layer { position: absolute; inset: 0; z-index: 32; display: flex; align-items: flex-end; justify-content: center; padding: 0 16px calc(8vh + env(safe-area-inset-bottom)); pointer-events: auto; }
.rpg-box { width: min(680px, 94vw); background: var(--panel); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border: 1px solid var(--line); border-left: 2px solid #ededed; padding: 22px 26px 24px; box-shadow: 0 18px 60px rgba(0,0,0,.5); }
.rpg-label { font-family: var(--mono); font-size: 10px; letter-spacing: 5px; color: #b0b0b0; text-transform: uppercase; margin-bottom: 10px; }
.rpg-text { font-size: clamp(14px, 3.6vw, 17px); line-height: 1.85; color: #e6e6e6; white-space: pre-line; margin-bottom: 18px; }
.rpg-options { display: flex; flex-direction: column; gap: 8px; }
.rpg-opt { text-align: left; padding: 12px 16px; background: rgba(255,255,255,.03); border: 1px solid var(--line); color: #dcdcdc; font-size: 14px; letter-spacing: 1px; cursor: pointer; transition: background .18s, border-color .18s, color .18s; position: relative; }
.rpg-opt::before { content: "›"; position: absolute; left: 6px; color: #666; }
.rpg-opt:hover, .rpg-opt:active { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.4); color: #fff; }

/* ============ 微信：对方正在输入 ============ */
.chat-typing { display: flex; align-items: center; gap: 8px; padding: 7px 14px; font-size: 11px; color: #8a8f98; font-family: var(--mono); letter-spacing: 1px; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots i { width: 5px; height: 5px; border-radius: 50%; background: #9aa1ac; animation: tp 1.1s infinite ease-in-out; }
.typing-dots i:nth-child(2) { animation-delay: .16s; }
.typing-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes tp { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* ============================================================
 * 第一幕核心剧情：对话气泡 / 屏幕特效 / 章节结局
 * ============================================================ */

/* ============ 说话人对话气泡（程丽台词，居中偏上） ============ */
.speech-layer { position: absolute; inset: 0; z-index: 34; display: flex; align-items: center; justify-content: center; pointer-events: auto; }
.speech-box {
  width: min(620px, 90vw); margin-top: -6vh;
  background: rgba(8,8,10,.90); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.2); border-top: 2px solid #cfcfcf;
  padding: 20px 26px 16px; position: relative;
  box-shadow: 0 22px 70px rgba(0,0,0,.6);
}
.speech-box::after { /* 气泡小尖 */
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 16px; height: 16px;
  background: rgba(8,8,10,.90); border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2);
  transform: translateX(-50%) rotate(45deg);
}
.speech-name {
  display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 4px;
  color: #0a0a0a; background: #ededed; padding: 3px 10px; margin-bottom: 14px;
}
.speech-text { font-size: clamp(16px, 4vw, 20px); line-height: 1.8; color: #f2f2f2; min-height: 1.8em; }
.speech-text .type-cursor { display: inline-block; width: 8px; height: 1em; vertical-align: -2px; background: #ededed; animation: blinkCur .7s steps(1) infinite; margin-left: 2px; }
@keyframes blinkCur { 0%,50% { opacity: 1; } 51%,100% { opacity: 0; } }
.speech-tip { margin-top: 14px; text-align: right; font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--ink-3); }

/* ============ 屏幕特效层 ============ */
.fx-layer { position: absolute; inset: 0; z-index: 40; pointer-events: none; background: #fff; opacity: 0; }
.fx-layer.flash { animation: fxFlash .5s ease-out; }
@keyframes fxFlash { 0% { opacity: .85; } 18% { opacity: .1; } 32% { opacity: .5; } 100% { opacity: 0; } }
.fx-vignette { position: absolute; inset: 0; z-index: 6; pointer-events: none;
  box-shadow: inset 0 0 22vw 6vw rgba(0,0,0,.72); background: radial-gradient(ellipse at center, transparent 45%, rgba(10,10,14,.55) 100%); }
body.shake #app { animation: shakeAnim .45s cubic-bezier(.36,.07,.19,.97); }
@keyframes shakeAnim {
  10%, 90% { transform: translate3d(-2px, 1px, 0); }
  20%, 80% { transform: translate3d(4px, -2px, 0); }
  30%, 50%, 70% { transform: translate3d(-6px, 2px, 0); }
  40%, 60% { transform: translate3d(6px, -1px, 0); }
}

/* ============ 章节结局层 ============ */
.chapter-end {
  position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: #000; text-align: center; padding: 24px;
  animation: ceIn 1.4s ease both;
}
@keyframes ceIn { 0% { opacity: 0; } 100% { opacity: 1; } }
.ce-inner { max-width: 620px; width: 100%; }
.ce-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 8px; color: var(--ink-3); text-transform: uppercase; margin-bottom: 30px; }
.ce-title {
  font-size: clamp(28px, 7vw, 52px); font-weight: 300; letter-spacing: 8px; color: #f4f4f4;
  animation: ceTitle 2s ease .3s both;
}
@keyframes ceTitle { 0% { opacity: 0; letter-spacing: 22px; } 100% { opacity: 1; letter-spacing: 8px; } }
.ce-subtitle { margin-top: 16px; font-family: var(--mono); font-size: clamp(12px, 3vw, 15px); letter-spacing: 3px; color: #b9b9b9; animation: ceTitle 2s ease .7s both; }
.ce-rule { width: 60px; height: 1px; background: rgba(255,255,255,.4); margin: 34px auto; }
.ce-desc { font-size: 13px; line-height: 2; color: var(--ink-3); letter-spacing: 1px; margin-bottom: 36px; }
.ce-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ghost-btn {
  pointer-events: auto; min-width: 210px; padding: 12px 40px; font-size: 12px; letter-spacing: 5px;
  color: var(--ink-2); background: transparent; border: 1px solid var(--line);
  transition: color .18s, border-color .18s;
}
.ghost-btn:hover { color: #fff; border-color: rgba(255,255,255,.5); }

@media (max-width: 420px) {
  .ce-title { letter-spacing: 4px; }
  .speech-box { padding: 16px 18px 12px; }
}
