:root {
  --bg-deep: #091024;
  --bg-indigo: #121d3b;
  --gold: #f0c768;
  --gold-bright: #ffe399;
  --gold-dim: #b88736;
  --paper-top: #f7f0e0;
  --paper-bot: #e8dac0;
  --ink-navy: #1b2746;
  --ink-muted: #525d75;
  --font-display: "ZCOOL XiaoWei", "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "Songti SC", "Cormorant Garamond", Georgia, serif;
  --font-serif: "LXGW WenKai Screen", "Kaiti SC", "STKaiti", "Songti SC", "STSong", "Noto Serif SC", "Cormorant Garamond", Georgia, serif;
  --font-en: "Cormorant Garamond", Georgia, serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg-deep);
  color: #f4efe4;
  font-family: var(--font-serif);
  -webkit-font-smoothing: antialiased;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

#webgl-container {
  position: fixed;
  inset: 0;
  z-index: 1;
}

#webgl-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.starry-vignette {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(circle at 55% 50%, rgba(10, 17, 38, 0) 45%, rgba(5, 9, 22, 0.68) 100%);
}

button {
  font-family: var(--font-serif);
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.25s ease, background 0.25s ease;
}

button:active {
  transform: scale(0.97);
}

kbd {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 0.75em;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, sans-serif;
  border-radius: 4px;
  border: 1px solid rgba(240, 199, 104, 0.4);
  background: rgba(12, 20, 42, 0.55);
  color: var(--gold-bright);
}

.hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

/* Global Sound Button */
#btn-global-sound {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 40;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(14, 23, 48, 0.72);
  border: 1px solid rgba(240, 199, 104, 0.35);
  color: var(--gold-bright);
  font-size: 13px;
  letter-spacing: 0.08em;
  backdrop-filter: blur(8px);
}

#btn-global-sound:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(240, 199, 104, 0.3);
}

/* Screens */
.screen {
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.65s ease, visibility 0.65s ease, transform 0.65s ease;
  transform: translateY(8px);
}

.screen.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ==================== SCREEN 1: TITLE ==================== */
.title-composition {
  position: absolute;
  left: 8vw;
  top: 50%;
  transform: translateY(-54%);
  max-width: 470px;
  pointer-events: auto;
}

.title-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--gold);
  margin-bottom: 16px;
  opacity: 0.92;
}

.title-heading {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.6vw, 62px);
  font-weight: 400;
  letter-spacing: 0.14em;
  color: #fdf6e6;
  text-shadow: 0 4px 28px rgba(8, 13, 30, 0.85), 0 0 26px rgba(240, 199, 104, 0.24);
  line-height: 1.24;
}

.title-ornament {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  color: var(--gold);
}

.ornament-line {
  width: 68px;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 199, 104, 0.7), rgba(240, 199, 104, 0.05));
}

.title-poem {
  font-size: 16.5px;
  line-height: 1.95;
  letter-spacing: 0.08em;
  color: rgba(244, 238, 224, 0.86);
  text-shadow: 0 2px 14px rgba(5, 9, 22, 0.9);
}

.title-bottom-cta {
  position: absolute;
  left: 50%;
  bottom: 7vh;
  transform: translateX(-50%);
  pointer-events: auto;
}

#btn-start-journey {
  padding: 12px 34px;
  font-size: 18px;
  letter-spacing: 0.26em;
  color: var(--gold-bright);
  border-radius: 999px;
  border: 1px solid rgba(240, 199, 104, 0.45);
  background: radial-gradient(circle, rgba(28, 42, 82, 0.65), rgba(11, 18, 40, 0.78));
  box-shadow: 0 0 28px rgba(240, 199, 104, 0.2);
  animation: pulseGold 2.8s ease-in-out infinite;
}

#btn-start-journey:hover {
  background: rgba(42, 60, 108, 0.8);
  box-shadow: 0 0 36px rgba(240, 199, 104, 0.45);
  transform: translateY(-2px);
}

@keyframes pulseGold {
  0%, 100% { opacity: 0.82; box-shadow: 0 0 20px rgba(240, 199, 104, 0.16); }
  50% { opacity: 1; box-shadow: 0 0 34px rgba(240, 199, 104, 0.38); }
}

/* ==================== SCREEN 2: PARCHMENT SCROLL ==================== */
#screen-map {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px 28px;
}

.parchment-scroll {
  position: relative;
  width: min(980px, 92vw);
  max-height: calc(100vh - 44px);
  padding: 26px 44px 24px;
  color: var(--ink-navy);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.parchment-paper-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 252, 242, 0.9), transparent 55%),
    radial-gradient(circle at 80% 78%, rgba(225, 206, 172, 0.75), transparent 55%),
    linear-gradient(180deg, var(--paper-top) 0%, #f1e6cf 55%, var(--paper-bot) 100%);
  border-radius: 12px;
  filter: url(#torn-paper);
  box-shadow:
    0 22px 60px rgba(3, 7, 20, 0.78),
    inset 0 0 42px rgba(166, 132, 82, 0.36),
    inset 0 0 8px rgba(128, 94, 48, 0.35);
}

.parchment-watercolor {
  position: absolute;
  inset: 10px;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.wc-cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(22px);
  background: rgba(124, 162, 212, 0.22);
}
.wc-cloud-1 { width: 240px; height: 120px; top: 18%; left: 4%; }
.wc-cloud-2 { width: 260px; height: 130px; top: 14%; right: 6%; }
.wc-cloud-3 { width: 220px; height: 110px; bottom: 16%; left: 10%; }
.wc-cloud-4 { width: 250px; height: 115px; bottom: 14%; right: 8%; }

.parchment-stars .p-star {
  position: absolute;
  color: #c9973c;
  font-size: 18px;
  opacity: 0.75;
  pointer-events: none;
}
.p-star-tl { top: 24px; left: 36px; font-size: 22px; }
.p-star-tr { top: 28px; right: 40px; font-size: 20px; }
.p-star-ml { top: 48%; left: 24px; }
.p-star-mr { top: 44%; right: 26px; }
.p-star-bl { bottom: 26px; left: 44px; }
.p-star-br { bottom: 24px; right: 42px; font-size: 21px; }

.scroll-header {
  text-align: center;
  margin-bottom: 6px;
}

.scroll-latin {
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: #8c7b62;
  margin-bottom: 4px;
}

.scroll-heading {
  font-size: clamp(24px, 2.5vw, 32px);
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--ink-navy);
}

.scroll-subtitle {
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--ink-muted);
  margin-top: 3px;
}

.scroll-constellation-stage {
  position: relative;
  width: 100%;
  margin: 4px 0;
}

.constellation-trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.trail-glow {
  fill: none;
  stroke: rgba(212, 162, 76, 0.22);
  stroke-width: 6;
}

.trail-dashed {
  fill: none;
  stroke: rgba(92, 108, 138, 0.48);
  stroke-width: 1.8;
  stroke-dasharray: 3 8;
  stroke-linecap: round;
}

.trail-star-dot {
  fill: #c9973c;
}

#scroll-planet-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 18px;
  justify-items: center;
  align-items: center;
}

.planet-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 4px 10px;
  transition: transform 0.28s ease;
}

.planet-node:hover {
  transform: translateY(-5px);
}

