/* ==========================================================================
   冻土之下，星海之上 — Awwwards 级 100% 全出血实景电影交互系统
   P0+P1 全面升级：
   1. 零黑墙、零圆角相框：每一幕 100vw × 100dvh 铺满视口，电影景深溶镜切换
   2. 零常驻黑底标签、零桌上卡片框：真实物体直接置身实景光影中
   3. 杜绝标题孤字换行（text-wrap: balance），手机竖屏原生全屏热区重排
   ========================================================================== */

:root {
  --bg-abyss: #05070d;
  --ink-bright: #f7f8fc;
  --ink-muted: rgba(238, 242, 250, 0.78);
  --ink-faint: rgba(215, 224, 240, 0.52);

  --gold-warm: #ebd08d;
  --sprout-emerald: #6ee7b7;
  --sea-glint: #93c5fd;
  --coral-flame: #f26440;
  --brass-aged: #d6a456;

  --glass-hud: rgba(7, 10, 18, 0.58);
  --glass-line: rgba(255, 255, 255, 0.14);
  --glass-line-gold: rgba(235, 208, 141, 0.45);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", system-ui, sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Cascadia Mono", ui-monospace, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-abyss);
  color: var(--ink-bright);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  touch-action: none;
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-ready,
  body.custom-cursor-ready button,
  body.custom-cursor-ready a,
  body.custom-cursor-ready [data-cursor] {
    cursor: none;
  }

  body.custom-cursor-ready input,
  body.custom-cursor-ready textarea,
  body.custom-cursor-ready select {
    cursor: text;
  }
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-warm);
  outline-offset: 3px;
}

.tabular {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   1. 定制交互灵光光标
   ========================================================================== */
.light-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 999;
  pointer-events: none;
  will-change: transform;
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  body.custom-cursor-ready .light-cursor {
    display: block;
  }
}

.cursor-core {
  position: absolute;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-top: -3.5px;
  border-radius: 50%;
  background: #fffdf5;
  box-shadow: 0 0 14px 3px rgba(235, 208, 141, 0.88);
  transition: transform 140ms var(--ease-out-quart);
}

.cursor-halo {
  position: absolute;
  width: 34px;
  height: 34px;
  margin-left: -17px;
  margin-top: -17px;
  border-radius: 50%;
  border: 1px solid rgba(235, 208, 141, 0.44);
  background: radial-gradient(circle, rgba(235, 208, 141, 0.12) 0%, transparent 72%);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    width 200ms var(--ease-out-expo),
    height 200ms var(--ease-out-expo),
    margin 200ms var(--ease-out-expo),
    background-color 180ms ease,
    border-color 180ms ease,
    transform 130ms var(--ease-out-quart);
}

.cursor-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #0b0e16;
  white-space: nowrap;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 140ms ease, transform 180ms var(--ease-out-expo);
}

.light-cursor.is-interactive .cursor-halo {
  width: 68px;
  height: 68px;
  margin-left: -34px;
  margin-top: -34px;
  background: rgba(248, 239, 216, 0.90);
  border-color: transparent;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.light-cursor.is-interactive .cursor-core {
  transform: scale(0.15);
}

.light-cursor.is-interactive .cursor-label {
  opacity: 1;
  transform: scale(1);
}

.light-cursor.is-pressed .cursor-halo {
  transform: scale(0.88);
}

/* ==========================================================================
   2. 100% 全屏电影实景舞台（零黑边、零圆角相框、方向感知景深溶镜）
   ========================================================================== */
.cinema-universe {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-abyss);
}

.realm-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform: scale(1.035);
  will-change: transform, opacity;
  transition:
    opacity 440ms var(--ease-out-quart),
    transform 520ms var(--ease-out-expo),
    visibility 0s linear 440ms;
}

.realm-screen.is-active {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transform: translate3d(0, 0, 0) scale(1);
  transition:
    opacity 440ms var(--ease-out-quart),
    transform 560ms var(--ease-out-expo),
    visibility 0s linear 0s;
  z-index: 5;
}

.realm-screen.enter-from-left { transform: translate3d(-44px, 0, 0) scale(1.02); }
.realm-screen.enter-from-right { transform: translate3d(44px, 0, 0) scale(1.02); }
.realm-screen.enter-from-up { transform: translate3d(0, -38px, 0) scale(1.02); }
.realm-screen.enter-from-down { transform: translate3d(0, 38px, 0) scale(1.02); }

