:root {
  --ink: #33261e;
  --paper: rgba(255, 251, 244, 0.96);
  --shadow: 0 18px 45px rgba(66, 57, 48, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Serif SC", "STSong", "SimSun", serif;
  color: var(--ink);
  background: linear-gradient(180deg, #e7f1f5 0%, #c8dce8 100%);
}

body.detail-open {
  overflow: hidden;
}

.home-page {
  background: #d9e6ea;
}

.home-shell {
  width: min(1440px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0;
}

.home-board {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #c7dceb;
  box-shadow: var(--shadow);
}

.home-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  user-select: none;
}

.home-choice-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}

.home-choice-layer.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.home-choice-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.guide-effect-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.guide-effect-layer.is-interactive {
  pointer-events: auto;
}

.guide-effect {
  position: absolute;
  display: block;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 252, 0.56) 0%, rgba(255, 248, 222, 0.34) 26%, rgba(214, 196, 145, 0.16) 48%, transparent 74%);
  box-shadow:
    0 0 20px rgba(255, 255, 252, 0.5),
    0 0 46px rgba(214, 196, 145, 0.24),
    inset 0 0 30px rgba(255, 255, 255, 0.22);
  mix-blend-mode: plus-lighter;
  opacity: 0.68;
  transform: scale(0.92);
  animation: imageGuideBreath 1.75s ease-in-out infinite;
}

.guide-effect::before,
.guide-effect::after {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 252, 0.42);
  opacity: 0.68;
}

.guide-effect::after {
  inset: 20%;
  border-color: rgba(88, 78, 48, 0.16);
  filter: blur(0.6px);
}

.guide-effect-1 {
  left: 3.6%;
  top: 70.2%;
  width: 24%;
  height: 10%;
}

.guide-effect-2 {
  left: 35.6%;
  top: 69.8%;
  width: 23%;
  height: 10%;
}

.guide-effect-3 {
  left: 69%;
  top: 69.8%;
  width: 24%;
  height: 10%;
}

.guide-effect.is-impact {
  z-index: 3;
  opacity: 0;
  animation: imageClickImpact 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.guide-effect.is-impact::before {
  animation: imageClickRing 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.guide-effect.is-impact::after {
  animation: imageInkWash 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-choice {
  position: absolute;
  z-index: 2;
  border: none;
  background: transparent;
  color: rgba(35, 31, 25, 0.9);
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transform-origin: center;
  overflow: visible;
  isolation: isolate;
}

.home-choice .ripple,
.home-choice .ink,
.home-choice .leaf,
.home-choice .spark,
.home-choice .petals,
.home-choice .ink-dots {
  position: absolute;
  pointer-events: none;
}

.home-choice .ripple {
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 62%;
  border-radius: 50%;
  opacity: 0;
  background:
    radial-gradient(ellipse at center, rgba(255, 248, 230, 0.46) 0%, rgba(255, 248, 230, 0.24) 34%, transparent 72%);
  box-shadow:
    inset 0 0 14px rgba(255, 248, 230, 0.18),
    0 0 14px rgba(230, 210, 150, 0.14);
  transform: scale(0.78);
  filter: blur(0.2px);
  z-index: 1;
}

.home-choice .ink {
  inset: 4% 4% 2%;
  border-radius: 46% 54% 52% 48%;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 72%, rgba(40, 40, 40, 0.08) 0%, rgba(40, 40, 40, 0.045) 32%, transparent 68%);
  filter: blur(1.6px);
  transform: scale(0.94);
  z-index: 2;
}

.home-choice .leaf {
  content: "";
  position: absolute;
  width: 15%;
  height: 24%;
  right: 8%;
  bottom: 17%;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(92, 126, 82, 0.18) 0%, rgba(74, 111, 70, 0.11) 46%, transparent 70%);
  border-radius: 70% 10% 70% 18%;
  box-shadow:
    inset -5px -4px 8px rgba(43, 72, 47, 0.08),
    0 0 8px rgba(255, 248, 230, 0.1);
  opacity: 0;
  transform-origin: 20% 70%;
  z-index: 3;
}

.home-choice .spark,
.home-choice .petals,
.home-choice .ink-dots {
  inset: 0;
}

.home-choice .spark i,
.home-choice .petals i,
.home-choice .ink-dots i {
  position: absolute;
  left: 50%;
  top: 62%;
  display: block;
  opacity: 0;
  z-index: 4;
}

.home-choice .spark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(236, 214, 145, 0.72);
  box-shadow: 0 0 10px rgba(230, 210, 150, 0.48);
}

