:root {
  --bg-ivory: #f7f1e6;
  --bg-pearl: #fffaf2;
  --bg-sage: #dfe9d9;
  --bg-jade: #d4e2d7;
  --ink: #21362d;
  --muted: #6d8477;
  --line: rgba(74, 104, 87, 0.14);
  --panel: rgba(255, 250, 242, 0.74);
  --panel-strong: rgba(255, 248, 238, 0.86);
  --glass: rgba(255, 255, 255, 0.44);
  --shadow: 0 24px 60px rgba(77, 90, 76, 0.16);
  --shadow-deep: 0 30px 80px rgba(48, 62, 52, 0.18);
  --gold: #d7b374;
  --gold-deep: #b48f52;
  --jade: #6eaa7f;
  --jade-deep: #3d6a52;
  --coral: #da7657;
  --coral-deep: #b24e32;
  --sand: #efe1bc;
  --sand-deep: #c3a86a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 12%, rgba(213, 227, 203, 0.88), transparent 24%),
    radial-gradient(circle at 88% 14%, rgba(241, 219, 186, 0.6), transparent 24%),
    radial-gradient(circle at 30% 80%, rgba(218, 232, 216, 0.8), transparent 28%),
    linear-gradient(180deg, #f9f4ea 0%, #efe6d7 100%);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(circle at 22% 32%, rgba(255, 255, 255, 0.48), transparent 16%),
    radial-gradient(circle at 72% 52%, rgba(255, 255, 255, 0.3), transparent 18%),
    linear-gradient(rgba(111, 136, 118, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(111, 136, 118, 0.028) 1px, transparent 1px);
  background-size: auto, auto, 34px 34px, 34px 34px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1920px, calc(100vw - 18px));
  margin: 0 auto;
  padding: 18px 0 26px;
}

.eyebrow,
.panel-kicker,
.choice-header span,
.status-label,
.metric-card span,
.atlas-chip span,
.float-head span {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.masthead h1,
.dock-head h2,
.atlas-header h2,
.spot-modal h3 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-weight: 700;
}

.masthead h1 {
  font-size: clamp(44px, 5vw, 78px);
  line-height: 0.95;
  margin-top: 10px;
}

.masthead-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: 0.08em;
}

.masthead-badge {
  min-width: 228px;
  padding: 20px 22px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.86), rgba(244, 236, 223, 0.78));
  border: 1px solid rgba(141, 164, 147, 0.18);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.masthead-badge span {
  display: block;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead-badge strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  color: var(--ink);
  font-family: "STKaiti", "KaiTi", serif;
}

.expedition-layout {
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.command-dock {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 16px;
}

.dock-card,
.atlas-header,
.board-frame,
.board-float {
  border-radius: 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.dock-card {
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.76), rgba(247, 240, 229, 0.7));
  backdrop-filter: blur(18px);
}

.dock-card-primary {
  position: relative;
  overflow: hidden;
}

.dock-card-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(215, 179, 116, 0.18), transparent 28%),
    radial-gradient(circle at bottom left, rgba(110, 170, 127, 0.12), transparent 30%);
  pointer-events: none;
}

.dock-head,
.dice-module,
.current-card,
.metric-grid,
.tool-grid,
.zoom-strip,
.legend {
  position: relative;
  z-index: 1;
}

.dock-head {
  margin-bottom: 14px;
}

.dock-head h2,
.atlas-header h2 {
  margin-top: 4px;
  font-size: 34px;
}

.dice-module {
  display: grid;
  gap: 14px;
}

