/* ==========================================================================
   PROJECT LET GO — THE CLEARING
   Phase 6: Integrated Letting-Go Ritual + Full-Screen Campsite Sanctuary
   ========================================================================== */

:root {
  --scene-w: 1672;
  --scene-h: 941;
  --night-bg: #0b0e1c;
  --moon-cream: #f7ead4;
  --moon-soft: rgba(247, 234, 212, 0.72);
  --moon-faint: rgba(247, 234, 212, 0.42);
  --amber: #f5a352;
  --amber-glow: rgba(245, 163, 82, 0.28);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --handwriting: "Homemade Apple", Georgia, cursive;
  --handwriting: "Homemade Apple", "EB Garamond", Georgia, cursive;
  --sans: "EB Garamond", Georgia, "Times New Roman", serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--night-bg);
  color: var(--moon-cream);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

[inert] { pointer-events: none; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   1. FULL-SCREEN CAMPSITE VIEWPORT & PIXEL-ART LAYERS
   ========================================================================== */
.clearing-viewport {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--night-bg);
  user-select: none;
  -webkit-user-select: none;
}

.scene-stage {
  position: absolute;
  width: 1672px;
  height: 941px;
  transform-origin: 0 0;
  will-change: transform;
  background-color: var(--night-bg);
}

.scene-layer {
  position: absolute;
  display: block;
  pointer-events: none;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  image-rendering: pixelated;
}

/* Subtle independent environmental breeze animations */
#layer-hanging_lantern {
  transform-origin: 50% 4%;
  animation: lanternSway 8.2s ease-in-out infinite;
}
#layer-left_tree {
  transform-origin: 0% 100%;
  animation: leftTreeBreeze 13.5s ease-in-out infinite;
}
#layer-right_tree {
  transform-origin: 100% 100%;
  animation: rightTreeBreeze 16.2s ease-in-out infinite;
}

@keyframes lanternSway {
  0%, 100% { transform: rotate(-1.35deg); }
  50%      { transform: rotate(1.45deg); }
}
@keyframes leftTreeBreeze {
  0%, 100% { transform: rotate(0deg) translate3d(0, 0, 0); }
  45%      { transform: rotate(0.42deg) translate3d(1.5px, 0.5px, 0); }
  75%      { transform: rotate(-0.18deg) translate3d(-0.5px, 0, 0); }
}
@keyframes rightTreeBreeze {
  0%, 100% { transform: rotate(0deg) translate3d(0, 0, 0); }
  38%      { transform: rotate(-0.38deg) translate3d(-1.5px, 0.5px, 0); }
  72%      { transform: rotate(0.22deg) translate3d(0.6px, 0, 0); }
}

/* Bear rig & unified marshmallow stick rig */
.bear-hitbox {
  position: absolute;
  left: 952px;
  top: 348px;
  width: 478px;
  height: 422px;
  z-index: 25;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
}
body:not([data-state="campsite"]) .bear-hitbox {
  pointer-events: none;
  cursor: default;
}

#layer-bear_body {
  transform-origin: 50% 94%;
  will-change: transform;
}

#fx-bear-face-canvas {
  position: absolute;
  left: 1031px;
  top: 349px;
  width: 398px;
  height: 419px;
  z-index: 14;
  pointer-events: none;
  image-rendering: pixelated;
  transform-origin: 50% 94%;
  will-change: transform;
}

#stick-rig {
  position: absolute;
  inset: 0;
  z-index: 15;
  pointer-events: none;
  transform-origin: 1230px 743px;
  will-change: transform;
}

#layer-marshmallow {
  transform-origin: 50% 50%;
  will-change: transform, opacity, filter;
}

#layer-music_note {
  will-change: transform, opacity;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* ==========================================================================
   2. ATMOSPHERIC VEIL & BURN CANVAS (Sits over scene during ritual states)
   ========================================================================== */
.ritual-veil {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 42%,
    rgba(9, 12, 26, 0.72) 0%,
    rgba(9, 12, 26, 0.52) 55%,
    rgba(9, 12, 26, 0.32) 100%
  );
  opacity: 0;
  transition: opacity 1.1s ease;
}

body[data-state="writing"] .ritual-veil,
body[data-state="preview"] .ritual-veil {
  opacity: 1;
}

body[data-state="final"] .ritual-veil {
  background: radial-gradient(
    ellipse at 50% 54%,
    rgba(9, 12, 26, 0.56) 0%,
    rgba(9, 12, 26, 0.16) 65%,
    rgba(9, 12, 26, 0.05) 100%
  );
  opacity: 1;
}

