@charset "utf-8";

:root {
  --ink: #08090b;
  --paper: #f2efe7;
  --dim: rgba(242, 239, 231, .60);
  --faint: rgba(242, 239, 231, .30);
  --gold: #d8bd8e;
  --ease: cubic-bezier(.22, .61, .24, 1);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  height: 100%;
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  overscroll-behavior: none;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- 全景容器 ---------- */
#pano {
  position: fixed; inset: 0;
  background: #0b0c0f;
  z-index: 1;
}
#pano .pnlm-container { background: #0b0c0f; }
#pano .pnlm-load-box { display: none !important; }
#pano .pnlm-about-msg { display: none !important; }
#pano .pnlm-grab { cursor: grab; }
#pano .pnlm-grabbing { cursor: grabbing; }

.veil {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5,6,8,.62) 0%, rgba(5,6,8,.10) 11%, rgba(5,6,8,0) 24%),
    linear-gradient(0deg, rgba(5,6,8,.78) 0%, rgba(5,6,8,.26) 11%, rgba(5,6,8,0) 28%);
}
.grain {
  position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: .13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

/* ---------- 开场 ---------- */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background: #07080a;
  transition: opacity .9s var(--ease), visibility .9s;
}
.boot.gone { opacity: 0; visibility: hidden; }
.boot-inner { text-align: center; padding: 0 32px; }
.boot-mark {
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  font-size: 44px; letter-spacing: .38em; text-indent: .38em;
  animation: bootIn 1.3s var(--ease) both;
}
.boot-sub {
  margin-top: 15px; font-size: 12px; letter-spacing: .28em; color: var(--faint);
  animation: bootIn 1.3s .2s var(--ease) both;
}
.boot-bar {
  width: 140px; height: 1px; margin: 36px auto 0;
  background: rgba(242,239,231,.12); overflow: hidden;
}
.boot-bar i {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, transparent, var(--gold));
  transition: width .5s var(--ease);
}
.boot-tip { margin-top: 15px; font-size: 11px; letter-spacing: .2em; color: var(--faint); }
@keyframes bootIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- 顶部 ---------- */
.hud {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0;
  padding: calc(var(--safe-top) + 20px) 20px 0;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud, .foot { transition: opacity .45s var(--ease); }
body.immersive .hud, body.immersive .foot { opacity: 0; pointer-events: none; }
body.idle .hud, body.idle .foot { opacity: .32; }
body.idle .tool, body.idle .nav-btn { border-color: rgba(242,239,231,.06); }

.sub { font-size: 11px; letter-spacing: .24em; color: var(--gold); margin-bottom: 9px; text-shadow: 0 1px 14px rgba(0,0,0,.75); }
.place h1 {
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  font-weight: 600; font-size: clamp(30px, 8.6vw, 44px);
  letter-spacing: .1em; line-height: 1.1;
  text-shadow: 0 2px 30px rgba(0,0,0,.6);
}
.meta {
  margin-top: 10px; font-size: 11.5px; letter-spacing: .08em;
  color: var(--dim); font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 12px rgba(0,0,0,.8);
}
.meta .dot { margin: 0 7px; opacity: .4; }

.tools { display: flex; flex-direction: column; gap: 9px; }
.tool {
  width: 41px; height: 41px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(12, 14, 18, .40);
  border: 1px solid rgba(242,239,231,.14);
  backdrop-filter: blur(14px) saturate(1.05);
  -webkit-backdrop-filter: blur(14px) saturate(1.05);
  transition: transform .18s var(--ease), background .25s, border-color .25s;
}
.tool svg { width: 18px; height: 18px; fill: none; stroke: var(--paper); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tool:active { transform: scale(.92); }
.tool.on { background: rgba(216,189,142,.20); border-color: rgba(216,189,142,.58); }
.tool.on svg { stroke: var(--gold); }

/* ---------- 底部 ---------- */
.foot {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0;
  padding: 0 20px calc(var(--safe-bottom) + 18px);
  display: flex; flex-direction: column; gap: 14px;
  pointer-events: none;
}
.foot > * { pointer-events: auto; }

.line {
  font-size: 14.5px; line-height: 1.7; letter-spacing: .04em;
  color: rgba(242,239,231,.94); max-width: 30em;
  text-shadow: 0 1px 20px rgba(0,0,0,.8);
  transition: opacity .35s, transform .45s var(--ease);
  min-height: 1.7em;
}
.line.fade { opacity: 0; transform: translateY(5px); }

.foot-row { display: flex; align-items: center; gap: 10px; }
.nav-btn {
  width: 38px; height: 38px; flex: 0 0 auto; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(12,14,18,.38); border: 1px solid rgba(242,239,231,.13);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: transform .18s var(--ease), background .25s;
}
.nav-btn svg { width: 16px; height: 16px; fill: none; stroke: var(--paper); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn:active { transform: scale(.9); background: rgba(216,189,142,.18); }

.rail {
  flex: 1; display: flex; gap: 7px; overflow-x: auto; overflow-y: hidden;
  scrollbar-width: none; -ms-overflow-style: none;
  padding: 2px 0; scroll-behavior: smooth;
}
.rail::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 7px 13px; border-radius: 100px;
  font-size: 12px; letter-spacing: .1em; color: var(--dim);
  background: rgba(12,14,18,.34); border: 1px solid rgba(242,239,231,.10);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: color .25s, border-color .25s, background .25s;
  white-space: nowrap;
}
.chip.on { color: var(--ink); background: var(--gold); border-color: var(--gold); font-weight: 600; }

/* ---------- 详情 ---------- */
.sheet {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
  max-height: 82vh;
  background: rgba(10, 11, 14, .94);
  backdrop-filter: blur(28px) saturate(1.1);
  -webkit-backdrop-filter: blur(28px) saturate(1.1);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid rgba(242,239,231,.09);
  transform: translateY(102%);
  transition: transform .5s var(--ease);
  display: flex; flex-direction: column;
  padding-bottom: calc(var(--safe-bottom) + 6px);
}
.sheet.open { transform: translateY(0); }
.sheet-handle { width: 36px; height: 4px; border-radius: 4px; background: rgba(242,239,231,.2); margin: 10px auto 0; flex: 0 0 auto; }
.sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 24px 24px; }
.sheet-sub { font-size: 11px; letter-spacing: .22em; color: var(--gold); }
.sheet h2 { font-family: "Songti SC", "SimSun", "Noto Serif SC", serif; font-size: 27px; letter-spacing: .08em; margin: 7px 0 11px; font-weight: 600; }
.sheet-lead { font-size: 14px; line-height: 1.85; color: var(--dim); }
.sheet-block { margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(242,239,231,.07); }
.sheet-block h3 { font-size: 11px; letter-spacing: .22em; font-weight: 500; color: var(--gold); margin-bottom: 8px; }
.sheet-block p { font-size: 14px; line-height: 1.92; color: rgba(242,239,231,.85); }
.sheet-close { margin-top: 24px; width: 100%; padding: 13px; border-radius: 13px; background: rgba(242,239,231,.07); font-size: 13px; letter-spacing: .1em; color: var(--dim); }

/* ---------- 提示 ---------- */
.toast {
  position: fixed; z-index: 30; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.96);
  padding: 12px 22px; border-radius: 100px;
  background: rgba(8,9,11,.72); border: 1px solid rgba(242,239,231,.12);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-size: 13px; letter-spacing: .12em; color: var(--paper);
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }

@media (min-width: 720px) {
  .hud { padding: calc(var(--safe-top) + 30px) 38px 0; }
  .foot { padding: 0 38px calc(var(--safe-bottom) + 28px); }
  .line { font-size: 16px; }
  .sheet { left: auto; right: 30px; bottom: 26px; width: 440px; max-height: 76vh; border-radius: 20px; }
  .sheet-handle { display: none; }
}