.home-choice .petals i {
  width: 14px;
  height: 8px;
  border-radius: 70% 20% 70% 20%;
  background: rgba(232, 194, 178, 0.66);
  transform: rotate(18deg);
}

.home-choice .ink-dots i {
  width: 9px;
  height: 7px;
  border-radius: 50%;
  background: rgba(35, 35, 32, 0.34);
  filter: blur(0.55px);
}

.home-choice.is-active-guide .ripple {
  opacity: 0.13;
  animation: quietWaterBreath 2s ease-in-out infinite;
}

.home-choice.is-active-guide .leaf {
  opacity: 0.14;
  animation: quietLeafSway 2.6s ease-in-out infinite;
}

.home-choice-layer.all-unlocked .home-choice .ripple {
  opacity: 0.11;
  animation: quietWaterBreath 2.15s ease-in-out infinite;
}

.home-choice-layer.all-unlocked .home-choice .leaf {
  opacity: 0.14;
  animation: quietLeafSway 2.8s ease-in-out infinite;
}

.home-choice.is-completed:not(.is-active-guide) .ripple {
  opacity: 0;
  animation: none;
}

.home-choice.is-completed:not(.is-active-guide) .leaf {
  opacity: 0;
  animation: none;
}

.home-choice.is-completed:not(.is-active-guide) .ink,
.home-choice.is-completed:not(.is-active-guide) .spark,
.home-choice.is-completed:not(.is-active-guide) .petals,
.home-choice.is-completed:not(.is-active-guide) .ink-dots {
  opacity: 0;
  animation: none;
}

.home-choice.is-locked {
  cursor: default;
  pointer-events: none;
}

.home-choice.is-locked .ripple,
.home-choice.is-locked .ink,
.home-choice.is-locked .leaf,
.home-choice.is-locked .spark,
.home-choice.is-locked .petals,
.home-choice.is-locked .ink-dots {
  opacity: 0;
  animation: none;
}

.home-choice:not(.is-locked):hover {
  -webkit-backdrop-filter: brightness(1.03) blur(0.2px);
  backdrop-filter: brightness(1.03) blur(0.2px);
}