.planet-visual {
  position: relative;
  width: clamp(112px, 13.5vh, 142px);
  height: clamp(112px, 13.5vh, 142px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.planet-thumb {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(34, 42, 68, 0.22));
}

.planet-ring {
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 1.8px solid #c9963b;
  box-shadow: 0 0 18px rgba(212, 162, 76, 0.45);
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: none;
}

.planet-ring::before {
  content: "✦";
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  color: #c9963b;
  font-size: 14px;
}

.planet-node.selected .planet-ring {
  opacity: 1;
  transform: scale(1.03);
}

.planet-stamp {
  position: absolute;
  right: -2px;
  bottom: 4px;
  padding: 1px 6px;
  font-size: 10px;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(250, 244, 228, 0.94);
  border: 1px solid rgba(184, 135, 54, 0.55);
  color: #7d5b20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.planet-node.completed .planet-stamp {
  background: linear-gradient(135deg, #f3c868, #d99b38);
  color: #1c243b;
  font-weight: 600;
}

.planet-node-label {
  margin-top: 2px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink-navy);
}

.scroll-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0;
  color: #c5953e;
  font-size: 12px;
}

.divider-wing {
  width: 90px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 135, 54, 0.55), transparent);
}

.scroll-footer {
  text-align: center;
  max-width: 680px;
}

#map-chapter {
  font-size: 11.5px;
  letter-spacing: 0.24em;
  color: #7c6b52;
}

#map-title {
  font-size: clamp(18px, 2vw, 22px);
  color: var(--ink-navy);
  letter-spacing: 0.1em;
  margin: 3px 0 6px;
}

#map-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.stat-pill {
  font-size: 11.5px;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(30, 46, 82, 0.08);
  border: 1px solid rgba(30, 46, 82, 0.16);
  color: #2c3b5e;
}

#map-quote {
  font-size: 13.5px;
  line-height: 1.65;
  color: #364363;
  margin-bottom: 10px;
}

#btn-enter-planet {
  padding: 8px 28px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink-navy);
  border-radius: 999px;
  background: linear-gradient(135deg, #f5d27a, #dda448);
  box-shadow: 0 4px 16px rgba(184, 130, 42, 0.38);
}

#btn-enter-planet:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(184, 130, 42, 0.55);
}

#btn-back-title {
  position: fixed;
  left: 24px;
  bottom: 20px;
  pointer-events: auto;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: rgba(244, 238, 224, 0.8);
  border: 1px solid rgba(244, 238, 224, 0.25);
  background: rgba(10, 17, 38, 0.65);
}

/* ==================== SCREEN 3: EXPLORATION HUD ==================== */
.hud-top-left {
  position: fixed;
  top: 18px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

#btn-back-map,
.hud-planet-info,
.hud-tools button,
.wp-pill {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(12, 20, 44, 0.72);
  border: 1px solid rgba(240, 199, 104, 0.32);
  backdrop-filter: blur(8px);
  font-size: 13px;
  color: #f6f0e2;
}

#btn-back-map:hover,
.hud-tools button:hover,
.wp-pill:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(240, 199, 104, 0.28);
}

.hud-planet-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

#hud-planet-name {
  color: var(--gold-bright);
  font-weight: 600;
}

.hud-sep {
  opacity: 0.45;
}

.hud-top-right {
  position: fixed;
  top: 18px;
  right: 112px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: auto;
}

#hud-waypoints {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.wp-pill {
  padding: 5px 11px;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.wp-pill.discovered {
  background: rgba(58, 46, 20, 0.82);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.wp-pill.guiding {
  box-shadow: 0 0 16px rgba(255, 218, 120, 0.65);
  border-color: #fff0b8;
}

.hud-tools {
  display: flex;
  gap: 8px;
}

.hud-bottom-center {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  pointer-events: none;
}

#prompt-interact {
  pointer-events: auto;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: #19233c;
  font-weight: 600;
  background: linear-gradient(135deg, #ffe59e, #eab657);
  box-shadow: 0 6px 26px rgba(240, 199, 104, 0.52);
  animation: pulseGold 2s ease-in-out infinite;
}

#hud-controls-hint {
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(244, 238, 224, 0.78);
  background: rgba(9, 15, 34, 0.58);
  border: 1px solid rgba(240, 199, 104, 0.18);
}

/* Completion Banner */
#banner-complete {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(32, 44, 82, 0.92), rgba(18, 27, 56, 0.95));
  border: 1.5px solid var(--gold);
  color: var(--gold-bright);
  font-size: 15px;
  letter-spacing: 0.14em;
  box-shadow: 0 8px 32px rgba(240, 199, 104, 0.42);
  transition: opacity 0.4s ease;
}

/* Journal Postcard Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 11, 26, 0.68);
  backdrop-filter: blur(6px);
  pointer-events: auto;
  transition: opacity 0.35s ease;
}

#hud-bgm {
  color: rgba(255, 232, 170, 0.85);
  font-size: 12px;
}

#hud-terrain-tag {
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(34, 48, 86, 0.82);
  border: 1px solid rgba(255, 218, 128, 0.45);
  color: #ffe8a3;
  font-size: 12px;
  letter-spacing: 0.05em;
  backdrop-filter: blur(8px);
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* Polaroid Photo Postcard Styles */
.journal-postcard {
  position: relative;
  width: min(540px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 32px 24px;
  color: var(--ink-navy);
  text-align: center;
}

.polaroid-frame {
  margin: 12px auto 14px;
  padding: 9px 9px 10px;
  background: #fdfbf6;
  border-radius: 4px;
  box-shadow: 0 8px 22px rgba(25, 32, 52, 0.2), 0 1px 3px rgba(0, 0, 0, 0.12);
  max-width: 420px;
  transform: rotate(-0.8deg);
  transition: transform 0.25s ease;
  cursor: zoom-in;
}

.polaroid-frame:hover {
  transform: rotate(0deg) scale(1.015);
}

.scroll-tbc-row {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.tbc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(94, 118, 158, 0.12);
  border: 1px dashed rgba(92, 108, 138, 0.45);
  color: #4a5978;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.tbc-badge:hover,
.tbc-badge.selected {
  background: rgba(212, 162, 76, 0.22);
  border-color: #b88736;
  color: var(--ink-navy);
}

.tbc-dot {
  font-size: 14px;
  color: #8c7248;
}

.polaroid-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 2px;
  background: #1c253d;
}

.polaroid-media.loading::after {
  content: "✦ 显影中…";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  letter-spacing: 0.14em;
  color: rgba(240, 199, 104, 0.82);
  background: #182138;
}

#journal-photo,
#journal-art-canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.2s ease;
}

#journal-caption {
  margin-top: 7px;
  font-size: 12px;
  color: #5b4d38;
  letter-spacing: 0.05em;
}

#photo-lightbox {
  z-index: 50;
  cursor: zoom-out;
  padding: 20px;
  background: rgba(5, 9, 22, 0.92);
}

#lightbox-img {
  max-width: 94vw;
  max-height: 90vh;
  border-radius: 6px;
  border: 6px solid #fdfbf6;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.85);
  object-fit: contain;
}

.postcard-paper-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, #f9f2e3 0%, #eadbc0 100%);
  border-radius: 10px;
  filter: url(#torn-postcard);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65), inset 0 0 32px rgba(168, 130, 74, 0.32);
}

