@font-face {
  font-family: "Tentacle Kitty";
  src: url("../assets/fonts/TentacleKitty.otf") format("opentype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --glow: #e8fff6;
  --petal: #d9b6ff;
  --gold: #f4e0a8;
  --cream: #f7f1e4;
  --line: rgba(232, 255, 246, 0.28);
  --logo-w: 486px;
  --logo-y: 0px;
  --arrive-top: 163px;
  --title-size: 50px;
  --lede-size: 19px;
  --btn-scale: 1.29;
  --btn-y: 46px;
  --title-font: "Cinzel Decorative", serif;
  --em-font: "Tentacle Kitty", serif;
  --whisper-font: "Tentacle Kitty", serif;
  --lede-font: "Tentacle Kitty", serif;
  --cta-font: "Cinzel Decorative", serif;
  --cta-small-font: "Tentacle Kitty", serif;
  --welcome-font: "Tentacle Kitty", serif;
  --enter-font: "Cinzel Decorative", serif;
  --portal-kicker-font: "Tentacle Kitty", serif;
  --portal-title-font: "Cinzel Decorative", serif;
  --portal-copy-font: "Tentacle Kitty", serif;
  --portal-label-font: "Tentacle Kitty", serif;
  --portal-btn-font: "Cinzel Decorative", serif;
  --portal-note-font: "Tentacle Kitty", serif;
  --portal-sig-font: "Cormorant Garamond", serif;
  --overlay-scale: 1;
  --wide-btn-extra: 0px;
  --logo-x: 0px;
  --title-x: 0px;
  --title-y: 0px;
  --body-x: 0px;
  --body-y: 0px;
  --sub-x: 0px;
  --sub-y: 0px;
  --welcome-size: 16px;
  --welcome-x: 0px;
  --welcome-y: 0px;
  --enter-size: 32px;
  --enter-x: 0px;
  --enter-y: 0px;
  --welcome-track: 0.18em;
  --enter-track: 0.06em;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: #050807;
  color: var(--cream);
  font-family: "Cormorant Garamond", Georgia, serif;
  overflow: hidden;
  touch-action: none;
}

#forest {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  touch-action: none;
}

.flat-woods {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #050807 url("../assets/loader-forest-open.jpg?v=20260902b") center / cover no-repeat;
}
body.no-webgl .flat-woods { display: block; }
body.no-webgl #forest { display: none; }

#sparkles {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  z-index: 22;
  touch-action: none;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #050807;
}

.loader.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}

.loader__scene {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  transform: scale(1);
  transition: transform 0.5s ease-in;
}
.loader.is-zoom .loader__scene {
  transform: scale(1.55);
}

.loader__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.loader__bg--open { z-index: 0; }
.loader__bg--closed {
  z-index: 1;
  opacity: 1;
  transition: opacity 1.7s ease;
}
.loader.is-ready .loader__bg--closed {
  opacity: 0;
}

.loader__veil {
  position: absolute;
  inset: 0;
  z-index: 6;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s linear;
}
.loader.is-zoom .loader__veil { opacity: 1; }

