/* Apple iOS / macOS Liquid Glass Editorial Cover + Fluid Magnetic Cursor + Single-Viewport SPA */

body.leeroy-stage {
  background: #080706 !important;
  color: #f3ede2;
  overflow: hidden !important;
  height: 100svh !important;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* Unified sleek top nav — NO bottom border line, PingFang Light, 12.08 matches nav ink! */
body.leeroy-stage .nav {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: opacity 0.28s ease;
}
body.leeroy-stage.in-room .nav {
  opacity: 0;
  pointer-events: none;
}
body.leeroy-stage .nav .brand {
  color: rgba(243, 237, 226, 0.86) !important;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 0.20em !important;
  font-size: 14px !important;
}
body.leeroy-stage .nav .brand i {
  display: none !important;
}

/* Minimalist Smoky Glass Top-Right Nav Capsule (matches Fig 1 Monkey ring aesthetic, razor-thin white rim!) */
body.leeroy-stage .nav .chapter-nav {
  background: rgba(28, 26, 24, 0.54) !important;
  border: 0.75px solid rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.36) !important;
  padding: 4px !important;
  border-radius: 999px !important;
  gap: 3px !important;
}
body.leeroy-stage .nav .chapter-nav a {
  color: rgba(243, 237, 226, 0.86) !important;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 300 !important;
  background: transparent !important;
  border: 0.75px solid transparent !important;
  padding: 5px 14px !important;
  border-radius: 999px !important;
  font-size: 12.5px !important;
  letter-spacing: 0.08em !important;
  transition: all 0.22s ease !important;
}
body.leeroy-stage .nav .chapter-nav a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.10) !important;
}
body.leeroy-stage .nav .chapter-nav a.active,
body.leeroy-stage .nav .chapter-nav a[aria-current="true"] {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(255, 255, 255, 0.32) !important;
  box-shadow: none !important;
}
body.leeroy-stage .nav .chapter-nav a.is-locked {
  color: rgba(243, 237, 226, 0.40) !important;
}

/* Hide legacy bright dividers, beige hero-copy banner & light hero clutter */
body.leeroy-stage .field-divider,
body.leeroy-stage .hero-matrix,
body.leeroy-stage .hero-copy,
body.leeroy-stage .orbit,
body.leeroy-stage .portrait-pool,
body.leeroy-stage .portrait-star,
body.leeroy-stage .scroll-cue {
  display: none !important;
}

/* Apple Liquid Glass Monkey Guide Popover & Tag */
body.leeroy-stage .monkey-card [lang="en"],
body.leeroy-stage .monkey-actions [lang="en"] {
  display: none !important;
}
body.leeroy-stage .monkey-toggle::before {
  inset: -18% -22% -8% !important;
  background: radial-gradient(ellipse at 50% 48%, rgba(226, 162, 83, 0.24) 0%, rgba(200, 142, 84, 0.09) 42%, transparent 72%) !important;
  filter: blur(24px) !important;
}
body.leeroy-stage .monkey-toggle::after {
  filter: blur(10px) !important;
  opacity: 0.42 !important;
}
body.leeroy-stage .monkey-toggle > span {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 300 !important;
  letter-spacing: 0.08em !important;
  color: rgba(248, 245, 240, 0.92) !important;
  background: rgba(28, 26, 24, 0.58) !important;
  border: 0.75px solid rgba(255, 255, 255, 0.36) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.38) !important;
  padding: 3px 11px !important;
}
body.leeroy-stage .monkey-card {
  border-radius: 20px !important;
  padding: 18px 20px 16px !important;
  background: rgba(28, 26, 24, 0.68) !important;
  border: 0.75px solid rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(16px) !important;
  -webkit-backdrop-filter: blur(16px) !important;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.52) !important;
  color: rgba(248, 246, 242, 0.94) !important;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
}
body.leeroy-stage .monkey-copy {
  font-weight: 300 !important;
  font-size: 14px !important;
  letter-spacing: 0.04em !important;
  color: rgba(250, 248, 244, 0.95) !important;
  margin: 0 28px 14px 0 !important;
}
body.leeroy-stage .monkey-close {
  right: 12px !important;
  top: 12px !important;
  width: 26px !important;
  height: 26px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  display: grid !important;
  place-items: center !important;
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  color: rgba(248, 246, 242, 0.82) !important;
  font-size: 14px !important;
  line-height: 1 !important;
  outline: none !important;
  transition: all 0.18s ease !important;
}
body.leeroy-stage .monkey-close:hover {
  background: rgba(255, 255, 255, 0.22) !important;
  color: #ffffff !important;
}
body.leeroy-stage .monkey-actions > * {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 300 !important;
  font-size: 12px !important;
  letter-spacing: 0.06em !important;
  padding: 6px 14px !important;
  border-radius: 999px !important;
  color: rgba(248, 246, 242, 0.92) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05)) !important;
  border: 1px solid rgba(255, 255, 255, 0.20) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  transition: all 0.18s ease !important;
}
body.leeroy-stage .monkey-actions > *:hover {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.10)) !important;
  border-color: rgba(255, 255, 255, 0.36) !important;
}