.postcard-stamp-mark {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 58px;
  height: 68px;
  padding: 5px;
  background: radial-gradient(circle at 0 0, transparent 3px, #fffaf0 3.5px) 0 0 / 10px 10px;
  box-shadow: 0 3px 10px rgba(60, 40, 14, 0.16);
  transform: rotate(5deg);
  z-index: 3;
}
.stamp-inner-art {
  width: 100%;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(180deg, #162447 0%, #2c4370 62%, #d8a95b 100%);
  border: 1px solid rgba(212, 168, 86, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 5px 2px 4px;
  position: relative;
  overflow: hidden;
}
.stamp-star {
  color: #fde49b;
  font-size: 11px;
  line-height: 1;
}
.stamp-peaks {
  width: 100%;
  height: 18px;
  background: linear-gradient(135deg, transparent 42%, #e9eef8 43%) -6px 4px / 22px 18px no-repeat,
    linear-gradient(225deg, transparent 42%, #cbd7ec 43%) 10px 4px / 22px 18px no-repeat;
}
.stamp-word {
  font-size: 8px;
  letter-spacing: 0.08em;
  color: #fff6de;
  font-weight: 600;
}
.stamp-cancel-seal {
  position: absolute;
  left: -24px;
  bottom: -16px;
  width: 56px;
  height: 56px;
  color: rgba(182, 38, 30, 0.82);
  transform: rotate(-16deg);
  pointer-events: none;
}

#journal-chapter {
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #826e50;
}

#journal-title {
  font-size: 24px;
  margin: 8px 0 4px;
  letter-spacing: 0.1em;
  color: var(--ink-navy);
}

#journal-elevation {
  font-size: 13px;
  color: #6b5a42;
}

.journal-star-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 16px 0;
  color: #c59238;
}

.journal-star-divider span {
  width: 70px;
  height: 1px;
  background: rgba(184, 135, 54, 0.45);
}

.journal-text-card {
  position: relative;
  margin: 4px auto 14px;
  padding: 12px 16px 14px;
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.58);
  border: 1px dashed rgba(168, 126, 62, 0.42);
  cursor: pointer;
  transition: background 0.22s ease, transform 0.2s ease, box-shadow 0.22s ease;
}

.journal-text-card:hover {
  background: rgba(255, 253, 247, 0.85);
  box-shadow: 0 4px 14px rgba(140, 102, 42, 0.14);
}

.journal-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 11.5px;
  color: #8a6934;
  letter-spacing: 0.06em;
}

#journal-page-badge {
  font-weight: 600;
  color: #7c5822;
}

#journal-flip-hint {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(212, 162, 76, 0.2);
  color: #6e4e1c;
}

#journal-poem {
  font-size: 15px;
  line-height: 1.88;
  letter-spacing: 0.05em;
  color: #273454;
  margin-bottom: 0;
  text-align: left;
  transition: opacity 0.18s ease;
}

#journal-progress {
  font-size: 12.5px;
  color: #7c6748;
  margin-bottom: 18px;
}

#btn-close-journal {
  padding: 9px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4cf76, #dc9f42);
  color: var(--ink-navy);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  box-shadow: 0 4px 16px rgba(184, 130, 42, 0.36);
}

/* Photo Mode */
body.photo-mode .hud-top-left,
body.photo-mode .hud-top-right,
body.photo-mode .hud-bottom-center,
body.photo-mode #hud-side-dock,
body.photo-mode #mobile-joystick,
body.photo-mode #wonder-toast,
body.photo-mode #campfire-mixer,
body.photo-mode #banner-complete,
body.photo-mode #btn-global-sound {
  opacity: 0;
  pointer-events: none;
}

body:has(#campfire-mixer:not(.hidden)) #mobile-joystick {
  opacity: 0;
  pointer-events: none;
}

/* 手机触屏左下角半透明「星芒微摇杆」（桌面鼠标默认隐藏，触屏/小屏显示） */
#mobile-joystick {
  display: none;
  position: fixed;
  left: 16px;
  bottom: 24px;
  z-index: 23;
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.joy-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 26, 56, 0.48), rgba(10, 17, 38, 0.22));
  border: 1px solid rgba(240, 199, 104, 0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s ease, background 0.2s ease;
}
#mobile-joystick.active .joy-ring {
  border-color: rgba(244, 207, 118, 0.78);
  background: radial-gradient(circle, rgba(24, 38, 76, 0.62), rgba(12, 20, 44, 0.35));
}
.joy-knob {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(240, 199, 104, 0.32);
  border: 1px solid rgba(255, 236, 178, 0.72);
  color: #fff4d2;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

@media (pointer: coarse), (max-width: 820px) {
  #mobile-joystick {
    display: block;
  }
}

/* ==================== V3.2 奇遇与星旅新功能样式 ==================== */
#hud-side-dock {
  position: fixed;
  left: 22px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 25;
  pointer-events: auto;
}

.dock-btn {
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(11, 19, 43, 0.72);
  border: 1px solid rgba(240, 199, 104, 0.35);
  color: #f6e7c4;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.dock-btn:hover,
.dock-btn.active {
  background: rgba(240, 199, 104, 0.24);
  border-color: var(--gold-bright);
  color: #fff6da;
  transform: translateX(2px);
}

#wonder-toast {
  position: fixed;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(12, 22, 48, 0.84);
  border: 1px solid rgba(244, 207, 118, 0.55);
  color: #fde9b2;
  font-size: 13.5px;
  letter-spacing: 0.06em;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  z-index: 26;
  pointer-events: none;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

#campfire-mixer {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: min(440px, 92vw);
  padding: 13px 18px 14px;
  border-radius: 16px;
  background: rgba(14, 22, 46, 0.86);
  border: 1px solid rgba(245, 178, 92, 0.48);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  color: #f8ebd0;
  z-index: 28;
  pointer-events: auto;
}
.campfire-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: #fbd38d;
  margin-bottom: 10px;
}
#btn-exit-campfire {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fde9b2;
  font-size: 11.5px;
}
.campfire-story-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(251, 146, 60, 0.11);
  border-left: 3px solid rgba(251, 191, 36, 0.72);
}
.campfire-story-text {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: #fef3c7;
  flex: 1;
}
.camp-story-next-btn {
  white-space: nowrap;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(254, 243, 199, 0.14);
  color: #fde68a;
  border: 1px solid rgba(253, 224, 71, 0.28);
}
.campfire-sliders {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.campfire-sliders label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  color: #e2d4b7;
}
.campfire-sliders input[type="range"] {
  width: 100%;
  accent-color: #f4b860;
}

.journal-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}
#btn-journal-ticket,
#btn-save-bookmark {
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}
#btn-journal-ticket {
  background: rgba(188, 48, 38, 0.14);
  border: 1px solid rgba(188, 48, 38, 0.52);
  color: #8f231c;
}
#btn-save-bookmark {
  background: rgba(186, 134, 48, 0.18);
  border: 1px solid rgba(168, 118, 38, 0.52);
  color: #6b4714;
}

body:has(#campfire-mixer:not(.hidden)) #hud-controls-hint {
  opacity: 0;
  pointer-events: none;
}
.mani-card {
  width: min(440px, 92vw);
  max-height: 84vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  border-radius: 18px;
  background: linear-gradient(165deg, #f7eed8, #ead9b7);
  color: #2c2013;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 168, 86, 0.6);
  pointer-events: auto;
  text-align: center;
}
.mani-eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #8c652b;
  margin-bottom: 4px;
}
#mani-title {
  font-size: 21px;
  color: #2b1d0e;
  margin-bottom: 4px;
}
.mani-sub {
  font-size: 12.5px;
  color: #6f5535;
  margin-bottom: 14px;
}
.mani-notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 210px;
  overflow-y: auto;
  margin-bottom: 14px;
  text-align: left;
}
.mani-note-item {
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 252, 245, 0.74);
  border: 1px solid rgba(176, 134, 68, 0.28);
  font-size: 13px;
  color: #352718;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mani-note-author {
  color: #8c6327;
  font-size: 11.5px;
  white-space: nowrap;
}
.mani-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.mani-form input {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(154, 114, 52, 0.45);
  background: rgba(255, 253, 248, 0.9);
  font-size: 13.5px;
  color: #2b1e10;
}
.mani-form button {
  padding: 9px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4cf76, #d99b3c);
  color: #1c160c;
  font-weight: 600;
  font-size: 14px;
}
.mani-close-btn {
  font-size: 12.5px;
  color: #745938;
  padding: 4px 12px;
}

