:root{color-scheme:dark;--bg:#070908;--ink:#eee8dd;--muted:#9faaa6;--line:#b9ae9160;--gold:#dccdaf;--warm:#752b20}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;background:var(--bg);color:var(--ink)}body{font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;overflow:hidden}button,input{font:inherit}button{color:inherit;cursor:pointer}button:focus-visible,input:focus-visible{outline:2px solid #d7c59c;outline-offset:5px}button:disabled{opacity:.5;cursor:wait}[hidden]{display:none!important}#intro{position:relative;width:100%;height:100svh;isolation:isolate;overflow:hidden}.frame{width:min(100vw,calc(100svh * 16 / 9));aspect-ratio:16/9;position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);background:#000;z-index:-2;pointer-events:none}#journey{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0}#globe-layer{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:#000;transition:opacity .55s ease}#globe{width:28.5%;aspect-ratio:1;position:relative;z-index:1} .atmosphere{position:absolute;width:26%;aspect-ratio:1;border-radius:50%;box-shadow:0 0 50px #3672850f}#veil{position:absolute;inset:0;background:radial-gradient(ellipse at 50% 45%,#45211850,#100e0c 70%);opacity:0;transition:opacity 1.2s ease;z-index:5}.masthead{position:absolute;inset:30px 42px auto;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:18px}.brand b{font-family:"Songti SC","STSong","SimSun",serif;font-size:19px;font-weight:500;letter-spacing:.2em}.brand span{font-size:9px;letter-spacing:.27em;color:#b9b6ac}.top-actions{display:flex;gap:20px}.top-actions button{border:0;background:none;padding:8px 0;font-size:11px;letter-spacing:.08em;color:#b9beb8}.chapter-tag{position:absolute;top:113px;left:43px;display:flex;align-items:center;gap:14px;color:var(--gold)}.chapter-tag span{font:18px "SimSun",serif}.chapter-tag i{display:block;width:30px;height:1px;background:var(--line)}.chapter-tag small{font-size:9px;letter-spacing:.21em}.intro-copy{position:absolute;left:8%;bottom:23%;max-width:550px;transition:opacity .35s ease,transform .35s ease}.eyebrow{font-size:10px;letter-spacing:.3em;color:var(--gold);margin:0 0 19px}h1{font-family:"Songti SC","STSong","SimSun",serif;font-weight:400;font-size:clamp(26px,3vw,48px);letter-spacing:.09em;margin:0 0 20px}#description{font-size:12px;line-height:1.95;max-width:280px;color:#b5bcb7;letter-spacing:.08em}.text-button{border:0;background:none;font-size:12px;padding:12px 6px;letter-spacing:.05em;color:#d4d0c1}#arrival{position:absolute;left:50%;top:45%;transform:translate(-50%,-50%);text-align:center;padding:28px 32px;background:#0c100de8;border:1px solid #ad9e6c30;backdrop-filter:blur(12px);max-width:410px;width:90%}#arrival h2,#completion h2{font:400 clamp(22px,2.5vw,38px) "SimSun",serif;letter-spacing:.08em;margin:0 0 16px}#arrival p:not(.eyebrow),#completion p:not(.eyebrow){font-size:12px;color:#bcbfb2;line-height:1.8}.hold-button{width:90px;height:90px;border:0;background:none;padding:0;position:relative;margin:12px auto 0}.hold-button svg{position:absolute;inset:0;fill:none;stroke:var(--gold);stroke-width:1.2;transform:rotate(-90deg)}.hold-button .track{stroke:#b3ab8a35}#hold-progress{stroke-dasharray:1;stroke-dashoffset:1;stroke-width:2}.hold-button span{font:18px "SimSun",serif;letter-spacing:.14em}#completion{position:absolute;left:50%;top:48%;transform:translate(-50%,-50%);text-align:center;width:85%;z-index:7}#completion h2{font-size:clamp(30px,4vw,58px)}#feedback{position:absolute;left:8%;bottom:146px;right:20%;display:flex;align-items:center;gap:9px;min-height:28px}.status-dot{width:5px;height:5px;background:#768479;border-radius:50%;flex-shrink:0}#status{font-size:10px;line-height:1.6;color:#b6beb6;max-width:680px}.journey-control{position:absolute;left:8%;bottom:58px;width:56%;max-width:780px}.range-labels{display:flex;justify-content:space-between;font-size:10px;letter-spacing:.08em;color:#bebdab;margin-bottom:6px}.milestones{display:flex;justify-content:space-between;font-size:9px;color:#89978e;letter-spacing:.18em}#atlas-credit{position:absolute;right:40px;bottom:22px;color:#89938b;font-size:9px;letter-spacing:.05em;margin:0}#help{position:absolute;right:250px;top:89px;width:min(700px,calc(100% - 290px));padding:28px;background:#111512f5;border:1px solid var(--line);backdrop-filter:blur(18px);z-index:10;box-shadow:0 20px 80px #0007}#help h2{font:400 21px "SimSun",serif;letter-spacing:.1em;margin:0 0 18px}.help-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px}.help-grid img{width:95px;max-width:100%;height:72px;display:block}.help-grid b{font-size:12px;font-weight:400}.help-grid p{font-size:11px;line-height:1.7;color:#a4b0a6}.small{font-size:10px;line-height:1.8;color:#929e95}#close-help{background:none;border:1px solid var(--line);padding:8px 16px;font-size:11px;margin-top:10px}.camera-monitor{position:fixed;top:105px;right:40px;width:190px;border:1px solid var(--line);background:#111;z-index:40}.camera-image{position:relative;width:100%;aspect-ratio:4/3;overflow:hidden}.camera-image video,.camera-image canvas{width:100%;height:100%;position:absolute;inset:0}.camera-image video{object-fit:contain}.camera-image canvas{pointer-events:none}.camera-monitor video{transform:scaleX(-1);opacity:.72}body[data-exploring=false] .intro-copy{opacity:0;pointer-events:none;transform:translateY(8px)}body[data-phase=COMPLETE] .journey-control{opacity:0;pointer-events:none}body[data-error=true] .status-dot{background:#e2ae7e}body[data-hand=true] .status-dot{background:#a9c0a0}
@media(max-width:760px){.masthead{inset:23px 23px auto}.brand{gap:0;display:block}.brand b{font-size:17px}.brand span{display:block;font-size:7px;margin-top:8px}.top-actions{gap:13px}.top-actions button{font-size:10px}.chapter-tag{left:24px;top:106px}.intro-copy{left:7%;bottom:27%;max-width:85%}h1{font-size:31px}#description{font-size:11px;max-width:270px}.eyebrow{font-size:9px}.journey-control{left:7%;width:75%;bottom:42px}#feedback{left:7%;right:7%;bottom:122px;flex-wrap:wrap;gap:6px}#atlas-credit{right:20px;bottom:14px;font-size:8px}#help{right:20px;top:300px;width:calc(100% - 40px);padding:18px;max-height:70svh;overflow:auto}.help-grid{grid-template-columns:repeat(2,1fr);gap:12px}.camera-monitor{top:91px;right:22px;width:135px}.frame{top:38%}.intro-copy{bottom:29%}#globe{width:42%}}
@media(max-height:650px) and (min-width:761px){.intro-copy{bottom:28%}h1{font-size:30px}.intro-copy .eyebrow{margin-bottom:12px}.masthead{top:20px}.chapter-tag{top:93px}#feedback{bottom:106px}.journey-control{bottom:32px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}.atmosphere{display:none}}

/* 仅由 ?debug=1、配置或 Ctrl+Shift+D 打开；不占正常展示布局。 */
#performance-panel{position:fixed;z-index:30;top:85px;left:16px;width:min(410px,calc(100vw - 32px));max-height:65svh;overflow:auto;padding:12px;background:#08110ff2;border:1px solid #789b87;color:#dceee3;box-shadow:0 8px 24px #0008;font:11px/1.65 ui-monospace,Consolas,monospace}
#performance-panel pre{white-space:pre-wrap;margin:6px 0 0;font:inherit}
#performance-panel button{float:right;background:#152b21;border:1px solid #789b87;padding:3px 7px;font-size:11px}

/* 常驻预览与只读进度；保留原来的小窗宽度和色彩。 */
.gesture-note{font-size:10px;line-height:1.7;color:var(--muted);margin:18px 0 0}
#progress{appearance:none;display:block;width:100%;height:2px;border:0;margin:18px 0;background:#a3987840;color:var(--gold)}
#progress::-webkit-progress-bar{background:#a3987840}#progress::-webkit-progress-value{background:var(--gold)}#progress::-moz-progress-bar{background:var(--gold)}
#camera-status{margin:0;padding:6px 8px;font-size:10px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere;max-height:64px;overflow:auto}
#camera-retry{display:block;margin:0 8px 8px;border:1px solid var(--line);background:none;padding:5px 7px;font-size:10px;color:var(--gold)}
.camera-monitor[data-error=true] #camera-status{color:#e2ae7e}
@media(max-width:760px){#help{max-height:calc(100svh - 315px)}.gesture-note{margin-top:12px;font-size:9px}}

/* 唯一主视觉。video 只解码，Canvas 完整呈现 16:9 画面及内嵌署名。 */
#journey{visibility:hidden;opacity:0;pointer-events:none}
#globe{position:absolute;inset:0;width:100%;height:100%;aspect-ratio:16/9;z-index:0}
.gate-scene{position:absolute;inset:0;z-index:1;pointer-events:none}
#asset-notice{position:absolute;top:42%;left:50%;transform:translate(-50%,-50%);width:min(440px,85%);text-align:center;pointer-events:none}
#asset-notice h2{font:400 clamp(22px,3vw,38px) "SimSun",serif;letter-spacing:.12em}
#asset-notice p:not(.eyebrow){font-size:12px;line-height:1.9;color:#bcbfb2}
#gesture-status,#depth-reference{font-size:10px;line-height:1.5;margin:0;padding:4px 8px;color:var(--gold)}
#depth-reference{font-size:9px;color:var(--muted);padding-bottom:8px}
/* 画面右下方保留 Google Earth 及动态影像供应方署名，控制条限定左侧。 */
@media(max-width:760px){.journey-control{width:78%}.intro-copy{bottom:25%}#globe{width:100%}.camera-monitor{width:135px}.frame{top:42%}#asset-notice{top:55%}}

/* 恢复任务：墓门是同一画框的透明合成层；HUD 在宿主六幕中复用。 */
#tomb{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
#help{left:32px;right:auto;top:165px;width:315px;padding:20px;background:#10120ff5;backdrop-filter:none}
.help-grid{grid-template-columns:1fr 1fr;gap:14px}.help-grid img{width:48px;height:40px}.help-grid p{margin:6px 0}
body[data-hud-only=true] #intro{display:none}body[data-hud-only=true]{background:transparent}
body[data-hud-only=true] .camera-monitor{inset:0;width:100%;height:100%;border:0}
body[data-hud-only=true] #depth-reference{display:none}
@media(max-width:760px){#help{left:20px;top:calc(var(--hud-bottom,314px) + 14px);width:min(300px,calc(100vw - 40px));max-height:calc(100svh - var(--hud-bottom,314px) - 40px)}#atlas-credit{font-size:7px}}

/* 当前章节只显示有效动作；教学位于画面边缘，识别后收成两行提示。 */
#gesture-guide{position:absolute;left:42px;top:165px;width:218px;color:var(--muted);font-size:10px;line-height:1.7;pointer-events:none}
#guide-title{margin:0 0 10px;color:var(--gold);font-size:11px;letter-spacing:.12em}
.guide-actions p{display:flex;justify-content:space-between;gap:12px;margin:7px 0}.guide-actions b{font-weight:400;color:#d5cbbb}.guide-actions span{color:var(--muted)}
#guide-note{margin:12px 0 0;font-size:9px;line-height:1.8;max-width:218px}
[data-gesture=spread]{display:none!important}
body[data-guide-stage=travel] [data-gesture=rotate],body[data-guide-stage=gate] [data-gesture=rotate],body[data-guide-stage=gate] [data-gesture=push],body[data-guide-stage=gate] [data-gesture=pull]{display:none!important}
body[data-guide-stage=gate] [data-gesture=spread]{display:grid!important}
body[data-guide-stage=complete] #gesture-guide,body[data-help=true] #gesture-guide,body[data-guide-compact=true] #gesture-guide .guide-actions{display:none}
body[data-guide-compact=true] #guide-title{margin-bottom:3px}body[data-guide-compact=true] #guide-note{margin-top:0}
#help{width:265px;padding:18px}#help h2{font-size:18px;margin:0 0 16px;font-weight:400}
#help .help-grid{grid-template-columns:1fr;gap:12px}#help .help-grid>div{display:grid;grid-template-columns:32px 1fr;column-gap:12px;text-align:left}
#help .help-grid img{grid-row:1/3;width:32px;height:36px}#help .help-grid b{font-size:11px;font-weight:400}#help .help-grid p{font-size:10px;margin:3px 0 0}
#help .small{font-size:10px;line-height:1.8;margin:15px 0}#close-help{font-size:10px;padding:6px 12px}
@media(max-width:760px){#gesture-guide{left:22px;top:160px;width:min(190px,calc(100vw - 178px))}.guide-actions p{display:block;margin:8px 0}.guide-actions span{margin-left:8px;font-size:9px}#guide-title{font-size:10px;letter-spacing:.04em}#guide-note{font-size:9px}#help{--help-top:max(calc(var(--hud-bottom,314px) + 14px),calc(42svh + 15vw + 12px));top:var(--help-top);width:min(265px,calc(100vw - 40px));max-height:calc(100svh - var(--help-top) - 20px)}}