.loader__brand {
  position: absolute;
  top: max(1.4rem, 5.5vh);
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.loader.is-zoom .loader__brand { opacity: 0; }

.loader__welcome {
  margin: 0 0 0.35rem;
  font-family: var(--welcome-font);
  font-weight: 700;
  font-size: var(--welcome-size);
  letter-spacing: var(--welcome-track);
  text-transform: uppercase;
  color: #f4e0a8;
  text-shadow: 0 2px 16px #000, 0 0 18px rgba(244, 224, 168, 0.35);
  transform: translate(var(--welcome-x), var(--welcome-y));
}

.loader__logo {
  width: min(420px, 72vw);
  height: auto;
  filter: drop-shadow(0 10px 28px rgba(0,0,0,0.55));
}

.loader__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: max(1.8rem, 7vh);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.loader.is-ready .loader__bottom {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__line {
  margin: 0;
  font-family: "Quicksand", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--petal);
  text-shadow: 0 2px 10px #000;
}

.loader__bar {
  width: min(280px, 64vw);
  height: 3px;
  background: rgba(255,255,255,0.16);
  border-radius: 99px;
  overflow: hidden;
}

.loader__enter {
  position: absolute;
  left: calc(50% + var(--enter-x));
  top: calc(54% + var(--enter-y));
  z-index: 4;
  appearance: none;
  border: 0;
  background: none;
  padding: 0.4rem 0.6rem;
  max-width: min(92vw, 40rem);
  transform: translate(-50%, -50%) scale(0.94);
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  font-family: var(--enter-font);
  font-weight: 700;
  font-size: var(--enter-size);
  line-height: 1.28;
  letter-spacing: var(--enter-track);
  color: #f4e0a8;
  text-align: center;
  text-shadow: 0 0 12px rgba(244, 224, 168, 0.55), 0 2px 14px #000;
  transition: opacity 0.55s ease, transform 0.55s ease;
  white-space: normal;
}
.loader.is-ready .loader__enter:not(:disabled) {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
  animation: enterPulse 2.2s ease-in-out infinite;
}
.loader.is-zoom .loader__enter {
  opacity: 0;
  transition-delay: 0s;
  animation: none;
}
@keyframes enterPulse {
  0%, 100% {
    color: #e4c36a;
    text-shadow: 0 0 10px rgba(228, 195, 106, 0.45), 0 2px 14px #000;
  }
  50% {
    color: #fff8e8;
    text-shadow: 0 0 22px rgba(255, 248, 232, 0.95), 0 0 48px rgba(232, 255, 246, 0.45), 0 2px 14px #000;
  }
}
@media (prefers-reduced-motion: reduce) {
  .loader.is-ready .loader__enter:not(:disabled) { animation: none; }
  .loader__bg--closed { transition: none; }
}
.loader__enter:disabled { cursor: wait; }
.loader__enter:not(:disabled):hover,
.loader__enter:not(:disabled):focus-visible {
  color: #fff8e8;
  outline: none;
}

.loader__bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #c6f0d8, #e8b6ff);
  transition: width 0.2s ease;
}

.loader__preview {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  z-index: 5;
  appearance: none;
  border: 1px solid rgba(232,255,246,0.22);
  background: rgba(8,16,12,0.45);
  color: rgba(247,241,228,0.55);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: "Quicksand", sans-serif;
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.loader__preview:hover,
.loader__preview:focus-visible {
  color: rgba(247,241,228,0.9);
  border-color: rgba(232,255,246,0.5);
  outline: none;
}
.loader__preview[hidden] { display: none; }

.gate-btn {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 8;
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(8,16,12,0.7);
  color: rgba(247,241,228,0.9);
  font-family: "Quicksand", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}
.gate-btn[hidden] { display: none; }

.gate-tuner {
  position: absolute;
  right: 1rem;
  left: auto;
  bottom: 3.2rem;
  z-index: 9;
}

.hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: calc(var(--arrive-top) * var(--overlay-scale));
  height: auto;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: var(--logo-y);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 1s ease, transform 1s ease;
}

.hud.is-on {
  opacity: 1;
  transform: none;
}

.hud__logo {
  width: min(calc(var(--logo-w) * var(--overlay-scale)), 62vw);
  height: auto;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.7));
  transform: translate(var(--logo-x), 0);
}

.arrive {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--arrive-top) * var(--overlay-scale));
  z-index: 5;
  text-align: center;
  padding: 0 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 1;
  pointer-events: none;
  transform: scale(var(--overlay-scale));
  transform-origin: top center;
}

.arrive.is-on {
  pointer-events: none;
}

.arrive__whisper,
.arrive__title,
.arrive__body,
.arrive__lede {
  opacity: 0;
  transition: opacity 0.85s ease;
}

.arrive.is-on .arrive__whisper,
.arrive.is-on .arrive__title {
  opacity: 1;
  transform: translate(var(--title-x), var(--title-y));
}

.arrive.is-on .arrive__body {
  opacity: 1;
  transform: translate(var(--body-x), var(--body-y));
}

.arrive__cta,
.portal,
.tuner,
.tune-btn,
.gate-btn,
.skip,
.mute,
.restart,
.loader {
  touch-action: auto;
}

.arrive__whisper {
  margin: 0 0 0.45rem;
  font-family: var(--whisper-font);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  color: var(--petal);
  text-shadow: 0 2px 12px #000;
}

.arrive__title {
  margin: 0;
  font-family: var(--title-font);
  font-weight: 700;
  font-size: var(--title-size);
  line-height: 1.12;
  text-shadow: 0 3px 0 rgba(0,0,0,0.25), 0 10px 30px rgba(0,0,0,0.7);
}