/* 登顶纪念票根 / 故事书签弹窗（手机竖屏紧凑单列 · 电脑横屏宽幅双栏典藏展台） */
.ticket-modal-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 92vw;
  pointer-events: auto;
}
.ticket-preview-stage {
  display: flex;
  align-items: center;
  justify-content: center;
}
#ticket-preview-img {
  max-height: 66vh;
  max-width: 88vw;
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.65);
  cursor: zoom-in;
  transition: transform 0.22s ease;
}
.ticket-controls-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ticket-desktop-header,
.ticket-modal-hint .hint-desktop {
  display: none;
}
.ticket-sign-row {
  display: flex;
  gap: 8px;
  width: min(360px, 88vw);
}
#ticket-traveler-input {
  flex: 1;
  min-width: 0;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(240, 199, 104, 0.45);
  background: rgba(12, 20, 44, 0.82);
  color: #fff5d8;
  font-size: 12.5px;
  outline: none;
}
#ticket-traveler-input::placeholder {
  color: rgba(235, 217, 178, 0.58);
}
#btn-apply-signature {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(240, 199, 104, 0.22);
  border: 1px solid rgba(240, 199, 104, 0.58);
  color: #fde6a2;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.bestiary-guide-btn {
  margin-top: 3px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(214, 158, 62, 0.22);
  border: 1px solid rgba(176, 124, 42, 0.45);
  color: #6b4816;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.bestiary-guide-btn:hover {
  background: rgba(214, 158, 62, 0.38);
}
.ticket-modal-hint {
  font-size: 12.5px;
  color: #f6dfa4;
  text-align: center;
}
.ticket-modal-btns {
  display: flex;
  gap: 12px;
}
#btn-download-ticket,
#btn-close-ticket {
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}
#btn-download-ticket {
  background: linear-gradient(135deg, #f4cf76, #dc9f42);
  color: #131b33;
  font-weight: 600;
}
#btn-close-ticket {
  background: rgba(255, 255, 255, 0.14);
  color: #f8ebd0;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

@media (min-width: 860px) and (min-height: 540px) {
  .ticket-modal-box {
    flex-direction: row;
    align-items: center;
    gap: 36px;
    padding: 26px 36px;
    max-width: min(1100px, 94vw);
    background: linear-gradient(145deg, rgba(13, 22, 48, 0.92), rgba(8, 14, 32, 0.94));
    border: 1px solid rgba(240, 199, 104, 0.34);
    border-radius: 22px;
    box-shadow: 0 28px 76px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 234, 178, 0.14);
    backdrop-filter: blur(16px);
  }
  #ticket-preview-img {
    max-height: 82vh;
    max-width: 52vw;
    object-fit: contain;
  }
  #ticket-preview-img:hover {
    transform: scale(1.012);
  }
  .ticket-controls-col {
    width: 316px;
    align-items: stretch;
    gap: 16px;
  }
  .ticket-desktop-header {
    display: block;
    border-bottom: 1px solid rgba(240, 199, 104, 0.2);
    padding-bottom: 14px;
  }
  #ticket-modal-title {
    margin: 6px 0 6px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 25px;
    letter-spacing: 0.08em;
    color: #f8e6b5;
  }
  #ticket-modal-sub {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: rgba(238, 221, 184, 0.72);
  }
  .ticket-sign-row {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  #ticket-traveler-input {
    padding: 10px 14px;
    font-size: 13.5px;
  }
  #btn-apply-signature {
    padding: 9px 16px;
    font-size: 13px;
    cursor: pointer;
  }
  .ticket-modal-hint {
    text-align: left;
    line-height: 1.55;
    color: rgba(246, 223, 164, 0.85);
  }
  .ticket-modal-hint .hint-mobile {
    display: none;
  }
  .ticket-modal-hint .hint-desktop {
    display: inline;
  }
  .ticket-modal-btns {
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
  }
  #btn-download-ticket,
  #btn-close-ticket {
    text-align: center;
    padding: 11px 18px;
    font-size: 14px;
  }
}

#photo-mode-bar {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: flex;
  gap: 10px;
  z-index: 30;
  pointer-events: auto;
}
#btn-snap-wallpaper {
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4cf76, #dc9f42);
  color: #121a30;
  font-weight: 600;
  font-size: 12.5px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
#photo-exit-hint {
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(12, 20, 44, 0.78);
  border: 1px solid rgba(240, 199, 104, 0.45);
  color: var(--gold-bright);
  font-size: 12.5px;
}

/* 星图顶部总印记与生灵图集徽章栏 */
.scroll-progress-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.scroll-meta-pill {
  padding: 3px 11px;
  border-radius: 999px;
  background: rgba(168, 124, 54, 0.14);
  border: 1px solid rgba(152, 108, 42, 0.36);
  color: #5b401b;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.scroll-meta-pill.clickable {
  cursor: pointer;
  font-weight: 600;
  background: rgba(212, 160, 68, 0.22);
}
.scroll-meta-pill.clickable:hover {
  background: rgba(212, 160, 68, 0.36);
}
.scroll-meta-pill.finale-pill {
  cursor: pointer;
  background: linear-gradient(135deg, #2b1d0e, #4a3216);
  border-color: #d9a441;
  color: #fde6a2;
  font-weight: 600;
}

/* 山野小生灵 6 宫格水彩图集弹窗 */
.bestiary-book {
  width: min(680px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 24px 22px 20px;
  border-radius: 20px;
  background: linear-gradient(165deg, #f8efe0, #ead8b5);
  color: #2c1f11;
  border: 1px solid rgba(206, 160, 78, 0.65);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  text-align: center;
  pointer-events: auto;
}
#bestiary-title {
  font-size: 22px;
  color: #291b0d;
  margin-bottom: 4px;
}
.bestiary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 12px 0 16px;
}
.bestiary-card {
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255, 252, 245, 0.78);
  border: 1px solid rgba(176, 134, 68, 0.32);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.bestiary-card.locked {
  background: rgba(34, 42, 66, 0.08);
  border-style: dashed;
}
.bestiary-card canvas {
  width: 86px;
  height: 86px;
}
.bestiary-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #2d1f10;
}
.bestiary-planet {
  font-size: 11.5px;
  color: #84602c;
}
.bestiary-note {
  font-size: 11.5px;
  line-height: 1.5;
  color: #4f3b22;
}
.bestiary-close {
  padding: 8px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4cf76, #d99b3c);
  color: #1c150b;
  font-weight: 600;
}

/* 跨星球 1.15s 小王子流光星轨飞行穿梭隧道 */
#warp-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  overflow: hidden;
  background: radial-gradient(circle at 50% 50%, rgba(254, 240, 180, 0.42) 0%, rgba(30, 27, 75, 0.88) 44%, rgba(6, 10, 26, 0.98) 82%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.36s ease;
}
#warp-veil.active {
  opacity: 1;
}
.warp-streaks {
  width: 190px;
  height: 190px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 226, 138, 0.78);
  box-shadow: 0 0 76px rgba(249, 168, 212, 0.48), inset 0 0 42px rgba(253, 224, 71, 0.42);
  animation: warpSpin 1.15s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.warp-tunnel-rings,