/* Full-screen pixel-art burning words canvas */
.burn-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 55;
  pointer-events: none;
  image-rendering: pixelated;
}

/* ==========================================================================
   3. BORDERLESS MOONLIT WRITING & REVIEW VIEWS (No clunky boxes!)
   ========================================================================== */
.ritual-stage {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 40px);
}

.wordmark {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: max(22px, env(safe-area-inset-left));
  z-index: 70;
  pointer-events: none;
  transition: opacity 1.2s ease;
}

body[data-state="campsite"] .wordmark,
body[data-state="burning"] .wordmark,
body[data-state="journey"] .wordmark {
  opacity: 0;
}

.wordmark-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--moon-cream);
  opacity: 0.78;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.view {
  position: absolute;
  width: min(640px, calc(100vw - 40px));
  max-height: 76dvh;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.85s ease, transform 0.85s ease, visibility 0s linear 0.85s;
}

.view.is-active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.95s ease 0.12s, transform 0.95s ease 0.12s, visibility 0s;
}

.view.is-active:not([inert]) {
  pointer-events: auto;
}

/* Soft, open, borderless writing composition floating directly in the night air */
.ritual-heading {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 2.65rem);
  letter-spacing: 0.01em;
  color: var(--moon-cream);
  text-shadow: 0 2px 18px rgba(7, 10, 22, 0.85);
}
.ritual-heading:focus { outline: none; }

.ritual-sub {
  margin: 8px 0 22px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.05rem, 2.1vw, 1.24rem);
  color: var(--moon-soft);
  text-shadow: 0 2px 12px rgba(7, 10, 22, 0.85);
}

/* Borderless writing well with whisper-faint firelit top/bottom hairlines */
.writing-well {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 0;
  border-top: 1px solid rgba(245, 163, 82, 0.22);
  border-bottom: 1px solid rgba(245, 163, 82, 0.18);
  min-height: clamp(170px, 32dvh, 270px);
  max-height: 44dvh;
}

#letter {
  flex: 1 1 auto;
  width: 100%;
  min-height: 150px;
  border: 0;
  resize: none;
  background: transparent;
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.3vw, 1.52rem);
  line-height: 1.68;
  letter-spacing: 0.005em;
  color: var(--moon-cream);
  caret-color: var(--amber);
  text-shadow: 0 1px 10px rgba(7, 10, 22, 0.9);
  outline: none;
  user-select: text;
  -webkit-user-select: text;
}

#letter::placeholder {
  color: var(--moon-faint);
  font-style: italic;
}


/* Handcrafted aged, torn & stained pixel-art parchment (20_aged_parchment.png) */
.letter-paper {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  aspect-ratio: 624 / 416;
  max-height: 52dvh;
  padding: clamp(28px, 5vw, 46px) clamp(32px, 5.6vw, 52px);
  background: transparent;
  border: none;
  color: #2b1e16;
  filter:
    drop-shadow(0 18px 34px rgba(4, 6, 16, 0.72))
    drop-shadow(0 6px 18px rgba(245, 140, 48, 0.18));
}

.letter-paper-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  z-index: 0;
}

.letter-paper .review-scroll {
  position: relative;
  z-index: 1;
  scrollbar-color: rgba(120, 82, 46, 0.35) transparent;
}

.letter-paper .review-body {
  color: #2c1f17;
  text-shadow: none;
  font-family: var(--handwriting);
  font-style: normal;
  font-size: clamp(0.95rem, 1.8vw, 1.18rem);
  line-height: 2.05;
}

.review-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(245, 163, 82, 0.35) transparent;
}

.review-body {
  margin: 0;
  white-space: pre-wrap;
  word-wrap: break-word;
  font-family: var(--serif);
  font-size: clamp(1.24rem, 2.3vw, 1.52rem);
  line-height: 1.68;
  letter-spacing: 0.005em;
  color: var(--moon-cream);
  text-shadow: 0 1px 12px rgba(7, 10, 22, 0.92);
}

.gentle-note {
  min-height: 20px;
  margin: 10px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.96rem;
  color: #f7be7c;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
}

.ritual-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.ritual-actions-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.privacy-whisper {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--moon-faint);
}