/* 全出血实拍视频/照片底片 */
.fullbleed-media {
  position: absolute;
  inset: -2.5%;
  width: 105%;
  height: 105%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  will-change: transform;
}

.cinema-grade-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(4, 7, 13, 0.56) 0%, rgba(4, 7, 13, 0.06) 36%, rgba(4, 7, 13, 0.08) 68%, rgba(4, 7, 13, 0.62) 100%);
}

/* 电影海报级排版标题（严防孤字换行 text-wrap: balance） */
.editorial-overlay {
  position: absolute;
  top: clamp(28px, 5.2vh, 56px);
  left: clamp(22px, 5vw, 68px);
  z-index: 12;
  max-width: min(88vw, 560px);
  pointer-events: none;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.86);
}

.editorial-kicker {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  color: var(--gold-warm);
  margin-bottom: 10px;
}

.editorial-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3.6vw, 3.1rem);
  font-weight: 600;
  line-height: 1.22;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
  color: #ffffff;
  text-wrap: balance;
}

.editorial-desc {
  font-size: clamp(0.88rem, 1.1vw, 0.98rem);
  line-height: 1.76;
  color: rgba(242, 245, 252, 0.84);
  margin: 0;
  text-wrap: pretty;
}

/* 极克制的屏幕边缘方向引路刻度（不抢画，轻轻贴边） */
.edge-portal {
  position: absolute;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.44);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 0.78rem;
  color: rgba(245, 247, 252, 0.86);
  letter-spacing: 0.05em;
  transition:
    background-color 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 220ms var(--ease-out-expo);
}

.edge-portal:hover {
  background: rgba(14, 20, 34, 0.82);
  border-color: var(--gold-warm);
  color: #ffffff;
}

.edge-portal.top { top: 20px; left: 50%; transform: translateX(-50%); }
.edge-portal.top:hover { transform: translateX(-50%) translateY(-2px); }

.edge-portal.bottom { bottom: max(68px, calc(env(safe-area-inset-bottom) + 56px)); left: 50%; transform: translateX(-50%); }
.edge-portal.bottom:hover { transform: translateX(-50%) translateY(2px); }

.edge-portal.left { left: 22px; top: 50%; transform: translateY(-50%); }
.edge-portal.left:hover { transform: translateY(-50%) translateX(-3px); }

.edge-portal.right { right: 22px; top: 50%; transform: translateY(-50%); }
.edge-portal.right:hover { transform: translateY(-50%) translateX(3px); }

/* 底部极简电影字幕感应条（平时隐形或极轻，悬停实物时浮现完整说明，绝不截断文字） */
.cinema-subtitle-bar {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px;
  border-radius: 999px;
  background: rgba(7, 10, 18, 0.68);
  border: 1px solid rgba(235, 208, 141, 0.28);
  backdrop-filter: blur(14px);
  font-size: 0.82rem;
  color: #fef3c7;
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: min(92vw, 680px);
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 200ms ease, transform 220ms var(--ease-out-expo);
}

.subtitle-inline-link {
  color: var(--gold-warm);
  font-weight: 700;
  flex-shrink: 0;
  padding-left: 8px;
  border-left: 1px solid rgba(235, 208, 141, 0.28);
}

.cinema-subtitle-bar.is-muted {
  color: rgba(235, 240, 248, 0.72);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   第一幕：冻土破晓 · 真实种子（seed.mp4）
   ========================================================================== */
.seed-real-hotspot {
  position: absolute;
  left: 50%;
  top: 58%;
  width: min(44vw, 380px);
  height: min(42vh, 300px);
  transform: translate(-50%, -50%);
  z-index: 14;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 208, 141, 0.08) 0%, transparent 68%);
  transition: background 320ms ease, transform 320ms var(--ease-out-expo);
}

.seed-real-hotspot:hover {
  background: radial-gradient(circle, rgba(110, 231, 183, 0.18) 0%, transparent 70%);
  transform: translate(-50%, -50%) scale(1.06);
}

/* ==========================================================================
   第二幕：自由海岸 · 真实银河海浪与 6 只差异化夜海漂流瓶（零黑底字条！）
   ========================================================================== */
.ocean-swell-img {
  animation: gentleSeaBreath 11s ease-in-out infinite alternate;
}

@keyframes gentleSeaBreath {
  0% { transform: scale(1.03) translate3d(-8px, -3px, 0); }
  100% { transform: scale(1.07) translate3d(8px, 4px, 0); }
}

