:root {
  --ink: #081318;
  --deep: #0c1f27;
  --teal: #12343f;
  --teal2: #1d4a57;
  --line: #2f6877;
  --amber: #e8a33d;
  --amber2: #f6c667;
  --cream: #f3e7cf;
  --paper: #efe2c4;
  --red: #c8402f;
  --hot: #ff8a5c;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STZhongsong", "STSong", "SimSun", serif;
  --sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --kai: "LXGW WenKai", "Kaiti SC", "STKaiti", "KaiTi", "KaiTi_GB2312", serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #020506; overflow: hidden; overscroll-behavior: none; touch-action: manipulation; }
body { font-family: var(--sans); color: var(--cream); -webkit-font-smoothing: antialiased; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button { font-family: inherit; cursor: pointer; }
.hidden { display: none !important; }

#viewport { position: fixed; inset: 0; overflow: hidden; box-sizing: border-box; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); }
#viewport.rot #stage { touch-action: none; }
#stage { position: absolute; width: 1280px; height: 720px; transform-origin: 0 0; overflow: hidden; background: #05090c; cursor: default; }

/* ---------- 场景 ---------- */
#scene { position: absolute; inset: 0; }
#bgs { position: absolute; inset: 0; }
.bg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #05090c; opacity: 0; transition: opacity .38s ease; will-change: opacity; }
.bg.on { opacity: 1; }
.mode-court .bg { transition: none; }
#cg { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: #05090c; opacity: 0; transition: opacity .6s ease; z-index: 5; pointer-events: none; }
#cg.on { opacity: 1; }
#vignette { position: absolute; inset: 0; pointer-events: none; z-index: 6; background: radial-gradient(ellipse at 50% 42%, transparent 52%, rgba(3, 10, 13, .58) 100%); }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 40; }
#flash.on { animation: flash .45s ease-out; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }

#sprite { position: absolute; left: 50%; bottom: 0; width: 0; height: 0; z-index: 2; pointer-events: none; transition: margin-left .28s ease; }
.choosing #sprite { margin-left: -230px; }
.sp { position: absolute; left: 0; bottom: 0; transform: translateX(-50%); max-width: none; opacity: 0; transition: opacity .16s linear; will-change: opacity; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .45)); }
.sp.on { opacity: 1; }
.sp.instant { transition: none; }

/* 法庭席位的栏杆 / 桌面 */
#rail { position: absolute; left: 0; right: 0; bottom: 150px; height: 96px; z-index: 3; display: none; pointer-events: none; }
.mode-court[data-view="def"] #rail, .mode-court[data-view="pro"] #rail, .mode-court[data-view="wit"] #rail, .mode-court[data-view="judge"] #rail { display: block; }
#rail::before { content: ""; position: absolute; left: -20px; right: -20px; top: 0; bottom: 0; background: linear-gradient(180deg, #a8743f 0, #8a5a2c 9%, #5d391b 10%, #6d4522 55%, #4a2c14 100%); box-shadow: 0 -10px 26px rgba(0, 0, 0, .5), inset 0 3px 0 rgba(255, 220, 160, .35); }
#rail::after { content: ""; position: absolute; left: 0; right: 0; top: 22px; height: 5px; background: linear-gradient(90deg, transparent, rgba(246, 198, 103, .75) 20%, rgba(246, 198, 103, .75) 80%, transparent); }
[data-view="pro"] #rail::before { background: linear-gradient(180deg, #7f8f9a 0, #56656f 9%, #26343c 10%, #2f414b 55%, #1b272e 100%); box-shadow: 0 -10px 26px rgba(0, 0, 0, .5), inset 0 3px 0 rgba(220, 240, 255, .35); }
[data-view="pro"] #rail::after { background: linear-gradient(90deg, transparent, rgba(200, 225, 240, .7) 20%, rgba(200, 225, 240, .7) 80%, transparent); }
[data-view="wit"] #rail { left: 300px; right: 300px; }
[data-view="wit"] #rail::before { left: 0; right: 0; border-radius: 16px 16px 0 0; border: 3px solid #3a2311; border-bottom: 0; }
[data-view="wit"] #rail::after { left: 40px; right: 40px; }
[data-view="judge"] #rail { height: 116px; }
[data-view="judge"] #rail::before { background: linear-gradient(180deg, #8c3a2c 0, #6e2a20 6%, #3d1d14 7%, #4b2618 55%, #2a140c 100%); }

.shake #scene, .shake #textbox { animation: shake .38s linear; }
@keyframes shake {
  0%, 100% { transform: translate(0, 0); } 12% { transform: translate(-13px, 6px); } 25% { transform: translate(11px, -7px); }
  38% { transform: translate(-9px, -4px); } 52% { transform: translate(8px, 5px); } 66% { transform: translate(-5px, 2px); } 82% { transform: translate(3px, -2px); }
}