.warp-tunnel-rings::before,
.warp-tunnel-rings::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 340px;
  height: 340px;
  margin: -170px 0 0 -170px;
  border-radius: 50%;
  border: 1.5px solid rgba(253, 230, 138, 0.45);
  box-shadow: 0 0 40px rgba(244, 114, 182, 0.32);
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 244, 196, 0.22) 0deg 1.6deg,
    transparent 1.6deg 15deg
  );
  animation: warpTunnelZoom 1.15s ease-in infinite;
}
.warp-tunnel-rings::before {
  animation-delay: -0.38s;
}
.warp-tunnel-rings::after {
  animation-delay: -0.76s;
}
#warp-label {
  position: relative;
  z-index: 2;
  margin-top: 22px;
  padding: 6px 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  border: 1px solid rgba(253, 224, 71, 0.42);
  color: #fff5d6;
  font-size: 15px;
  letter-spacing: 0.16em;
  text-shadow: 0 2px 12px rgba(251, 191, 36, 0.65);
}
@keyframes warpSpin {
  from { transform: scale(0.55) rotate(0deg); }
  to { transform: scale(1.38) rotate(200deg); }
}
@keyframes warpTunnelZoom {
  0% { transform: scale(0.18) rotate(0deg); opacity: 0; }
  30% { opacity: 0.92; }
  100% { transform: scale(4.2) rotate(42deg); opacity: 0; }
}

/* 全星系 24 处明信片印记总图集弹窗 */
.atlas-book {
  width: min(780px, 95vw);
}
.atlas-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 12px;
}
.atlas-tab {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(168, 124, 54, 0.14);
  border: 1px solid rgba(154, 110, 42, 0.34);
  color: #5f431d;
  font-size: 12px;
  cursor: pointer;
}
.atlas-tab.active {
  background: linear-gradient(135deg, #2d1f10, #4d351a);
  color: #fde8ab;
  border-color: #c89438;
  font-weight: 600;
}
.atlas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 11px;
  margin: 8px 0 16px;
}
.atlas-card {
  padding: 8px;
  border-radius: 12px;
  background: #fffdf8;
  border: 1px solid rgba(176, 134, 68, 0.32);
  box-shadow: 0 4px 12px rgba(45, 30, 12, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}
.atlas-card.unlocked {
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.atlas-card.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(45, 30, 12, 0.16);
}
.atlas-card.locked {
  background: rgba(255, 251, 242, 0.62);
  border: 1px dashed rgba(176, 134, 68, 0.45);
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.atlas-card.locked:hover {
  transform: translateY(-2px);
  border-color: rgba(198, 146, 62, 0.78);
}
.atlas-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 7px;
  overflow: hidden;
  background: #172340;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f3d792;
  font-size: 20px;
}
.atlas-thumb-wrap.is-uncharted {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--orb-glow, #f0c768) 26%, transparent), transparent 68%),
    linear-gradient(160deg, #101b36 0%, #1b2c52 55%, #121e3b 100%);
  box-shadow: inset 0 0 0 1px rgba(240, 199, 104, 0.26);
  flex-direction: column;
  padding-bottom: 12px;
}
.uncharted-emblem {
  width: 82%;
  height: 82%;
  color: #f2d388;
  filter: drop-shadow(0 0 6px rgba(242, 211, 136, 0.32));
  transition: transform 0.35s ease, color 0.25s ease;
}
.atlas-card.locked:hover .uncharted-emblem {
  transform: scale(1.06);
  color: #ffe7a4;
}
.atlas-card.locked:hover .emblem-orbit {
  transform-origin: 60px 43px;
  transform: rotate(24deg);
  transition: transform 0.6s ease;
}
.uncharted-tag {
  position: absolute;
  bottom: 5px;
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: rgba(245, 217, 142, 0.78);
}
.atlas-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.atlas-card-title {
  font-size: 13px;
  font-weight: 700;
  color: #2d1f10;
  line-height: 1.3;
}
.atlas-card-meta {
  font-size: 11px;
  color: #7d5d32;
}

/* 24/24 全星系大满贯隐藏终章手札 */
.finale-letter {
  width: min(520px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px 26px 24px;
  border-radius: 20px;
  background: linear-gradient(165deg, #0d1630, #162449);
  border: 1.5px solid rgba(240, 199, 104, 0.65);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.72);
  color: #f7ead0;
  text-align: center;
  pointer-events: auto;
}
.finale-eyebrow {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: #f0c768;
  margin-bottom: 6px;
}
#finale-title {
  font-size: 24px;
  color: #fff6dc;
  margin-bottom: 14px;
}
.finale-body {
  text-align: left;
  font-size: 14.5px;
  line-height: 1.85;
  color: #e9dac0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.finale-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
#btn-generate-passport {
  padding: 9px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f4cf76, #dc9f42);
  color: #11192e;
  font-weight: 700;
  font-size: 13.5px;
}
#btn-close-finale {
  padding: 9px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f5e6c8;
  font-size: 13px;
}

/* 屏蔽第三方免费托管平台自动注入的右下角悬浮水印徽章 */
#nl-badge-frame,
iframe[id*="nl-badge"],
iframe[src*="netlify"],
netlify-hud,
#netlify-badge,
.netlify-badge,
a[href*="netlify.com?utm_source"] {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* Mobile & Touch Screen Complete Anti-Overlap Layout */
@media (pointer: coarse) {
  #hud-controls-hint,
  kbd {
    display: none !important;
  }
}

@media (max-width: 820px) {
  #hud-controls-hint,
  .hud-hide-mobile,
  kbd {
    display: none !important;
  }

  #btn-global-sound {
    top: 12px;
    right: 12px;
    padding: 5px 11px;
    font-size: 12px;
  }

  /* 1. 手机竖屏扉页：标题居上半屏，3D星球居下半屏，互不遮挡 */
  .title-composition {
    position: absolute;
    left: 6vw;
    right: 6vw;
    top: 8vh;
    transform: none;
    max-width: none;
    text-align: center;
  }
  .title-eyebrow {
    justify-content: center;
    font-size: 11px;
    letter-spacing: 0.16em;
    margin-bottom: 10px;
  }
  .title-heading {
    font-size: clamp(28px, 7.8vw, 36px);
    letter-spacing: 0.1em;
  }
  .title-ornament {
    justify-content: center;
    margin: 12px 0;
  }
  .title-poem {
    font-size: 14px;
    line-height: 1.75;
  }
  .title-bottom-cta {
    bottom: 5vh;
    width: 100%;
    text-align: center;
  }
  #btn-start-journey {
    padding: 10px 26px;
    font-size: 15px;
    letter-spacing: 0.18em;
  }

  /* 2. 手机竖屏羊皮纸星图卷轴：零重叠流式滚动排版 */
  #screen-map {
    padding: 50px 10px 48px;
    align-items: stretch;
  }
  .parchment-scroll {
    width: 100%;
    max-height: 100%;
    padding: 16px 14px 18px;
    overflow-y: auto;
    justify-content: flex-start;
    gap: 8px;
  }
  .parchment-stars {
    display: none;
  }
  .scroll-latin {
    font-size: 9px;
    letter-spacing: 0.2em;
  }
  .scroll-heading {
    font-size: 21px;
    letter-spacing: 0.16em;
  }
  .scroll-subtitle {
    font-size: 11.5px;
  }
  .constellation-trail-svg {
    display: none;
  }
  #scroll-planet-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 6px;
    width: 100%;
  }
  .planet-node {
    padding: 2px;
  }
  .planet-visual {
    width: 78px;
    height: 78px;
  }
  .planet-stamp {
    font-size: 9px;
    padding: 0 5px;
  }
  .planet-node-label {
    font-size: 11.5px;
    letter-spacing: 0.02em;
    text-align: center;
    line-height: 1.25;
  }
  #map-title {
    font-size: 16px;
    line-height: 1.35;
  }
  .stat-pill {
    font-size: 10.5px;
    padding: 2px 8px;
  }
  #map-quote {
    font-size: 12.5px;
    line-height: 1.55;
    margin-bottom: 8px;
  }
  #btn-enter-planet {
    padding: 8px 24px;
    font-size: 14.5px;
  }
  #btn-back-title {
    left: 12px;
    bottom: 10px;
    padding: 4px 10px;
    font-size: 11.5px;
  }

  /* 3. 手机竖屏星球探索 HUD：三行清晰排布，完整展示海拔、步数与BGM */
  .hud-top-left {
    top: 10px;
    left: 10px;
    right: 10px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  #btn-back-map {
    padding: 5px 11px;
    font-size: 12px;
    white-space: nowrap;
  }
  .hud-planet-info {
    width: 100%;
    padding: 5px 11px;
    font-size: 11px;
    gap: 5px;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    justify-content: flex-start;
    line-height: 1.3;
  }
  .hud-planet-info::-webkit-scrollbar {
    display: none;
  }
  #hud-bgm {
    font-size: 11px;
  }
  #mobile-joystick {
    left: 12px;
    bottom: 18px;
  }
  .joy-ring {
    width: 68px;
    height: 68px;
  }
  .joy-knob {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }
  #hud-terrain-tag {
    position: fixed;
    top: auto;
    bottom: 66px;
    left: 92px;
    right: 12px;
    transform: none;
    padding: 5px 12px;
    font-size: 11px;
    z-index: 15;
    max-width: none;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .hud-top-right {
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: auto;
    pointer-events: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .hud-tools {
    order: 1;
    pointer-events: auto;
    align-self: flex-end;
    margin-right: 68px;
    gap: 5px;
  }
  .hud-tools button {
    padding: 5px 9px;
    font-size: 11px;
    white-space: nowrap;
  }
  #hud-waypoints {
    order: 2;
    pointer-events: auto;
    margin-top: 44px;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    gap: 5px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }
  #hud-waypoints::-webkit-scrollbar {
    display: none;
  }
  .wp-pill {
    padding: 4px 9px;
    font-size: 11px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .hud-bottom-center {
    bottom: 18px;
    left: 92px;
    right: 12px;
    width: auto;
    transform: none;
  }
  #prompt-interact {
    font-size: 12.5px;
    padding: 8px 14px;
    width: 100%;
    max-width: none;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  #banner-complete {
    top: 90px;
    width: 88vw;
    text-align: center;
    font-size: 12.5px;
    padding: 8px 14px;
  }

  /* 4. 手机竖屏明信片弹窗优化 */
  .journal-postcard {
    width: 92vw;
    max-height: 86vh;
    padding: 20px 18px 18px;
  }
  .postcard-stamp-mark {
    width: 40px;
    height: 46px;
    top: 14px;
    right: 14px;
    font-size: 8px;
  }
  #journal-title {
    font-size: 18px;
    padding-right: 32px;
  }
  #journal-poem {
    font-size: 13.5px;
    line-height: 1.72;
  }
  .journal-page-header {
    font-size: 10.5px;
  }
  #hud-side-dock {
    left: 10px;
    right: auto;
    top: 142px;
    transform: none;
    gap: 7px;
  }
  .dock-btn {
    padding: 6px 10px;
    font-size: 11px;
  }
  #wonder-toast {
    top: 106px;
    font-size: 12px;
    padding: 6px 14px;
  }
  .bestiary-grid,
  .atlas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  #photo-mode-bar {
    right: 12px;
    left: 12px;
    justify-content: center;
  }
}