.home-choice:not(.is-locked):hover .ripple {
  opacity: 0.42;
  animation: hoverWaterRipple 1.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.home-choice:not(.is-locked):hover .ink {
  opacity: 0.72;
  animation: hoverInkGather 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-choice:not(.is-locked):hover .leaf {
  opacity: 0.28;
  animation: hoverLeafSway 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-choice.is-clicking {
  animation: inkClickLift 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-choice.is-clicking .ripple {
  animation: clickWaterRipple 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-choice.is-clicking .ink {
  animation: clickInkBloom 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-choice.is-clicking .leaf {
  opacity: 0.26;
  animation: hoverLeafSway 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-choice[data-step="1"].is-clicking .ink-dots i {
  animation: clickInkDot 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-choice[data-step="2"].is-clicking .spark i {
  animation: clickGoldSpark 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.home-choice[data-step="3"].is-clicking .petals i {
  animation: clickPetalDrift 1.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.choice-1 {
  left: 4.5%;
  top: 68.5%;
  width: 29%;
  height: 13%;
}

.choice-2 {
  left: 35%;
  top: 68%;
  width: 28%;
  height: 13%;
}

.choice-3 {
  left: 66.5%;
  top: 68%;
  width: 29%;
  height: 13%;
}

@keyframes quietWaterBreath {
  0%,
  100% {
    transform: scale(0.86);
    opacity: 0.08;
  }

  50% {
    transform: scale(1.03);
    opacity: 0.14;
  }
}

@keyframes imageGuideBreath {
  0%,
  100% {
    opacity: 0.46;
    transform: scale(0.9);
    filter: blur(0.2px);
  }

  50% {
    opacity: 0.78;
    transform: scale(1.03);
    filter: blur(0.35px) brightness(1.1);
  }
}

@keyframes imageClickImpact {
  0% {
    opacity: 0.82;
    transform: scale(0.72);
  }

  22% {
    opacity: 0.9;
    transform: scale(1.05);
  }

  58% {
    opacity: 0.48;
    transform: scale(1.35);
  }

  100% {
    opacity: 0;
    transform: scale(1.75);
  }
}

@keyframes imageClickRing {
  0% {
    opacity: 0.72;
    transform: scale(0.7);
    border-color: rgba(255, 255, 252, 0.58);
  }

  100% {
    opacity: 0;
    transform: scale(1.9);
    border-color: rgba(255, 248, 230, 0);
  }
}

@keyframes imageInkWash {
  0% {
    opacity: 0.16;
    transform: scale(0.85);
    border-color: rgba(88, 78, 48, 0.22);
    box-shadow: inset 0 0 18px rgba(70, 62, 42, 0.09);
  }

  42% {
    opacity: 0.5;
  }

  100% {
    opacity: 0;
    transform: scale(1.75);
    border-color: rgba(40, 40, 40, 0);
    box-shadow: inset 0 0 34px rgba(40, 40, 40, 0);
  }
}

@keyframes quietLeafSway {
  0%,
  100% {
    transform: rotate(-1deg);
  }

  50% {
    transform: rotate(1deg);
  }
}

@keyframes hoverWaterRipple {
  0% {
    transform: scale(0.72);
    opacity: 0.2;
  }

  52% {
    opacity: 0.42;
  }

  100% {
    transform: scale(1.18);
    opacity: 0.12;
  }
}

@keyframes hoverInkGather {
  0% {
    transform: scale(1.08);
    opacity: 0;
  }

  100% {
    transform: scale(0.98);
    opacity: 0.72;
  }
}

@keyframes hoverLeafSway {
  0% {
    transform: rotate(0deg);
  }

  35% {
    transform: rotate(1.8deg);
  }

  72% {
    transform: rotate(-0.8deg);
  }

  100% {
    transform: rotate(0deg);
  }
}

@keyframes inkClickLift {
  0%,
  100% {
    transform: scale(1);
  }

  28% {
    transform: scale(1.025);
  }
}

@keyframes clickWaterRipple {
  0% {
    transform: scale(0.56);
    opacity: 0.5;
  }

  25% {
    opacity: 0.78;
  }

  62% {
    transform: scale(1.38);
    opacity: 0.24;
  }

  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

@keyframes clickInkBloom {
  0% {
    transform: scale(0.72);
    opacity: 0;
  }

  25% {
    transform: scale(0.96);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

.home-choice .ink-dots i:nth-child(1) { --dx: -42px; --dy: -26px; }
.home-choice .ink-dots i:nth-child(2) { --dx: 34px; --dy: -30px; }
.home-choice .ink-dots i:nth-child(3) { --dx: -18px; --dy: 30px; }
.home-choice .ink-dots i:nth-child(4) { --dx: 46px; --dy: 20px; }
.home-choice .ink-dots i:nth-child(5) { --dx: 8px; --dy: -48px; }

.home-choice .spark i:nth-child(1) { --dx: -38px; --dy: -38px; animation-delay: 40ms; }
.home-choice .spark i:nth-child(2) { --dx: 36px; --dy: -44px; animation-delay: 100ms; }
.home-choice .spark i:nth-child(3) { --dx: -12px; --dy: -62px; animation-delay: 160ms; }
.home-choice .spark i:nth-child(4) { --dx: 52px; --dy: -18px; animation-delay: 220ms; }
.home-choice .spark i:nth-child(5) { --dx: -52px; --dy: -14px; animation-delay: 280ms; }
.home-choice .spark i:nth-child(6) { --dx: 10px; --dy: -32px; animation-delay: 340ms; }

.home-choice .petals i:nth-child(1) { --dx: -46px; --dy: -34px; --rot: -34deg; animation-delay: 80ms; }
.home-choice .petals i:nth-child(2) { --dx: 38px; --dy: -44px; --rot: 42deg; animation-delay: 150ms; }
.home-choice .petals i:nth-child(3) { --dx: -12px; --dy: -62px; --rot: 22deg; animation-delay: 230ms; }
.home-choice .petals i:nth-child(4) { --dx: 54px; --dy: -20px; --rot: 62deg; animation-delay: 310ms; }

@keyframes clickInkDot {
  0%, 24% {
    opacity: 0;
    transform: translate(0, 0) scale(0.7);
  }

  42% {
    opacity: 0.62;
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1.05);
  }
}

@keyframes clickGoldSpark {
  0%, 28% {
    opacity: 0;
    transform: translate(0, 0) scale(0.6);
  }

  48% {
    opacity: 0.92;
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) scale(1);
  }
}

@keyframes clickPetalDrift {
  0%, 30% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }

  50% {
    opacity: 0.82;
  }

  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
  }
}

.scene-shell {
  width: min(1440px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0;
}

.scene-board {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1080 / 608;
  border-radius: 24px;
  background: #c7dceb;
  box-shadow: var(--shadow);
}

.scene-board::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 28%, transparent 76%, rgba(39, 55, 65, 0.1));
  opacity: 0;
  transition: opacity 320ms ease;
}

.scene-board.is-finished::after {
  opacity: 1;
}

.timeline-video,
.node-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.timeline-video {
  object-fit: fill;
  object-position: center;
  user-select: none;
}

.node-layer {
  z-index: 3;
  pointer-events: none;
}

.timeline-node {
  position: absolute;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  transition: opacity 280ms ease, transform 280ms ease, filter 280ms ease;
}

.lotus-node {
  width: clamp(92px, 8.8vw, 150px);
  aspect-ratio: 1.45 / 1;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  display: grid;
  place-items: center;
}

.lotus-1 {
  background-image: url("lotus-1.png");
}

.lotus-2 {
  background-image: url("lotus-2.png");
}

.lotus-3 {
  background-image: url("lotus-3.png");
}

.lotus-4 {
  background-image: url("lotus-4.png");
}

.lotus-5 {
  background-image: url("lotus-5.png");
}

.timeline-node.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.timeline-node.is-clickable {
  pointer-events: auto;
  filter:
    drop-shadow(0 0 10px rgba(255, 235, 160, 0.9))
    drop-shadow(0 0 24px rgba(201, 148, 58, 0.65))
    drop-shadow(0 0 48px rgba(201, 148, 58, 0.3));
}


.timeline-node.is-clickable::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 8%;
  height: 42%;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at center, rgba(255, 248, 226, 0.34) 0%, rgba(222, 197, 130, 0.12) 42%, transparent 72%);
  opacity: 0.62;
  pointer-events: none;
  animation: nodeSoftGlow 1.4s ease-in-out infinite;
}

.timeline-node.is-clickable button {
  animation: nodeInvite 1.7s ease-in-out infinite;
}

.timeline-node.is-current button {
  animation: currentNode 0.95s ease-in-out infinite;
}

.timeline-node button {
  display: block;
  width: 100%;
  height: 100%;
  border: none;
  padding: 18% 12% 14%;
  background: transparent;
  color: #fffaf0;
  font: inherit;
  cursor: pointer;
  transition: transform 220ms ease;
}

.timeline-node.is-clickable button:hover {
  transform: translateY(-2px);
}

.scene-text-node {
  min-width: clamp(96px, 10vw, 168px);
}

.scene-text-node .scene-text-button {
  width: auto;
  min-width: 100%;
  height: auto;
  padding: 8px 18px;
}

.scene-text-label {
  display: inline-block;
  color: #fffaf0;
  font-size: clamp(18px, 1.8vw, 30px);
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-shadow:
    -2px -2px 0 rgba(44, 39, 33, 0.82),
    2px -2px 0 rgba(44, 39, 33, 0.82),
    -2px 2px 0 rgba(44, 39, 33, 0.82),
    2px 2px 0 rgba(44, 39, 33, 0.82),
    0 6px 14px rgba(42, 34, 26, 0.34);
}

.scene-text-node.is-clickable::before {
  left: 4%;
  right: 4%;
  bottom: 0;
  height: 60%;
}

.scene-text-node.is-current .scene-text-button {
  animation: currentNode 1.2s ease-in-out infinite;
}

.scene-text-node.is-clicking .scene-text-button {
  animation: currentNode 0.6s ease-in-out 2;
}

.scene-board.is-debug-mode .scene-text-node {
  opacity: 1;
}

.scene-board.is-debug-mode .scene-text-node.is-debug-selected .scene-text-button {
  filter:
    drop-shadow(0 0 8px rgba(255, 248, 226, 0.82))
    drop-shadow(0 0 20px rgba(222, 197, 130, 0.4));
}

.node-label {
  display: inline-block;
  color: #fffaf0;
  font-size: clamp(10px, 1.05vw, 18px);
  font-weight: 800;
  line-height: 1.2;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    -2px -2px 0 rgba(44, 39, 33, 0.78),
    2px -2px 0 rgba(44, 39, 33, 0.78),
    -2px 2px 0 rgba(44, 39, 33, 0.78),
    2px 2px 0 rgba(44, 39, 33, 0.78),
    0 4px 8px rgba(42, 34, 26, 0.28);
}

@keyframes currentNode {
  0%,
  100% {
    opacity: 0.8;
    transform: scale(0.96);
  }

  50% {
    opacity: 1;
    transform: scale(1.14);
  }
}

@keyframes nodeSoftGlow {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.88);
  }

  50% {
    opacity: 1;
    transform: scale(1.18);
  }
}

@keyframes nodeInvite {
  0%,
  100% {
    transform: scale(0.97);
    opacity: 0.88;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}


.restart-button {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 3;
  border: 1px solid rgba(76, 58, 42, 0.24);
  border-radius: 999px;
  padding: 10px 18px;
  background: rgba(255, 251, 244, 0.88);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(46, 36, 28, 0.16);
}

.audio-unlock-btn {
  position: absolute;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 4;
  border: 1px solid rgba(76, 58, 42, 0.24);
  border-radius: 999px;
  padding: 9px 20px;
  background: rgba(255, 251, 244, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(46, 36, 28, 0.16);
  transition: opacity 0.6s ease, transform 0.6s ease;
  animation: audioUnlockPulse 2.5s ease-in-out infinite;
}

.audio-unlock-btn.is-hiding {
  opacity: 0;
  transform: translateX(-50%) translateY(10px);
  pointer-events: none;
}

@keyframes audioUnlockPulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(46, 36, 28, 0.16); }
  50%       { box-shadow: 0 10px 28px rgba(46, 36, 28, 0.28), 0 0 0 4px rgba(201, 148, 58, 0.15); }
}

.home-return {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 4;
  padding: 10px 18px;
  border: 1px solid rgba(76, 58, 42, 0.2);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.86);
  color: var(--ink);
  font: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(46, 36, 28, 0.14);
}

.subpage-shell {
  width: min(1440px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0;
}

.subpage-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 24px;
  background: #c7dceb;
  box-shadow: var(--shadow);
}

.subpage-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
}

.subpage-return {
  left: auto;
  right: 18px;
}

.story-shell {
  width: min(1440px, calc(100vw - 24px));
  margin: 0 auto;
  padding: 12px 0;
}

.story-board {
  position: relative;
  min-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(236, 243, 247, 0.98), rgba(228, 238, 244, 0.96));
  box-shadow: var(--shadow);
}

.story-layout {
  display: flex;
  flex-direction: column;
  width: min(980px, calc(100% - 56px));
  margin: 34px auto 88px;
  padding: 26px 26px 32px;
  border: 1px solid rgba(88, 64, 44, 0.1);
  background: rgba(255, 251, 244, 0.94);
  box-shadow: 0 18px 40px rgba(42, 34, 26, 0.12);
}

.story-video-panel {
  display: flex;
  justify-content: center;
  padding: 0;
  background: transparent;
}

.story-video-frame {
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(76, 58, 42, 0.12);
  border-radius: 12px;
  background: #111;
  box-shadow: 0 16px 34px rgba(38, 34, 30, 0.16);
  overflow: hidden;
}

.story-play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 110px;
  height: 110px;
  border: none;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 45%, rgba(255, 250, 240, 0.96), rgba(238, 225, 202, 0.92));
  box-shadow:
    0 18px 34px rgba(44, 33, 24, 0.28),
    0 0 0 10px rgba(255, 250, 240, 0.18);
  cursor: pointer;
  transition: opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.story-play-button:hover {
  transform: translate(-50%, -50%) scale(1.04);
  box-shadow:
    0 18px 34px rgba(44, 33, 24, 0.32),
    0 0 0 12px rgba(255, 250, 240, 0.22);
}