.dice-face {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 156px;
  border-radius: 32px;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.82), transparent 28%),
    radial-gradient(circle at 72% 80%, rgba(197, 212, 205, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(242, 246, 243, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    inset 0 -18px 24px rgba(197, 205, 201, 0.18),
    0 24px 34px rgba(116, 132, 123, 0.16);
  transition: transform 260ms ease, box-shadow 260ms ease, filter 260ms ease;
  perspective: 900px;
}

.dice-face::before {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 26px;
  border: 1px solid rgba(152, 171, 160, 0.12);
  pointer-events: none;
}

.dice-shell {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  perspective: 900px;
}

.dice-cube {
  position: relative;
  width: 78px;
  height: 78px;
  transform-style: preserve-3d;
  transition: transform 780ms cubic-bezier(0.2, 0.8, 0.2, 1);
  transform: rotateX(-24deg) rotateY(38deg);
}

.dice-face[data-value="1"] .dice-cube {
  transform: rotateX(0deg) rotateY(0deg);
}

.dice-face[data-value="2"] .dice-cube {
  transform: rotateY(-90deg);
}

.dice-face[data-value="3"] .dice-cube {
  transform: rotateX(90deg);
}

.dice-face[data-value="4"] .dice-cube {
  transform: rotateX(-90deg);
}

.dice-face[data-value="5"] .dice-cube {
  transform: rotateY(90deg);
}

.dice-face[data-value="6"] .dice-cube {
  transform: rotateY(180deg);
}

.dice-side {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background:
    radial-gradient(circle at 28% 24%, rgba(255, 255, 255, 0.98), rgba(249, 251, 250, 0.96) 46%, rgba(232, 238, 235, 0.98) 100%);
  border: 1px solid rgba(182, 195, 188, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -9px 18px rgba(184, 194, 188, 0.18),
    0 8px 18px rgba(112, 129, 119, 0.12);
}

.face-1 { transform: translateZ(39px); }
.face-2 { transform: rotateY(90deg) translateZ(39px); }
.face-3 { transform: rotateX(-90deg) translateZ(39px); }
.face-4 { transform: rotateX(90deg) translateZ(39px); }
.face-5 { transform: rotateY(-90deg) translateZ(39px); }
.face-6 { transform: rotateY(180deg) translateZ(39px); }

.pip {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, #4d5d56 0%, #27362f 68%, #1a2520 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.18),
    0 1px 2px rgba(28, 36, 32, 0.18);
}

.pip-top-left { top: 15px; left: 15px; }
.pip-top-right { top: 15px; right: 15px; }
.pip-mid-left { top: 33px; left: 15px; }
.pip-mid-right { top: 33px; right: 15px; }
.pip-center { top: 33px; left: 33px; }
.pip-bottom-left { bottom: 15px; left: 15px; }
.pip-bottom-right { bottom: 15px; right: 15px; }

.dice-face.rolling .dice-cube {
  animation: diceSpin 720ms linear infinite;
}

.dice-face.rolling {
  transform: translateY(-2px) scale(1.03);
  filter: saturate(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -18px 24px rgba(197, 205, 201, 0.18),
    0 30px 44px rgba(116, 132, 123, 0.2);
}

@keyframes diceSpin {
  0% {
    transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
  }
  100% {
    transform: rotateX(360deg) rotateY(540deg) rotateZ(180deg);
  }
}

.action-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.primary-btn,
.ghost-btn,
.tool-btn,
.zoom-btn,
.choice-button,
.modal-close {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.primary-btn,
.ghost-btn,
.tool-btn {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 700;
}

.primary-btn {
  color: #fffdfa;
  background: linear-gradient(160deg, #507f64, #365946);
  box-shadow: 0 14px 22px rgba(53, 89, 70, 0.18);
}

.ghost-btn,
.tool-btn {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(141, 164, 147, 0.18);
}

.tool-btn.is-active {
  color: #fffdfa;
  background: linear-gradient(160deg, #507f64, #365946);
  box-shadow: 0 14px 22px rgba(53, 89, 70, 0.18);
  border-color: transparent;
}

.primary-btn:hover,
.ghost-btn:hover,
.tool-btn:hover,
.zoom-btn:hover,
.choice-button:hover,
.modal-close:hover {
  transform: translateY(-1px);
}

.primary-btn:disabled,
.ghost-btn:disabled,
.tool-btn:disabled,
.zoom-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.current-card {
  margin-top: 16px;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(141, 164, 147, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.current-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 30px;
  line-height: 1.05;
  font-family: "STKaiti", "KaiTi", serif;
}

.current-card p,
.modal-body p {
  margin: 0;
  line-height: 1.7;
  color: var(--muted);
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.metric-card {
  padding: 14px 14px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(141, 164, 147, 0.14);
}

.metric-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  line-height: 1;
  font-family: "STKaiti", "KaiTi", serif;
}

.tool-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.zoom-strip {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.zoom-btn {
  height: 46px;
  border-radius: 16px;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(141, 164, 147, 0.18);
}

.zoom-rail {
  position: relative;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.54);
  border: 1px solid rgba(141, 164, 147, 0.16);
}

.zoom-rail span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--jade));
}

.legend {
  display: grid;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.legend-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 10px;
  border-radius: 50%;
  vertical-align: middle;
}

.legend-dot.scenic {
  background: linear-gradient(160deg, #da7657, #b24e32);
}

.legend-dot.choice {
  border-radius: 5px;
  background: linear-gradient(160deg, #e9ca92, #be9450);
}

.legend-dot.normal {
  background: linear-gradient(160deg, #74a484, #4e7860);
}

.legend-dot.step {
  background: linear-gradient(160deg, #efe1bc, #c3a86a);
}

.atlas-stage {
  min-width: 0;
}

.atlas-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding: 18px 22px;
  margin-bottom: 14px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.84), rgba(244, 236, 224, 0.72));
  backdrop-filter: blur(16px);
}

.atlas-chip-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.atlas-chip {
  min-width: 196px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(141, 164, 147, 0.14);
}

.atlas-chip strong {
  display: block;
  margin-top: 8px;
  font-size: 19px;
  line-height: 1.25;
  font-family: "STKaiti", "KaiTi", serif;
}

.board-shell {
  position: relative;
  min-height: 930px;
}

.board-ornament {
  position: absolute;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  color: #6f836b;
  background: rgba(255, 252, 245, 0.7);
  border: 1px solid rgba(191, 170, 123, 0.22);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  font-family: "STKaiti", "KaiTi", serif;
}

.board-ornament-north {
  top: 20px;
  right: 20px;
  font-size: 24px;
}

.board-ornament-seal {
  left: 22px;
  bottom: 22px;
  font-size: 28px;
}

.board-frame {
  position: relative;
  padding: 24px;
  min-height: 1040px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.82), rgba(245, 236, 222, 0.76));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.58),
    inset 0 -28px 40px rgba(156, 137, 101, 0.08),
    var(--shadow-deep);
  backdrop-filter: blur(18px);
}

.board-frame::before {
  content: "";
  position: absolute;
  inset: 16px;
  border-radius: 28px;
  border: 1px solid rgba(194, 169, 110, 0.14);
  pointer-events: none;
}

.board-map {
  position: relative;
  width: 100%;
  aspect-ratio: 1940 / 1080;
  overflow: hidden;
  border-radius: 34px;
  user-select: none;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 255, 255, 0.42), transparent 18%),
    radial-gradient(circle at 26% 72%, rgba(203, 224, 201, 0.68), transparent 26%),
    radial-gradient(circle at 52% 34%, rgba(225, 235, 217, 0.74), transparent 20%),
    radial-gradient(circle at 70% 60%, rgba(206, 227, 209, 0.65), transparent 24%),
    radial-gradient(circle at 86% 24%, rgba(247, 234, 206, 0.44), transparent 20%),
    linear-gradient(180deg, #edf3e7 0%, #dfe8d9 48%, #d6e2d0 100%);
}

.board-mist {
  position: absolute;
  inset: -4%;
  z-index: 1;
  pointer-events: none;
  filter: blur(16px);
  opacity: 0.82;
}

.mist-band {
  position: absolute;
  border-radius: 999px;
  background:
    radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.56), rgba(255, 255, 255, 0.16) 52%, transparent 76%);
  mix-blend-mode: screen;
  animation: mistDrift 28s ease-in-out infinite alternate;
}