.arrive__title em,
.arrive__body em {
  display: block;
  font-family: var(--em-font);
  font-style: italic;
  font-weight: 400;
  font-size: 0.92em;
  color: var(--glow);
  text-shadow: 0 0 18px rgba(200,255,230,0.45), 0 8px 28px #000;
}

.arrive__body {
  margin: 0.15rem 0 0;
  font-family: var(--em-font);
  font-style: italic;
  font-weight: 400;
  font-size: calc(var(--title-size) * 0.92);
  line-height: 1.15;
  color: var(--glow);
  text-shadow: 0 0 18px rgba(200,255,230,0.45), 0 8px 28px #000;
}

.arrive__lede {
  position: fixed;
  left: 50%;
  top: 42%;
  z-index: 5;
  margin: 0;
  padding: 0 1.2rem;
  max-width: none;
  font-family: var(--lede-font);
  font-weight: 600;
  font-size: var(--lede-size);
  line-height: 1.45;
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
  text-shadow: 0 3px 16px #000;
  transform: translate(calc(-50% + var(--sub-x)), -50%);
}

.arrive__lede.is-on {
  opacity: 1;
  transform: translate(calc(-50% + var(--sub-x)), -50%);
}

.arrive__cta {
  appearance: none;
  position: fixed;
  left: 50%;
  top: 62%;
  z-index: 6;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(232,255,246,0.38);
  background: linear-gradient(180deg, rgba(52, 74, 62, 0.88), rgba(12, 22, 16, 0.92));
  color: var(--cream);
  margin: 0;
  padding: 0.78rem 1.6rem 0.7rem;
  min-width: 16.5rem;
  min-height: 4.35rem;
  border-radius: 999px;
  cursor: pointer;
  touch-action: none;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 24px rgba(180,255,220,0.18);
  transform: translate(-50%, -50%) scale(var(--btn-scale));
  transition: opacity 0.35s ease, box-shadow 0.12s ease;
}

.arrive__cta.is-on {
  opacity: 1;
  pointer-events: auto;
}

.arrive__cta span {
  display: block;
  font-family: var(--cta-font);
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.arrive__cta small {
  display: block;
  margin-top: 0.16rem;
  font-family: var(--cta-small-font);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0.75;
}
.arrive__cta small[hidden] { display: none; }

.arrive__cta:hover,
.arrive__cta:focus-visible {
  transform: translate(-50%, -52%) scale(var(--btn-scale));
  box-shadow: 0 14px 36px rgba(0,0,0,0.4), 0 0 36px rgba(180,255,220,0.35);
  outline: none;
}

.restart {
  position: fixed;
  top: 0.7rem;
  left: 0.7rem;
  z-index: 9;
  width: 4.3rem;
  height: 4.3rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(247, 241, 228, 0.62);
  font-size: 2.35rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 2px 8px #000;
}
.restart:hover,
.restart:focus-visible {
  color: rgba(247, 241, 228, 0.95);
  outline: none;
}

.mute {
  position: fixed;
  left: 0.85rem;
  bottom: 0.85rem;
  z-index: 9;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem 0.35rem 0.45rem;
  border: 0;
  border-radius: 999px;
  background: rgba(8, 16, 12, 0.45);
  color: #d4a84a;
  font-family: "Quicksand", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 0 8px rgba(212, 168, 74, 0.55), 0 2px 8px #000;
}
.mute__note {
  font-size: 1.45rem;
  line-height: 1;
  animation: mutePulse 2.6s ease-in-out infinite;
}
.mute:hover,
.mute:focus-visible {
  color: #fff8e8;
  outline: none;
}
.mute.is-off {
  color: rgba(212, 168, 74, 0.45);
  text-shadow: none;
}
.mute.is-off .mute__note {
  text-decoration: line-through;
  animation: none;
  opacity: 0.45;
}
@keyframes mutePulse {
  0%, 100% {
    color: #c8963a;
    text-shadow: 0 0 6px rgba(200, 150, 58, 0.45), 0 2px 8px #000;
    transform: scale(1);
  }
  50% {
    color: #fff8e8;
    text-shadow: 0 0 16px rgba(255, 248, 232, 0.9), 0 2px 8px #000;
    transform: scale(1.08);
  }
}
@media (prefers-reduced-motion: reduce) {
  .mute__note { animation: none; }
}

.tune-btn {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 8;
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(8,16,12,0.55);
  color: rgba(247,241,228,0.85);
  font-family: "Quicksand", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
}
.tune-btn[hidden] { display: none; }

.tuner {
  position: fixed;
  left: 1rem;
  bottom: 3.2rem;
  z-index: 14;
  width: min(320px, calc(100vw - 2rem));
  max-height: min(72vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0.7rem 0.85rem 0.65rem;
  border-radius: 14px;
  background: rgba(8,14,12,0.88);
  border: 1px solid rgba(232,255,246,0.16);
  color: #f7f1e4;
  font-family: "Quicksand", sans-serif;
}

.tuner.is-max {
  width: min(460px, calc(100vw - 2rem));
  max-height: min(88vh, 820px);
  bottom: 1rem;
  left: 1rem;
}

.tuner.is-min {
  width: min(280px, calc(100vw - 2rem));
  max-height: none;
  padding-bottom: 0.55rem;
}

.tuner.is-min .tuner__body { display: none; }

.tuner__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-shrink: 0;
  margin-bottom: 0.45rem;
}

.tuner__bar-actions {
  display: flex;
  gap: 0.25rem;
}

.tuner__bar-actions button {
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(255,255,255,0.04);
  color: inherit;
  border-radius: 999px;
  padding: 0.22rem 0.5rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.55rem;
  font-family: inherit;
  white-space: nowrap;
}

.tuner__play {
  width: 1.7rem;
  padding: 0.18rem 0 !important;
  letter-spacing: 0 !important;
  font-size: 0.62rem !important;
  line-height: 1;
}

.tuner__body {
  overflow: auto;
  min-height: 0;
}

.tuner__dump {
  width: 100%;
  min-height: 8rem;
  margin-top: 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(232,255,246,0.2);
  background: #050807;
  color: #c6f0d8;
  font-size: 0.58rem;
  padding: 0.4rem;
}

.tuner[hidden] { display: none; }

.tuner__title {
  margin: 0;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: #c6f0d8;
}

.tuner__label {
  margin: 0.65rem 0 0.2rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.58rem;
  color: #f4e0a8;
}

.tuner__jumps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.35rem;
  margin: 0 0 0.7rem;
}