.story-play-button.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.story-play-icon {
  position: absolute;
  left: 53%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-50%, -50%);
  border-top: 18px solid transparent;
  border-bottom: 18px solid transparent;
  border-left: 30px solid rgba(86, 58, 34, 0.9);
}

.story-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

html.no-splash .entry-splash {
  display: none;
}

/* Entry splash */
.entry-splash {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: #060303;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 1.2s ease;
  user-select: none;
}

.entry-splash.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.entry-splash-content {
  text-align: center;
  color: #c9943a;
  font-family: "Noto Serif SC", "STSong", "SimSun", serif;
}

.entry-splash-sub {
  font-size: 0.8rem;
  letter-spacing: 0.55em;
  opacity: 0.45;
  margin: 0 0 1.8rem;
}

.entry-splash-title {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 300;
  letter-spacing: 0.6em;
  margin: 0;
  line-height: 1;
  text-indent: 0.6em;
}

.entry-splash-hint {
  margin-top: 3.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.45em;
  text-indent: 0.45em;
  animation: splashPulse 2.8s ease-in-out infinite;
}

@keyframes splashPulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.75; }
}

.story-copy-panel {
  padding: 24px 0 0;
  display: flex;
  flex-direction: column;
  background: transparent;
  border-top: 0;
}

.story-kicker {
  margin: 0 0 10px;
  color: #996741;
  font-size: 13px;
  letter-spacing: 0.2em;
}