.mist-band-a {
  width: 42%;
  height: 22%;
  left: 6%;
  top: 11%;
}

.mist-band-b {
  width: 36%;
  height: 18%;
  right: 8%;
  top: 34%;
  animation-duration: 34s;
  animation-delay: -10s;
}

.mist-band-c {
  width: 46%;
  height: 21%;
  left: 24%;
  bottom: 9%;
  opacity: 0.78;
  animation-duration: 40s;
  animation-delay: -18s;
}

@keyframes mistDrift {
  0% {
    transform: translate3d(-1.2%, -0.8%, 0) scale(0.98);
  }
  100% {
    transform: translate3d(1.8%, 1.2%, 0) scale(1.05);
  }
}

.board-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.34), transparent 42%),
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.18), transparent 26%),
    radial-gradient(circle at 70% 62%, rgba(255, 255, 255, 0.14), transparent 28%);
  opacity: 0.82;
}

.board-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(108, 126, 114, 0.08)),
    radial-gradient(circle at center, transparent 54%, rgba(80, 106, 89, 0.08) 100%);
}

.board-map.zoomed {
  cursor: grab;
}

.board-map.dragging {
  cursor: grabbing;
}

.board-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  transform-origin: 0 0;
  transition: transform 220ms ease;
  will-change: transform;
}

.board-map.dragging .board-canvas {
  transition: none;
}