/* 5. 手机意外横屏紧凑保护（防止高度不足 480px 时羊皮纸与弹窗纵向挤压） */
@media (max-height: 500px) and (orientation: landscape) {
  .parchment-scroll {
    max-height: 92vh;
    overflow-y: auto;
    padding: 14px 20px;
  }
  .scroll-constellation-stage {
    padding: 4px 0;
  }
  .planet-visual {
    width: 64px;
    height: 64px;
  }
  .journal-postcard,
  .bestiary-book,
  .mani-card,
  .finale-letter {
    max-height: 90vh;
    overflow-y: auto;
    padding: 14px 18px;
  }
  #ticket-preview-img {
    max-height: 56vh;
  }
  #hud-side-dock {
    top: 52%;
    transform: translateY(-50%);
    gap: 5px;
  }
  .dock-btn {
    padding: 4px 9px;
    font-size: 11px;
  }
}

/* ==================== DESKTOP LANDSCAPE HORIZONTAL POSTCARD SPREAD ==================== */
@media (min-width: 900px) and (min-height: 540px) {
  .journal-postcard {
    width: min(940px, 92vw);
    max-height: 88vh;
    padding: 32px 36px 28px;
  }

  .journal-postcard .postcard-content {
    display: grid;
    grid-template-columns: 1.06fr 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 32px;
    align-items: center;
    text-align: left;
  }

  .journal-postcard #journal-polaroid {
    grid-column: 1;
    grid-row: 1 / span 2;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 12px 12px 14px;
    transform: rotate(-1.2deg);
    text-align: center;
  }

  .journal-postcard .postcard-header-block {
    grid-column: 2;
    grid-row: 1;
    padding-left: 26px;
    padding-right: 68px;
    border-left: 1px dashed rgba(164, 126, 68, 0.42);
    margin-bottom: 10px;
  }

  .journal-postcard #journal-title {
    font-size: 22px;
    margin: 6px 0 4px;
  }

  .journal-postcard .postcard-story-block {
    grid-column: 2;
    grid-row: 2;
    padding-left: 26px;
    border-left: 1px dashed rgba(164, 126, 68, 0.42);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .journal-postcard .journal-text-card {
    margin: 4px 0 12px;
    width: 100%;
  }

  .journal-postcard #journal-progress {
    margin-bottom: 14px;
  }

  .journal-postcard .journal-actions-row {
    justify-content: flex-start;
  }
}

.journal-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.journal-progress-row #journal-progress {
  margin-bottom: 0;
  flex: 1;
  text-align: center;
}

.sibling-nav-btn {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(176, 132, 62, 0.48);
  background: rgba(255, 250, 238, 0.78);
  color: #6b4c1e;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.15s ease;
  white-space: nowrap;
}

.sibling-nav-btn:hover {
  background: rgba(246, 224, 174, 0.92);
  transform: translateY(-1px);
}

#btn-photo-preset {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(240, 199, 104, 0.52);
  background: rgba(14, 24, 52, 0.82);
  color: #f8e2a6;
  font-size: 13px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

#btn-photo-preset:hover {
  background: rgba(28, 44, 88, 0.92);
}

#btn-auto-stroll.active {
  background: rgba(240, 199, 104, 0.28);
  border-color: rgba(248, 217, 130, 0.9);
  color: #fff3c4;
  box-shadow: 0 0 14px rgba(240, 199, 104, 0.35);
}

#btn-bike-ride.active {
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.72), rgba(56, 189, 248, 0.38));
  border-color: rgba(125, 211, 252, 0.92);
  color: #f0f9ff;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.42);
}

.campfire-presets {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.camp-preset-btn {
  flex: 1;
  min-width: 84px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(240, 199, 104, 0.36);
  background: rgba(255, 244, 214, 0.08);
  color: #f5dfb0;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.camp-preset-btn:hover {
  background: rgba(240, 199, 104, 0.22);
  border-color: rgba(240, 199, 104, 0.78);
}

.atlas-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.atlas-header-row .mani-sub {
  margin: 0;
  flex: 1;
}
.reel-launch-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(176, 128, 52, 0.65);
  background: linear-gradient(135deg, #2b1d0e, #4a3117);
  color: #fbe5ad;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.reel-launch-btn:hover {
  filter: brightness(1.12);
}

/* 星际旅途胶片放映厅 */
.reel-stage {
  width: min(860px, 94vw);
  max-height: 90vh;
  padding: 18px 22px;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(10, 16, 36, 0.96), rgba(6, 10, 24, 0.98));
  border: 1px solid rgba(240, 199, 104, 0.4);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.82);
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #f7ebd2;
}
.reel-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}
.reel-counter {
  color: #f0c768;
  font-family: var(--font-en);
  letter-spacing: 0.08em;
}
.reel-planet-badge {
  color: #d9c59a;
  font-size: 12.5px;
}
.reel-frame {
  width: 100%;
  height: min(54vh, 460px);
  border-radius: 12px;
  overflow: hidden;
  background: #050814;
  border: 1px solid rgba(240, 199, 104, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}
#reel-photo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: reelKenBurns 7s ease-in-out infinite alternate;
}
@keyframes reelKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.045); }
}
.reel-caption-box {
  text-align: center;
  padding: 2px 8px;
}
#reel-title {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 400;
  color: #fce8b2;
  font-family: var(--font-display);
}
#reel-quote {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #dfd0b0;
  max-height: 4.6em;
  overflow-y: auto;
}
.reel-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.reel-ctrl-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(240, 199, 104, 0.42);
  background: rgba(255, 245, 220, 0.08);
  color: #f6e0aa;
  font-size: 12.5px;
  cursor: pointer;
}
.reel-ctrl-btn.active,
.reel-ctrl-btn:hover {
  background: rgba(240, 199, 104, 0.24);
}