.story-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 3.2vw, 46px);
  color: #31241a;
}

.story-year {
  margin: 0 0 24px;
  font-size: 16px;
  color: rgba(60, 45, 36, 0.72);
}

.story-content {
  flex: 1;
  padding-right: 4px;
  overflow: visible;
}

.story-return {
  position: fixed;
  left: max(24px, calc((100vw - min(1440px, calc(100vw - 24px))) / 2 + 24px));
  bottom: 24px;
  z-index: 20;
}


.sleepwood-return {
  left: auto;
  right: 18px;
}

.sleepwood-choice-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}

.sleepwood-choice-layer.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sleepwood-hotspot-layer {
  position: absolute;
  inset: 0;
}

.sleepwood-hotspot-layer {
  z-index: 3;
  display: none;
}

.sleepwood-hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24%;
  height: 10%;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.sleepwood-hotspot.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.sleepwood-hotspot.is-clicking {
  animation: inkClickLift 0.9s ease-in-out;
}

.sleepwood-hotspot.is-locked,
.sleepwood-hotspot.is-completed {
  opacity: 0;
  pointer-events: none;
}

.sleepwood-effect {
  transform: translate(-50%, -50%);
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 252, 0.78) 0%, rgba(255, 248, 222, 0.5) 28%, rgba(226, 203, 135, 0.28) 52%, transparent 76%);
  box-shadow:
    0 0 30px rgba(255, 255, 252, 0.72),
    0 0 68px rgba(226, 203, 135, 0.42),
    inset 0 0 38px rgba(255, 255, 255, 0.32);
  opacity: 0.86;
}