#nodeLayer {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.map-node {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}

.map-node .node-core {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 251, 244, 0.96);
  background: linear-gradient(160deg, #7ab08a, #568366);
  box-shadow: 0 10px 16px rgba(111, 135, 117, 0.16);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.map-node .node-core::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.95);
}

.map-node:hover .node-core {
  transform: scale(1.08);
}

.map-node.normal .node-core {
  width: 17px;
  height: 17px;
  background: linear-gradient(160deg, #79a98a, #577863);
}

.map-node.step .node-core {
  width: 14px;
  height: 14px;
  border-width: 1px;
  border-color: rgba(255, 251, 244, 0.96);
  background: linear-gradient(160deg, rgba(242, 229, 198, 0.98), rgba(212, 184, 123, 0.96));
  box-shadow: 0 6px 10px rgba(155, 136, 98, 0.12);
}

.map-node.step .node-core::after {
  display: none;
}

.map-node.choice .node-core {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(160deg, #ebcf9d, #c79d55);
  transform: rotate(45deg);
}

.map-node.choice .node-core::after {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: rgba(255, 248, 235, 0.94);
}

.map-node.scenic .node-core {
  width: 34px;
  height: 34px;
  background: linear-gradient(160deg, #e08764, #b95738);
  box-shadow: 0 14px 22px rgba(182, 97, 67, 0.2);
}

.map-node.scenic .node-core::after {
  width: 10px;
  height: 10px;
  background: #fff8ee;
  clip-path: polygon(50% 0%, 61% 37%, 100% 37%, 69% 59%, 80% 100%, 50% 74%, 20% 100%, 31% 59%, 0 37%, 39% 37%);
}

.map-node.active .node-core,
.map-node.target .node-core {
  animation: nodePulse 1.2s infinite;
}

.board-map.on-start-node .map-node.start-anchor.active .node-core {
  animation: none;
  box-shadow:
    0 0 0 4px rgba(215, 179, 116, 0.14),
    0 14px 22px rgba(182, 97, 67, 0.18);
}

.map-node.visited.step .node-core,
.map-node.visited.normal .node-core {
  background: linear-gradient(160deg, rgba(136, 198, 149, 0.98), rgba(84, 136, 98, 0.96));
  border-color: rgba(255, 255, 252, 0.96);
}

.map-node.visited.step .node-core {
  box-shadow:
    0 0 0 4px rgba(136, 198, 149, 0.12),
    0 8px 16px rgba(111, 135, 117, 0.15);
}

.map-node.visited.scenic .node-core,
.map-node.visited.choice .node-core {
  box-shadow:
    0 0 0 6px rgba(215, 179, 116, 0.1),
    0 14px 22px rgba(169, 125, 84, 0.18);
}

@keyframes nodePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(224, 135, 100, 0.32), 0 10px 16px rgba(169, 125, 84, 0.16);
  }
  100% {
    box-shadow: 0 0 0 18px rgba(224, 135, 100, 0), 0 10px 16px rgba(169, 125, 84, 0.16);
  }
}

.node-label {
  position: absolute;
  top: calc(100% + 10px + var(--label-offset-y, 0px));
  left: 50%;
  transform: translateX(calc(-50% + var(--label-offset-x, 0px)));
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.82);
  color: var(--ink);
  white-space: nowrap;
  font-size: 11px;
  border: 1px solid rgba(141, 164, 147, 0.16);
  box-shadow: 0 10px 20px rgba(94, 113, 101, 0.12);
  backdrop-filter: blur(12px);
}

.board-map.labels-hidden .node-label {
  opacity: 0;
  transform: translateX(calc(-50% + var(--label-offset-x, 0px))) translateY(-4px);
  pointer-events: none;
}

.player-token {
  position: absolute;
  left: 0;
  top: 0;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fffdf7;
  font-weight: 700;
  font-size: 0;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.42), transparent 26%),
    linear-gradient(160deg, #4da6ff, #1767c8);
  box-shadow:
    0 8px 14px rgba(42, 112, 208, 0.24),
    0 0 0 4px rgba(78, 166, 255, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: left 320ms ease, top 320ms ease;
}

.player-token.at-start {
  width: 16px;
  height: 16px;
  font-size: 0;
  box-shadow:
    0 8px 14px rgba(42, 112, 208, 0.2),
    0 0 0 4px rgba(78, 166, 255, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

.start-marker {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 0;
  pointer-events: none;
}

.start-marker.is-start-active {
  gap: 0;
}

.start-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.92);
  color: var(--ink);
  border: 1px solid rgba(141, 164, 147, 0.16);
  box-shadow: 0 10px 18px rgba(94, 113, 101, 0.12);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.board-float {
  position: absolute;
  z-index: 4;
  backdrop-filter: blur(18px);
}

.board-journal {
  left: 24px;
  right: 24px;
  bottom: 24px;
  padding: 16px 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.76), rgba(246, 238, 225, 0.72));
}