/* ==================== v3.7.1 STORYBOOK TYPOGRAPHY REFINEMENT ==================== */
#map-title,
#hud-planet-title,
#journal-title,
.scroll-header-title,
.modal-card h2,
.modal-card h3,
.planet-node-label {
  font-family: var(--font-display);
  font-weight: 400;
}

.title-eyebrow,
#map-chapter,
#hud-planet-code,
.journal-meta {
  font-family: var(--font-en), var(--font-serif);
}

/* ==================== V4.0 星球邻居 · 跨宇宙串门社交样式 ==================== */
.title-bottom-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.neighbor-title-btn {
  background: rgba(25, 32, 64, 0.72);
  border: 1px solid rgba(249, 168, 212, 0.58);
  color: #fce7f3;
  padding: 8px 20px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: transform 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.neighbor-title-btn:hover {
  transform: translateY(-2px);
  background: rgba(190, 56, 112, 0.42);
  box-shadow: 0 6px 20px rgba(244, 114, 182, 0.32);
}

.universe-switcher {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  margin-bottom: 8px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(138, 102, 52, 0.13);
  border: 1px solid rgba(152, 112, 56, 0.28);
}

.uni-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #5c4324;
  padding: 5px 13px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uni-tab:hover {
  background: rgba(255, 250, 238, 0.65);
}

.uni-tab.active {
  background: linear-gradient(135deg, #3b2814, #5c3d1e);
  color: #fef3c7;
  box-shadow: 0 3px 10px rgba(59, 40, 20, 0.24);
}

.uni-tab.kitty-tab.active {
  background: linear-gradient(135deg, #be3b6a, #9d2b58);
  color: #fff5f8;
}

.uni-tab.miemie-tab.active {
  background: linear-gradient(135deg, #1b7a58, #145a41);
  color: #ecfdf5;
}

.uni-tab.luca-tab.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #f0f9ff;
}

.neighbor-title-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.neighbor-title-btn.miemie-btn {
  border-color: rgba(110, 231, 183, 0.45);
  color: #d1fae5;
}

.neighbor-title-btn.luca-btn {
  border-color: rgba(56, 189, 248, 0.5);
  color: #e0f2fe;
}

.uni-tab.creator-tab {
  border-color: rgba(180, 120, 44, 0.42);
  color: #7c4a15;
  background: rgba(255, 248, 228, 0.55);
}

.planet-node.has-resonance .planet-ring {
  border-color: rgba(236, 72, 153, 0.65);
  box-shadow: 0 0 14px rgba(244, 114, 182, 0.38);
}

.resonance-badge-dot {
  position: absolute;
  top: -4px;
  left: -4px;
  background: linear-gradient(135deg, #ec4899, #f59e0b);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.footer-action-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.resonance-pill-btn {
  background: linear-gradient(135deg, rgba(190, 59, 106, 0.14), rgba(217, 119, 6, 0.16));
  border: 1px solid rgba(190, 59, 106, 0.52);
  color: #8f244c;
  padding: 9px 16px;
  border-radius: 999px;
  font-family: var(--font-serif);
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.resonance-pill-btn:hover {
  transform: translateY(-1px);
  background: rgba(190, 59, 106, 0.24);
}

.neighbor-dock-btn {
  border-color: rgba(249, 168, 212, 0.52) !important;
}

.neighbor-hub-card,
.creator-card {
  max-width: 540px;
  width: min(92vw, 540px);
}

.neighbor-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.neighbor-act-btn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(168, 121, 62, 0.45);
  background: rgba(255, 250, 238, 0.85);
  color: #3d2814;
  font-family: var(--font-serif);
  font-size: 12.5px;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease;
}

.neighbor-act-btn:hover {
  transform: translateY(-1px);
  background: #fff5dc;
}

.neighbor-act-btn.rose-btn {
  background: linear-gradient(135deg, #fff0f5, #ffe4ee);
  border-color: rgba(219, 75, 126, 0.5);
  color: #9b1c4b;
}

.resonance-book {
  max-width: 780px;
  width: min(94vw, 780px);
}

.resonance-book.trinity-mode {
  max-width: 980px;
  width: min(95vw, 980px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.55), 0 0 36px rgba(251, 191, 36, 0.28);
}

.resonance-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 12px 0 16px;
}

.resonance-compare-grid.trinity-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.uni-tab.trinity-tab {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.24), rgba(244, 114, 182, 0.22), rgba(52, 211, 153, 0.24));
  border-color: rgba(217, 154, 38, 0.65);
  color: #6b3f08;
  font-weight: 600;
}
.uni-tab.trinity-tab.active {
  background: linear-gradient(135deg, #92400e, #be185d, #065f46);
  color: #fef3c7;
  border-color: #fbbf24;
}

.res-col {
  background: rgba(255, 251, 242, 0.82);
  border: 1px solid rgba(168, 128, 72, 0.35);
  border-radius: 14px;
  padding: 12px;
  text-align: left;
}

.res-col.kitty-col {
  background: rgba(255, 245, 249, 0.88);
  border-color: rgba(219, 92, 140, 0.42);
}

.res-col.miemie-col {
  background: rgba(240, 253, 248, 0.9);
  border-color: rgba(27, 122, 88, 0.42);
}

.res-col.luca-col {
  background: rgba(240, 249, 255, 0.9);
  border-color: rgba(2, 132, 199, 0.42);
}

.res-owner-tag {
  display: inline-block;
  font-size: 11.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(92, 62, 28, 0.12);
  color: #5c3d1e;
  margin-bottom: 8px;
}

.res-owner-tag.kitty-tag {
  background: rgba(219, 75, 126, 0.16);
  color: #9d2453;
}

.res-owner-tag.miemie-tag {
  background: rgba(27, 122, 88, 0.16);
  color: #145a41;
}

.res-owner-tag.luca-tag {
  background: rgba(2, 132, 199, 0.16);
  color: #0369a1;
}

.res-col img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 9px;
  margin-bottom: 8px;
}

.res-col h4 {
  margin: 0 0 6px;
  font-size: 15px;
  color: #2b1d0e;
}

.res-col p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.58;
  color: #523b22;
}

.resonance-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.creator-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
}

.creator-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.creator-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: #5c4324;
}

.creator-form input,
.creator-form select,
.creator-form textarea {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(156, 116, 62, 0.45);
  background: rgba(255, 252, 245, 0.92);
  color: #2b1d0e;
  font-family: var(--font-serif);
  font-size: 13px;
}

.creator-submit-row,
.creator-result-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.creator-go-btn {
  flex: 1;
  padding: 9px 14px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #be3b6a, #c97a2b);
  color: #fffaf0;
  font-family: var(--font-serif);
  font-size: 13.5px;
  cursor: pointer;
}

