/* Gift wrap over milatonin.com, back on 18 Nov 2026. The server removes it after the first opening in New York. */

html.gift-on, html.gift-on body { overflow: hidden; background: #000; }
html.gift-on body > :not(.gift):not(.gift-confetti) { visibility: hidden; }

.gift {
  position: fixed; inset: 0; z-index: 2147483000;
  display: grid; place-items: center;
  padding: 24px 16px;
  background: #000; color: #fff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: opacity 1s ease;
}
.gift.is-leaving { opacity: 0; pointer-events: none; }
.gift * { box-sizing: border-box; }

.gift-stars { position: absolute; inset: 0; pointer-events: none; }
.gift-stars i {
  position: absolute; width: 2px; height: 2px; border-radius: 50%;
  background: #fff; opacity: 0;
  animation: gift-twinkle 4s ease-in-out infinite;
}

.gift-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 22px; text-align: center; }

.gift-label, .gift-caption {
  font-family: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
  font-weight: 500; text-transform: uppercase; letter-spacing: .18em;
}
.gift-label { margin: 0; font-size: 12px; color: #9b9b9b; }

.gift-box {
  appearance: none; display: block; margin: 0; padding: 0; border: 0; background: none;
  width: min(66vw, 44vh, 300px); cursor: pointer; color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.gift-box:focus-visible { outline: 1px solid #fff; outline-offset: 12px; }
.gift-box > span, .gift-box > span > span { display: block; }
.gift-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.gift-float { animation: gift-float 4.5s ease-in-out infinite; }
.gift-shake { transform-origin: 50% 90%; animation: gift-hop 2.4s ease-in-out infinite; }
.gift-lid { transform-box: view-box; transform-origin: 130px 100px; }
.gift-spark { transform-box: fill-box; transform-origin: center; animation: gift-spark 2.8s ease-in-out infinite; }
.gift-glow { opacity: 0; transform-box: fill-box; transform-origin: center; }

.gift.is-opening .gift-shake { animation: none; }
.gift.is-opening .gift-float { animation-play-state: paused; }
.gift.is-opening .gift-lid { animation: gift-lid 1s cubic-bezier(.2, .7, .3, 1) forwards; }
.gift.is-opening .gift-glow { animation: gift-glow 1.3s ease-out forwards; }
.gift.is-opening .gift-base { transform-box: fill-box; transform-origin: 50% 100%; animation: gift-base .6s .45s ease-in forwards; }
.gift.is-opening .gift-spark { animation: none; opacity: 0; }

.gift-caption { margin: 0; min-height: 1.6em; font-size: 14px; color: #fff; animation: gift-pulse 1.6s ease-in-out infinite; }
.gift.is-opening .gift-caption, .gift.is-opening .gift-label { opacity: 0; animation: none; transition: opacity .3s; }

.gift-hello {
  position: absolute; left: 50%; top: 50%; width: min(92vw, 1200px);
  margin: 0; transform: translate(-50%, -50%) scale(.85); opacity: 0;
  font-weight: 900; font-size: clamp(36px, 8.5vw, 104px); line-height: .95; letter-spacing: -.035em;
  text-align: center; pointer-events: none;
}
.gift.is-opening .gift-hello { animation: gift-hello 1s .7s cubic-bezier(.2, .8, .2, 1) forwards; }

.gift-confetti { position: fixed; inset: 0; z-index: 2147483001; width: 100%; height: 100%; pointer-events: none; }

@keyframes gift-twinkle { 0%, 100% { opacity: 0; } 50% { opacity: .7; } }
@keyframes gift-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes gift-spark { 0%, 100% { opacity: 0; transform: scale(.4); } 50% { opacity: 1; transform: scale(1); } }
@keyframes gift-hop {
  0%, 70%, 100% { transform: translateY(0) rotate(0); }
  76% { transform: translateY(-14px) rotate(-3deg); } 82% { transform: translateY(0) rotate(2deg); }
  88% { transform: translateY(-6px) rotate(-1deg); } 94% { transform: translateY(0) rotate(0); }
}
@keyframes gift-lid {
  0% { transform: translate(0, 0) rotate(0); opacity: 1; }
  25% { transform: translate(0, 6px) rotate(0); opacity: 1; }
  100% { transform: translate(-70px, -260px) rotate(-38deg); opacity: 0; }
}
@keyframes gift-base { to { opacity: 0; transform: translateY(18px) scale(.9); } }
@keyframes gift-glow { 0% { opacity: 0; transform: scale(.3); } 30% { opacity: .9; } 100% { opacity: 0; transform: scale(3.2); } }
@keyframes gift-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes gift-hello { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .gift * { animation: none !important; }
  .gift.is-opening .gift-lid, .gift.is-opening .gift-base { opacity: 0; }
  .gift.is-opening .gift-hello { opacity: 1; transform: translate(-50%, -50%); }
}