.tuner__jumps button {
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(255,255,255,0.04);
  color: inherit;
  border-radius: 8px;
  padding: 0.38rem 0.2rem;
  cursor: pointer;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.58rem;
  font-family: inherit;
}

.tuner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.4rem 0 0.6rem;
}
.tuner__mini {
  appearance: none;
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(8,16,12,0.45);
  color: inherit;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  font-family: "Quicksand", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tuner__range { width: 100%; }

.tuner__num {
  width: 100%;
  border: 1px solid rgba(232,255,246,0.22);
  background: rgba(0,0,0,0.35);
  color: inherit;
  border-radius: 6px;
  padding: 0.15rem 0.2rem;
  font: inherit;
  font-size: 0.62rem;
  text-align: right;
}

.tuner__reset {
  margin-top: 0.55rem;
  width: 100%;
  border: 1px solid rgba(232,255,246,0.28);
  background: transparent;
  color: inherit;
  border-radius: 8px;
  padding: 0.35rem;
  cursor: pointer;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.62rem;
}

.tuner__layer {
  margin: 0.45rem 0 0.2rem;
  border-top: 1px solid rgba(232,255,246,0.1);
  padding-top: 0.35rem;
}

.tuner__layer summary {
  cursor: pointer;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.62rem;
  color: #c6f0d8;
  padding: 0.2rem 0;
}

.tuner__field {
  display: grid;
  gap: 0.18rem;
  margin: 0.35rem 0;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tuner__field input,
.tuner__field textarea,
.tuner__field select {
  width: 100%;
  border: 1px solid rgba(232,255,246,0.22);
  background: rgba(0,0,0,0.35);
  color: inherit;
  border-radius: 6px;
  padding: 0.32rem 0.4rem;
  font-family: "Cormorant Garamond", serif;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

.tuner__field textarea { min-height: 3.4rem; resize: vertical; }

.tuner__hint {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.62rem;
  line-height: 1.4;
  opacity: 0.7;
  letter-spacing: 0.02em;
}

.portal[hidden] { display: none; }

.portal {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: auto;
}

.portal__veil {
  position: absolute;
  inset: 0;
  background: rgba(3,7,6,0.55);
  backdrop-filter: blur(7px);
}

.portal__card,
.portal__thanks {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 1.7rem 1.6rem 1.4rem;
  border-radius: 1.4rem;
  background: linear-gradient(180deg, rgba(22,34,28,0.82), rgba(8,14,12,0.9));
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0,0,0,0.55), 0 0 60px rgba(160,255,210,0.12);
  backdrop-filter: blur(16px);
  text-align: center;
  animation: cardIn 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.portal__kicker {
  margin: 0 0 0.4rem;
  font-family: var(--portal-kicker-font);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--petal);
}

.portal__title {
  margin: 0 0 0.5rem;
  font-family: var(--portal-title-font);
  font-size: clamp(0.95rem, 4.4vw, 1.5rem);
  line-height: 1.15;
  white-space: nowrap;
}

.portal__copy, .portal__sig, .portal__note {
  margin: 0 auto 1rem;
  max-width: 100%;
  font-size: 1.08rem;
  line-height: 1.45;
  overflow-wrap: break-word;
}

.portal__copy { font-family: var(--portal-copy-font); }
#sheetCopy { white-space: pre-line; }
.portal__sig { font-family: var(--portal-sig-font); }
.portal__note { font-family: var(--portal-note-font); }
#thanksCopy { color: var(--gold); font-style: italic; }
#thanksSig { color: inherit; font-style: normal; }

.field { display: block; text-align: left; margin-bottom: 0.85rem; }

.field span {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--portal-label-font);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232,255,246,0.72);
}

