@font-face {
  font-family: Explora;
  src: url("assets/fonts/Explora-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  background: #030610;
  --ice: #d6effb;
  --flake-y: 48%;
}

* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }

.experience {
  --background-light: .46;
  --daylight: 0;
  --twilight-warmth: 0;
  --sunrise: 0;
  --sunset: 0;
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 280px;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% var(--flake-y), #0a1628, #040916 32%, #020409 71%);
}

.landscape,
.sky,
.sky-light,
.effects {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.landscape {
  --position-x: 50%;
  --scenery: url("assets/palace.webp");
  background: #0a162a var(--scenery) var(--position-x) 50% / cover no-repeat;
  filter: brightness(min(1.36, calc(var(--background-light) * (1 + 1.08 * var(--daylight)))));
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 3.25s ease-in-out, transform 6.5s cubic-bezier(.15,.53,.32,1);
}

.is-revealed .landscape { opacity: 1; transform: scale(1); }
.landscape::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(ellipse 66% 50% at 11% 44%, rgb(255 182 147 / var(--sunrise)), transparent),
    radial-gradient(ellipse 71% 49% at 86% 50%, rgb(255 147 104 / var(--sunset)), transparent),
    radial-gradient(ellipse 39% 60% at 48% 54%, rgb(25 59 92 / calc(var(--daylight) * .29)), transparent);
}
.daylight,
.daylight img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.daylight {
  z-index: 2;
  opacity: var(--daylight);
  filter: sepia(calc(.23 * var(--twilight-warmth))) saturate(calc(1 + .25 * var(--twilight-warmth)));
}
.palace-daylight { z-index: auto; }
.daylight img { object-fit: cover; object-position: var(--position-x) 50%; }
.sky { visibility: hidden; }
.has-animated-sky .sky { visibility: visible; }
.sky-light {
  background:
    radial-gradient(ellipse 48% 13% at 44% 14%, #4af2bb4d, transparent),
    radial-gradient(ellipse 40% 16% at 72% 8%, #8460fa49, transparent);
  mix-blend-mode: screen;
  opacity: 0;
}
.sky-light::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--scenery) var(--position-x) 50% / cover no-repeat;
  mask-image: linear-gradient(transparent 1%, #0007 10%, #0008 21%, transparent 34%);
}
.is-revealed .sky-light { animation: sky-glow 11s ease-in-out infinite alternate; }
.has-animated-sky .sky-light { display: none; }

.destination-layer,
.destination-layer > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.destination-layer {
  isolation: isolate;
  opacity: 0;
  transition: opacity .72s ease-in-out;
}
.destination-layer.is-visible { opacity: 1; }
.destination-layer > img {
  display: block;
  object-fit: cover;
  object-position: 56% var(--vertical-position, 50%);
}
.destination-layer .sky { z-index: 1; }

.effects { z-index: 1; }
.experience:not(.is-revealed) .effects { mix-blend-mode: screen; }
.holiday-greeting {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.entrance {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .65s ease;
}

.entrance:focus-visible { outline: 1px solid #b6e8ff; outline-offset: -14px; }
.is-open .entrance { opacity: 0; pointer-events: none; }

.tree-interaction {
  position: absolute;
  z-index: 2;
  inset: var(--tree-top) auto auto var(--tree-left);
  width: var(--tree-width);
  height: var(--tree-height);
  padding: 0;
  border: 0;
  background: transparent;
  clip-path: polygon(36% 0, 64% 0, 100% 100%, 0 100%);
  cursor: grab;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}
.tree-interaction.is-dragging { cursor: grabbing; }
.tree-interaction[aria-pressed="true"] {
  inset: 0;
  width: 100%;
  height: 100%;
  clip-path: none;
  cursor: pointer;
}
.tree-interaction:focus-visible {
  outline: 0;
  background: radial-gradient(ellipse 45px 25px at 50% 97%, #b5eaff51, transparent);
}

.controls {
  position: absolute;
  z-index: 3;
  right: max(clamp(17px, 3.4vw, 49px), calc(env(safe-area-inset-right) + 10px));
  bottom: max(clamp(16px, 3.1vh, 32px), calc(env(safe-area-inset-bottom) + 10px));
  display: flex;
  gap: 9px;
  align-items: center;
  animation: controls-in 1.15s ease both;
}

.brightness,
.replay,
.sound-toggle,
.appearance-toggle,
.destinations-toggle {
  display: flex;
  align-items: center;
  height: 44px;
  border: 1px solid #b9daed42;
  border-radius: 99px;
  background: #080e1dc9;
  backdrop-filter: blur(8px);
  color: var(--ice);
  transition: background .25s, border-color .25s;
}

.brightness { gap: 12px; padding: 0 14px; }
.brightness:hover,
.brightness:focus-within,
.replay:hover,
.sound-toggle:hover,
.appearance-toggle:hover,
.destinations-toggle:hover { background: #17283de6; border-color: #b9daed8c; }

.sun {
  position: relative;
  width: 8px;
  height: 8px;
  margin: 0 5px;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.sun::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  box-shadow: 0 -7px currentColor, 0 7px currentColor, -7px 0 currentColor, 7px 0 currentColor,
    5px 5px currentColor, -5px -5px currentColor, -5px 5px currentColor, 5px -5px currentColor;
}

.brightness input {
  appearance: none;
  -webkit-appearance: none;
  width: clamp(74px, 9vw, 128px);
  height: 30px;
  margin: 0;
  background: transparent;
  cursor: ew-resize;
}
.brightness input::-webkit-slider-runnable-track {
  height: 2px;
  border-radius: 10px;
  background: linear-gradient(90deg, #52738d, #d2efff);
}
.brightness input::-moz-range-track {
  height: 2px;
  border-radius: 10px;
  background: linear-gradient(90deg, #52738d, #d2efff);
}
.brightness input::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -4px;
  border: 1px solid #e6f9ff;
  border-radius: 50%;
  background: #c4eeff;
  box-shadow: 0 0 9px #b5e8ffab;
}
.brightness input::-moz-range-thumb {
  width: 8px;
  height: 8px;
  border: 1px solid #e6f9ff;
  border-radius: 50%;
  background: #c4eeff;
  box-shadow: 0 0 9px #b5e8ffab;
}

.replay { justify-content: center; width: 44px; padding: 0; cursor: pointer; }
.sound-toggle { justify-content: center; width: 44px; padding: 0; cursor: pointer; }
.intro-sound {
  position: absolute;
  z-index: 3;
  right: max(clamp(17px, 3.4vw, 49px), env(safe-area-inset-right) + 10px);
  bottom: max(clamp(16px, 3.1vh, 32px), env(safe-area-inset-bottom) + 10px);
}
.is-open .intro-sound { display: none; }
.sound-icon { width: 18px; height: 18px; position: relative; }
.sound-icon i {
  position: absolute;
  left: 0;
  top: 3px;
  width: 10px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 30%, 34% 30%, 100% 0, 100% 100%, 34% 70%, 0 70%);
}
.sound-icon::before,
.sound-icon::after {
  content: "";
  position: absolute;
  border: 1px solid transparent;
  border-right-color: currentColor;
  border-radius: 50%;
}
.sound-icon::before { inset: 5px 3px 5px 6px; }
.sound-icon::after { inset: 2px 0 2px 4px; }
.sound-toggle[data-muted="true"] .sound-icon::before { display: none; }
.sound-toggle[data-muted="true"] .sound-icon::after {
  inset: 2px auto auto 8px;
  width: 1px;
  height: 15px;
  border: 0;
  border-radius: 0;
  background: currentColor;
  box-shadow: 1px 0 #0a172b;
  transform: rotate(-45deg);
}
.replay-icon {
  position: relative;
  width: 21px;
  height: 21px;
}
.replay-icon::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1.65px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-20deg);
}
.replay-icon::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  right: 1px;
  top: 3px;
  border-right: 1.65px solid currentColor;
  border-bottom: 1.65px solid currentColor;
  border-radius: 1px;
  transform: rotate(8deg);
}
.brightness input:focus-visible, .replay:focus-visible, .sound-toggle:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 3px;
}

.destinations-toggle {
  --destination-edge: max(clamp(17px, 3.4vw, 49px), calc(env(safe-area-inset-left) + 10px));
  position: absolute;
  z-index: 3;
  left: var(--destination-edge);
  bottom: max(clamp(16px, 3.1vh, 32px), calc(env(safe-area-inset-bottom) + 10px));
  justify-content: center;
  width: 44px;
  padding: 0;
  cursor: pointer;
  animation: controls-in 1.15s ease both;
}
.appearance-toggle {
  position: absolute;
  z-index: 3;
  left: calc(max(clamp(17px, 3.4vw, 49px), env(safe-area-inset-left) + 10px) + 53px);
  bottom: max(clamp(16px, 3.1vh, 32px), env(safe-area-inset-bottom) + 10px);
  width: 44px;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  animation: controls-in 1.15s ease both;
}
.adjust-icon { display: grid; width: 17px; gap: 6px; }
.adjust-icon i { position: relative; height: 1px; background: currentColor; }
.adjust-icon i::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 5px #c7ecff7a;
}
.adjust-icon i:last-child::after { left: 10px; }
.appearance {
  position: absolute;
  z-index: 4;
  inset: auto auto max(73px, calc(3.1vh + 53px), calc(env(safe-area-inset-bottom) + 63px)) max(clamp(16px, 3.4vw, 49px), env(safe-area-inset-left));
  box-sizing: border-box;
  width: min(300px, calc(100% - 32px));
  max-height: calc(100dvh - 112px);
  overflow: auto;
  padding: 17px;
  display: grid;
  gap: 11px;
  border: 1px solid #b0d7f04b;
  border-radius: 19px;
  background: radial-gradient(ellipse at 18% 12%, #24496579, transparent 72%), #0a111fe9;
  box-shadow: 0 17px 42px #0008, inset 0 1px #d1f1ff26;
  backdrop-filter: blur(18px);
  color: var(--ice);
  font: 13px/1.4 "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  animation: controls-in .24s ease both;
}
.appearance-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tree-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.tree-shapes button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 55px;
  padding: 5px 2px;
  border: 1px solid #b9def04d;
  border-radius: 8px;
  background: #b9def011;
  color: var(--ice);
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.tree-shapes button[aria-pressed="true"] {
  border-color: #e1f5ff;
  background: #a5ddff26;
  box-shadow: 0 0 11px #acdfff45;
}
.tree-shapes i {
  width: 22px;
  height: 23px;
  background: radial-gradient(circle, #effbff 24%, transparent 38%) 0 0 / 3px 3px;
  clip-path: polygon(50% 0, 64% 29%, 60% 29%, 77% 55%, 69% 55%, 97% 94%, 3% 94%, 31% 55%, 23% 55%, 40% 29%, 36% 29%);
}
.tree-shapes [data-shape="champagne"] i {
  width: 27px;
  background: repeating-linear-gradient(157deg, transparent 0 3px, #ffe0a2 4px 5px, transparent 6px 8px),
    radial-gradient(circle, #fff4d8 24%, transparent 38%) 0 0 / 4px 4px;
}
.tree-shapes [data-shape="frost"] i {
  width: 19px;
  background: repeating-linear-gradient(35deg, transparent 0 5px, #b2eaff 6px, transparent 7px 9px),
    repeating-linear-gradient(145deg, transparent 0 5px, #e3f7ff 6px, transparent 7px 9px);
}
.tree-shapes [data-shape="starlit"] i {
  width: 27px;
  background: radial-gradient(circle, #fff0c2 25%, transparent 38%) 0 0 / 7px 6px,
    radial-gradient(circle, #a4d9ff 28%, transparent 42%) 1px 1px / 3px 3px;
}
.swatches { display: flex; gap: 9px; }
.swatches button,
.custom-swatch {
  width: 34px;
  height: 34px;
  padding: 4px;
  border: 1px solid #b9def04d;
  border-radius: 50%;
  background: #b9def011;
  cursor: pointer;
}
.swatches button::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #f8fcff, var(--swatch) 53%);
}
.swatches button[aria-pressed="true"] {
  border-color: #e1f5ff;
  box-shadow: 0 0 11px #acdfff69;
}
.custom-swatch { position: relative; width: 28px; height: 28px; padding: 3px; }
.custom-swatch input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 3px; border: 0; background: transparent; cursor: pointer; }
.custom-swatch input::-webkit-color-swatch-wrapper { padding: 0; }
.custom-swatch input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.custom-swatch input::-moz-color-swatch { border: 0; border-radius: 50%; }
.snow-label { margin-top: 4px; }
.snow-label output { margin-left: 6px; color: #b5def6; font-variant-numeric: tabular-nums; }
.snow-default {
  min-height: 26px;
  padding: 2px 8px;
  border: 1px solid #b0d7f04b;
  border-radius: 99px;
  color: inherit;
  background: #b4d9fb13;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
.snow-default[aria-pressed="true"] { border-color: #bbe9ff9e; color: #f0faff; }
.snow-amount { width: 100%; margin: 0; height: 22px; accent-color: #bce8fb; cursor: ew-resize; }
.appearance-row output { margin-left: 6px; color: #b5def6; font-variant-numeric: tabular-nums; }
.scene-hour { width: 100%; margin: 0; accent-color: #c8ecff; cursor: ew-resize; }
.time-marks {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  margin-top: -7px;
  padding-bottom: 9px;
  border-bottom: 1px solid #b0d7f028;
  color: #a7c6db;
  font-size: 9px;
}
.time-play {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  padding: 0;
  border: 1px solid #b0d7f04b;
  border-radius: 50%;
  background: #b4d9fb13;
  color: #e6f8ff;
  cursor: pointer;
}
.time-play span {
  width: 9px;
  height: 11px;
  margin-left: 2px;
  background: currentColor;
  clip-path: polygon(0 0,100% 50%,0 100%);
}
.time-play[aria-pressed="true"] span {
  margin-left: 0;
  clip-path: polygon(0 0,33% 0,33% 100%,67% 100%,67% 0,100% 0,100% 100%,0 100%);
}
.appearance-toggle:focus-visible,
.appearance button:focus-visible,
.appearance input:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.destination-icon {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.destination-icon::before {
  content: "";
  position: absolute;
  inset: -1px 4px;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.destination-icon::after {
  content: "";
  position: absolute;
  inset: 4px 0;
  border-block: 1px solid currentColor;
}

.destinations {
  width: min(474px, calc(100% - 32px));
  max-width: none;
  max-height: min(680px, calc(100dvh - 94px));
  inset: auto auto max(72px, calc(env(safe-area-inset-bottom) + 61px)) max(clamp(16px, 3.4vw, 49px), env(safe-area-inset-left));
  margin: 0;
  padding: 19px;
  color: var(--ice);
  border: 1px solid #b0d7f04b;
  border-radius: 25px;
  background: radial-gradient(ellipse at 34% 36%, #1c38526e, transparent 71%),
    linear-gradient(150deg, #101c2be8, #070b16ec 73%);
  box-shadow: 0 22px 70px #0009, 0 0 33px #517fab18, inset 0 1px #d1f1ff33;
  backdrop-filter: blur(24px);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  overscroll-behavior: contain;
}
.destinations[open] { animation: controls-in .28s ease both; }
.destinations::backdrop { background: #02050c2b; }
.destinations-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
}
.destinations h2 {
  margin: 0;
  padding-left: 2px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .15em;
}
.destinations-close {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid #bfdff146;
  background: #98ccf00e;
  color: var(--ice);
  cursor: pointer;
}
.destinations-close::before,
.destinations-close::after {
  content: "";
  position: absolute;
  width: 13px;
  height: 1px;
  left: 50%;
  top: 50%;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}
.destinations-close::after { transform: translate(-50%, -50%) rotate(-45deg); }
.globe-stage {
  position: relative;
  width: min(94%, 51dvh, 374px);
  aspect-ratio: 1;
  margin: 4px auto 17px;
  isolation: isolate;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.globe-stage.is-dragging { cursor: grabbing; }
.globe-stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 19px #76c9ff4d);
}
.globe-stage::before {
  position: absolute;
  content: "";
  z-index: -1;
  inset: -2.2%;
  border-radius: 50%;
  border: 1px solid #abd9ff26;
  box-shadow: 0 0 31px #72c6ff19, inset 0 0 32px #9bd7ff24;
}
.globe-stage::after {
  position: absolute;
  content: "";
  z-index: -1;
  inset: 12% -5%;
  border-radius: 50%;
  border: 1px solid #b9dfff17;
  transform: rotate(-26deg);
  pointer-events: none;
}
.globe-stage:focus { outline: none; }
.globe-stage:focus-visible::before { outline: 1px solid #bde9ff94; outline-offset: 3px; }
.globe-pin {
  position: absolute;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
}
.globe-pin::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, #e5f8ff70, #79c8ff2b 28%, transparent 67%);
}
.globe-pin::after {
  content: "";
  width: 14px;
  height: 14px;
  background: #ebfaff;
  clip-path: polygon(50% 0, 59% 40%, 100% 50%, 59% 60%, 50% 100%, 41% 60%, 0 50%, 41% 40%);
  transition: scale .2s ease;
}
.globe-pin:hover,
.globe-pin:focus-visible,
.globe-pin.is-highlighted { z-index: 2; }
.globe-pin.is-highlighted::after {
  scale: 1.6;
  animation: pin-twinkle 1.35s ease-in-out infinite alternate;
}
.globe-pin.is-highlighted::before { background: radial-gradient(circle, #e5f8ffcf, #79c8ff76 22%, transparent 67%); }
.globe-pin[aria-pressed="true"]::before {
  background: radial-gradient(circle, #ffe6ad9e, #ffdd953b 30%, transparent 67%);
}
.globe-pin[aria-pressed="true"]::after { background: #fff0c8; }
.globe-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #c1d9ed;
  font-size: 12px;
}
.globe-preview {
  position: absolute;
  z-index: 4;
  left: clamp(88px, var(--preview-x), calc(100% - 88px));
  top: var(--preview-y);
  transform: translate(-50%, calc(-100% - 14px));
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(176px, 60vw);
  min-height: 53px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid #bce7ffbd;
  border-radius: 11px;
  background: linear-gradient(120deg, #122d43f5, #071624f5);
  box-shadow: 0 0 22px #76caff60, inset 0 0 12px #a9d9f425;
  color: #d6eafa;
  font-size: 12px;
  line-height: 1.45;
  animation: preview-in .2s ease both;
}
.globe-preview.is-below { transform: translate(-50%, 14px); }
.globe-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(112deg, transparent 33%, #b8e8ff2f 47%, #d0efff4b 50%, transparent 60%);
  transform: translateX(-135%);
  animation: preview-shimmer 2.8s ease-in-out infinite;
}
.globe-preview img {
  width: 57px;
  height: 40px;
  flex: none;
  border: 1px solid #bfdff146;
  border-radius: 6px;
  object-fit: cover;
}
.globe-preview-label { display: grid; gap: 1px; }
.globe-preview-label span { color: #a6cce6; font-size: 10px; letter-spacing: .12em; }
.globe-preview-label strong { color: #effaff; font-weight: 600; }
.palace-return {
  min-height: 38px;
  padding: 5px 12px;
  flex: none;
  color: #e2f2fa;
  background: #101d2acc;
  border: 1px solid #bfdff146;
  border-radius: 99px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.palace-return:hover,
.palace-return[aria-pressed="true"] { border-color: #bce3ffad; }
.destinations-toggle:focus-visible,
.destinations-close:focus-visible,
.globe-pin:focus-visible,
.palace-return:focus-visible {
  outline: 2px solid var(--ice);
  outline-offset: 2px;
}
.destinations-status { margin: 13px 2px 0; color: #d6eafa; font-size: 12px; }

@keyframes controls-in { from { opacity: 0; transform: translateY(6px); } }
@keyframes pin-twinkle {
  0% { opacity: .65; scale: 1.05; }
  100% { opacity: 1; scale: 1.65; }
}
@keyframes preview-in { from { opacity: 0; } }
@keyframes preview-shimmer {
  0%, 26% { transform: translateX(-135%); }
  76%, 100% { transform: translateX(135%); }
}
@keyframes sky-glow {
  0% { opacity: .19; transform: translate(-3%, -1.5%) skewX(-4deg); }
  60% { opacity: .8; }
  100% { opacity: .55; transform: translate(3%, 1.5%) skewX(4deg); }
}

@media (max-aspect-ratio: 5/4) {
  .landscape { --position-x: 78%; }
}

@media (max-aspect-ratio: 4/5) {
  .landscape {
    --position-x: 64%;
    --scenery: url("assets/palace-portrait.webp");
  }
  .destination-layer > img { object-position: var(--portrait-position, 61%) 50%; }
}

@media (max-width: 500px) {
  .destinations { padding: 13px; }
  .appearance-toggle {
    left: max(17px, env(safe-area-inset-left) + 10px);
    bottom: max(calc(3.1vh + 53px), calc(env(safe-area-inset-bottom) + 63px));
  }
  .appearance { bottom: max(calc(3.1vh + 106px), calc(env(safe-area-inset-bottom) + 116px)); }
  .appearance { max-height: calc(100dvh - 147px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.egg-toggle {
  position: absolute;
  z-index: 3;
  left: calc(max(clamp(17px, 3.4vw, 49px), env(safe-area-inset-left) + 10px) + 106px);
  bottom: max(clamp(16px, 3.1vh, 32px), env(safe-area-inset-bottom) + 10px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #b9daed42;
  border-radius: 50%;
  background: #080e1dc9;
  backdrop-filter: blur(8px);
  color: var(--ice);
  cursor: pointer;
}
.egg-toggle[aria-pressed="true"] {
  color: #ffe3a9;
  border-color: #ffd69caa;
  box-shadow: 0 0 15px #ffbd674a, inset 0 0 13px #ffc47625;
}
.gift-icon { position: relative; width: 22px; height: 22px; }
.gift-icon::before,
.gift-icon::after,
.gift-icon i,
.gift-icon b { position: absolute; display: block; box-sizing: border-box; }
.gift-icon::before,
.gift-icon::after { content: ""; }
.gift-icon::before {
  inset: 10px 4px 2px;
  border: 1.45px solid currentColor;
  border-radius: 0 0 2px 2px;
}
.gift-icon::after {
  inset: 7px 2px auto;
  height: 5px;
  border: 1.45px solid currentColor;
  border-radius: 1.5px;
}
.gift-icon i {
  top: 7px;
  bottom: 2px;
  left: 50%;
  border-left: 1.45px solid currentColor;
}
.gift-icon b {
  left: 4px;
  top: 2px;
  width: 7px;
  height: 5px;
  border: 1.25px solid currentColor;
  border-radius: 5px 5px 1px 5px;
  transform: rotate(22deg);
}
.gift-icon b::after {
  content: "";
  position: absolute;
  box-sizing: border-box;
  top: -3.2px;
  left: 5.3px;
  width: 7px;
  height: 5px;
  border: 1.25px solid currentColor;
  border-radius: 5px 5px 5px 1px;
  transform: rotate(-44deg);
}
.egg-toggle:focus-visible,
.egg-clue:focus-visible { outline: 2px solid #ffe3a9; outline-offset: 3px; }

.egg-progress {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: max(14px, env(safe-area-inset-top));
  translate: -50%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid #d2e7ff40;
  background: #0a101ee0;
  color: #ffeccd;
  font: 11px/1.1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.egg-steps { display: flex; gap: 5px; }
.egg-progress output { white-space: nowrap; }
.egg-progress-open {
  position: absolute;
  inset: -4px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}
.egg-progress-open:disabled { cursor: default; pointer-events: none; }
.egg-progress:has(.egg-progress-open:not([hidden]):not(:disabled)) { border-color: #ffd49b84; }
.egg-progress-open:hover,
.egg-progress-open:focus-visible {
  outline: 1px solid #ffe0a9b0;
  box-shadow: 0 0 18px #ffcf845c;
}
.egg-steps span {
  width: 5px;
  height: 5px;
  rotate: 45deg;
  border-radius: 1px;
  background: #afc6e24f;
}
.egg-steps .lit {
  background: #ffe1a1;
  box-shadow: 0 0 6px #ffb968;
  animation: egg-step .6s ease-out;
}

.egg-clue {
  position: absolute;
  z-index: 3;
  width: max(44px, var(--clue-size, 44px));
  height: max(44px, var(--clue-size, 44px));
  translate: -50% -50%;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--egg-color, #ffdfb0);
  cursor: pointer;
  touch-action: manipulation;
}
.egg-clue img {
  width: var(--clue-size, 44px);
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 5px var(--egg-color, #ffdfb0));
}
.egg-clue::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--egg-color, #ffdfb0) 57%, transparent), transparent 67%);
  mix-blend-mode: screen;
  animation: egg-twinkle 2.7s ease-in-out infinite;
  pointer-events: none;
}
.egg-clue[aria-expanded="true"] img { opacity: .42; }
.egg-clue[aria-expanded="true"]::after { opacity: .3; animation: none; }

.egg-reveal {
  position: absolute;
  z-index: 3;
  width: var(--reveal-size, 180px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: var(--egg-color, #ffdfb0);
}
.egg-reveal img {
  display: block;
  width: 100%;
  max-height: min(33dvh, 280px);
  object-fit: contain;
  filter: drop-shadow(0 0 8px #0c142cbc) drop-shadow(0 0 12px color-mix(in srgb, var(--egg-color, #ffdfb0) 45%, transparent));
}
.egg-reveal p {
  position: absolute;
  left: 50%;
  top: calc(100% + 4px);
  translate: -50%;
  width: max-content;
  margin: 0;
  white-space: nowrap;
  font: 600 clamp(12px, 1.65vw, 25px)/1.2 Georgia, "Songti SC", serif;
  text-align: center;
  letter-spacing: .06em;
  text-shadow: 0 0 7px currentColor, 0 2px 8px #070a16, 0 2px 12px #02040a;
}
.egg-arrival {
  animation: egg-arrive 1.12s cubic-bezier(.18,.76,.25,1) both, egg-float 4s 1.12s ease-in-out infinite;
}
.egg-arrival p { animation: egg-caption .8s .69s both; }
.globe-pin.is-discovered::before {
  background: radial-gradient(circle, #ffe6adf2, #ffdd956e 34%, transparent 74%);
}
.globe-pin.is-discovered::after { background: #ffe6af; }

@keyframes egg-twinkle {
  0%, 100% { opacity: .26; scale: .84; }
  41%, 57% { opacity: .94; scale: 1.21; }
}
@keyframes egg-step {
  0% { scale: .7; }
  65% { scale: 1.55; }
  100% { scale: 1; }
}
@keyframes egg-arrive {
  0% { opacity: 0; transform: translate(calc(-50% + var(--reveal-from-x)), calc(-50% + var(--reveal-from-y))) scale(.19); }
  30% { opacity: .7; }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes egg-float {
  0%, 100% { transform: translate(-50%, -50%); }
  45% { transform: translate(calc(-50% + 4px), calc(-50% - 9px)); }
  74% { transform: translate(calc(-50% - 3px), calc(-50% - 5px)); }
}
@keyframes egg-caption { from { opacity: 0; } }

@media (max-width: 500px) {
  .egg-toggle {
    left: calc(max(17px, env(safe-area-inset-left) + 10px) + 53px);
    bottom: max(calc(3.1vh + 53px), calc(env(safe-area-inset-bottom) + 63px));
  }
}
@media (prefers-reduced-motion: reduce) {
  .egg-clue::after { opacity: .65; }
}

.egg-arrival { animation-delay: .22s, 1.34s; }
.egg-arrival p { animation-delay: .47s; }
.egg-reveal p {
  max-width: min(88vw, 310px);
  white-space: normal;
  overflow-wrap: anywhere;
}

.egg-finale {
  position: fixed;
  width: min(790px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  border: 0;
  background: transparent;
}
.egg-finale::backdrop { background: #070a1688; backdrop-filter: blur(4px); }
.egg-finale[open],
.egg-finale[open]::backdrop { animation: postcard-fade-in .44s ease-out both; }
.egg-finale.postcard-closing,
.egg-finale.postcard-closing::backdrop { animation: postcard-fade-out .32s ease-in both; }
@keyframes postcard-fade-in { from { opacity: 0; } }
@keyframes postcard-fade-out { to { opacity: 0; } }
.postcard-media {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent),
    linear-gradient(transparent, black 9%, black 91%, transparent);
  mask-composite: intersect;
}
#postcard-preview { display: block; width: 100%; height: auto; }
#postcard-motion { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.postcard-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(7px, 1.2vw, 13px);
  padding: 1px 4px 9px;
}
.postcard-controls button {
  min-height: 42px;
  min-width: 71px;
  padding: 8px 15px;
  border-radius: 7px 10px 7px 10px;
  border: 1px solid #a4dfffbd;
  background:
    linear-gradient(121deg, #cef7ff42, transparent 25% 75%, #a4ddff25),
    linear-gradient(168deg, #2e577cd0, #142c50eb 57%, #254e71d9);
  color: #f3fcff;
  font: 600 13px/1.25 system-ui, sans-serif;
  white-space: nowrap;
  text-shadow: 0 0 8px #9edfff75;
  box-shadow: inset 0 1px 0 #edfcffd0, inset 0 -1px 0 #8dcaf183, 0 0 12px #7ec2ff4f;
  cursor: pointer;
}
.postcard-controls button:hover,
.postcard-controls button:focus-visible {
  outline: 1px solid #ebfbff;
  outline-offset: 2px;
  box-shadow: inset 0 1px 0 #edfcffe8, 0 0 17px #90d2ff89;
}
.scene-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  translate: -50% 3px;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
  padding: 5px 9px;
  border: 1px solid #9dd1e696;
  border-radius: 6px;
  background: #08182def;
  color: #ecf9ff;
  font: 500 12px/1.25 system-ui, sans-serif;
  transition: opacity .16s, translate .16s, visibility .16s;
}
.destinations-toggle:focus-visible .scene-tooltip,
.appearance-toggle:focus-visible .scene-tooltip,
.egg-toggle:focus-visible .scene-tooltip {
  translate: -50% 0;
  opacity: 1;
  visibility: visible;
}
@media (hover: hover) {
  .destinations-toggle:hover .scene-tooltip,
  .appearance-toggle:hover .scene-tooltip,
  .egg-toggle:hover .scene-tooltip {
    translate: -50% 0;
    opacity: 1;
    visibility: visible;
  }
}
.experience:has(.postcard-star:not([hidden]))::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: #050a17b8;
  animation: postcard-dim .38s ease-out both;
}
.postcard-star {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 180px;
  padding: 12px 18px;
  border: 0;
  border-radius: 28px;
  background: transparent;
  color: #e6f7ff;
  mix-blend-mode: screen;
  cursor: pointer;
  touch-action: manipulation;
}
.postcard-star img {
  width: clamp(90px, 14vw, 154px);
  aspect-ratio: 1;
  display: block;
  object-fit: contain;
  animation: postcard-snowflake 2.7s ease-in-out infinite;
}
.postcard-star span {
  color: #effaff;
  text-align: center;
  font: 550 12px/1.35 system-ui, sans-serif;
  letter-spacing: .04em;
  text-shadow: 0 0 12px #9fd4ff88;
}
.postcard-star:focus-visible { outline: 1px solid #b8e7ffaf; }
@keyframes postcard-dim { from { opacity: 0; } }
@keyframes postcard-snowflake {
  0%, 100% { transform: translateY(0) rotate(-4deg); opacity: .81; }
  50% { transform: translateY(-7px) rotate(4deg); opacity: 1; }
}