/* Minimalist Circular Smoky-Glass Music Icon Button (no text!) */
body.leeroy-stage #soundBtn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 38px !important;
  height: 38px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  color: rgba(243, 237, 226, 0.72) !important;
  background: rgba(28, 26, 24, 0.54) !important;
  border: 0.75px solid rgba(255, 255, 255, 0.34) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  box-shadow: none !important;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}
body.leeroy-stage #soundBtn:hover {
  border-color: rgba(255, 255, 255, 0.65) !important;
  color: #ffffff !important;
}
body.leeroy-stage #soundBtn[aria-pressed="true"],
body.leeroy-stage #soundBtn.is-playing {
  border-color: rgba(244, 183, 110, 0.76) !important;
  color: #f4b76e !important;
  box-shadow: 0 0 18px rgba(244, 183, 110, 0.22) !important;
}
body.leeroy-stage #soundBtn[aria-pressed="false"]::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 1px;
  background: rgba(243, 237, 226, 0.62);
  transform: rotate(-42deg);
  pointer-events: none;
}

/* Home Fireflies disabled per user preference */
#homeFireflies {
  display: none !important;
}

/* Keep Floating Monkey ALWAYS visible above all 360° room overlays & slightly enlarged! */
body.leeroy-stage #monkeyGuide:not(.is-hanging) {
  z-index: 96 !important;
}
body.leeroy-stage #monkeyGuide:not(.is-hanging) .monkey-toggle canvas {
  width: 152px !important;
  height: auto !important;
}
@media (max-width: 650px) {
  body.leeroy-stage #monkeyGuide:not(.is-hanging) .monkey-toggle canvas {
    width: 126px !important;
  }
}

/* Full-screen pitch-black velvet curtain hero (makes cursor warm spotlight stand out dramatically!) */
body.leeroy-stage .hero.section {
  position: relative;
  min-height: 100svh;
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 64px 20px 26px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  background:
    radial-gradient(circle at 50% 50%, #090807 0%, #030303 56%, #000000 100%) !important;
  overflow: hidden;
  perspective: 1100px;
}

/* Refined Center Spotlight Stage (portrait slightly smaller so dark stage breathes!) */
body.leeroy-stage .portrait-stage {
  position: relative;
  z-index: 2;
  margin: 0 auto !important;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(440px, 84vw) !important;
  height: min(65svh, 550px);
}
body.leeroy-stage .portrait-light {
  position: absolute;
  inset: -4% -8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 162, 83, 0.14) 0%, rgba(160, 118, 72, 0.04) 44%, transparent 70%);
  filter: blur(36px);
  pointer-events: none;
}
body.leeroy-stage .portrait-scene {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
  transform-style: preserve-3d;
}
body.leeroy-stage .portrait-anchor {
  position: relative;
  width: auto !important;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.leeroy-stage .hero-portrait {
  height: 100% !important;
  width: auto !important;
  max-height: min(63svh, 535px);
  max-width: 82vw;
  object-fit: contain;
  filter: var(--portrait-grade, contrast(1.03)) drop-shadow(0 30px 56px rgba(0, 0, 0, 0.92));
}

/* Keep scene navigation in its own row below the interactive portrait. */
.portal-orbit {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 2vw, 22px);
  max-width: 100%;
}
.portal-card {
  flex: none;
  overflow: hidden;
  width: clamp(44px, 14vw, 88px);
  aspect-ratio: 1;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  color: rgba(252, 248, 242, 0.96);
  background-image: linear-gradient(152deg, rgba(28, 20, 15, 0.36), rgba(14, 10, 8, 0.58)), url('tex-wood-ui.jpg');
  background-size: cover;
  background-position: center;
  border: 0.75px solid rgba(255, 244, 228, 0.36);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 242, 222, 0.22);
  transition: border-color 0.24s ease, filter 0.24s ease, box-shadow 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  cursor: pointer;
}
#portalDarkroom { background-position: 20% 25%; }
#portalTea      { background-position: 78% 45%; }
#portalWorkshop { background-position: 45% 80%; }
#portalTbc      { background-position: 69% 82%; }

