/* La ilustración, la estrella y los focos comparten un único plano de cámara. */
#tv-xmas-intro-v516, #tv-v524-finale {
  --tv-screen: calc(100vh / var(--tv-page-scale-factor, 1));
}
@supports (height: 100svh) {
  #tv-xmas-intro-v516, #tv-v524-finale {
    --tv-screen: calc(100svh / var(--tv-page-scale-factor, 1));
  }
}
.tv-tree-shot {
  position: relative;
  line-height: 0;
  transform-origin: 50% 52%;
}
#tv-xmas-intro-v516 .tv-tree-shot,
#tv-v524-finale.tv-tree-travel .tv-tree-shot {
  transform: translate3d(calc(var(--tv-far-x, 0%) * (1 - var(--tv-tree-progress, 0))),
                         calc(var(--tv-far-y, 0%) * (1 - var(--tv-tree-progress, 0))), 0)
             scale(calc(.43 + .57 * var(--tv-tree-progress, 0)));
}
#tv-xmas-intro-v516 .tv-tree-shot .tv-in-tree-svg,
#tv-v524-finale .tv-tree-shot .tv-in-tree-svg {
  display: block;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible;
  filter: none !important;
}

/* Bienvenida. El desplazamiento nativo controla el recorrido dentro de la postal. */
#tv-xmas-intro-v516 .tv-in-scroll {
  position: absolute;
  inset: 0;
  overflow: hidden auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
#tv-xmas-intro-v516 .tv-in-scroll::-webkit-scrollbar { display: none; }
#tv-xmas-intro-v516 .tv-in-scroll:focus { outline: none; }
#tv-xmas-intro-v516 .tv-in-track { height: 175%; }
#tv-xmas-intro-v516 .tv-in-stage {
  position: sticky;
  top: 0;
  display: grid;
  place-items: center;
  height: calc(100% / 1.75);
}
#tv-xmas-intro-v516 .tv-in-tree-shell { --tv-far-x: -10%; }
#tv-xmas-intro-v516 .tv-tree-shot {
  width: min(100%, calc(var(--tv-screen) * .51), 480px);
}
#tv-xmas-intro-v516 .tv-in-navigation {
  position: absolute;
  z-index: 2;
  right: max(30px, env(safe-area-inset-right));
  bottom: max(25px, env(safe-area-inset-bottom));
  left: max(30px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #f1d6a5;
  pointer-events: none;
}
#tv-xmas-intro-v516 .tv-tree-hint {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 500 13px/1.2 system-ui, sans-serif;
}
#tv-xmas-intro-v516 .tv-tree-hint i {
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
#tv-xmas-intro-v516 .tv-in-enter {
  margin-left: auto;
  min-height: 44px;
  padding: 6px 16px;
  color: inherit;
  background: rgba(18, 40, 34, .68);
  border: 1px solid rgba(238, 208, 153, .45);
  border-radius: 999px;
  font: 600 13px/1 system-ui, sans-serif;
  cursor: pointer;
  pointer-events: auto;
}
#tv-xmas-intro-v516 .tv-in-enter:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
#tv-xmas-intro-v516.tv-in-exploring .tv-in-bottom-rule {
  animation: none;
  transform: scaleX(var(--tv-tree-progress, 0));
}
html[data-theme="light"] #tv-xmas-intro-v516 .tv-in-navigation { color: #654522; }
html[data-theme="light"] #tv-xmas-intro-v516 .tv-in-enter {
  background: rgba(255, 249, 231, .8);
  border-color: rgba(114, 79, 36, .40);
}