.sleepwood-effect::before {
  border-color: rgba(255, 255, 252, 0.62);
  opacity: 0.84;
}

.sleepwood-effect::after {
  border-color: rgba(122, 96, 45, 0.24);
  opacity: 0.82;
}

.sleepwood-effect.is-interactive {
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: auto;
  background-color: transparent;
}

.sleepwood-effect.is-interactive:focus {
  outline: none;
}

.sleepwood-effect-1,
.sleepwood-effect-2,
.sleepwood-effect-3,
.sleepwood-effect-4,
.sleepwood-effect-5 {
  width: 24%;
  height: 10%;
}

.scene-board.is-debug-mode .sleepwood-hotspot {
  pointer-events: none;
  opacity: 0;
}

.scene-board.is-debug-mode .sleepwood-effect.is-debug-marker {
  opacity: 0.34;
  animation: imageGuideBreath 1.75s ease-in-out infinite;
}

.scene-board.is-debug-mode .sleepwood-effect.is-debug-marker.is-current-target {
  opacity: 0.58;
}

.scene-board.is-debug-mode .sleepwood-effect.is-debug-marker.is-debug-selected {
  opacity: 0.92;
  animation: imageGuideBreath 1.45s ease-in-out infinite;
}

.scene-debug-panel {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 8;
  width: min(320px, calc(100% - 36px));
  padding: 14px 14px 12px;
  border: 1px solid rgba(76, 58, 42, 0.14);
  border-radius: 18px;
  background: rgba(255, 251, 244, 0.9);
  box-shadow: 0 12px 28px rgba(46, 36, 28, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.scene-debug-panel.is-collapsed {
  width: auto;
  padding: 10px;
}

.scene-debug-panel.is-collapsed .scene-debug-body {
  display: none;
}

.scene-debug-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(76, 58, 42, 0.16);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.scene-debug-toggle.is-expanded {
  margin-bottom: 10px;
}

.scene-debug-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
}

.scene-debug-buttons,
.scene-debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scene-debug-buttons {
  margin-bottom: 10px;
}

.scene-debug-status {
  margin: 0 0 10px;
  min-height: 38px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(51, 38, 30, 0.82);
}

.scene-debug-panel button {
  border: 1px solid rgba(76, 58, 42, 0.16);
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.scene-debug-panel button.is-selected {
  background: rgba(240, 229, 208, 0.96);
  border-color: rgba(131, 100, 67, 0.28);
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(31, 43, 48, 0.42);
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.detail-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.detail-card {
  width: 100%;
  max-width: 980px;
  min-height: min(720px, calc(100vh - 48px));
  max-height: min(840px, calc(100vh - 48px));
  padding: 54px 60px 40px;
  background: var(--paper);
  box-shadow: var(--shadow);
  position: relative;
  display: flex;
  flex-direction: column;
}

.detail-card::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(88, 64, 44, 0.12);
  pointer-events: none;
}

.detail-header,
.detail-content,
.back-button {
  position: relative;
  z-index: 1;
}

.detail-header {
  text-align: center;
  margin-bottom: 28px;
}

.detail-era {
  margin: 0 0 8px;
  color: #996741;
  font-size: 13px;
  letter-spacing: 0.2em;
}

.detail-title {
  margin: 0 0 8px;
  font-size: clamp(28px, 3.2vw, 42px);
  color: #31241a;
}

.detail-year {
  margin: 0;
  font-size: 16px;
  color: rgba(60, 45, 36, 0.72);
}

.detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 18px 0 6px;
}

.detail-content p {
  margin: 0 0 18px;
  font-size: 18px;
  line-height: 1.95;
}

.detail-media-grid {
  display: grid;
  gap: 14px;
  margin: 0 0 22px;
}

.detail-media-grid-duo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.detail-media-grid-duo .detail-media-image {
  height: clamp(300px, 44vw, 430px);
}

.detail-media-grid-portrait {
  align-items: start;
}

.detail-media-grid-duo .detail-media-image-portrait {
  height: clamp(430px, 58vw, 620px);
  object-fit: contain;
  background: rgba(255, 251, 244, 0.9);
}

.detail-media-grid-triple {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-media-image {
  display: block;
  width: 100%;
  border-radius: 8px;
  border: 1px solid rgba(88, 64, 44, 0.12);
  box-shadow: 0 10px 24px rgba(46, 36, 28, 0.12);
  object-fit: cover;
}

.detail-media-image-large {
  max-height: 360px;
  object-fit: contain;
  background: rgba(255, 251, 244, 0.9);
}

.detail-inline-link {
  color: #8b5d36;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-inline-link:hover {
  color: #6f4523;
}

.detail-vr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin: -8px 0 18px;
  padding: 8px 14px;
  border: 1px solid rgba(139, 93, 54, 0.2);
  border-radius: 999px;
  background: rgba(250, 244, 234, 0.88);
  box-shadow: 0 8px 18px rgba(46, 36, 28, 0.08);
}

.detail-vr-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #8b5d36;
  color: #fffaf2;
  font-size: 14px;
  font-weight: 700;
}