.portal-card:hover {
  border-color: rgba(255, 244, 228, 0.72);
  filter: brightness(1.12);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.58), inset 0 1px 0 rgba(255, 244, 228, 0.30);
}
.portal-card.is-done {
  border-color: rgba(164, 242, 194, 0.58);
}
.portal-card.is-locked {
  opacity: 0.68;
  border-color: rgba(255, 244, 228, 0.22);
  filter: saturate(0.75) brightness(0.84);
}
.portal-card.is-unlocked-final {
  border-color: rgba(246, 202, 140, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.50), 0 0 24px rgba(226, 162, 83, 0.20);
}
.portal-card.shake { animation: portalShake 0.42s ease; }
@keyframes portalShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-7px); }
  55% { transform: translateX(7px); }
  80% { transform: translateX(-3px); }
}
.portal-title {
  position: relative;
  z-index: 1;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: 0.12em;
  padding-left: 0.12em;
  line-height: 1;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}
.portal-pill {
  position: relative;
  z-index: 1;
  font-weight: 300;
  font-size: 10px;
  letter-spacing: 0.10em;
  color: rgba(243, 237, 226, 0.64);
}
.portal-card.is-done .portal-pill { color: #a4f2c2; }
.portal-card.is-unlocked-final .portal-pill { color: #f6ca8c; }

.hero-micro-bar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 300;
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: rgba(243, 237, 226, 0.52);
}
.hero-wish-link {
  appearance: none;
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  color: rgba(248, 245, 240, 0.92);
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.10em;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hero-wish-link:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.09));
  color: #ffffff;
}

/* Single-Viewport Theatrical Room Overlays (never display:none under .monkey-locked so iframe WebGL keeps full viewport size!) */
body.leeroy-stage .section.fullbleed-scene {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100svh !important;
  z-index: 50;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.42s ease, visibility 0.42s ease;
}
body.leeroy-stage .section.fullbleed-scene.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
body.leeroy-stage .section.reasons,
body.leeroy-stage footer {
  display: none !important;
}

/* Minimalist Top-Right Circular Home Button aligned cleanly BELOW room top-right controls (no overlap!) */
.room-home-btn {
  position: fixed;
  top: 74px;
  right: 20px;
  z-index: 95;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 0.75px solid rgba(255, 255, 255, 0.42);
  background-image: linear-gradient(145deg, rgba(36, 34, 32, 0.62), rgba(20, 19, 18, 0.72)), url('tex-frosted-glass.jpg');
  background-size: cover;
  background-position: center;
  background-blend-mode: multiply;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: rgba(252, 250, 246, 0.94);
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0.10em;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.44);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(0.86);
  transition: opacity 0.28s ease, transform 0.28s ease, border-color 0.2s ease, background 0.2s ease;
}
body.leeroy-stage.in-room .room-home-btn {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: scale(1);
}
.room-home-btn:hover {
  border-color: rgba(255, 255, 255, 0.72);
  background: rgba(44, 40, 36, 0.74);
  transform: scale(1.06);
}

