:root {
  color-scheme: dark;
  background: #000;
  font-family: Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #000;
}

body {
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  touch-action: pan-y;
}

button {
  font: inherit;
}

.app {
  display: grid;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  place-items: center;
  overflow: hidden;
  background: #000;
}

.scene {
  position: relative;
  width: min(100vw, calc(100dvh * 13 / 24));
  aspect-ratio: 13 / 24;
  max-height: 100dvh;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.backgrounds,
.background,
.navigation,
.timer-system,
.timer-screen {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.background {
  display: block;
  object-fit: contain;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

.app[data-page="bar"] .backgrounds {
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.app[data-page="bar"] .backgrounds::-webkit-scrollbar {
  display: none;
}

.bar-background {
  position: absolute;
  top: 0;
  left: 0;
  aspect-ratio: 780 / 1772;
  width: 100%;
  height: auto;
  min-height: 100%;
  overflow: hidden;
}

.bar-layer,
.bar-animation {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.bar-back {
  z-index: 0;
}

.bar-animation {
  z-index: 1;
}

.bar-animation-poster {
  opacity: 1;
}

.bar-animation-media {
  position: absolute;
  z-index: 2;
  display: block;
  height: auto;
  max-width: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear;
}

.bar-animation--cocktail .bar-animation-media {
  top: 14.647%;
  left: -2.927%;
  width: 59.323%;
}

.bar-animation--infusion .bar-animation-media {
  top: 22.743%;
  left: 48.654%;
  width: 46.154%;
}

.bar-animation--lemon .bar-animation-media {
  top: 11.15%;
  left: 55.4%;
  width: 32.35%;
}

.bar-animation.is-playing .bar-animation-media {
  opacity: 1;
}

.bar-animation.is-playing .bar-animation-poster {
  opacity: 0;
}

.bar-front {
  z-index: 3;
}

.background {
  z-index: 0;
  visibility: hidden;
  opacity: 0;
}

.background.is-active {
  visibility: visible;
  opacity: 1;
}

.geo-lock-overlay,
.geo-lock-composite {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.geo-lock-overlay {
  z-index: 1;
  visibility: hidden;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.app[data-page="geo"][data-geo-locked="true"] .geo-lock-overlay {
  visibility: visible;
  opacity: 1;
}

.geo-lock-composite {
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.geo-hints {
  position: absolute;
  z-index: 5;
  inset: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
}

.app[data-page="geo"] .geo-hints {
  visibility: visible;
}

.geo-hint-zones,
.geo-hint-backdrop {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.geo-hint-zones {
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.geo-hint-zone {
  fill: rgba(255, 7, 143, 0.001);
  stroke: transparent;
  stroke-width: 2;
  cursor: pointer;
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.app[data-page="geo"]:not([data-geo-locked="true"]) .geo-hints:not(.is-open) .geo-hint-zone {
  pointer-events: all;
}

.geo-hint-zone:focus,
.geo-hint-zone:focus-visible {
  fill: rgba(255, 7, 143, 0.001);
  stroke: transparent;
  outline: none !important;
}

.geo-hint-backdrop {
  z-index: 1;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  visibility: hidden;
  opacity: 0;
  background: #000;
  cursor: default;
  pointer-events: none;
  appearance: none;
  transition:
    opacity 500ms ease,
    visibility 0s linear 500ms;
  -webkit-tap-highlight-color: transparent;
}

.geo-hints.is-open .geo-hint-backdrop {
  visibility: visible;
  opacity: 0.55;
  pointer-events: auto;
  transition-delay: 0s;
}

.geo-hint-phone {
  position: absolute;
  z-index: 2;
  top: 8.6111%;
  left: 7.6923%;
  width: 84.6154%;
  opacity: 0;
  pointer-events: none;
  cursor: pointer;
  transform: translateX(-118.1818%) rotate(-9deg);
  transform-origin: 50% 50%;
  filter: drop-shadow(-12px 16px 30px rgba(0, 0, 0, 0.75));
  transition:
    transform 820ms cubic-bezier(0.16, 0.86, 0.2, 1.02),
    opacity 400ms ease;
  will-change: transform, opacity;
  -webkit-tap-highlight-color: transparent;
}

.geo-hints.is-open .geo-hint-phone {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) rotate(0deg);
}

.geo-hint-phone:focus {
  outline: none;
}

.geo-hint-phone img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.timer-system {
  z-index: 1;
  pointer-events: none;
}

.timer-system:not([data-layout-ready="true"]) {
  visibility: hidden;
}

.app:not([data-page="home"]) .timer-system {
  visibility: hidden;
  opacity: 0;
}

.timer-screen {
  z-index: 2;
  overflow: visible;
}

.timer-screen-clip {
  position: absolute;
  inset: 0;
}

.timer-screen-backgrounds {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 1;
  mix-blend-mode: normal;
  pointer-events: none;
}

.timer-surface {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  backface-visibility: hidden;
}

.timer-screen-clip {
  z-index: 2;
  overflow: hidden;
}

.timer-surface {
  width: 133.3333px;
  height: 100px;
  overflow: hidden;
  opacity: 0;
  transition: opacity 120ms linear;
}

.timer-screen.is-ready .timer-surface {
  opacity: 1;
}

.timer-digits {
  position: absolute;
  z-index: 1;
  /* The former 84% × 84% area is reduced by 20% in the monitor's
     local plane. Keep the lower part clear for the unit label. */
  top: 4%;
  left: 16.4%;
  width: 67.2%;
  height: 67.2%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.timer-word {
  position: absolute;
  z-index: 1;
  top: 61%;
  left: 50%;
  display: block;
  width: auto;
  height: 34%;
  /* All word SVGs share the same vertical viewport and baseline. Their
     natural widths preserve the letter scale as the grammatical form changes.
     This translation is inside the digits' existing projective surface. */
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.timer-system[data-effects="on"] .timer-digits {
  /* SourceGraphic supplies both the sharp image and the glow from the exact
     same animation frame; no second WebP playback can drift out of sync. */
  filter: url(#timer-digit-light);
}

.timer-filter-definitions {
  position: absolute;
  pointer-events: none;
}

.timer-glass {
  position: absolute;
  z-index: 3;
  display: block;
  opacity: 1;
  mix-blend-mode: normal;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.timer-digit {
  display: grid;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.timer-digit [data-timer-digit] {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  mix-blend-mode: screen;
  filter: saturate(1.08) contrast(1.1) brightness(1.04);
  user-select: none;
  -webkit-user-drag: none;
}

.timer-glow-layer {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 0;
  width: 390px;
  height: 240px;
  transform-origin: 0 0;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms linear;
}

.timer-glow-layer.is-ready {
  opacity: 0.22;
}

.timer-system[data-effects="on"] .timer-glow-layer {
  /* Spread the original pulse into the v6 screen masks below the background,
     digits and glass, without starting another animation clock. */
  filter: url(#timer-screen-spill);
}

.timer-system[data-effects="off"] .timer-screen-backgrounds,
.timer-system[data-effects="off"] .timer-glow-layer {
  display: none;
}

.timer-glow-image,
.timer-glow-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  user-select: none;
  -webkit-user-drag: none;
}

.timer-glow-layer[data-animation-format="image"] .timer-glow-image,
.timer-glow-layer[data-animation-format="video"] .timer-glow-video {
  opacity: 1;
}

.rsvp-count {
  position: absolute;
  z-index: 1;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.app[data-page="rsvp"] .rsvp-count {
  visibility: visible;
}

.rsvp-count-digit {
  position: absolute;
  top: 44.4444%;
  display: block;
  width: 4.4872%;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.rsvp-count-digit:nth-child(1) {
  left: 27.6923%;
}

.rsvp-count-digit:nth-child(2) {
  left: 32.5641%;
}

.rsvp-count-digit:nth-child(3) {
  left: 37.3718%;
}

.rsvp-count-digit:nth-child(4) {
  left: 42.2436%;
}

.rsvp-cigarette {
  position: absolute;
  z-index: 2;
  top: 34%;
  left: 0;
  width: 100%;
  height: 24%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.app[data-page="rsvp"] .rsvp-cigarette {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.rsvp-cigarette-media {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 94%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.rsvp-cigarette-media::before {
  display: block;
  padding-top: 100%;
  content: "";
}

.rsvp-cigarette-idle,
.rsvp-cigarette-idle-video,
.rsvp-cigarette-animation,
.rsvp-cigarette-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

.rsvp-cigarette-idle,
.rsvp-cigarette-idle-video,
.rsvp-cigarette-animation,
.rsvp-cigarette-video {
  opacity: 0;
}

.rsvp-cigarette.is-playing .rsvp-cigarette-idle,
.rsvp-cigarette.is-playing .rsvp-cigarette-idle-video {
  opacity: 0;
}

.rsvp-cigarette[data-animation-format="image"].is-idle .rsvp-cigarette-idle,
.rsvp-cigarette[data-animation-format="video"].is-idle .rsvp-cigarette-idle-video,
.rsvp-cigarette[data-animation-format="image"].is-playing .rsvp-cigarette-animation,
.rsvp-cigarette[data-animation-format="video"].is-playing .rsvp-cigarette-video {
  opacity: 1;
}

.rsvp-cigarette:focus-visible {
  outline: 2px solid #ff1f9a;
  outline-offset: -4px;
}

.navigation {
  --nav-icon-size: min(14.8718vw, 8.0556dvh);
  --nav-pitch: calc(var(--nav-icon-size) * 70 / 58);
  z-index: 2;
  pointer-events: none;
}

.navigation-underlay {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.app[data-page="bar"] .navigation-underlay.is-ready {
  visibility: visible;
  opacity: 1;
}

.navigation-buttons {
  position: absolute;
  z-index: 1;
  right: 0;
  left: 0;
  bottom: max(calc(var(--nav-icon-size) * 22 / 58), env(safe-area-inset-bottom, 0px));
  height: calc(var(--nav-icon-size) * 150 / 58);
  overflow: hidden;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  pointer-events: auto;
}

.navigation-track {
  position: absolute;
  left: 50%;
  bottom: calc(var(--nav-icon-size) * 10 / 58);
  width: max-content;
  display: flex;
  align-items: flex-end;
  transform: translateX(calc(-50% + var(--nav-offset, 0px)));
  transition: transform 460ms cubic-bezier(0.2, 0.9, 0.24, 1);
}

.nav-slot {
  display: flex;
  flex: none;
  justify-content: center;
  align-items: flex-end;
  width: var(--nav-pitch);
}

.navigation-buttons.is-dragging,
.navigation-buttons.is-dragging .nav-button {
  cursor: grabbing;
}

.navigation-buttons.is-dragging .navigation-track,
.navigation-buttons.is-dragging .nav-button {
  transition: none;
}

.nav-button {
  position: relative;
  z-index: 1;
  flex: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  cursor: pointer;
  filter: brightness(0.95);
  transform: translateY(var(--nav-lift, 0px)) scale(var(--nav-scale, 0.88));
  transform-origin: 50% 84%;
  transition:
    transform 460ms cubic-bezier(0.2, 0.9, 0.24, 1),
    filter 460ms linear,
    opacity 460ms linear;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
}

.nav-button-motion,
.nav-button-sway {
  display: block;
  transform-origin: 50% 74%;
}

.nav-button-motion {
  will-change: transform, filter, clip-path;
}

.nav-button-motion.is-crumpling {
  animation: nav-crush-1b 700ms cubic-bezier(0.24, 0.86, 0.28, 1) both;
}

.nav-button-sway {
  animation: nav-sway-1b var(--sway-duration, 6.4s) ease-in-out var(--sway-delay, 0s) infinite alternate;
  transform-origin: 50% 85%;
}

.nav-button-sway--reverse {
  animation-name: nav-sway-1b-reverse;
}

.nav-slot:nth-child(2) {
  --sway-duration: 7.8s;
  --sway-delay: 0.45s;
}

.nav-slot:nth-child(3) {
  --sway-duration: 5.6s;
  --sway-delay: 0.9s;
}

.nav-slot:nth-child(4) {
  --sway-duration: 7.1s;
  --sway-delay: 1.35s;
}

.nav-slot:nth-child(5) {
  --sway-duration: 6.9s;
  --sway-delay: 1.8s;
}

.nav-button-art {
  display: block;
  width: auto;
  height: var(--nav-icon-size);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.navigation-buttons:not([data-input-method="pointer"]) .nav-button:focus-visible {
  outline: 2px solid #ff1f9a;
  outline-offset: 4px;
}

@keyframes nav-crush-1b {
  0% {
    clip-path: polygon(0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 50%);
    filter: brightness(1) contrast(1);
    transform: scale(1) rotate(0deg);
  }

  30% {
    clip-path: polygon(9% 11%, 54% 3%, 94% 13%, 89% 51%, 96% 90%, 46% 98%, 6% 88%, 12% 47%);
    filter: brightness(0.55) contrast(1.4) saturate(0.85);
    transform: scale(0.5) rotate(-9deg) translateY(8px);
  }

  46% {
    clip-path: polygon(5% 6%, 48% 6%, 97% 4%, 95% 55%, 92% 96%, 52% 93%, 3% 95%, 6% 44%);
    filter: brightness(0.7) contrast(1.25);
    transform: scale(0.58) rotate(7deg) translateY(4px);
  }

  70% {
    clip-path: polygon(1% 1%, 50% 0%, 99% 1%, 100% 50%, 99% 99%, 50% 100%, 1% 99%, 0% 50%);
    filter: brightness(1.1) contrast(1.02);
    transform: scale(1.07) rotate(-2.5deg);
  }

  86% {
    transform: scale(0.97) rotate(1.2deg);
  }

  100% {
    clip-path: polygon(0% 0%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 50%);
    filter: brightness(1) contrast(1);
    transform: scale(1) rotate(0deg);
  }
}

@keyframes nav-sway-1b {
  from {
    transform: rotate(-0.8deg) translateY(0);
  }

  to {
    transform: rotate(0.9deg) translateY(-1.5px);
  }
}

@keyframes nav-sway-1b-reverse {
  from {
    transform: rotate(1deg) translateY(-1px);
  }

  to {
    transform: rotate(-0.7deg) translateY(1.5px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }

  .timer-surface,
  .timer-glow-layer,
  .navigation-track,
  .nav-button,
  .geo-hint-backdrop,
  .geo-hint-phone {
    transition: none;
  }

  .nav-button-motion,
  .nav-button-sway {
    animation: none !important;
  }
}