.field input {
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(232,255,246,0.22);
  background: rgba(5,10,8,0.55);
  color: var(--cream);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.12rem;
  outline: none;
}

.field input:focus {
  border-color: rgba(210,255,230,0.7);
  box-shadow: 0 0 0 3px rgba(180,255,220,0.16);
}

.portal__submit,
.portal__again {
  display: block;
  box-sizing: border-box;
  width: 100%;
  margin-top: 0.25rem;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  font-family: var(--portal-btn-font);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #102016;
  background: linear-gradient(180deg, #f4fff8, #c6f0d8);
}

.portal__note { margin: 0.75rem 0 0; font-size: 0.92rem; opacity: 0.72; }

.portal__error {
  margin: 0.55rem 0 0;
  color: #ffc7d4;
  font-size: 0.92rem;
}

.portal__error[hidden] { display: none; }

.portal__close {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-size: 1.5rem;
  cursor: pointer;
}

.portal__thanks[hidden] { display: none; }

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

body.is-open .arrive,
body.is-open .hud { opacity: 0.18; }

@media (max-width: 520px) {
  .portal {
    padding: 0.65rem;
    align-items: center;
  }
  .portal__card,
  .portal__thanks {
    width: min(28rem, 100%);
    max-width: 100%;
    min-width: 0;
    padding: 1.35rem 0.9rem 1.1rem;
  }
  .portal__kicker {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
  }
  .portal__title {
    white-space: normal;
    font-size: clamp(1.05rem, 6.4vw, 1.32rem);
  }
  .portal__copy,
  .portal__sig {
    font-size: 0.98rem;
  }
  .portal__note {
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .field span {
    font-size: 0.6rem;
    letter-spacing: 0.08em;
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .arrive, .hud, .loader, .courts-ring, .court, .court-door, .court__say { transition: none; }
}

/* Four Courts — hub doors + diorama rooms */
.courts-ring {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 7;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem 0.7rem;
  padding: 0 1rem 5.2rem;
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.courts-ring.is-on {
  opacity: 1;
  pointer-events: none;
  transform: none;
}
.courts-ring__whisper {
  flex: 1 0 100%;
  margin: 0 0 0.15rem;
  text-align: center;
  font-family: var(--whisper-font);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  text-shadow: 0 2px 10px #000;
}
.court-door {
  pointer-events: auto;
  appearance: none;
  min-width: 5.6rem;
  min-height: 3.4rem;
  padding: 0.45rem 0.7rem 0.4rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(232, 255, 246, 0.32);
  background: linear-gradient(180deg, rgba(42, 58, 48, 0.9), rgba(10, 18, 14, 0.92));
  color: var(--cream);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}
.court-door span {
  display: block;
  font-family: var(--cta-font);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.court-door small {
  display: block;
  margin-top: 0.12rem;
  font-family: var(--whisper-font);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}
.court-door--spring { box-shadow: 0 0 16px rgba(180, 255, 190, 0.22), 0 8px 20px rgba(0,0,0,0.35); }
.court-door--summer { box-shadow: 0 0 16px rgba(255, 214, 120, 0.28), 0 8px 20px rgba(0,0,0,0.35); }
.court-door--autumn { box-shadow: 0 0 16px rgba(255, 150, 80, 0.26), 0 8px 20px rgba(0,0,0,0.35); }
.court-door--winter { box-shadow: 0 0 16px rgba(180, 220, 255, 0.28), 0 8px 20px rgba(0,0,0,0.35); }
.court-door:hover,
.court-door:focus-visible {
  transform: translateY(-2px);
  outline: none;
}

body.is-open .courts-ring,
body.in-court .courts-ring,
body.in-court .arrive,
body.in-court .arrive__lede,
body.in-court .arrive__cta {
  opacity: 0 !important;
  pointer-events: none !important;
}

.court {
  position: fixed;
  inset: 0;
  z-index: 16;
  background: #050807;
}
.court[hidden] { display: none !important; }
.court__stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.court__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.court[data-court="spring"] .court__sky { background: radial-gradient(ellipse at 50% 30%, #1b3a28, #050807 70%); }
.court[data-court="summer"] .court__sky { background: radial-gradient(ellipse at 50% 30%, #3a3214, #050807 70%); }
.court[data-court="autumn"] .court__sky { background: radial-gradient(ellipse at 50% 30%, #3a1c10, #050807 70%); }
.court[data-court="winter"] .court__sky { background: radial-gradient(ellipse at 50% 30%, #163040, #050807 70%); }
.court__woods {
  position: absolute;
  inset: -6% -8%;
  width: 116%;
  height: 112%;
  object-fit: cover;
  z-index: 1;
  opacity: 0.72;
}
.court[data-court="spring"] .court__woods { filter: hue-rotate(42deg) saturate(1.2); }
.court[data-court="summer"] .court__woods { filter: hue-rotate(-12deg) saturate(1.35) contrast(1.05); }
.court[data-court="autumn"] .court__woods { filter: hue-rotate(-42deg) saturate(1.4) sepia(0.25); }
.court[data-court="winter"] .court__woods { filter: hue-rotate(160deg) saturate(0.55) brightness(1.08); }
.court__frame {
  position: absolute;
  left: 50%;
  top: -4%;
  width: min(1200px, 140vw);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.85;
}
.court[data-court="autumn"] .court__frame { filter: hue-rotate(-50deg) saturate(1.2); }
.court[data-court="winter"] .court__frame { filter: hue-rotate(160deg) saturate(0.4) brightness(1.2); }
.court[data-court="summer"] .court__frame { filter: hue-rotate(-20deg) saturate(1.3); }
.court__moss {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: min(1100px, 140vw);
  transform: translateX(-50%);
  z-index: 4;
  pointer-events: none;
}
.court__hut {
  appearance: none;
  position: absolute;
  left: 50%;
  bottom: 18%;
  z-index: 5;
  width: min(220px, 46vw);
  height: min(210px, 38vh);
  transform: translateX(-50%);
  border: 0;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 78%, #4a2e18 0 28%, transparent 29%),
    radial-gradient(ellipse at 50% 40%, #6b4424 0 34%, transparent 35%),
    linear-gradient(180deg, #2a1810, #5a3a22);
  clip-path: ellipse(46% 48% at 50% 54%);
  box-shadow: inset 0 -20px 24px rgba(0,0,0,0.35);
}
.court__hut::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 22%;
  width: 28%;
  height: 34%;
  transform: translateX(-50%);
  border-radius: 40% 40% 12% 12%;
  background: #1a0f0a;
  box-shadow: 0 0 12px rgba(244, 224, 168, 0.35);
}
.court[data-court="spring"] .court__hut { filter: hue-rotate(70deg); }
.court[data-court="summer"] .court__hut { filter: hue-rotate(-10deg) saturate(1.2); }
.court[data-court="winter"] .court__hut { filter: hue-rotate(160deg) saturate(0.5) brightness(1.15); }
.court__hut:hover { filter: brightness(1.12); }
.court__token {
  appearance: none;
  position: absolute;
  left: 62%;
  bottom: 26%;
  z-index: 6;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: radial-gradient(circle at 35% 30%, #fff6d2, var(--gold) 42%, #8a5a18);
  box-shadow: 0 0 18px rgba(244, 224, 168, 0.7);
}
.court[data-court="spring"] .court__token { background: radial-gradient(circle at 35% 30%, #fff, #f4d6ea 40%, #c45a8a); }
.court[data-court="summer"] .court__token { background: radial-gradient(circle at 35% 30%, #fff6c8, #f0c02e 45%, #b86a10); }
.court[data-court="autumn"] .court__token { background: radial-gradient(circle at 35% 30%, #ffe0c0, #d06020 48%, #6a2410); }
.court[data-court="winter"] .court__token { background: radial-gradient(circle at 35% 30%, #fff, #cfe8ff 40%, #6aa0c8); }
.court__token.is-got { opacity: 0.25; transform: scale(0.8); pointer-events: auto; }
.court__title {
  position: absolute;
  top: 4.8rem;
  left: 50%;
  z-index: 7;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--title-font);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 3px 16px #000;
  pointer-events: none;
}
.court__title span {
  display: block;
  font-family: var(--whisper-font);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.court__back {
  position: fixed;
  top: 0.85rem;
  left: 5.4rem;
  z-index: 18;
  appearance: none;
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(8, 14, 12, 0.72);
  color: var(--cream);
  font-family: var(--whisper-font);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
.court__say {
  position: fixed;
  left: 50%;
  bottom: 5.4rem;
  z-index: 18;
  width: min(520px, 88vw);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--lede-font);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--cream);
  text-shadow: 0 3px 14px #000;
  background: rgba(6, 10, 8, 0.55);
  border: 1px solid rgba(232,255,246,0.16);
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  opacity: 0;
  pointer-events: none;
}
.court__say.is-on { opacity: 1; }
.pouch {
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 18;
  display: flex;
  flex-wrap: wrap;
  width: 9.4rem;
  gap: 0.3rem;
  padding: 0.45rem 0.45rem 0.5rem;
  border-radius: 0.9rem;
  background: rgba(8, 14, 12, 0.78);
  border: 1px solid rgba(232,255,246,0.2);
}
.pouch__label {
  flex: 1 0 100%;
  margin: 0 0 0.1rem;
  font-family: var(--whisper-font);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  color: var(--gold);
}
.pouch__slot {
  flex: 1 1 40%;
  appearance: none;
  min-height: 2rem;
  border: 1px solid rgba(232,255,246,0.16);
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.04);
  color: rgba(247,241,228,0.45);
  font-family: var(--cta-font);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.pouch__slot.is-got {
  color: var(--cream);
  background: rgba(244, 224, 168, 0.16);
  border-color: rgba(244, 224, 168, 0.45);
}
.pouch.is-full { box-shadow: 0 0 22px rgba(244, 224, 168, 0.35); }
.pouch[hidden] { display: none !important; }

@media (max-width: 820px) {
  .court-door { min-width: 4.6rem; min-height: 3.1rem; }
  .court__back { left: 0.7rem; top: 5.3rem; }
  .pouch { right: 0.45rem; bottom: 0.45rem; }
  .court__say { bottom: 6.4rem; font-size: 0.95rem; }
}

body.in-glade .arrive,
body.in-glade .arrive__lede,
body.in-glade .arrive__cta {
  opacity: 0 !important;
  pointer-events: none !important;
}

.glade {
  position: fixed;
  inset: 0;
  z-index: 15;
  background: #050807;
}
.glade[hidden] { display: none !important; }
.glade__world {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.glade__bg {
  position: absolute;
  inset: -8% -6%;
  width: 112%;
  height: 116%;
  object-fit: cover;
  filter: saturate(1.05) brightness(0.78);
}
.glade__trees {
  position: absolute;
  top: -6%;
  height: 92%;
  width: auto;
  max-width: 48vw;
  object-fit: contain;
  pointer-events: none;
  z-index: 2;
}
.glade__trees--l { left: -8%; }
.glade__trees--r { right: -8%; }
.glade__vines {
  position: absolute;
  inset: -10% -5% auto;
  width: 110%;
  z-index: 4;
  pointer-events: none;
  opacity: 0.85;
}
.glade__frame {
  position: absolute;
  left: 50%;
  top: -8%;
  width: min(1200px, 145vw);
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  opacity: 0.7;
}
.glade__moss {
  position: absolute;
  left: 50%;
  bottom: -12%;
  width: min(1200px, 150vw);
  transform: translateX(-50%);
  z-index: 6;
  pointer-events: none;
}
.glade__house {
  appearance: none;
  position: absolute;
  left: 50%;
  bottom: 16%;
  z-index: 7;
  width: min(280px, 58vw);
  height: min(260px, 46vh);
  transform: translateX(-50%);
  border: 0;
  padding: 0;
  cursor: pointer;
  background:
    radial-gradient(ellipse at 50% 86%, #3a2414 0 30%, transparent 31%),
    radial-gradient(ellipse at 50% 42%, #6b4424 0 38%, transparent 39%);
  clip-path: ellipse(48% 50% at 50% 52%);
}
.glade__door {
  position: absolute;
  left: 50%;
  bottom: 18%;
  width: 26%;
  height: 32%;
  transform: translateX(-50%);
  border-radius: 40% 40% 10% 10%;
  background: #140c08;
  box-shadow: 0 0 16px rgba(244, 224, 168, 0.4);
  pointer-events: none;
}
.glade__kitty {
  position: absolute;
  left: 58%;
  bottom: 28%;
  width: 42%;
  height: 58%;
  pointer-events: none;
}
.glade__kitty img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: brightness(0.86) saturate(0.9);
}
.glade__house:hover { filter: brightness(1.08); }
.glade__title {
  position: absolute;
  top: 4.6rem;
  left: 50%;
  z-index: 8;
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--title-font);
  font-size: clamp(1.15rem, 3.6vw, 1.7rem);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 3px 16px #000;
  pointer-events: none;
}
.glade__title span {
  display: block;
  font-family: var(--whisper-font);
  font-size: 0.72rem;
  letter-spacing: 0.26em;
  color: var(--gold);
  margin-bottom: 0.2rem;
}
.glade__back {
  position: fixed;
  top: 0.85rem;
  left: 5.4rem;
  z-index: 18;
  appearance: none;
  border: 1px solid rgba(232,255,246,0.28);
  background: rgba(8, 14, 12, 0.72);
  color: var(--cream);
  font-family: var(--whisper-font);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
}
.glade__letter {
  appearance: none;
  position: absolute;
  left: 64%;
  bottom: 14%;
  z-index: 8;
  border: 1px solid rgba(244, 224, 168, 0.4);
  background: rgba(20, 16, 10, 0.72);
  color: var(--gold);
  font-family: var(--whisper-font);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
}
.glade__say {
  position: fixed;
  left: 50%;
  bottom: 5.2rem;
  z-index: 18;
  width: min(540px, 88vw);
  margin: 0;
  transform: translateX(-50%);
  text-align: center;
  font-family: var(--lede-font);
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--cream);
  text-shadow: 0 3px 14px #000;
  background: rgba(6, 10, 8, 0.55);
  border: 1px solid rgba(232,255,246,0.16);
  border-radius: 1rem;
  padding: 0.7rem 1rem;
  opacity: 0;
  pointer-events: none;
}
.glade__say.is-on { opacity: 1; }

.realm-hint {
  appearance: none;
  position: absolute;
  z-index: 5;
  width: min(160px, 28vw);
  height: min(160px, 22vh);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  color: var(--cream);
  background: radial-gradient(circle, rgba(244,224,168,0.28) 0%, rgba(244,224,168,0) 70%);
  opacity: 0;
  animation: realmFade 9s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.realm-hint span {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--cta-font);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px #000;
  pointer-events: none;
}
.realm-hint--spring { left: 8%; top: 22%; background: radial-gradient(circle, rgba(160,255,190,0.32) 0%, transparent 70%); }
.realm-hint--summer { right: 8%; top: 24%; background: radial-gradient(circle, rgba(255,210,90,0.34) 0%, transparent 70%); }
.realm-hint--autumn { left: 14%; bottom: 22%; background: radial-gradient(circle, rgba(255,140,70,0.32) 0%, transparent 70%); }
.realm-hint--winter { right: 12%; bottom: 28%; background: radial-gradient(circle, rgba(170,220,255,0.34) 0%, transparent 70%); }
.realm-hint.is-seen { opacity: 0.55; animation: realmBreathe 4.5s ease-in-out infinite; }
@keyframes realmFade {
  0%, 18% { opacity: 0; }
  38% { opacity: 0.55; }
  62% { opacity: 0.18; }
  100% { opacity: 0.42; }
}
@keyframes realmBreathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.7; }
}

@media (max-width: 820px) {
  .glade__back { left: 0.7rem; top: 5.3rem; }
  .glade__say { bottom: 6.4rem; font-size: 0.95rem; }
  .glade__letter { left: auto; right: 1rem; bottom: 5.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .realm-hint { animation: none; opacity: 0.45; }
}