/* Workshop Section Lock Curtain */
#lab { position: relative; }
.workshop-lock-veil {
  position: absolute;
  inset: 0;
  z-index: 15;
  background: radial-gradient(circle at 50% 45%, rgba(16, 13, 11, 0.90), rgba(7, 6, 5, 0.97));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  transition: opacity 0.55s ease, visibility 0.55s ease;
}
.workshop-lock-veil.unlocked { opacity: 0; visibility: hidden; pointer-events: none; }
.lock-emblem {
  width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  display: grid; place-items: center;
  font-size: 20px; color: #f3ede2;
}
.lock-title { font-size: 20px; font-weight: 300; letter-spacing: 0.16em; margin: 0; color: #f6f0e4; }
.lock-desc { font-size: 13px; font-weight: 300; color: rgba(243, 237, 226, 0.66); max-width: 420px; line-height: 1.75; margin: 0; }
.lock-steps { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.lock-step-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px; text-decoration: none;
  font-size: 12px; font-weight: 300; letter-spacing: 0.08em;
  color: #f3ede2;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
  transition: all 0.2s ease;
}
.lock-step-btn:hover { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.18); }
.lock-step-btn.done { color: #a4f2c2; border-color: rgba(164, 242, 194, 0.42); background: rgba(118, 226, 158, 0.12); }

/* Deep Low-Saturation Obsidian-Moss Translucent Wish Modal (no chalkboard green!) */
body.leeroy-stage #wishDialog {
  position: fixed !important;
  background: linear-gradient(160deg, rgba(11, 20, 16, 0.84) 0%, rgba(5, 10, 8, 0.92) 100%) !important;
  backdrop-filter: blur(28px) saturate(115%) !important;
  -webkit-backdrop-filter: blur(28px) saturate(115%) !important;
  border: 0.75px solid rgba(206, 222, 212, 0.24) !important;
  box-shadow: 0 34px 92px rgba(0, 0, 0, 0.72) !important;
  color: #eff5f1 !important;
  border-radius: 28px !important;
  padding: 40px 30px 32px !important;
  width: min(390px, calc(100vw - 32px)) !important;
  text-align: center;
  overflow: hidden;
  outline: none !important;
}
body.leeroy-stage #wishDialog::backdrop {
  background: rgba(3, 10, 7, 0.66) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
body.leeroy-stage #wishDialog .close {
  position: absolute !important;
  top: 16px !important;
  right: 16px !important;
  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border-radius: 50% !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32) !important;
  color: rgba(240, 248, 243, 0.86) !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  outline: none !important;
  transition: all 0.2s ease !important;
}
body.leeroy-stage #wishDialog .close:hover {
  background: rgba(255, 255, 255, 0.24) !important;
  border-color: rgba(255, 255, 255, 0.44) !important;
  color: #ffffff !important;
  transform: scale(1.06);
}
body.leeroy-stage #wishDialog .close:focus,
body.leeroy-stage #wishDialog .close:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(164, 242, 194, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}
body.leeroy-stage #wishDialog .wish-star,
body.leeroy-stage #wishDialog [lang="en"] {
  display: none !important;
}
body.leeroy-stage #wishDialog h3 {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-size: 21px !important;
  font-weight: 300 !important;
  letter-spacing: 0.12em !important;
  color: #f4faf6 !important;
  margin: 4px 0 8px !important;
}
body.leeroy-stage #wishDialog p {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 300 !important;
  font-size: 13.5px !important;
  letter-spacing: 0.06em !important;
  color: rgba(226, 242, 232, 0.76) !important;
  margin: 0 0 14px !important;
}
body.leeroy-stage #wishDialog .wish-monkey-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  cursor: pointer;
  outline: none;
  position: relative;
}
body.leeroy-stage #wishDialog .wish-monkey-aura {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(164, 242, 194, 0.24) 0%, rgba(226, 162, 83, 0.10) 48%, transparent 74%);
  filter: blur(22px);
  pointer-events: none;
}
body.leeroy-stage #wishDialog .wish-monkey-canvas {
  position: relative;
  z-index: 1;
  width: 196px;
  height: 196px;
  display: block;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.46));
  animation: wishMonkeyFloat 3.2s ease-in-out infinite;
}
body.leeroy-stage #wishDialog .wish-monkey-btn.out .wish-monkey-canvas {
  animation: wishMonkeyHop 0.6s ease;
}
@keyframes wishMonkeyFloat {
  0%, 100% { transform: translateY(0px) rotate(-1.5deg); }
  50% { transform: translateY(-10px) rotate(1.5deg); }
}
@keyframes wishMonkeyHop {
  0%, 100% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-18px) scale(1.08); }
}
body.leeroy-stage #wishDialog .wish-tap-hint {
  display: inline-block;
  margin-top: 2px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.10em;
  color: rgba(242, 250, 245, 0.88);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