.float-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.float-head strong,
.choice-header strong {
  font-size: 24px;
  font-family: "STKaiti", "KaiTi", serif;
}

.journal-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.journal-chip {
  padding: 9px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid rgba(141, 164, 147, 0.14);
  font-size: 13px;
}

.journal-chip.current {
  color: #8b4b27;
  background: linear-gradient(160deg, rgba(245, 231, 202, 0.98), rgba(223, 191, 135, 0.96));
  border-color: rgba(196, 163, 102, 0.22);
}

.choice-card {
  left: 50%;
  top: 24px;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 90px));
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.94), rgba(244, 236, 224, 0.92));
  color: var(--ink);
}

.choice-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.choice-button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(141, 164, 147, 0.14);
  font-size: 14px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(103, 115, 104, 0.28);
  backdrop-filter: blur(14px);
}

.spot-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  width: min(1180px, 100%);
  max-height: min(86vh, 920px);
  overflow: hidden;
  border-radius: 32px;
  background: #fbf7ef;
  box-shadow: 0 30px 90px rgba(82, 96, 83, 0.22);
}

.modal-media {
  min-height: 360px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(17, 27, 22, 0.12)),
    #d8ccb4;
}

.modal-media img,
.modal-media video,
.map-fallback {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-carousel {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.media-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 720ms ease;
}

.media-slide.active {
  opacity: 1;
  z-index: 1;
}

.media-slide img,
.media-slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-fallback {
  position: relative;
  background:
    radial-gradient(circle at var(--spot-x) var(--spot-y), rgba(248, 235, 188, 0.42), transparent 13%),
    radial-gradient(circle at 20% 25%, rgba(176, 204, 165, 0.32), transparent 20%),
    radial-gradient(circle at 68% 62%, rgba(133, 176, 140, 0.28), transparent 24%),
    linear-gradient(180deg, #dbe7d6, #b8c8bb);
}

.map-fallback::after {
  content: "等待替换本地图片或视频";
  position: absolute;
  left: 20px;
  bottom: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 245, 228, 0.92);
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.08em;
}

.modal-body {
  padding: 38px 36px 34px;
  min-height: 0;
  max-height: min(86vh, 920px);
  overflow: auto;
  color: var(--ink);
  scrollbar-width: thin;
  scrollbar-color: rgba(74, 116, 84, 0.56) rgba(233, 226, 211, 0.74);
}

.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: rgba(233, 226, 211, 0.74);
  border-radius: 999px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: rgba(74, 116, 84, 0.56);
  border-radius: 999px;
}

#modalDesc {
  white-space: pre-line;
  line-height: 1.78;
}

.spot-modal h3 {
  margin-top: 6px;
  font-size: clamp(34px, 4vw, 52px);
  color: var(--ink);
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.modal-meta span {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(110, 170, 127, 0.1);
  color: var(--jade-deep);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 249, 237, 0.96);
  box-shadow: 0 8px 24px rgba(26, 35, 31, 0.12);
}

@media (max-width: 1280px) {
  .expedition-layout {
    grid-template-columns: 260px minmax(0, 1fr);
  }

  .board-shell,
  .board-frame {
    min-height: 820px;
  }
}