.ambient-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
  display: block;
}

.sea-bottles-layer {
  position: absolute;
  inset: 0;
  z-index: 14;
}

.real-bottle-btn {
  position: absolute;
  display: block;
  will-change: transform;
  transform-origin: 50% 68%;
  transition: filter 260ms ease;
}

/* 真实海浪浸没水线遮罩：下半截瓶肚柔和融进深海泡沫，零贴纸感 */
.real-bottle-img-wrap {
  position: relative;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.35) 78%, transparent 94%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, 0.35) 78%, transparent 94%);
  transition: transform 280ms var(--ease-out-expo);
}

.real-bottle-img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 14px 20px rgba(2, 8, 22, 0.85));
}

.bottle-waterline-ring {
  position: absolute;
  bottom: 20%;
  left: 50%;
  width: 88%;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(186, 230, 253, 0.32);
  box-shadow: 0 0 12px rgba(125, 211, 252, 0.25);
  pointer-events: none;
}

.real-bottle-btn:hover {
  filter: brightness(1.24) drop-shadow(0 0 24px rgba(147, 197, 253, 0.55));
}

.real-bottle-btn:hover .real-bottle-img-wrap {
  transform: translateY(-9px) scale(1.06);
}

/* ==========================================================================
   第三幕：海畔木匠台 — 彻底撕掉 3 个黑框卡片，实物直接摆在真胡桃木桌面上！
   ========================================================================== */
.workbench-tabletop {
  position: absolute;
  inset: 0;
  z-index: 14;
  pointer-events: none;
}

/* 左侧木桌：真铸铁红手轮 + 迷你黄铜玻璃流道视窗（无外框卡片！） */
.prop-valve-rig {
  position: absolute;
  left: 11%;
  bottom: 14%;
  display: flex;
  align-items: center;
  gap: 14px;
  pointer-events: auto;
}

.real-handwheel-btn {
  width: clamp(118px, 12vw, 168px);
  height: clamp(118px, 12vw, 168px);
  border-radius: 50%;
  position: relative;
}

.real-handwheel-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  /* 暖钨丝台灯光调色融合进老胡桃木桌 */
  filter: sepia(0.18) brightness(0.90) contrast(1.06) drop-shadow(0 18px 22px rgba(8, 4, 2, 0.88));
  transition: transform 540ms var(--ease-out-expo), filter 200ms ease;
}

.real-handwheel-btn:hover .real-handwheel-img {
  filter: sepia(0.10) brightness(1.02) contrast(1.08) drop-shadow(0 20px 26px rgba(8, 4, 2, 0.92));
}

.brass-sight-glass {
  width: clamp(132px, 13vw, 184px);
  height: clamp(82px, 8.5vw, 108px);
  border-radius: 12px;
  background: rgba(6, 9, 14, 0.86);
  border: 2.5px solid #9e7339;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.82), inset 0 3px 12px rgba(0, 0, 0, 0.92);
  display: block;
}

/* 中央木桌：带桌面真实透视倾角的胡桃木镶铜棋盘（无黑框卡片！） */
.prop-chess-rig {
  position: absolute;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%) perspective(820px) rotateX(15deg);
  transform-origin: center bottom;
  pointer-events: auto;
}

.walnut-chessboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 2px;
  width: clamp(176px, 17vw, 228px);
  height: clamp(176px, 17vw, 228px);
  padding: 8px;
  border-radius: 10px;
  background: linear-gradient(145deg, #4b2d18, #24140a);
  border: 2.5px solid #ad7f41;
  box-shadow: 0 26px 42px rgba(0, 0, 0, 0.88), inset 0 1px 0 rgba(255, 224, 178, 0.25);
}

.wood-square {
  border-radius: 3px;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  line-height: 1;
  font-size: clamp(1.2rem, 1.8vw, 1.55rem);
}

