* { box-sizing: border-box; }
html, body, #experience, #tour, #cinema { width: 100%; height: 100%; margin: 0; }
html, body { overflow: hidden; background: #080a0d; color: #f3f4f6; }
body { font-family: "Segoe UI","Microsoft YaHei",sans-serif; }
#experience { position: relative; isolation: isolate; }
#panorama, #curtain, #cinema, #film { position: absolute; inset: 0; width: 100%; height: 100%; }
#panorama { background: #0a0d11; }
#curtain { z-index: 2; background-size: cover; background-position: center; pointer-events: none; transition: opacity .32s ease; }
#curtain.clear { opacity: 0; }
#busy { position: absolute; z-index: 3; left: 50%; top: max(28px,env(safe-area-inset-top)); width: 32px; height: 2px;
  transform: translateX(-50%); background: #ffffff36; border-radius: 1px; overflow: hidden; }
#busy::before { content: ""; display: block; width: 55%; height: 100%; background: #fff; animation: traverse 1.25s ease-in-out infinite alternate; }
@keyframes traverse { to { transform: translateX(85%); } }
.pnlm-load-box, .pnlm-about-msg, .pnlm-error-msg { display: none !important; }
.glass, .home { border-radius: 32px; background: #090c128a; border: 1px solid #f2f4ff35; backdrop-filter: blur(10px); }
.glass.actions { padding: 1px 3px; }
.download-tip { position: absolute; top: calc(100% + 8px); right: 0; z-index: 8; visibility: hidden;
  width: max-content; max-width: calc(100vw - 84px); padding: 7px 10px; pointer-events: none;
  border: 1px solid #ffffff26; border-radius: 6px; background: #0c1015ee; color: #e9edf4;
  text-align: left; font: 400 .83rem/1.55 "Segoe UI","Microsoft YaHei",sans-serif; }
#quest:focus-visible .download-tip { visibility: visible; }
@media (hover:hover) { #quest:hover .download-tip { visibility: visible; } }
.home { left: max(25px,env(safe-area-inset-left)); top: max(20px,env(safe-area-inset-top)); }
.home svg { width: 27px; height: 27px; }
.home[data-tip]::after, .lower-left [data-tip]::after { left: 0; right: auto; }
.lower-left, .fullscreen { bottom: max(22px,env(safe-area-inset-bottom)); }
.lower-left { left: max(25px,env(safe-area-inset-left)); gap: 13px; }
.fullscreen { right: max(28px,env(safe-area-inset-right)); }
.lower-left [data-tip]::after, .fullscreen[data-tip]::after { top: auto; bottom: calc(100% + 7px); }
#station-name { font-family: "Songti SC","Noto Serif CJK SC","SimSun",serif; letter-spacing: .14em; font-size: clamp(1rem,1.8vw,1.38rem);
  text-shadow: 0 1px 4px #000, 0 2px 12px #000; opacity: 0; transition: opacity .45s; pointer-events: none; }
#station-name.show, .lower-left:hover #station-name, .lower-left:focus-within #station-name { opacity: 1; }
.waypoint { width: 46px; height: 46px; z-index: 2; }
.waypoint.merged-away { visibility: hidden !important; }
.waypoint button { display: grid; width: 46px; height: 46px; place-items: center; margin: 0; padding: 0; border: 0;
  border-radius: 50%; background: transparent; color: white; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.waypoint .glyph { width: 32px; height: 32px; background: #14191e6b; border-radius: 50%; filter: drop-shadow(0 1px 4px #000b);
  stroke-width: 1.65; transition: transform .16s,background .16s; }
.waypoint button:hover .glyph, .waypoint button:focus-visible .glyph { transform: scale(1.13); background: #14191ebf; }
.waypoint [data-tip]::after { right: auto; left: 50%; top: calc(100% - 3px); transform: translateX(-50%); }
#cinema { background: black; display: grid; place-items: center; }
#film { object-fit: contain; }
.film-play { position: relative; color: #fff; width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid #ffffffae;
  border-radius: 50%; background: #0a0d1370; backdrop-filter: blur(6px); cursor: pointer; }
.film-play:hover { background: #0a0d13ba; }
.film-play .glyph { width: 32px; height: 32px; }
#guide { position: absolute; z-index: 5; top: max(26px,env(safe-area-inset-top)); left: max(80px,calc(env(safe-area-inset-left) + 54px)); }
#guide summary { width: max-content; cursor: pointer; background: #090c12b0; border: 1px solid #f2f4ff35;
  color: #f2f4f8; border-radius: 22px; padding: 7px 13px; font-size: .86rem; }
#guide article { position: absolute; left: -54px; top: calc(100% + 12px); width: min(33rem,calc(100vw - 52px));
  max-height: calc(100dvh - 104px); overflow: auto; padding: 18px 20px; border: 1px solid #ffffff35; border-radius: 14px;
  background: #11151af7; color: #d7dce4; font-size: .94rem; line-height: 1.6; }
#guide h1 { margin: 0; font-size: 1.16rem; line-height: 1.5; color: #fafbff; }
#guide nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
#guide a { color: #e1e8f5; text-underline-offset: 3px; }
#guide a[aria-current] { font-weight: 650; }
#notice { position: absolute; z-index: 5; bottom: 78px; left: 50%; transform: translateX(-50%); background: #13161ef2;
  color: #fafbff; padding: 10px 16px; border-radius: 10px; font-size: .9rem; width: max-content; max-width: 84%; }
#notice { pointer-events: none; }
dialog { width: min(620px,calc(100% - 32px)); max-height: 79dvh; overflow: auto; position: fixed; top: auto; left: 0; right: 0;
  bottom: max(24px,env(safe-area-inset-bottom)); margin: 0 auto; padding: 18px 23px 22px;
  border: 1px solid #dce2ef35; border-radius: 18px; color: #f2f3f6; background: #11151af7; box-shadow: 0 16px 70px #0007; }
dialog::backdrop { background: #03060a58; }
dialog[open] { animation: rise .18s ease-out; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.sheet-heading, .sheet-foot, .file-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-heading { margin-bottom: 12px; }
h2 { margin: 0; font-weight: 450; font-size: 1.06rem; letter-spacing: .04em; }
.sheet-heading .tool { margin: -6px -9px -6px 0; }
.sheet-heading .tool svg { width: 18px; height: 18px; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.cards.pair { grid-template-columns: repeat(2,minmax(0,1fr)); }
.scene-card { position: relative; display: flex; flex-direction: column; border: 1px solid #ffffff28; border-radius: 8px; overflow: hidden;
  text-decoration: none; color: #edeff5; background: #191d22; }
.scene-card:hover { border-color: #ffffffaa; }
.scene-card img { width: 100%; aspect-ratio: 1.9; object-fit: cover; }
.scene-card span { padding: .5rem .65rem; font-size: .91rem; }
.scene-card[aria-current=location] { border-color: #f0f2f5; }
.scene-card .glyph { position: absolute; top: 5px; right: 5px; width: 19px; height: 19px; color: white; padding: 1px; background: #0d1015c0; border-radius: 50%; }
.sheet-foot { margin-top: 12px; color: #b9bec7; font-size: .85rem; }
.sheet-foot .tool { margin: -3px -8px -9px auto; }
.sheet-foot .tool svg { width: 19px; }
.file-row { background: #ffffff08; border-radius: 10px; padding: 13px 15px; }
.file-row strong { display: block; font-size: 1.03rem; font-weight: 550; }
.file-row small { display: block; color: #b6bec8; font-size: .86rem; line-height: 1.5; margin-top: 4px; }
.file-row a { background: #e8ecf1; color: #181d22; }
.file-row a:hover { background: #fff; color: #080a10; }
.local-reader-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin-top: 8px; }
dialog .local-reader-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9rem; }
dialog .local-reader-links a:first-child { text-decoration: none; padding: 0 14px; color: #f1f4f8; border-radius: 22px; border: 1px solid #ffffff42; }
dialog p { font-size: .92rem; line-height: 1.7; color: #cbd0d7; }
dialog p:last-child { margin-bottom: 0; }
dialog a:not(.scene-card,.tool) { color: #f2f4fb; text-underline-offset: 3px; }
@media(max-width:600px) {
  #guide { top: max(18px,env(safe-area-inset-top)); left: max(64px,calc(env(safe-area-inset-left) + 52px)); }
  #guide article { left: -52px; width: min(33rem,calc(100vw - 24px)); }
  .home { top: max(12px,env(safe-area-inset-top)); left: max(12px,env(safe-area-inset-left)); }
  .lower-left { left: max(12px,env(safe-area-inset-left)); }
  .fullscreen { right: max(12px,env(safe-area-inset-right)); }
  .lower-left, .fullscreen { bottom: max(14px,env(safe-area-inset-bottom)); }
  dialog { width: calc(100% - 20px); bottom: max(10px,env(safe-area-inset-bottom)); padding: 14px 16px 18px; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .film-play { width: 60px; height: 60px; }
}
@media(max-width:375px) {
  #guide { top: max(66px,calc(env(safe-area-inset-top) + 54px)); left: max(12px,env(safe-area-inset-left)); }
  #guide article { left: 0; max-height: calc(100dvh - 122px); }
}