@media (max-width: 1080px) {
  .expedition-layout {
    grid-template-columns: 1fr;
  }

  .command-dock {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 900px) {
  .page-shell {
    width: min(100vw - 16px, 1780px);
    padding-top: 14px;
  }

  .masthead,
  .atlas-header {
    flex-direction: column;
    align-items: stretch;
  }

  .command-dock {
    grid-template-columns: 1fr;
  }

  .atlas-chip-group {
    justify-content: start;
  }

  .board-shell,
  .board-frame {
    min-height: 640px;
  }

  .choice-card {
    top: 14px;
    width: calc(100% - 24px);
  }

  .board-journal {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .spot-modal {
    grid-template-columns: 1fr;
  }

  .modal-media {
    min-height: 240px;
  }
}

@media (max-width: 950px) and (orientation: landscape) {
  body {
    overflow: hidden;
  }

  .page-shell {
    width: calc(100vw - 12px);
    padding: 8px 0 10px;
  }

  .masthead {
    margin-bottom: 10px;
    gap: 12px;
    align-items: center;
  }

  .masthead h1 {
    font-size: clamp(28px, 4.1vw, 42px);
    line-height: 0.98;
  }

  .masthead-note {
    margin-top: 6px;
    font-size: 12px;
    letter-spacing: 0.05em;
  }

  .masthead-badge {
    min-width: 168px;
    padding: 14px 16px;
    border-radius: 22px;
  }

  .masthead-badge strong {
    margin-top: 6px;
    font-size: 22px;
  }

  .expedition-layout {
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
    min-height: calc(100vh - 98px);
  }

  .command-dock {
    position: static;
    display: grid;
    grid-template-columns: minmax(260px, 1.35fr) minmax(180px, 0.92fr) minmax(150px, 0.88fr);
    gap: 10px;
    align-items: stretch;
  }

  .dock-card {
    padding: 14px;
    border-radius: 24px;
  }

  .dock-head {
    margin-bottom: 10px;
  }

  .dock-head h2,
  .atlas-header h2 {
    font-size: 26px;
  }

  .dock-card-primary {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "dice"
      "current";
    gap: 12px;
    min-height: 0;
  }

  .dice-module {
    grid-area: dice;
    grid-template-columns: 86px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
  }

  .dice-face {
    min-height: 108px;
    border-radius: 26px;
  }

  .dice-shell {
    width: 74px;
    height: 74px;
  }

  .dice-cube {
    width: 58px;
    height: 58px;
  }

  .action-row {
    display: grid;
    gap: 10px;
  }

  .primary-btn,
  .ghost-btn,
  .tool-btn {
    min-height: 40px;
    font-size: 13px;
    border-radius: 16px;
  }

  .current-card {
    grid-area: current;
    margin-top: 0;
    padding: 14px 14px 12px;
    border-radius: 20px;
    min-width: 0;
  }

  .current-card strong {
    font-size: 18px;
  }

  .current-card p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.45;
  }

  .dock-card-metrics {
    display: grid;
    gap: 10px;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .metric-card {
    min-height: 72px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .metric-card strong {
    font-size: 24px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .dock-card-legend {
    padding-top: 12px;
  }

  .legend {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 10px;
    font-size: 12px;
  }

  .atlas-stage {
    min-width: 0;
  }

  .atlas-header {
    margin-bottom: 10px;
    padding: 14px 16px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
  }

  .atlas-chip-group {
    gap: 8px;
  }

  .atlas-chip {
    min-width: 120px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .atlas-chip strong {
    font-size: 14px;
  }

  .board-shell,
  .board-frame {
    min-height: calc(100vh - 232px);
  }

  .board-frame {
    padding: 14px;
  }

  .board-frame::before {
    inset: 10px;
    border-radius: 24px;
  }

  .board-map {
    height: calc(100vh - 274px);
    min-height: 210px;
    aspect-ratio: auto;
    border-radius: 28px;
  }

  .board-ornament {
    transform: scale(0.86);
    transform-origin: top right;
  }

  .board-journal {
    left: 14px;
    right: 14px;
    bottom: 12px;
    padding: 8px 12px;
    border-radius: 20px;
  }

  .float-head strong {
    font-size: 15px;
  }

  .journal-list {
    gap: 8px;
  }

  .journal-chip {
    padding: 6px 10px;
    font-size: 11px;
  }

  .choice-card {
    top: 12px;
    right: 12px;
    left: auto;
    width: min(320px, calc(100% - 24px));
    padding: 14px;
    border-radius: 22px;
  }

  .choice-list {
    gap: 8px;
  }

  .choice-button {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 14px;
  }

  .map-node .node-core {
    transform: scale(0.94);
  }

  .node-label {
    padding: 3px 8px;
    font-size: 10px;
  }

  .player-token {
    width: 32px;
    height: 32px;
    font-size: 11px;
  }

  .player-token.at-start {
    width: 26px;
    height: 26px;
    font-size: 10px;
  }

  .dock-head {
    grid-area: head;
  }

  .dock-card-primary .panel-kicker,
.dock-card-legend .panel-kicker {
    font-size: 10px;
    letter-spacing: 0.22em;
  }
}

.page-shell {
  width: min(1980px, calc(100vw - 14px));
  padding: 12px 0 24px;
}

.game-stage {
  display: block;
}

.map-stage {
  display: grid;
  gap: 16px;
}

.map-stage-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 8px 12px 0;
  text-align: center;
}

.map-stage-head h1 {
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: clamp(30px, 3.6vw, 54px);
  line-height: 1;
}

.board-shell {
  min-height: auto;
}

.board-ornament-seal {
  display: none;
}

.board-ornament-north {
  top: 18px;
  right: 18px;
  width: 62px;
  height: 62px;
}

.board-frame {
  padding: 18px;
  min-height: auto;
}

.board-frame::before {
  inset: 12px;
}

.board-map {
  aspect-ratio: 1940 / 1080;
  min-height: min(78vh, 1040px);
  border-radius: 36px;
}

.action-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: min(720px, calc(100% - 48px));
  margin: 0 auto;
  padding: 14px;
  border-radius: 28px;
  border: 1px solid rgba(141, 164, 147, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.8), rgba(245, 236, 223, 0.74));
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.action-roll,
.action-reset {
  min-height: 58px;
  border-radius: 18px;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.action-roll {
  min-width: 0;
}

.action-reset {
  min-width: 148px;
}

.choice-card {
  top: 18px;
  width: min(520px, calc(100% - 40px));
}

.dice-overlay {
  position: fixed;
  inset: 0;
  z-index: 26;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(247, 243, 234, 0.22), rgba(221, 231, 221, 0.08) 34%, rgba(83, 100, 89, 0.2) 100%);
  transition: opacity 260ms ease;
}

.dice-overlay.is-visible {
  opacity: 1;
}

.dice-overlay-center {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 22px;
  transform: translateY(-2vh);
}

.dice-overlay-face {
  width: 286px;
  min-height: 286px;
  border-radius: 44px;
  background:
    radial-gradient(circle at 32% 18%, rgba(255, 255, 255, 0.96), transparent 28%),
    radial-gradient(circle at 70% 76%, rgba(212, 227, 218, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 245, 0.74));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -18px 28px rgba(190, 203, 196, 0.18),
    0 38px 90px rgba(72, 85, 76, 0.18);
  backdrop-filter: blur(24px);
}

.dice-overlay-face::before {
  inset: 18px;
  border-radius: 36px;
  border-color: rgba(174, 191, 181, 0.18);
}

.dice-overlay-face .dice-shell {
  width: 140px;
  height: 140px;
  transform: scale(1.95);
}

.dice-overlay.is-rolling .dice-cube {
  animation: diceSpin 520ms linear infinite;
}

.dice-overlay.is-settled .dice-overlay-face {
  animation: diceFloat 700ms ease forwards;
}

.dice-overlay-result {
  min-width: 112px;
  padding: 12px 22px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 251, 243, 0.86);
  border: 1px solid rgba(170, 185, 176, 0.22);
  box-shadow: 0 18px 36px rgba(84, 99, 90, 0.12);
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 28px;
  letter-spacing: 0.12em;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.dice-overlay-result.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.dice-overlay-fog {
  position: absolute;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0.14) 52%, transparent 74%);
  filter: blur(24px);
  opacity: 0.58;
  animation: overlayFogDrift 16s ease-in-out infinite alternate;
}

.dice-overlay .fog-a {
  width: 38vw;
  height: 18vw;
  left: 6vw;
  top: 16vh;
}

.dice-overlay .fog-b {
  width: 30vw;
  height: 14vw;
  right: 10vw;
  bottom: 18vh;
  animation-duration: 20s;
}

.dice-overlay .fog-c {
  width: 44vw;
  height: 20vw;
  left: 30vw;
  bottom: 10vh;
  animation-duration: 24s;
}

.dice-overlay.is-dissolving .dice-overlay-center {
  animation: diceMistOut 900ms ease forwards;
}

.dice-overlay.is-dissolving .dice-overlay-fog {
  animation-duration: 1.2s;
}

@keyframes diceFloat {
  0% {
    transform: translateY(0) scale(1);
  }
  100% {
    transform: translateY(-6px) scale(1.02);
  }
}

@keyframes overlayFogDrift {
  0% {
    transform: translate3d(-1.5%, -1.2%, 0) scale(0.96);
  }
  100% {
    transform: translate3d(2.2%, 1.6%, 0) scale(1.05);
  }
}

@keyframes diceMistOut {
  0% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(-2vh) scale(1);
  }
  100% {
    opacity: 0;
    filter: blur(28px);
    transform: translateY(-6vh) scale(1.08);
  }
}