.wood-square.maple { background: #cba977; }
.wood-square.walnut { background: #52321b; }
.wood-square.selected { box-shadow: inset 0 0 0 2.5px #fde047; }
.wood-square.last-move { box-shadow: inset 0 0 0 2px #34d399; }

.chess-piece-3d {
  filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.72));
  pointer-events: none;
}

/* 右侧木桌：真实手工粗陶三格定食盘直接置放木面（无黑框卡片！） */
.prop-plate-rig {
  position: absolute;
  right: 11%;
  bottom: 13%;
  pointer-events: auto;
}

.real-plate-btn {
  width: clamp(150px, 16vw, 220px);
  height: clamp(150px, 16vw, 220px);
  border-radius: 50%;
  position: relative;
}

.real-plate-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  filter: sepia(0.20) brightness(0.84) contrast(1.06) drop-shadow(0 22px 26px rgba(8, 4, 2, 0.88));
  transition: transform 560ms var(--ease-out-expo), filter 200ms ease;
}

.real-plate-btn:hover .real-plate-img {
  filter: sepia(0.08) brightness(0.98) contrast(1.08) drop-shadow(0 24px 30px rgba(8, 4, 2, 0.92));
}

/* 木桌上方悬停器物时才浮现的精致动作微条 */
.atelier-inspect-pill {
  position: absolute;
  right: clamp(22px, 5vw, 68px);
  top: clamp(28px, 5.2vh, 56px);
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(12, 10, 9, 0.72);
  border: 1px solid rgba(235, 208, 141, 0.34);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  color: var(--ink-bright);
}

.atelier-inspect-pill a,
.atelier-inspect-pill button {
  color: var(--gold-warm);
  font-weight: 600;
}

/* ==========================================================================
   第四幕：星空暖灯木屋 — 彻底撕掉 6 张常驻黑贴纸，仅留呼吸微光锚点 + 暖光融合手办！
   ========================================================================== */
.cabin-real-hotspot {
  position: absolute;
  z-index: 14;
  border-radius: 16px;
  display: grid;
  place-items: center;
  transition: background-color 240ms ease;
}

/* 平时只是一粒极克制的暖金微光感应呼吸点（绝不贴宜家价签！） */
.glint-beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(253, 230, 138, 0.92);
  box-shadow: 0 0 0 6px rgba(253, 230, 138, 0.16), 0 0 18px rgba(253, 230, 138, 0.65);
  pointer-events: none;
  animation: beaconPulse 2.8s ease-in-out infinite;
  transition: transform 200ms var(--ease-out-expo), opacity 200ms ease;
}

@keyframes beaconPulse {
  0%, 100% { transform: scale(0.92); opacity: 0.65; }
  50% { transform: scale(1.18); opacity: 1; }
}

/* 只有鼠标悬停家具时，极轻的提示名才淡入显现 */
.hover-reveal-tag {
  position: absolute;
  bottom: calc(50% + 16px);
  left: 50%;
  transform: translate3d(-50%, 6px, 0);
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(10, 11, 16, 0.84);
  border: 1px solid rgba(235, 208, 141, 0.42);
  font-size: 0.74rem;
  font-weight: 600;
  color: #fef3c7;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 200ms var(--ease-out-expo);
}

.cabin-real-hotspot:hover .hover-reveal-tag {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}

.cabin-real-hotspot:hover .glint-beacon {
  transform: scale(1.35);
}

/* 精准锚定在全屏 cabin.jpg 真实家具上的热区 */
.hs-bookshelf { left: 20%; top: 10%; width: 20%; height: 42%; }
.hs-turntable { left: 36%; top: 47%; width: 15%; height: 17%; }
.hs-dumbbells { left: 50%; top: 76%; width: 16%; height: 18%; }
.hs-postbox   { left: 54%; top: 46%; width: 9%; height: 18%; }
.hs-starwindow{ left: 66%; top: 12%; width: 28%; height: 50%; }

/* 暖光书桌台面上的三个实体手办（暖琥珀调色 + 深暖接地阴影 + 物理防穿模） */
.desk-figurines-stage {
  position: absolute;
  left: 3%;
  top: 42%;
  width: 32%;
  height: 28%;
  z-index: 16;
}

.real-figurine-btn {
  position: absolute;
  bottom: 10px;
  left: 0;
  width: clamp(54px, 5.4vw, 76px);
  margin-left: calc(clamp(54px, 5.4vw, 76px) / -2);
  display: flex;
  flex-direction: column;
  align-items: center;
  will-change: transform;
}

/* 脚底真实台灯暖黑接触椭圆投影，让玩偶牢牢“踩”在胡桃木桌上 */
.real-figurine-btn::after {
  content: "";
  width: 68%;
  height: 9px;
  margin-top: -5px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(12, 6, 2, 0.85) 0%, transparent 74%);
  pointer-events: none;
}