/* ---------- HUD ---------- */
#hud { position: absolute; top: 14px; right: 18px; z-index: 30; display: flex; gap: 8px; align-items: center; }
.hud-btn { height: 34px; padding: 0 14px; border-radius: 3px; border: 1px solid rgba(246, 198, 103, .5); background: rgba(8, 19, 24, .72); color: var(--cream); font-size: 15px; letter-spacing: 2px; transition: background .15s, color .15s; }
.hud-btn.on { background: var(--amber2); color: var(--ink); }
#lamps { display: flex; gap: 7px; margin-right: 12px; padding: 5px 12px 3px; background: rgba(8, 19, 24, .72); border: 1px solid rgba(246, 198, 103, .35); border-radius: 20px; }
.lamp { width: 20px; height: 26px; position: relative; display: inline-block; }
.lamp::before { content: ""; position: absolute; left: 3px; top: 4px; width: 14px; height: 16px; border-radius: 7px 7px 3px 3px; background: radial-gradient(circle at 50% 60%, #fff6c9 0, #ffd166 45%, #e8a33d 100%); box-shadow: 0 0 12px 3px rgba(255, 196, 86, .75); }
.lamp::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 0; height: 5px; background: #8a6a2d; border-radius: 1px; box-shadow: 0 -21px 0 -1px #8a6a2d; }
.lamp.off::before { background: #24343a; box-shadow: none; }
.lamp.dying::before { animation: lamp-die .7s ease-out; }
@keyframes lamp-die { 0% { background: #fff; box-shadow: 0 0 26px 12px rgba(255, 220, 140, 1); transform: scale(1.5); } 40% { background: #ffd166; } 100% { background: #24343a; box-shadow: none; transform: scale(1); } }

/* ---------- 时间地点卡 ---------- */
#card { position: absolute; left: 0; top: 70px; z-index: 22; padding: 14px 46px 14px 54px; background: linear-gradient(90deg, rgba(8, 19, 24, .92) 70%, transparent); border-left: 6px solid var(--amber); font-family: var(--serif); min-width: 520px; animation: card-in .3s ease-out; }
#card.out { opacity: 0; transition: opacity .3s; }
#card-main { font-size: 28px; letter-spacing: 3px; color: var(--amber2); min-height: 40px; }
#card-sub { font-size: 21px; letter-spacing: 3px; color: var(--cream); margin-top: 4px; min-height: 30px; }
@keyframes card-in { from { transform: translateX(-60px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- 对话框 ---------- */
#textbox { position: absolute; left: 70px; width: 1140px; bottom: 22px; height: 176px; z-index: 20; background: linear-gradient(180deg, rgba(10, 30, 38, .94), rgba(6, 18, 23, .96)); border: 2px solid rgba(246, 198, 103, .55); border-radius: 4px; box-shadow: 0 0 0 5px rgba(8, 19, 24, .6), 0 14px 40px rgba(0, 0, 0, .6); }
#textbox::before { content: ""; position: absolute; left: 10px; right: 10px; top: 8px; bottom: 8px; border: 1px solid rgba(246, 198, 103, .16); pointer-events: none; }
#nameplate { position: absolute; left: 34px; top: -25px; height: 44px; line-height: 44px; padding: 0 30px; font-family: var(--serif); font-weight: 900; font-size: 24px; letter-spacing: 4px; color: #0b1c22; background: var(--nc, var(--amber)); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%, 8px 50%); box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
#text { position: absolute; left: 46px; right: 56px; top: 34px; font-size: 27px; line-height: 1.62; letter-spacing: 1px; color: #f7efdc; text-shadow: 0 2px 3px rgba(0, 0, 0, .6); }
#text em { font-style: normal; color: var(--hot); font-weight: 700; }
.tw-rest { visibility: hidden; }
#textbox.thought #text { color: #a9dcf2; }
#textbox.narr #text { font-family: var(--kai); font-size: 29px; color: var(--cream); text-align: center; top: 46px; letter-spacing: 2px; }
#textbox.testimony #text { color: #bdf3c6; }
#textbox.testimony { border-color: rgba(150, 230, 170, .6); }
#next { position: absolute; right: 28px; bottom: 18px; width: 0; height: 0; border-left: 9px solid transparent; border-right: 9px solid transparent; border-top: 12px solid var(--amber2); opacity: 0; }
#next.on { opacity: 1; animation: next-bob .8s ease-in-out infinite; }
@keyframes next-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }

/* ---------- 选项 ---------- */
#choices { position: absolute; right: 50px; top: 92px; width: 560px; z-index: 26; display: flex; flex-direction: column; align-items: stretch; gap: 14px; }
.choice-prompt { font-family: var(--serif); font-size: 21px; letter-spacing: 2px; color: var(--amber2); background: rgba(8, 19, 24, .88); padding: 8px 20px; border-top: 1px solid var(--amber); border-bottom: 1px solid var(--amber); margin-bottom: 2px; text-align: center; }
.choice { width: 100%; min-height: 62px; padding: 12px 30px; font-size: 25px; letter-spacing: 2px; color: var(--cream); background: linear-gradient(90deg, rgba(18, 52, 63, .96), rgba(10, 30, 38, .96)); border: 2px solid rgba(246, 198, 103, .6); border-radius: 3px; position: relative; text-align: center; animation: choice-in .28s ease-out both; transition: transform .12s, background .12s, color .12s; box-shadow: 0 8px 22px rgba(0, 0, 0, .5); }
.choice.done { opacity: .62; }
.choice.done::after { content: "已问"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 15px; color: var(--amber2); border: 1px solid currentColor; padding: 1px 8px; border-radius: 2px; }
@keyframes choice-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- 质询 ---------- */
#cebar { position: absolute; left: 0; top: 16px; z-index: 22; display: flex; align-items: center; gap: 16px; padding: 8px 30px 8px 22px; background: linear-gradient(90deg, rgba(8, 19, 24, .94) 80%, transparent); border-left: 6px solid #8fe0a4; }
#cebar-tag { font-family: var(--serif); font-weight: 900; font-size: 22px; letter-spacing: 6px; color: #0b1c22; background: #8fe0a4; padding: 2px 8px 2px 14px; }
#cebar-title { font-size: 19px; letter-spacing: 2px; color: var(--cream); }
#cebar-dots { display: flex; gap: 7px; }
#cebar-dots i { width: 22px; height: 6px; background: rgba(255, 255, 255, .22); border-radius: 1px; }
#cebar-dots i.on { background: #8fe0a4; box-shadow: 0 0 8px #8fe0a4; }
#ceactions { position: absolute; left: 70px; width: 1140px; bottom: 208px; z-index: 24; display: flex; justify-content: center; gap: 16px; animation: choice-in .2s ease-out; }
.ce-btn { height: 58px; min-width: 190px; padding: 0 26px; font-family: var(--serif); font-weight: 900; font-size: 27px; letter-spacing: 6px; border-radius: 3px; border: 2px solid var(--ink); color: var(--ink); position: relative; box-shadow: 0 6px 0 rgba(0, 0, 0, .55), 0 10px 22px rgba(0, 0, 0, .45); transition: transform .08s, filter .12s; }
.ce-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(0, 0, 0, .55); }
.ce-btn small { position: absolute; right: 8px; bottom: 3px; font-size: 12px; letter-spacing: 0; opacity: .6; font-family: var(--sans); }
.ce-btn.press { background: linear-gradient(180deg, #a9dcf2, #6fb4d3); }
.ce-btn.present { background: linear-gradient(180deg, #ffd27a, #e8a33d); }
.ce-btn.ghost { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 150px; font-family: var(--sans); font-weight: 400; font-size: 19px; letter-spacing: 2px; background: rgba(8, 19, 24, .88); color: var(--cream); border-color: rgba(246, 198, 103, .5); }
.ce-btn:disabled { opacity: .35; pointer-events: none; }
/* 方向箭头用边框画，不用 ◀▶ 字符：这两个字符在手机上会被换成彩色 emoji */
.tri { display: block; width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.tri.l { border-right: 11px solid var(--amber2); }
.tri.r { border-left: 11px solid var(--amber2); }

#promptbar { position: absolute; left: 0; right: 0; top: 150px; z-index: 24; display: flex; flex-direction: column; align-items: center; gap: 18px; animation: choice-in .25s ease-out; }
#prompt-text { font-family: var(--serif); font-size: 25px; letter-spacing: 2px; color: var(--amber2); background: rgba(8, 19, 24, .92); padding: 12px 40px; border-top: 2px solid var(--amber); border-bottom: 2px solid var(--amber); max-width: 1000px; text-align: center; }
#prompt-btn { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 6px 0 rgba(0, 0, 0, .55), 0 0 0 0 rgba(246, 198, 103, .7); } 50% { box-shadow: 0 6px 0 rgba(0, 0, 0, .55), 0 0 0 14px rgba(246, 198, 103, 0); } }

/* ---------- 喊话：胶片条 ---------- */
#shout { position: absolute; inset: 0; z-index: 45; pointer-events: none; display: none; align-items: center; justify-content: center; background: rgba(4, 10, 13, .35); }
#shout.go { display: flex; }
#shout-burst { position: absolute; left: -120px; right: -120px; top: 50%; height: 250px; margin-top: -125px; transform: rotate(-7deg); background:
    radial-gradient(circle, #05090c 0 9px, transparent 10px) 0 12px / 44px 26px repeat-x,
    radial-gradient(circle, #05090c 0 9px, transparent 10px) 0 calc(100% - 12px) / 44px 26px repeat-x,
    linear-gradient(180deg, #1a1208 0 50px, var(--sc1) 50px calc(100% - 50px), #1a1208 calc(100% - 50px));
  box-shadow: 0 0 0 4px #05090c, 0 30px 60px rgba(0, 0, 0, .6); animation: strip-in .22s cubic-bezier(.2, .9, .3, 1.2) both; }
#shout.warm { --sc1: #e8a33d; --sc2: #0b1c22; --sc3: #fff3d1; }
#shout.cold { --sc1: #6e9fbd; --sc2: #06131a; --sc3: #e6f6ff; }
#shout-text { position: relative; font-family: var(--serif); font-weight: 900; font-size: 168px; letter-spacing: 10px; color: var(--sc2); transform: rotate(-7deg); -webkit-text-stroke: 3px var(--sc3); paint-order: stroke fill; text-shadow: 7px 7px 0 rgba(0, 0, 0, .28); animation: slam .3s cubic-bezier(.2, 1.4, .4, 1) both; }
#shout.small #shout-burst { height: 150px; margin-top: -75px; }
#shout.small #shout-text { font-size: 96px; }
#shout.small { background: none; }
@keyframes strip-in { from { transform: rotate(-7deg) translateX(-100%); } to { transform: rotate(-7deg) translateX(0); } }
@keyframes slam { 0% { transform: rotate(-7deg) scale(3); opacity: 0; } 60% { opacity: 1; } 100% { transform: rotate(-7deg) scale(1); } }

/* ---------- 横幅 ---------- */
#banner { position: absolute; inset: 0; z-index: 42; pointer-events: none; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.banner-band { position: absolute; left: 0; right: 0; top: 50%; height: 170px; margin-top: -85px; background: linear-gradient(90deg, transparent, rgba(8, 19, 24, .95) 18%, rgba(8, 19, 24, .95) 82%, transparent); border-top: 2px solid var(--amber); border-bottom: 2px solid var(--amber); }
#banner-main { position: relative; font-family: var(--serif); font-weight: 900; font-size: 78px; letter-spacing: 30px; padding-left: 30px; color: var(--amber2); text-shadow: 0 4px 0 rgba(0, 0, 0, .5); }
#banner-sub { position: relative; font-size: 22px; letter-spacing: 8px; color: var(--cream); margin-top: 2px; }
#banner.go .banner-band { animation: band 1.65s ease both; }
#banner.go #banner-main { animation: band-text 1.65s ease both; }
#banner.go #banner-sub { animation: band-text 1.65s ease both; animation-delay: .06s; }
@keyframes band { 0% { transform: scaleY(0); } 14% { transform: scaleY(1); } 86% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(0); opacity: 0; } }
@keyframes band-text { 0% { opacity: 0; transform: translateX(120px); } 16% { opacity: 1; transform: translateX(0); } 84% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateX(-120px); } }

/* ---------- 判决 ---------- */
#verdict { position: absolute; inset: 0; z-index: 44; display: flex; align-items: center; justify-content: center; gap: 70px; background: rgba(4, 10, 13, .55); overflow: hidden; pointer-events: none; }
#verdict span { font-family: var(--serif); font-weight: 900; font-size: 300px; line-height: 1; color: var(--cream); -webkit-text-stroke: 6px #0b1c22; paint-order: stroke fill; text-shadow: 0 0 0 #000, 12px 12px 0 var(--red); opacity: 0; }
#verdict span.in { animation: stamp .22s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes stamp { 0% { opacity: 0; transform: scale(4) rotate(-12deg); } 100% { opacity: 1; transform: scale(1) rotate(-3deg); } }
#verdict i { position: absolute; top: -30px; width: 12px; height: 20px; opacity: .95; animation: confetti linear both; }
@keyframes confetti { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(800px) rotate(var(--r)); } }

/* ---------- 章节标题 ---------- */
#titlecard { position: absolute; inset: 0; z-index: 43; background: #030709; display: flex; flex-direction: column; align-items: center; justify-content: center; }
#titlecard-main { font-family: var(--serif); font-weight: 900; font-size: 92px; letter-spacing: 22px; padding-left: 22px; color: var(--cream); }
#titlecard-sub { font-family: var(--serif); font-size: 32px; letter-spacing: 12px; color: var(--amber2); margin-top: 26px; padding: 12px 40px; border-top: 1px solid rgba(246, 198, 103, .6); }
#titlecard.in #titlecard-main { animation: tc-in 1.3s ease both; }
#titlecard.in #titlecard-sub { animation: tc-in 1.3s ease both; animation-delay: .5s; }
#titlecard.out { opacity: 0; transition: opacity .5s; }
@keyframes tc-in { from { opacity: 0; letter-spacing: 44px; filter: blur(8px); } to { opacity: 1; filter: none; } }

/* ---------- 证物弹出 ---------- */
#evpop { position: absolute; inset: 0; z-index: 35; display: flex; align-items: flex-start; justify-content: center; padding-top: 96px; background: rgba(4, 10, 13, .45); }
.evpop-inner { width: 760px; background: linear-gradient(180deg, #17404c, #0e2a33); border: 2px solid var(--amber); border-radius: 4px; box-shadow: 0 0 0 6px rgba(8, 19, 24, .7), 0 24px 60px rgba(0, 0, 0, .7); }
#evpop.in .evpop-inner { animation: evpop .32s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes evpop { from { opacity: 0; transform: translateY(-30px) scale(.94); } to { opacity: 1; transform: none; } }
#evpop-head { background: var(--amber); color: var(--ink); font-family: var(--serif); font-weight: 900; font-size: 20px; letter-spacing: 6px; padding: 8px 24px; }
.evpop-body { display: flex; gap: 24px; padding: 22px 26px 12px; align-items: center; }
#evpop-img { width: 168px; height: 168px; object-fit: contain; flex: none; background: radial-gradient(circle, rgba(243, 231, 207, .95), rgba(214, 196, 160, .95)); border-radius: 4px; border: 1px solid rgba(0, 0, 0, .3); padding: 8px; }
#evpop-name { font-family: var(--serif); font-weight: 900; font-size: 32px; letter-spacing: 4px; color: var(--amber2); margin-bottom: 10px; }
#evpop-desc { font-size: 20px; line-height: 1.7; color: var(--cream); }
.evpop-foot { text-align: right; padding: 4px 24px 12px; font-size: 14px; letter-spacing: 3px; color: rgba(243, 231, 207, .55); }

#toast { position: absolute; left: 18px; top: 14px; z-index: 50; padding: 8px 20px; font-size: 16px; letter-spacing: 2px; background: rgba(8, 19, 24, .9); border-left: 4px solid var(--amber); color: var(--cream); pointer-events: none; }
#toast.in { animation: toast 2.4s ease both; }
@keyframes toast { 0% { opacity: 0; transform: translateX(-20px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#tip { position: absolute; inset: 0; z-index: 52; display: flex; align-items: center; justify-content: center; background: rgba(4, 10, 13, .6); }
.tip-inner { width: 720px; background: var(--paper); color: #2b2318; border-radius: 4px; padding: 0 0 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, .7); text-align: center; animation: evpop .3s ease both; }
.tip-head { background: var(--teal); color: var(--amber2); font-family: var(--serif); font-weight: 900; letter-spacing: 12px; font-size: 20px; padding: 8px; }
#tip-body { padding: 26px 40px 20px; font-size: 21px; line-height: 1.8; text-align: left; }

/* ---------- 通用面板 ---------- */
.overlay { position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(4, 10, 13, .72); }
.panel { width: 1160px; height: 630px; background: linear-gradient(180deg, #143944, #0b222a); border: 2px solid var(--amber); border-radius: 4px; box-shadow: 0 0 0 6px rgba(8, 19, 24, .7), 0 30px 70px rgba(0, 0, 0, .7); display: flex; flex-direction: column; animation: evpop .22s ease both; }
.panel.narrow { width: 900px; }
.panel.small { width: 680px; height: auto; max-height: 640px; }
.panel-head { display: flex; align-items: center; gap: 20px; padding: 12px 18px; border-bottom: 1px solid rgba(246, 198, 103, .35); flex: none; }
.panel-title { font-family: var(--serif); font-weight: 900; font-size: 24px; letter-spacing: 8px; color: var(--amber2); flex: 1; }
.btn { height: 42px; padding: 0 22px; font-size: 18px; letter-spacing: 3px; border-radius: 3px; border: 1px solid rgba(246, 198, 103, .7); background: rgba(8, 19, 24, .6); color: var(--cream); transition: background .12s, color .12s; }
.btn.primary { background: linear-gradient(180deg, #ffd27a, #e8a33d); color: var(--ink); font-weight: 700; border-color: var(--ink); }
.btn.ghost { border-color: rgba(243, 231, 207, .3); }
.btn:disabled { opacity: .35; pointer-events: none; }

/* 法庭记录 */
.tabs { display: flex; gap: 6px; }
.tab { height: 42px; padding: 0 28px; font-family: var(--serif); font-weight: 900; font-size: 21px; letter-spacing: 6px; background: transparent; color: rgba(243, 231, 207, .6); border: 1px solid rgba(246, 198, 103, .3); border-radius: 3px; }
.tab.on { background: var(--amber); color: var(--ink); border-color: var(--amber); }
#record-prompt { flex: 1; font-size: 19px; letter-spacing: 2px; color: var(--amber2); text-align: center; }
.panel-body { flex: 1; display: flex; min-height: 0; }
#record-grid { flex: 1; padding: 18px; display: grid; grid-template-columns: repeat(5, 1fr); grid-auto-rows: 138px; gap: 12px; overflow-y: auto; align-content: start; }
.rc { background: rgba(8, 19, 24, .55); border: 2px solid rgba(246, 198, 103, .22); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 4px 7px; color: var(--cream); transition: transform .1s, border-color .1s; overflow: hidden; }
.rc img { width: 86px; height: 86px; object-fit: contain; }
.rc.prof img { object-fit: cover; object-position: 50% 6%; border-radius: 50%; background: rgba(243, 231, 207, .16); }
.rc span { font-size: 16px; letter-spacing: 1px; white-space: nowrap; }
.rc.on { border-color: var(--amber2); background: rgba(232, 163, 61, .2); box-shadow: 0 0 16px rgba(246, 198, 103, .35); }
#record-detail { width: 400px; flex: none; border-left: 1px solid rgba(246, 198, 103, .3); padding: 18px 22px; display: flex; flex-direction: column; background: rgba(8, 19, 24, .35); }
#record-detail.empty > * { visibility: hidden; }
#rd-imgwrap { height: 190px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, rgba(243, 231, 207, .95), rgba(205, 187, 150, .95)); border-radius: 4px; flex: none; overflow: hidden; }
#rd-img { max-height: 176px; max-width: 300px; object-fit: contain; }
#record-detail.prof #rd-img { max-height: none; max-width: none; height: 430px; margin-top: 4px; }
#record-detail.prof #rd-imgwrap { align-items: flex-start; }
#record-detail.prof #rd-imgwrap { background: radial-gradient(circle at 50% 30%, #2c6475, #0e2a33); }
#rd-name { font-family: var(--serif); font-weight: 900; font-size: 30px; letter-spacing: 4px; color: var(--amber2); margin-top: 14px; }
#rd-meta { font-size: 15px; letter-spacing: 3px; color: rgba(243, 231, 207, .6); margin-top: 2px; }
#rd-desc { font-size: 18.5px; line-height: 1.75; margin-top: 10px; flex: 1; overflow-y: auto; }
#rd-actions { display: flex; gap: 10px; justify-content: flex-end; flex: none; margin-top: 10px; }

/* 文书 */
#doc { z-index: 62; }
.doc-wrap { display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 700px; animation: evpop .22s ease both; }
#doc-prompt { font-family: var(--serif); font-size: 24px; letter-spacing: 2px; color: var(--amber2); background: rgba(8, 19, 24, .92); padding: 8px 36px; border-top: 2px solid var(--amber); border-bottom: 2px solid var(--amber); }
#doc-body { max-height: 616px; overflow-y: auto; border-radius: 3px; box-shadow: 0 24px 60px rgba(0, 0, 0, .7); }
#doc-body.isplan { width: 1030px; border: 2px solid var(--amber); overflow: hidden; }
.doc-foot { display: flex; align-items: center; gap: 12px; }
#doc-hint { font-size: 17px; letter-spacing: 2px; color: var(--cream); min-width: 10px; }
.paper { width: 820px; padding: 26px 46px 24px; background: linear-gradient(180deg, #f4e9cf, #e9dbb8); color: #2b2318; font-size: 19px; line-height: 1.75; position: relative; }
.paper h3 { font-family: var(--serif); font-weight: 900; font-size: 27px; letter-spacing: 4px; margin: 0 0 14px; text-align: center; border-bottom: 2px solid #2b2318; padding-bottom: 10px; }
.paper h4 { font-family: var(--serif); font-size: 20px; letter-spacing: 4px; margin: 18px 0 6px; }
.paper p { margin: 6px 0; }
.paper .small { font-size: 16px; opacity: .78; text-align: center; }
.paper table { width: 100%; border-collapse: collapse; margin: 8px 0; }
.paper th { text-align: left; white-space: nowrap; vertical-align: top; padding: 4px 16px 4px 0; font-weight: 700; width: 1%; }
.paper td { padding: 4px 8px 4px 0; vertical-align: top; }
.paper tr + tr th, .paper tr + tr td { border-top: 1px dashed rgba(43, 35, 24, .28); }
.paper b { font-weight: 900; }
.paper .hand, .paper table.hand td, .paper table.hand th { font-family: var(--kai); font-size: 20px; line-height: 1.6; }
.paper .hand.small { font-size: 18px; text-align: left; }
.paper .sign { text-align: right; margin-top: 14px; }
.paper .stamp { position: absolute; right: 44px; bottom: 26px; width: 104px; height: 104px; border: 4px solid rgba(200, 64, 47, .7); border-radius: 50%; color: rgba(200, 64, 47, .75); font-family: var(--serif); font-weight: 900; font-size: 17px; display: flex; align-items: center; justify-content: center; text-align: center; transform: rotate(-14deg); letter-spacing: 2px; padding: 12px; line-height: 1.3; }
.paper.program { text-align: center; background: linear-gradient(180deg, #f1e3c0, #e6d3a6); border: 10px double #7b5a2a; }
.paper.program h3 { font-size: 38px; border: 0; margin: 4px 0; }
.paper.program table { text-align: left; margin: 12px auto; width: 92%; }
.paper.program td i { color: #8c2416; font-style: normal; font-size: 17px; }
.paper.program .hand { text-align: left; text-indent: 2em; }
.paper.program .sign { text-align: right; }
.paper.logbook { background: repeating-linear-gradient(180deg, #f2e8d0 0 37px, #c9d8d2 37px 38px); }
.paper.notebook { background: #f6f0df; border-left: 26px solid #1c1c1c; }
.paper.receipt { background: #f7f0e1; border: 1px solid #b9a67a; }
.paper.letter { width: 1060px; padding: 36px 44px; display: flex; gap: 40px; }
.paper.letter .col { flex: 1; }
.paper.letter .col + .col { border-left: 1px dashed rgba(43, 35, 24, .5); padding-left: 40px; flex: 1.25; }
.paper.letter .hand { font-size: 23px; line-height: 1.8; margin: 8px 0; }
.paper.letter .hand.small { font-size: 20px; margin-top: 14px; color: #8c2416; }

/* 平面图 */
svg.plan { display: block; width: 1030px; height: auto; }
svg.plan text { font-family: var(--sans); fill: #e6f6f8; text-anchor: middle; pointer-events: none; }
svg.plan .t { font-size: 24px; letter-spacing: 4px; font-weight: 700; }
svg.plan .t2 { font-size: 20px; }
svg.plan .m { paint-order: stroke; stroke: #12343f; stroke-width: 6px; }
svg.plan .s { font-size: 16px; letter-spacing: 1px; }
svg.plan .v { writing-mode: vertical-rl; glyph-orientation-vertical: 0; }
svg.plan .rg rect { fill: transparent; }
#doc.point svg.plan .rg { cursor: pointer; }
#doc.point svg.plan .rg.sel rect { fill: rgba(255, 138, 92, .5); stroke: #ffb38f; stroke-width: 3; }

/* 回看 */
#backlog-list { flex: 1; overflow-y: auto; padding: 16px 28px; }
.bl { display: flex; gap: 18px; padding: 7px 0; font-size: 19px; line-height: 1.6; border-bottom: 1px solid rgba(243, 231, 207, .08); }
.bl b { width: 100px; flex: none; color: var(--amber2); text-align: right; font-weight: 700; }
.bl.thought span { color: #a9dcf2; }
.bl.narr span { font-family: var(--kai); }
.bl.testimony span { color: #bdf3c6; }

/* 菜单 */
.menu-body { padding: 22px 32px 26px; display: flex; flex-direction: column; gap: 18px; font-size: 20px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; letter-spacing: 2px; }
.seg, .stepper { display: flex; align-items: center; gap: 8px; }
.seg button, .stepper button { min-width: 64px; height: 44px; font-size: 20px; color: var(--cream); background: rgba(8, 19, 24, .6); border: 1px solid rgba(246, 198, 103, .5); border-radius: 3px; }
.seg button.on { background: var(--amber); color: var(--ink); border-color: var(--amber); font-weight: 700; }
.stepper span { width: 64px; text-align: center; color: var(--amber2); font-variant-numeric: tabular-nums; }
.touch-help { display: none; }
.menu-row { display: flex; gap: 12px; flex-wrap: wrap; }
.menu-help { font-size: 15px; line-height: 1.8; color: rgba(243, 231, 207, .65); border-top: 1px solid rgba(246, 198, 103, .25); padding-top: 14px; }
#menu.intitle #menu-retry, #menu.intitle #menu-title { display: none; }
#menu { z-index: 70; }

/* 辩护终止 / 结算 */
#gameover { background: rgba(2, 5, 6, .9); z-index: 64; }
.go-inner, .end-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; animation: evpop .5s ease both; }
.go-title { font-family: var(--serif); font-weight: 900; font-size: 86px; letter-spacing: 20px; color: #6f7f86; }
.go-sub { font-size: 22px; letter-spacing: 3px; color: var(--cream); margin-bottom: 20px; }
#ending { background: linear-gradient(rgba(2, 5, 6, .86), rgba(2, 5, 6, .93)), url(../assets/cg/ending.webp) center / cover; z-index: 64; }
.end-kicker { font-size: 18px; letter-spacing: 14px; color: rgba(243, 231, 207, .6); }
.end-title { font-family: var(--serif); font-weight: 900; font-size: 54px; letter-spacing: 8px; color: var(--cream); }
#end-rank { font-family: var(--serif); font-weight: 900; font-size: 38px; letter-spacing: 10px; color: var(--amber2); border-top: 1px solid var(--amber); border-bottom: 1px solid var(--amber); padding: 10px 50px; margin-top: 8px; }
#end-stats { font-size: 21px; line-height: 2; letter-spacing: 3px; text-align: center; color: var(--cream); }
.end-next { font-size: 19px; letter-spacing: 6px; color: rgba(243, 231, 207, .6); margin: 8px 0 14px; }

/* ---------- 标题画面 ---------- */
#title { position: absolute; inset: 0; z-index: 80; background: #05090c; }
#title-bg { position: absolute; inset: 0; background-size: cover; background-position: center; animation: title-zoom 40s ease-in-out infinite alternate; }
@keyframes title-zoom { from { transform: scale(1); } to { transform: scale(1.08) translateX(-1.2%); } }
#title-fog { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(4, 12, 16, .8) 0, rgba(4, 12, 16, .6) 34%, rgba(4, 12, 16, .08) 62%), linear-gradient(0deg, rgba(4, 12, 16, .8), transparent 34%); }
.title-logo { position: absolute; left: 86px; top: 112px; }
.logo-kicker { font-size: 15px; letter-spacing: 9px; color: var(--amber); }
.logo-main { font-family: var(--serif); font-weight: 900; font-size: 112px; letter-spacing: 12px; color: var(--cream); text-shadow: 0 6px 30px rgba(0, 0, 0, .8); margin: 6px 0 10px -4px; line-height: 1.15; }
.logo-sub { display: inline-block; font-family: var(--serif); font-size: 30px; letter-spacing: 10px; color: var(--ink); background: var(--amber); padding: 5px 16px 5px 26px; clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%, 10px 50%); }
.title-menu { position: absolute; left: 86px; bottom: 96px; display: flex; flex-direction: column; gap: 12px; }
.tbtn { width: 300px; height: 54px; text-align: left; padding: 0 26px; font-family: var(--serif); font-size: 25px; letter-spacing: 8px; color: var(--cream); background: rgba(8, 19, 24, .6); border: 0; border-left: 4px solid var(--amber); transition: all .15s; }
.loading .tbtn { opacity: .35; pointer-events: none; }
#title-load { position: absolute; left: 90px; bottom: 60px; font-size: 15px; letter-spacing: 3px; color: var(--amber2); }
#title-note { position: absolute; left: 90px; bottom: 60px; font-size: 15px; letter-spacing: 2px; color: var(--amber2); }
.title-foot { position: absolute; right: 30px; bottom: 22px; font-size: 14px; letter-spacing: 3px; color: rgba(243, 231, 207, .5); }
#scenes { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4, 10, 13, .75); }
#scenes-list { padding: 16px 24px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.scene-btn { height: 48px; text-align: left; padding: 0 20px; font-size: 19px; letter-spacing: 2px; color: var(--cream); background: rgba(8, 19, 24, .6); border: 1px solid rgba(246, 198, 103, .4); border-radius: 3px; }
.scene-btn.locked { opacity: .35; pointer-events: none; }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-thumb { background: rgba(246, 198, 103, .45); border-radius: 5px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, .2); }

@media (hover: hover) {
  .hud-btn:hover { background: var(--amber); color: var(--ink); }
  .choice:hover { background: var(--amber); color: var(--ink); transform: translateX(-8px); }
  .choice.done:hover::after { color: var(--ink); }
  .ce-btn:hover { transform: translateY(-3px); filter: brightness(1.12); }
  .btn:hover { background: var(--amber2); color: var(--ink); }
  .btn.primary:hover { filter: brightness(1.1); }
  .rc:hover { transform: translateY(-3px); border-color: var(--amber2); }
  #doc.point svg.plan .rg:hover rect { fill: rgba(246, 198, 103, .28); }
  .tbtn:hover { background: var(--amber); color: var(--ink); padding-left: 40px; }
  .scene-btn:hover { background: var(--amber2); color: var(--ink); }
}

/* ---------- 触屏 / 手机 ---------- */
.touch .sp { filter: none; }
.touch #hud { top: 12px; right: 14px; gap: 10px; }
.touch .hud-btn { height: 56px; padding: 0 18px; font-size: 22px; letter-spacing: 2px; }
.touch #lamps { padding: 9px 14px 7px; margin-right: 8px; }
.touch #textbox { height: 204px; bottom: 12px; }
.touch #text { font-size: 30px; line-height: 1.56; top: 38px; }
.touch #textbox.narr #text { font-size: 32px; top: 50px; }
.touch #nameplate { height: 50px; line-height: 50px; font-size: 27px; top: -29px; }
.touch #next { border-left-width: 12px; border-right-width: 12px; border-top-width: 16px; }
.touch .tri { border-top-width: 10px; border-bottom-width: 10px; }
.touch .tri.l { border-right-width: 14px; }
.touch .tri.r { border-left-width: 14px; }
.touch #rail { bottom: 170px; }
.touch #ceactions { bottom: 228px; gap: 14px; }
.touch .ce-btn { height: 78px; min-width: 230px; font-size: 32px; }
.touch .ce-btn.ghost { min-width: 190px; font-size: 24px; }
.touch .ce-btn small { display: none; }
.touch #cebar { top: 80px; }
.touch #cebar-title { font-size: 21px; }
.touch #toast { top: 84px; font-size: 19px; }
.touch #card { top: 84px; }
.touch #choices { top: 84px; width: 620px; gap: 14px; }
.touch .choice { min-height: 80px; font-size: 29px; }
.touch .choice-prompt { font-size: 24px; }
.touch #promptbar { top: 120px; }
.touch #prompt-text { font-size: 28px; }
.touch .btn { height: 60px; padding: 0 26px; font-size: 23px; }
.touch .tab { height: 60px; font-size: 25px; padding: 0 34px; }
.touch #record-prompt { font-size: 21px; }
.touch .panel { height: 680px; width: 1220px; }
.touch .panel.small { height: auto; max-height: 690px; width: 780px; }
.touch .panel.narrow { width: 1100px; }
.touch #record-grid { grid-auto-rows: 150px; }
.touch .rc span { font-size: 19px; }
.touch #record-detail { width: 440px; }
.touch #rd-imgwrap { height: 150px; }
.touch #rd-img { max-height: 138px; }
.touch #rd-name { font-size: 30px; margin-top: 10px; }
.touch #rd-desc { font-size: 23px; line-height: 1.6; }
.touch #rd-actions .btn { flex: 1; padding: 0 10px; }
.touch #evpop-desc { font-size: 24px; }
.touch .evpop-inner { width: 880px; }
.touch .evpop-foot { font-size: 18px; }
.touch #tip-body { font-size: 25px; }
.touch .tip-inner { width: 860px; }
.touch #doc-body { max-height: 560px; }
.touch .paper { width: 1060px; font-size: 25px; padding: 26px 44px; }
.touch .paper h3 { font-size: 30px; }
.touch .paper .small { font-size: 21px; }
.touch .paper .hand, .touch .paper table.hand td, .touch .paper table.hand th { font-size: 26px; }
.touch .paper .hand.small { font-size: 22px; }
.touch .paper.letter { width: 1180px; }
.touch .paper.letter .hand { font-size: 26px; }
.touch .paper.program td i { font-size: 21px; }
.touch #doc-body.isplan { width: 1060px; }
.touch svg.plan { width: 1060px; }
.touch svg.plan .s { font-size: 20px; }
.touch svg.plan .t { font-size: 27px; }
.touch svg.plan .t2 { font-size: 23px; }
.touch #doc-prompt { font-size: 26px; }
.touch #doc-hint { font-size: 22px; }
.touch .bl { font-size: 24px; }
.touch .bl b { width: 120px; }
.touch .menu-body { font-size: 25px; gap: 16px; }
.touch .seg button, .touch .stepper button { min-width: 88px; height: 60px; font-size: 25px; }
.touch .key-help { display: none; }
.touch .touch-help { display: block; font-size: 19px; }
.touch .tbtn { width: 340px; height: 68px; font-size: 29px; }
.touch .title-menu { bottom: 70px; gap: 12px; }
.touch #title-note { bottom: 30px; font-size: 18px; }
.touch .title-logo { top: 70px; }
.touch .scene-btn { height: 62px; font-size: 23px; }
.touch #scenes .panel.small { width: 900px; }
.touch .go-inner .btn, .touch .end-inner .btn { min-width: 320px; }
.touch ::-webkit-scrollbar { width: 6px; }

/* ---------- 调查阶段 ---------- */
#invplace { position: absolute; left: 18px; top: 14px; z-index: 30; height: 36px; line-height: 36px; padding: 0 26px 0 16px; font-family: var(--serif); font-size: 19px; letter-spacing: 3px; color: var(--ink); background: var(--amber); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); pointer-events: none; }
#invbar { position: absolute; left: 70px; width: 1140px; bottom: 40px; z-index: 24; display: flex; justify-content: center; gap: 16px; animation: choice-in .2s ease-out; }
#invbar .ce-btn { min-width: 176px; }
#invbar .ce-btn.ghost { font-family: var(--serif); font-weight: 900; font-size: 25px; letter-spacing: 5px; min-width: 160px; }
#invbar .ce-btn.go { border-color: var(--hot); color: var(--amber2); }
.ce-btn.fresh::before { content: ""; position: absolute; right: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: var(--hot); box-shadow: 0 0 0 3px var(--ink); }
#invspots { position: absolute; inset: 0; z-index: 22; background: radial-gradient(ellipse at center, rgba(4, 10, 13, 0) 55%, rgba(4, 10, 13, .45) 100%); }
.spot { position: absolute; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0; border: 0; background: none; }
.spot i { position: absolute; inset: 16px; border-radius: 50%; border: 3px solid var(--amber2); background: rgba(8, 19, 24, .6); animation: spot-pulse 1.6s ease-out infinite; }
.spot i::after { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: var(--amber2); }
.spot.seen i { animation: none; border-color: rgba(243, 231, 207, .6); }
.spot.seen i::after { background: rgba(243, 231, 207, .6); }
.spot span { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); white-space: nowrap; font-size: 15px; letter-spacing: 1px; padding: 2px 9px; color: var(--cream); background: rgba(8, 19, 24, .85); border-radius: 2px; pointer-events: none; }
@keyframes spot-pulse { 0% { box-shadow: 0 0 0 0 rgba(246, 198, 103, .7); } 100% { box-shadow: 0 0 0 20px rgba(246, 198, 103, 0); } }
.spot-back { position: absolute; right: 50px; bottom: 40px; background: rgba(8, 19, 24, .88); }
.spot-tip { position: absolute; left: 0; right: 0; bottom: 48px; text-align: center; font-size: 19px; letter-spacing: 3px; color: var(--cream); text-shadow: 0 2px 6px #000, 0 0 12px #000; pointer-events: none; }

/* 章节选择 / 段落选择里的章节标题 */
#chapters { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4, 10, 13, .75); }
#chapters-list { padding: 16px 24px 22px; display: grid; gap: 12px; }
.chapter-btn { height: 62px; font-family: var(--serif); font-size: 25px; letter-spacing: 6px; position: relative; }
.chapter-btn.cleared::after { content: "已通关"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--sans); font-size: 14px; letter-spacing: 2px; color: var(--amber2); border: 1px solid currentColor; padding: 1px 8px; border-radius: 2px; }
#scenes-list { max-height: 560px; overflow-y: auto; }
.scene-head { grid-column: 1 / -1; font-family: var(--serif); font-size: 18px; letter-spacing: 5px; color: var(--amber2); padding: 6px 2px 4px; border-bottom: 1px solid rgba(246, 198, 103, .3); }

/* 可指认的图：区域不限于矩形 */
svg.plan .rg > * { fill: transparent; }
#doc.point svg.plan .rg.sel > * { fill: rgba(255, 138, 92, .5); stroke: #ffb38f; stroke-width: 3; }

@media (hover: hover) {
  .spot:hover i { transform: scale(1.18); }
  #doc.point svg.plan .rg:hover > * { fill: rgba(246, 198, 103, .28); }
  #doc.point svg.plan .rg.sel:hover > * { fill: rgba(255, 138, 92, .5); }
  .chapter-btn.cleared:hover::after { color: var(--ink); }
}

.touch #invplace { height: 50px; line-height: 50px; font-size: 24px; }
.touch #invbar { bottom: 30px; gap: 12px; }
.touch #invbar .ce-btn { min-width: 200px; }
.touch #invbar .ce-btn.ghost { font-size: 29px; min-width: 190px; }
.touch .spot { width: 104px; height: 104px; margin: -52px 0 0 -52px; }
.touch .spot i { inset: 22px; }
.touch .spot span { top: 88px; font-size: 20px; }
.touch .spot-tip { font-size: 23px; }
.touch .chapter-btn { height: 78px; font-size: 29px; }
.touch #scenes-list { max-height: 520px; }

/* 夜景：同一张背景压暗，不另画（第三章的续灯之夜） */
#stage.night .bg { filter: brightness(.5) saturate(.75) hue-rotate(-10deg); }
#stage.night #spA, #stage.night #spB { filter: brightness(.86); }

/* 回忆：泛黄 */
#stage.old .bg, #stage.old #cg { filter: sepia(.8) saturate(.65) brightness(.9) contrast(1.06); }
#stage.old #spA, #stage.old #spB { filter: sepia(.7) saturate(.7) brightness(.95); }

/* 标题页：版本号与版本说明 */
.ver-btn { position: absolute; right: 30px; bottom: 50px; height: 32px; padding: 0 14px; font-family: var(--sans); font-size: 14px; letter-spacing: 2px; color: rgba(243, 231, 207, .8); background: rgba(8, 19, 24, .55); border: 1px solid rgba(246, 198, 103, .45); border-radius: 3px; cursor: pointer; transition: all .15s; }
.ver-btn:hover { color: var(--amber2); border-color: var(--amber); }
#vernotes { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(4, 10, 13, .75); }
#vernotes-list { padding: 14px 28px 22px; max-height: 540px; overflow-y: auto; }
.ver-item + .ver-item { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(246, 198, 103, .25); }
.ver-no { font-family: var(--serif); font-weight: 900; font-size: 22px; letter-spacing: 3px; color: var(--amber2); }
.ver-no span { margin-left: 14px; padding: 2px 10px; font-family: var(--sans); font-weight: 400; font-size: 13px; letter-spacing: 2px; color: var(--ink); background: var(--amber); border-radius: 2px; vertical-align: 3px; }
.ver-item ul { margin: 6px 0 0; padding-left: 22px; }
.ver-item li { font-size: 17px; line-height: 1.75; color: var(--cream); }
.touch .ver-btn { height: 46px; padding: 0 18px; font-size: 19px; bottom: 56px; }
.touch #vernotes .panel.small { width: 900px; }
.touch #vernotes-list { max-height: 500px; }
.touch .ver-no { font-size: 26px; }
.touch .ver-item li { font-size: 22px; }

/* 分享链接上没登录时的气泡。固定在真实窗口的右上角，箭头对着页面顶栏的 Sign in
   （它的中心离窗口右边 172px：量自 usemagpie.ai 的分享页，顶栏改版了就改 --signin-x） */
#signin-tip { --signin-x: 172px; position: fixed; top: 12px; right: 20px; z-index: 1000; box-sizing: border-box; width: 310px; max-width: calc(100vw - 40px); padding: 14px 16px 14px; background: #f6c667; color: #1d1608; border-radius: 8px; box-shadow: 0 10px 28px rgba(0, 0, 0, .55); font-family: var(--sans); font-size: 15.5px; line-height: 1.6; animation: signin-bob 1.5s ease-in-out infinite; }
#signin-tip i { position: absolute; top: -10px; right: calc(var(--signin-x) - 20px - 11px); width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-bottom: 11px solid #f6c667; }
#signin-tip b { display: block; font-size: 18px; letter-spacing: 1px; margin-bottom: 3px; }
#signin-tip span { display: block; }
#signin-tip button { display: block; margin: 10px 0 0 auto; height: 34px; padding: 0 16px; font-size: 15px; letter-spacing: 2px; color: #f3e7cf; background: #12343f; border: 0; border-radius: 4px; cursor: pointer; }
@keyframes signin-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
#title-bg { transition: opacity .38s ease; }