/* Soft firelit buttons (no harsh chunky borders) */
.btn-fire {
  appearance: none;
  border: 1px solid rgba(245, 163, 82, 0.55);
  background: rgba(245, 163, 82, 0.16);
  color: #ffe6c4;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 0 22px rgba(245, 163, 82, 0.14);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.btn-fire:hover,
.btn-fire:focus-visible {
  background: rgba(245, 163, 82, 0.28);
  border-color: rgba(245, 163, 82, 0.88);
  box-shadow: 0 0 28px rgba(245, 163, 82, 0.3);
  outline: none;
}

.btn-fire:active {
  transform: translateY(1px);
}

.btn-fire:disabled {
  opacity: 0.45;
  cursor: default;
}

.btn-whisper {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--moon-soft);
  padding: 8px 4px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(247, 234, 212, 0.25);
  text-underline-offset: 5px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.btn-whisper:hover,
.btn-whisper:focus-visible {
  color: var(--moon-cream);
  text-decoration-color: rgba(245, 163, 82, 0.7);
  outline: none;
}

/* Final comforting sky view */
.view-final {
  text-align: center;
  align-items: center;
  margin-top: 14dvh;
}

.final-line {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.65rem, 4vw, 2.45rem);
  line-height: 1.42;
  color: var(--moon-cream);
  text-shadow: 0 2px 24px rgba(5, 8, 20, 0.92);
}

.final-sub {
  margin: 10px 0 28px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1rem, 2.3vw, 1.38rem);
  color: var(--moon-soft);
  text-shadow: 0 2px 16px rgba(5, 8, 20, 0.92);
}

.final-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

/* Subtle Skip button (only visible while burning or rising to sky) */
.skip-btn {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 80;
  appearance: none;
  border: 1px solid rgba(247, 234, 212, 0.22);
  background: rgba(15, 18, 33, 0.55);
  color: var(--moon-soft);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: opacity 0.25s ease, border-color 0.2s ease, color 0.2s ease;
}

.skip-btn:hover {
  border-color: rgba(245, 163, 82, 0.6);
  color: var(--moon-cream);
}

/* ==========================================================================
   4. WHISPER-SUBTLE CORNER CONTROLS (Sound Panel + Optional Write Return)
   ========================================================================== */
.corner-controls {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 8px;
}

body[data-state="burning"] .corner-controls,
body[data-state="journey"] .corner-controls {
  opacity: 0;
  pointer-events: none;
}

.corner-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(255, 225, 181, 0.2);
  background: rgba(15, 18, 33, 0.48);
  color: rgba(255, 225, 181, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.42;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: opacity 0.25s ease, border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.corner-icon-btn:hover,
.corner-icon-btn:focus-visible {
  opacity: 0.94;
  border-color: rgba(245, 163, 82, 0.65);
  color: #ffe4bc;
  background: rgba(15, 18, 33, 0.76);
  outline: none;
}

.corner-icon-btn.is-active {
  opacity: 0.68;
  border-color: rgba(245, 163, 82, 0.5);
  color: var(--amber);
}

.corner-icon-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}

.audio-toggle .icon-sound-on { display: none; }
.audio-toggle .icon-sound-off { display: block; }
.audio-toggle.is-active .icon-sound-on { display: block; }
.audio-toggle.is-active .icon-sound-off { display: none; }

/* Only show the tiny feather button when already sitting in the campsite */
#btn-open-write {
  display: none;
}
body[data-state="campsite"] #btn-open-write {
  display: flex;
}

/* Dark translucent midnight-and-amber sound popover (matches our art direction) */
.sound-popover {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 48px);
  z-index: 160;
  width: min(304px, calc(100vw - 32px));
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(245, 163, 82, 0.24);
  background: rgba(14, 17, 32, 0.90);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  color: var(--moon-cream);
  font-size: 12.5px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s linear 0.24s;
}

.sound-popover.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0s;
}

.custom-music-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(245, 163, 82, 0.16);
}

.custom-music-label {
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  color: var(--moon-soft);
}

.custom-music-form {
  display: flex;
  gap: 6px;
}

.custom-music-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 6px 9px;
  border-radius: 8px;
  border: 1px solid rgba(245, 163, 82, 0.25);
  background: rgba(8, 10, 22, 0.72);
  color: var(--moon-cream);
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 12px;
  outline: none;
}

.custom-music-input:focus {
  border-color: rgba(245, 163, 82, 0.7);
}

.custom-music-input::placeholder {
  color: rgba(247, 234, 212, 0.36);
}