/* Saludo al pie. El espacio extra se recorre con el scroll normal de la página. */
#tv-v524-finale.tv-tree-travel {
  height: calc(var(--tv-screen) * 1.68) !important;
  min-height: 0 !important;
}
#tv-v524-finale.tv-tree-travel .tv-v524-final-sticky {
  height: var(--tv-screen) !important;
  min-height: 0 !important;
  transform: translate3d(0, var(--tv-frame-shift, 0%), 0);
}
#tv-v524-finale.tv-tree-presentation .tv-v524-final-content {
  width: min(92%, 960px);
  padding: 20px 0;
}
#tv-v524-finale.tv-tree-presentation .tv-v524-final-scene {
  position: relative;
  width: min(100%, 760px);
  height: min(calc(var(--tv-screen) * .54), 510px);
}
#tv-v524-finale.tv-tree-presentation .tv-v524-final-tree {
  --tv-far-x: 11%;
  position: absolute;
  top: 50%; left: 63%;
  width: min(60%, calc(var(--tv-screen) * .389), 367px) !important;
  opacity: 1 !important;
  filter: none !important;
  transition: none !important;
  transform: translate(-50%, -50%) !important;
}
#tv-v524-finale.tv-tree-presentation .tv-tree-signature {
  --tv-seal-x: -16%;
  --tv-seal-y: -9%;
  --tv-seal-shrink: .12;
  position: absolute;
  top: 50%; left: 32%;
  transform: translate(-50%, -50%)
             translate3d(calc(var(--tv-seal-x) * var(--tv-tree-progress, 0)),
                         calc(var(--tv-seal-y) * var(--tv-tree-progress, 0)), 0)
             scale(calc(1 - var(--tv-seal-shrink) * var(--tv-tree-progress, 0)));
}
#tv-v524-finale.tv-tree-presentation .tv-v5288-pixel-veil {
  z-index: 0 !important;
}
@media (max-width: 650px) and (orientation: portrait) {
  #tv-xmas-intro-v516 .tv-in-intro-content {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: center;
    gap: 0;
    padding: max(38px, env(safe-area-inset-top)) 22px max(70px, env(safe-area-inset-bottom));
  }
  #tv-xmas-intro-v516 .tv-in-brand {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas: "eyebrow eyebrow" "logo title" "message message";
    justify-content: center;
    align-items: center;
    column-gap: 12px;
  }
  #tv-xmas-intro-v516 .tv-in-eyebrow { grid-area: eyebrow; margin-bottom: 8px; }
  #tv-xmas-intro-v516 .tv-in-logo-frame {
    grid-area: logo;
    width: min(26vw, calc(var(--tv-screen) * .15), 116px) !important;
    height: auto !important;
    aspect-ratio: 1;
  }
  #tv-xmas-intro-v516 .tv-in-rule { display: none; }
  #tv-xmas-intro-v516 .tv-in-title {
    grid-area: title;
    text-align: left;
    font-size: min(11vw, calc(var(--tv-screen) * .071), 51px);
  }
  #tv-xmas-intro-v516 .tv-in-subtitle { grid-area: message; margin-top: 8px; }
  #tv-xmas-intro-v516 .tv-in-tree-shell {
    --tv-far-x: 0%;
    --tv-far-y: -6%;
    height: 100%;
    margin: 0;
    min-height: 0;
    container-type: size;
  }
  #tv-xmas-intro-v516 .tv-tree-shot {
    width: min(95%, calc(var(--tv-screen) * .42));
  }
  @supports (width: 1cqh) {
    #tv-xmas-intro-v516 .tv-tree-shot { width: min(95%, 71.8cqh); }
  }
  #tv-v524-finale.tv-tree-presentation .tv-v524-final-tree {
    left: 57%;
    width: min(76%, calc(var(--tv-screen) * .389)) !important;
    --tv-far-x: 15%;
  }
  #tv-v524-finale.tv-tree-presentation .tv-tree-signature {
    left: 29%;
    --tv-seal-x: -41%;
    --tv-seal-y: -70%;
    --tv-seal-shrink: .42;
  }
}
@media (max-height: 530px) and (orientation: landscape) {
  #tv-xmas-intro-v516 .tv-in-intro-content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto;
    min-height: 0;
    padding: 14px 8% 46px;
  }
  #tv-xmas-intro-v516 .tv-in-tree-shell { margin: 0; }
  #tv-xmas-intro-v516 .tv-in-logo-frame {
    width: calc(var(--tv-screen) * .28) !important;
    height: calc(var(--tv-screen) * .28) !important;
  }
  #tv-xmas-intro-v516 .tv-in-title { font-size: min(6vw, 45px); }
  #tv-xmas-intro-v516 .tv-in-title em, #tv-v524-finale .tv-v524-final-greeting em { display: inline; }
  #tv-xmas-intro-v516 .tv-in-subtitle { margin-top: 4px; }
  #tv-xmas-intro-v516 .tv-in-navigation { bottom: 10px; }
  #tv-v524-finale.tv-tree-presentation .tv-v524-final-greeting {
    font-size: min(6vw, calc(var(--tv-screen) * .115)) !important;
  }
  #tv-v524-finale.tv-tree-presentation .tv-v524-final-logo-frame {
    width: min(21vw, calc(var(--tv-screen) * .36)) !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  #tv-xmas-intro-v516 .tv-in-track, #tv-xmas-intro-v516 .tv-in-stage { height: 100%; }
  #tv-xmas-intro-v516 .tv-tree-shot { transform: none; }
  #tv-xmas-intro-v516 .tv-tree-hint { display: none; }
  #tv-v524-finale.tv-tree-presentation .tv-v524-final-sticky { --tv-tree-progress: 1 !important; }
}