body.leeroy-stage #wishDialog .wish-result {
  margin-top: 12px;
  color: #a4f2c2 !important;
  font-weight: 300 !important;
  font-size: 13px !important;
  letter-spacing: 0.08em;
}

/* Desktop pointer index, drawn without backdrop blur or light spill. */
.leeroy-cursor-ring {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 9999;
  pointer-events: none;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  display: grid;
  place-items: center;
  border: 1px solid #e6c999a6;
  border-radius: 50%;
  color: #fff0d9;
  font: 600 8px/1 system-ui,sans-serif;
  letter-spacing: .06em;
}
.leeroy-cursor-ring:empty::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #e5b87f;
}
.leeroy-cursor-ring.is-expanded {
  width: 43px;
  height: 43px;
  margin: -21.5px 0 0 -21.5px;
  background: #262017e8;
}
.leeroy-cursor-ring[hidden] { display: none; }
@media (hover: none), (pointer: coarse) {
  .leeroy-cursor-ring { display: none; }
}

#progressToast {
  position: fixed; top: 68px; left: 50%; transform: translateX(-50%) translateY(-10px);
  z-index: 90; padding: 9px 18px; border-radius: 999px;
  background: linear-gradient(145deg, rgba(36, 34, 32, 0.78), rgba(16, 15, 14, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.30);
  color: #fff6e8; font-weight: 300; font-size: 12px; letter-spacing: 0.08em;
  backdrop-filter: blur(22px) saturate(180%); opacity: 0; pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
#progressToast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

body.leeroy-stage .portrait-stage {
  width: min(746px, 96vw) !important;
}
body.leeroy-stage .hero-portrait {
  max-width: min(54vw, 455px);
}
#portalRoam { background-position: 52% 74%; }

.portrait-pat {
  position: relative;
  display: grid;
  place-items: center;
  height: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
}
.portrait-pat .hero-portrait {
  --portrait-grade: sepia(.13) saturate(.94) contrast(1.03);
  grid-area: 1 / 1;
  transition: opacity 240ms ease;
  pointer-events: none;
}
.portrait-pat .portrait-pat-alt {
  --portrait-grade: hue-rotate(-9deg) saturate(.86) brightness(1.08) contrast(1.03);
}
.portrait-pat-alt,
.portrait-pat[aria-pressed="true"] .hero-portrait:not(.portrait-pat-alt) {
  opacity: 0;
}
.portrait-pat[aria-pressed="true"] .portrait-pat-alt { opacity: 1; }
.portrait-pat-hint,
.portrait-reply:not(:empty) {
  width: max-content;
  border: 1px solid #efe3d266;
  background: #17130fec;
  color: #f3ede2;
  border-radius: 999px;
  padding: 6px 13px;
  font-size: 13px;
}
.portrait-pat-hint {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
}
.portrait-reply {
  position: absolute;
  z-index: 2;
  top: 16%;
  left: 68%;
  pointer-events: none;
}
@media (max-width: 680px) {
  .portal-title { font-size: 13px; }
  .portal-pill { font-size: 9px; }
  body.leeroy-stage .nav .chapter-nav a { padding-inline: 5px !important; }
  .portrait-reply { top: 22%; left: 60%; }
}
@media (prefers-reduced-motion: reduce) {
  .portrait-pat .hero-portrait { transition: none; }
}

/* The shared Home control matches the room only while Roam is open. */
body.leeroy-stage.in-room:has(#roamSection.is-open) .room-home-btn {
  color: #f0e7d6;
  background: linear-gradient(#50483d,#3b342d 48%,#302a24 52%,#393129);
  border-color: #a695785e;
  box-shadow: inset 0 1px 1px #f1dec338, 0 2px 8px #140e0966;
}