.custom-music-btn {
  appearance: none;
  border: 1px solid rgba(245, 163, 82, 0.45);
  background: rgba(245, 163, 82, 0.16);
  color: #ffe4bc;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.custom-music-btn:hover {
  background: rgba(245, 163, 82, 0.28);
  border-color: rgba(245, 163, 82, 0.8);
}

.custom-music-btn.is-quiet {
  border-color: rgba(247, 234, 212, 0.2);
  background: transparent;
  color: var(--moon-soft);
}

.custom-music-status {
  margin: 6px 0 0;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 11px;
  color: #f7be7c;
  min-height: 14px;
}

.custom-player-wrap {
  margin-top: 8px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(245, 163, 82, 0.2);
  background: #0b0e1c;
}

.custom-player-wrap iframe {
  display: block;
  width: 100%;
  border: 0;
}

.sound-popover-title {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--moon-soft);
}

.sound-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 10px;
}
.sound-row:last-child { margin-bottom: 0; }

.sound-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.sound-row label {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  color: var(--moon-cream);
}

.sound-row input[type="checkbox"] {
  accent-color: var(--amber);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.sound-row input[type="range"] {
  width: 100%;
  accent-color: var(--amber);
  cursor: pointer;
}

/* Keyboard-only developer comparison overlay (press R in campsite) */
.ref-compare-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  image-rendering: pixelated;
  transition: opacity 0.15s ease;
}
.ref-compare-overlay.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  #layer-hanging_lantern,
  #layer-left_tree,
  #layer-right_tree {
    animation: none !important;
  }
}


/* Phase 7: Whisper-soft marshmallow offer prompt & fleeting warmth line */
.bear-offer-prompt {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease, visibility 0s linear 0.8s;
}

.bear-offer-prompt.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  pointer-events: auto;
  transition: opacity 0.9s ease, transform 0.9s ease, visibility 0s;
}

.bear-offer-text {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.96rem, 1.9vw, 1.12rem);
  color: var(--moon-cream);
  text-shadow: 0 2px 14px rgba(5, 8, 20, 0.95);
  white-space: nowrap;
}

.btn-accept-marsh {
  appearance: none;
  border: 1px solid rgba(245, 163, 82, 0.55);
  background: rgba(15, 18, 33, 0.62);
  color: #ffe4bc;
  padding: 7px 16px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-accept-marsh:hover,
.btn-accept-marsh:focus-visible {
  background: rgba(245, 163, 82, 0.26);
  border-color: rgba(245, 163, 82, 0.88);
  box-shadow: 0 0 20px rgba(245, 163, 82, 0.28);
  outline: none;
}

.clearing-whisper {
  position: fixed;
  left: 50%;
  bottom: max(32px, env(safe-area-inset-bottom));
  transform: translate(-50%, 6px);
  z-index: 120;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(0.98rem, 1.9vw, 1.15rem);
  color: var(--moon-cream);
  text-shadow: 0 2px 14px rgba(5, 8, 20, 0.95);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.clearing-whisper.is-visible {
  opacity: 0.9;
  transform: translate(-50%, 0);
}


/* Real pixel-art bear pose sprites (eating & offering) for seamless non-wonky arm/stick motion */
.bear-pose-sprite {
  position: absolute;
  left: 920px;
  top: 342px;
  width: 515px;
  height: 432px;
  z-index: 15;
  pointer-events: none;
  image-rendering: -moz-crisp-edges;
  image-rendering: -webkit-crisp-edges;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  transform-origin: 60% 94%;
  opacity: 0;
  transition: opacity 0.38s ease;
  will-change: transform, opacity;
}

.bear-pose-sprite.is-active {
  opacity: 1;
}

#layer-bear_body,
#stick-rig {
  transition: opacity 0.35s ease;
}


/* Breathe with the Moon — subtle clickable moon & whisper-soft breath cue */
.moon-hitbox {
  position: absolute;
  left: 566px;
  top: 80px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  z-index: 25;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
}

body:not([data-state="campsite"]) .moon-hitbox {
  pointer-events: none;
  cursor: default;
}

.moon-breath-cue {
  position: absolute;
  left: 651px;
  top: 268px;
  transform: translateX(-50%);
  z-index: 30;
  pointer-events: none;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: 0.08em;
  color: #ffe8c6;
  text-shadow: 0 2px 16px rgba(6, 9, 22, 0.95);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.moon-breath-cue.is-visible {
  opacity: 0.78;
}