.detail-content p:first-child {
  font-size: 22px;
  font-weight: 600;
}

.detail-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
  position: relative;
  z-index: 1;
}

.vr-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 44px);
  background: rgba(29, 22, 16, 0.62);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.vr-overlay.is-visible {
  display: flex;
}

.vr-card {
  width: min(1180px, 96vw);
  height: min(760px, 88vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 248, 236, 0.28);
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.vr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
  color: #3c2d24;
  background: rgba(250, 244, 234, 0.96);
  border-bottom: 1px solid rgba(88, 64, 44, 0.14);
}

.vr-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vr-close-button {
  border: 1px solid rgba(139, 93, 54, 0.32);
  border-radius: 999px;
  padding: 7px 14px;
  font: inherit;
  font-size: 14px;
  color: #6f4523;
  background: rgba(255, 253, 248, 0.9);
  text-decoration: none;
  cursor: pointer;
}

.vr-close-button {
  color: #fffaf2;
  background: #8b5d36;
}

.vr-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #fff;
}

.back-button {
  display: block;
  padding: 14px 38px;
  font-size: 18px;
  font-family: inherit;
  border: 1px solid rgba(76, 58, 42, 0.2);
  border-radius: 999px;
  background: rgba(255, 251, 244, 0.9);
  color: var(--ink);
  cursor: pointer;
}

.back-button.primary {
  background: rgba(240, 229, 208, 0.96);
}

@media (max-width: 900px) {
  .scene-shell {
    width: min(100vw - 20px, 1440px);
    padding-top: 10px;
  }

  .node-label {
    font-size: 12px;
  }

  .restart-button {
    right: 10px;
    bottom: 10px;
    padding: 8px 12px;
    font-size: 14px;
  }

  .detail-card {
    min-height: auto;
    max-height: calc(100vh - 28px);
    padding: 34px 22px 28px;
  }

  .detail-content p {
    font-size: 15px;
  }

  .detail-media-grid-duo,
  .detail-media-grid-triple {
    grid-template-columns: 1fr;
  }

  .detail-media-grid-duo .detail-media-image {
    height: auto;
  }

  .back-button {
    flex: 1;
    font-size: 16px;
  }

  .detail-actions {
    gap: 10px;
  }

  .story-video-panel {
    padding: 0;
  }

  .story-copy-panel {
    padding: 18px 0 0;
  }

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

  .story-layout {
    min-height: auto;
    width: min(100% - 20px, 980px);
    margin: 12px auto 82px;
    padding: 14px 14px 22px;
  }
}