.creator-share-result {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(156, 116, 62, 0.4);
  text-align: left;
}

.creator-ok-tip {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: #7c2d4d;
}

.creator-url-box {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.creator-url-box input {
  flex: 1;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(156, 116, 62, 0.45);
  background: #fffdf8;
  font-size: 12px;
  color: #3b2814;
}

.creator-url-box button {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(156, 116, 62, 0.5);
  background: #f8ebd0;
  color: #3b2814;
  cursor: pointer;
  font-size: 12px;
}

@media (max-width: 720px) {
  .resonance-compare-grid,
  .resonance-compare-grid.trinity-grid,
  .creator-row,
  .neighbor-quick-actions {
    grid-template-columns: 1fr;
  }
  .res-col img {
    height: 155px;
  }
}

/* ==================== V4.1 双星主主场切换舱 & 7星猫耳星云居中星群 ==================== */
.host-role-switcher {
  position: absolute;
  top: max(18px, env(safe-area-inset-top, 14px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: auto;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(10, 18, 42, 0.62);
  border: 1px solid rgba(244, 213, 132, 0.34);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}

.host-role-btn {
  border: none;
  background: transparent;
  color: rgba(248, 240, 220, 0.72);
  font-family: "LXGW WenKai Screen", "Kaiti SC", serif;
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.host-role-btn.active {
  background: rgba(244, 213, 132, 0.22);
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(244, 213, 132, 0.45);
}

.host-role-btn.kitty-role.active {
  background: linear-gradient(135deg, rgba(244, 114, 182, 0.32), rgba(251, 146, 60, 0.25));
  color: #ffe4ef;
  box-shadow: inset 0 0 0 1px rgba(249, 168, 212, 0.6);
}

#scroll-planet-grid.grid-many-planets {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
}

#scroll-planet-grid.grid-many-planets .planet-node {
  width: calc(25% - 10px);
  min-width: 148px;
}

@media (max-width: 720px) {
  .host-role-switcher {
    top: max(12px, env(safe-area-inset-top, 10px));
    left: 12px;
    transform: none;
    padding: 3px;
    gap: 2px;
  }
  .host-role-btn {
    font-size: 11px;
    padding: 5px 8px;
  }
  #scroll-planet-grid.grid-many-planets .planet-node {
    width: calc(50% - 8px);
    min-width: 120px;
  }
}

@media (max-width: 820px) {
  .companion-follow-pill {
    position: fixed;
    top: auto;
    bottom: 98px;
    left: 92px;
    margin-top: 0;
    z-index: 20;
    font-size: 11.5px;
    padding: 4px 10px;
  }
}

.neighbor-reply-link-btn {
  width: 100%;
  margin: 8px 0 4px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(190, 59, 106, 0.55);
  background: linear-gradient(135deg, rgba(252, 231, 243, 0.85), rgba(254, 243, 199, 0.85));
  color: #8f244c;
  font-family: "LXGW WenKai Screen", "Kaiti SC", serif;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.neighbor-reply-link-btn:hover {
  transform: translateY(-1px);
}

/* V4.2 并肩同行胶囊 & 星主点击互动气泡卡 & 寻路找星主胶囊 */
.companion-follow-pill {
  pointer-events: auto;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(249, 168, 212, 0.72);
  background: rgba(24, 18, 44, 0.78);
  backdrop-filter: blur(8px);
  color: #fce7f3;
  font-family: "LXGW WenKai Screen", serif;
  font-size: 12.5px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(236, 72, 153, 0.25);
  transition: transform 0.18s ease, background 0.18s ease;
}
.companion-follow-pill:hover {
  transform: translateY(-1px);
  background: rgba(46, 24, 62, 0.9);
}
.companion-exit-tag {
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(244, 114, 182, 0.28);
  color: #fbcfe8;
  font-size: 11.5px;
}

.wp-chip.wp-host-nav {
  border-color: rgba(249, 168, 212, 0.72);
  background: linear-gradient(135deg, rgba(64, 28, 68, 0.72), rgba(32, 24, 58, 0.76));
  color: #fbcfe8;
}
.wp-chip.wp-host-nav.following {
  border-color: rgba(251, 191, 36, 0.85);
  color: #fef08a;
}

.host-action-popover {
  pointer-events: auto;
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%);
  z-index: 48;
  min-width: 296px;
  max-width: 92vw;
  padding: 12px 14px 14px;
  border-radius: 18px;
  border: 1px solid rgba(249, 168, 212, 0.58);
  background: linear-gradient(160deg, rgba(20, 18, 42, 0.9), rgba(38, 22, 52, 0.88));
  backdrop-filter: blur(12px);
  box-shadow: 0 14px 36px rgba(6, 8, 22, 0.58), 0 0 24px rgba(244, 114, 182, 0.22);
  color: #fdf2f8;
}
.host-pop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-family: "ZCOOL XiaoWei", "LXGW WenKai Screen", serif;
  font-size: 15px;
  color: #fbcfe8;
}
.host-pop-close {
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #f9a8d4;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
}
.host-pop-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.host-pop-btn {
  padding: 8px 11px;
  border-radius: 11px;
  border: 1px solid rgba(251, 207, 232, 0.35);
  background: rgba(255, 255, 255, 0.08);
  color: #fff1f2;
  font-family: "LXGW WenKai Screen", serif;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.host-pop-btn:hover {
  background: rgba(244, 114, 182, 0.28);
  transform: translateY(-1px);
}
.host-pop-btn.primary {
  grid-column: 1 / -1;
  border-color: rgba(251, 191, 36, 0.68);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.38), rgba(245, 158, 11, 0.34));
  color: #fef3c7;
  font-size: 13.5px;
}
@media (max-width: 640px) {
  .host-action-popover {
    bottom: 132px;
  }
}

/* V4.3 同行头顶3D微气泡 · 漂流瓶快捷贴纸 · 未读星标 · 首次降落轻引导 */
.companion-speech-bubble {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -100%);
  z-index: 36;
  pointer-events: none;
  max-width: 240px;
  padding: 6px 13px;
  border-radius: 14px;
  border: 1px solid rgba(249, 168, 212, 0.68);
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(8px);
  color: #fdf2f8;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.42);
  transition: opacity 0.35s ease;
}
.companion-speech-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -6px;
  border-width: 6px 6px 0;
  border-style: solid;
  border-color: rgba(249, 168, 212, 0.68) transparent transparent;
}
.first-land-guide {
  position: fixed;
  left: 50%;
  bottom: 94px;
  transform: translateX(-50%);
  z-index: 34;
  pointer-events: none;
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid rgba(253, 224, 71, 0.45);
  background: rgba(12, 19, 38, 0.76);
  backdrop-filter: blur(8px);
  color: #fef3c7;
  font-size: 12.5px;
  white-space: nowrap;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
  transition: opacity 0.45s ease;
}
.bottle-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px;
}
.bottle-preset-chip {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(244, 114, 182, 0.42);
  background: rgba(244, 114, 182, 0.13);
  color: #fbcfe8;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.16s ease;
}
.bottle-preset-chip:hover {
  background: rgba(244, 114, 182, 0.3);
  color: #fff;
}
#btn-neighbor-hub.has-unread-bottle {
  position: relative;
  border-color: rgba(253, 224, 71, 0.85);
  box-shadow: 0 0 14px rgba(251, 191, 36, 0.45);
}
#btn-neighbor-hub.has-unread-bottle::after {
  content: "✦";
  position: absolute;
  top: -5px;
  right: -4px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  border-radius: 50%;
  background: #f43f5e;
  color: #fef08a;
  font-size: 10px;
  box-shadow: 0 0 8px rgba(244, 63, 94, 0.85);
}