.real-figurine-img {
  width: 100%;
  height: auto;
  pointer-events: none;
  /* 精准暖琥珀台灯调色，彻底消除冷白影棚 P 图感！ */
  filter: sepia(0.26) saturate(0.96) brightness(0.80) contrast(1.06) drop-shadow(0 6px 8px rgba(10, 4, 1, 0.72));
  transition: transform 200ms var(--ease-out-expo), filter 180ms ease;
}

.real-figurine-btn:hover .real-figurine-img {
  filter: sepia(0.18) saturate(1.04) brightness(0.92) contrast(1.06) drop-shadow(0 8px 12px rgba(10, 4, 1, 0.82));
}

.real-figurine-btn.is-jumping .real-figurine-img {
  transform: translateY(-16px) scale(1.08);
}

.figurine-speech {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate3d(-50%, 6px, 0) scale(0.92);
  padding: 5px 12px;
  border-radius: 12px;
  background: rgba(255, 248, 230, 0.94);
  color: #1c1610;
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.58);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 200ms var(--ease-out-expo);
  z-index: 25;
}

.figurine-speech.is-high {
  bottom: calc(100% + 36px);
}

.figurine-speech.is-talking {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.cabin-sky-scope-btn {
  position: absolute;
  top: clamp(20px, 4vh, 34px);
  right: clamp(20px, 4vw, 48px);
  z-index: 20;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(10, 14, 24, 0.66);
  border: 1px solid rgba(235, 208, 141, 0.36);
  backdrop-filter: blur(12px);
  font-size: 0.78rem;
  color: var(--gold-warm);
}

/* ==========================================================================
   第五幕：深空星云 — 彻底删除虚线剧透框！无框藏于深空星尘中
   ========================================================================== */
.cosmos-full-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  display: block;
}

/* 完全隐形无框的 11h18m 深空感应星域（0 虚线框、0 剧透文字！） */
.ra-invisible-zone {
  position: absolute;
  top: 7%;
  right: 5%;
  width: min(34vw, 390px);
  height: min(28vh, 210px);
  z-index: 15;
}

.star-hover-card {
  position: absolute;
  z-index: 22;
  pointer-events: none;
  padding: 10px 15px;
  border-radius: 14px;
  background: rgba(7, 11, 22, 0.90);
  border: 1px solid var(--glass-line-gold);
  backdrop-filter: blur(12px);
  max-width: 280px;
  opacity: 0;
  transform: translate3d(-50%, -120%, 0) scale(0.95);
  transition: opacity 150ms ease, transform 180ms var(--ease-out-expo);
}

.star-hover-card.is-shown {
  opacity: 1;
  transform: translate3d(-50%, -132%, 0) scale(1);
}

/* ==========================================================================
   第六幕：地窖黄铜巨门 — 火炬暖光摇曳呼吸 + 真实黄铜门环热区
   ========================================================================== */
.torch-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 7;
  mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(255, 168, 66, 0.36) 0%, rgba(242, 100, 64, 0.12) 45%, transparent 72%);
  animation: torchFlicker 3.6s ease-in-out infinite alternate;
}

.torch-left { left: 16%; top: 28%; width: 220px; height: 220px; }
.torch-right { right: 4%; top: 44%; width: 190px; height: 190px; animation-delay: 1.3s; }

@keyframes torchFlicker {
  0% { opacity: 0.62; transform: scale(0.95); }
  35% { opacity: 0.95; transform: scale(1.06); }
  70% { opacity: 0.72; transform: scale(0.98); }
  100% { opacity: 1; transform: scale(1.04); }
}

.vault-door-ring-hotspot {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(56vw, 440px);
  height: min(56vw, 440px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  z-index: 14;
  transition: box-shadow 280ms ease;
}

.vault-door-ring-hotspot:hover {
  box-shadow: 0 0 70px rgba(214, 164, 86, 0.28), inset 0 0 42px rgba(214, 164, 86, 0.16);
}

/* ==========================================================================
   3. 左下角微缩星象仪（零顶部导航栏）
   ========================================================================== */
.spatial-compass-pod {
  position: fixed;
  left: 18px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.compass-orbit-menu {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: min(92vw, 420px);
  padding: 8px;
  border-radius: 16px;
  background: rgba(7, 10, 18, 0.88);
  border: 1px solid var(--glass-line-gold);
  backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transform: translate3d(0, 8px, 0) scale(0.95);
  transform-origin: bottom left;
  transition: opacity 170ms ease, transform 200ms var(--ease-out-expo);
}

.spatial-compass-pod.is-open .compass-orbit-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
}

.zone-jump-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  color: var(--ink-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid transparent;
}

.zone-jump-chip:hover,
.zone-jump-chip.is-here {
  color: #ffffff;
  background: rgba(235, 208, 141, 0.22);
  border-color: var(--glass-line-gold);
}

.compass-seed-pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--glass-hud);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px);
  font-size: 0.75rem;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.compass-seed-pill:hover {
  border-color: var(--gold-warm);
  color: #ffffff;
}