@media (max-width: 1180px) {
  .board-map {
    min-height: min(74vh, 860px);
  }
}

@media (max-width: 950px) and (orientation: landscape) {
  .page-shell {
    width: calc(100vw - 8px);
    padding: 8px 0 14px;
  }

  .map-stage {
    gap: 10px;
  }

  .map-stage-head {
    gap: 2px;
    padding-top: 2px;
  }

  .map-stage-head h1 {
    font-size: clamp(22px, 3.2vw, 30px);
  }

  .board-frame {
    padding: 10px;
    border-radius: 26px;
  }

  .board-map {
    min-height: calc(100vh - 150px);
    border-radius: 26px;
  }

  .board-ornament-north {
    width: 48px;
    height: 48px;
    top: 12px;
    right: 12px;
    font-size: 20px;
  }

  .choice-card {
    top: 12px;
    width: min(320px, calc(100% - 20px));
    padding: 12px;
  }

  .float-head strong,
  .choice-header strong {
    font-size: 18px;
  }

  .action-bar {
    width: min(520px, calc(100% - 18px));
    padding: 10px;
    gap: 10px;
  }

  .action-roll,
  .action-reset {
    min-height: 48px;
    font-size: 13px;
  }

  .action-reset {
    min-width: 118px;
  }

  .dice-overlay-face {
    width: 220px;
    min-height: 220px;
    border-radius: 34px;
  }

  .dice-overlay-face .dice-shell {
    transform: scale(1.5);
  }

  .dice-overlay-result {
    font-size: 22px;
    padding: 10px 18px;
  }
}