.compass-ping {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold-warm);
  box-shadow: 0 0 8px var(--gold-warm);
}

/* ==========================================================================
   4. 沉浸弹出层（羊皮瓶信 / 藏书 / 窗台 Now / 信箱 / 叩门拜帖）
   ========================================================================== */
.world-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(3, 5, 10, 0.74);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out-quart);
  user-select: text;
}

.world-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.parchment-sheet {
  width: 100%;
  max-width: 580px;
  max-height: 84dvh;
  overflow-y: auto;
  border-radius: 18px;
  padding: 32px 34px;
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 255, 255, 0.45), transparent 60%),
    linear-gradient(165deg, #f8f1e1 0%, #eadbc0 100%);
  color: #211c17;
  border: 1px solid #d4b88c;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.85);
  transform: translate3d(0, 20px, 0) scale(0.95);
  transition: transform 260ms var(--ease-out-expo);
}

.world-overlay.is-open .parchment-sheet {
  transform: translate3d(0, 0, 0) scale(1);
}

.parchment-sheet h3 {
  font-family: var(--font-serif);
  font-size: 1.48rem;
  margin: 10px 0 16px;
  color: #14110e;
}

.parchment-sheet p {
  font-size: 0.95rem;
  line-height: 1.85;
  color: #3d352c;
  margin: 0 0 14px;
}

.dark-modal-card {
  width: 100%;
  max-width: 620px;
  max-height: 86dvh;
  overflow-y: auto;
  border-radius: 24px;
  padding: 26px 28px;
  background: #101420;
  border: 1px solid var(--glass-line-gold);
  color: var(--ink-bright);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.88);
  transform: translate3d(0, 18px, 0) scale(0.96);
  transition: transform 240ms var(--ease-out-expo);
}

.world-overlay.is-open .dark-modal-card {
  transform: translate3d(0, 0, 0) scale(1);
}

.modal-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(120, 120, 128, 0.22);
  display: grid;
  place-items: center;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 13px;
}

.form-field label {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #f8fafc;
  font: inherit;
  font-size: 0.9rem;
}

.form-select option { background: #101420; color: #f8fafc; }
.form-textarea { min-height: 86px; resize: vertical; }

.cta-gold-btn {
  padding: 10px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ebd08d 0%, #c8913b 100%);
  color: #141008;
  font-size: 0.84rem;
  font-weight: 700;
}

.secondary-pill-btn {
  padding: 9px 15px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  color: var(--ink-bright);
}

/* ==========================================================================
   5. 手机竖屏原生全屏自适应重排（彻底告别 208px 邮票！）
   ========================================================================== */
@media (max-width: 768px) {
  .edge-portal.top {
    top: max(14px, env(safe-area-inset-top));
  }

  .editorial-overlay {
    top: max(66px, calc(env(safe-area-inset-top) + 54px));
    left: 20px;
    right: 20px;
    max-width: none;
  }

  .edge-portal.left,
  .edge-portal.right {
    top: auto;
    bottom: max(70px, calc(env(safe-area-inset-bottom) + 56px));
    transform: none;
  }
  .edge-portal.left { left: 14px; }
  .edge-portal.right { right: 14px; }

  .cinema-subtitle-bar {
    bottom: max(122px, calc(env(safe-area-inset-bottom) + 108px));
    font-size: 0.75rem;
    padding: 6px 14px;
  }

  /* 手机端木匠台三件实物重排为清晰好点的上下排布，零挤压、零遮挡底部按钮 */
  .workbench-tabletop {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 14px;
    padding: 0 16px 168px;
  }

  .prop-valve-rig,
  .prop-chess-rig,
  .prop-plate-rig {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
  }

  /* 手机端书房三个手办移至画面中下宽敞区域方便单手点击 */
  .desk-figurines-stage {
    left: 8%;
    top: 46%;
    width: 84%;
    height: 22%;
  }

  .parchment-sheet,
  .dark-modal-card {
    padding: 22px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
  .realm-screen {
    transform: none !important;
    transition: opacity 150ms linear !important;
  }
}