@media (max-width: 700px) {
  .action-bar {
    grid-template-columns: 1fr;
    width: calc(100% - 18px);
  }

  .action-reset {
    min-width: 0;
  }
}

.map-stage {
  width: min(75vw, 1480px);
  margin: 0 auto;
  gap: 14px;
}

.board-map {
  min-height: min(64vh, 860px);
}

.control-strip {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(420px, 720px);
  justify-content: center;
  gap: 14px;
  align-items: stretch;
}

.current-card-compact {
  margin-top: 0;
  min-height: 86px;
  padding: 16px 18px;
  display: grid;
  align-content: center;
  gap: 6px;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.82), rgba(244, 236, 223, 0.7));
  box-shadow: var(--shadow);
}

.current-card-compact strong {
  margin: 0;
  font-size: 28px;
}

.current-card-compact p {
  font-size: 13px;
  line-height: 1.5;
}

.action-bar {
  width: 100%;
  margin: 0;
}

.dice-overlay {
  background: transparent;
}

.dice-overlay-center {
  transform: translateY(-1vh);
}

.dice-overlay-face {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -18px 28px rgba(190, 203, 196, 0.16),
    0 24px 56px rgba(72, 85, 76, 0.14);
}

.dice-overlay-fog {
  opacity: 0.34;
}

.dice-overlay .fog-a,
.dice-overlay .fog-b,
.dice-overlay .fog-c {
  width: 20vw;
  height: 9vw;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
}

.dice-overlay .fog-a {
  transform: translate(-12vw, -6vh);
}

.dice-overlay .fog-b {
  transform: translate(10vw, 7vh);
}

.dice-overlay .fog-c {
  transform: translate(0, 13vh);
}

@media (max-width: 1180px) {
  .map-stage {
    width: min(86vw, 1240px);
  }

  .board-map {
    min-height: min(58vh, 720px);
  }

  .control-strip {
    grid-template-columns: 1fr;
  }

  .current-card-compact,
  .action-bar {
    width: min(720px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 950px) and (orientation: landscape) {
  .map-stage {
    width: calc(100vw - 18px);
  }

  .board-map {
    min-height: calc(100vh - 200px);
  }

  .control-strip {
    grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.2fr);
    gap: 10px;
  }

  .current-card-compact {
    min-height: 72px;
    padding: 12px 14px;
  }

  .current-card-compact strong {
    font-size: 22px;
  }

  .current-card-compact p {
    font-size: 12px;
  }

  .action-bar {
    padding: 10px;
  }
}

@media (max-width: 700px) {
  .map-stage {
    width: calc(100vw - 14px);
  }

  .control-strip {
    grid-template-columns: 1fr;
  }

  .current-card-compact,
  .action-bar {
    width: 100%;
  }
}
