:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #222;
  background: #fff;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
  background: #fff;
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #e9a9bc;
  outline-offset: 6px;
}
a {
  color: inherit;
}
[hidden] {
  display: none !important;
}
main {
  display: grid;
}
#party,
.ending {
  grid-area: 1 / 1;
  align-self: start;
}
#party {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
}
.birthday-title {
  position: absolute;
  top: max(24px, calc(50% - min(32vw, 192px) - 64px));
  left: 24px;
  right: 24px;
  z-index: 1;
  margin: 0;
  color: #111;
  font-size: clamp(36px, 9vw, 48px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.8px;
  text-align: center;
}
.stage {
  position: relative;
  width: min(100vw, 800px);
  height: min(100svh, 640px);
}
.rainbow-rays {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: var(--rays-size);
  aspect-ratio: 1;
  overflow: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.75;
}
.rainbow-rays-spin {
  position: absolute;
  inset: 0;
  animation: rainbow-rays-turn 18s linear infinite;
}
.rainbow-rays-spin > span {
  position: absolute;
  top: 50%;
  left: 44%;
  width: 12%;
  height: 50%;
  transform-origin: 50% 0;
  transform: rotate(var(--ray-angle));
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  opacity: 0.65;
  background: linear-gradient(
    to bottom,
    var(--ray-color) 35%,
    transparent 100%
  );
  animation: rainbow-ray-shimmer 2.8s ease-in-out var(--ray-delay) infinite
    alternate;
}
.rainbow-rays-spin > span:nth-child(3n + 1) {
  height: 42%;
}
.rainbow-rays-spin > span:nth-child(3n + 2) {
  height: 47%;
}
.rainbow-rays-spin > span:nth-child(6n + 1) {
  --ray-color: #ff5c9c;
}
.rainbow-rays-spin > span:nth-child(6n + 2) {
  --ray-color: #ffa84f;
}
.rainbow-rays-spin > span:nth-child(6n + 3) {
  --ray-color: #f5d84d;
}
.rainbow-rays-spin > span:nth-child(6n + 4) {
  --ray-color: #58dca0;
}
.rainbow-rays-spin > span:nth-child(6n + 5) {
  --ray-color: #65caff;
}
.rainbow-rays-spin > span:nth-child(6n) {
  --ray-color: #aa8aff;
}
@keyframes rainbow-rays-turn {
  to {
    transform: rotate(1turn);
  }
}
@keyframes rainbow-ray-shimmer {
  from {
    opacity: 0.45;
  }
  to {
    opacity: 0.9;
  }
}
#canvas-host {
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: grab;
  border-radius: 24px;
}
#canvas-host:active {
  cursor: grabbing;
}
#canvas-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
#bite {
  border: 0;
  background: none;
  padding: 24px;
  font-size: clamp(110px, 28vw, 200px);
  line-height: 1;
}
.ending {
  min-height: 100svh;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.cat-portrait {
  position: relative;
  isolation: isolate;
  --rays-size: 145%;
  width: min(240px, 60vw);
}
.cat {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
}
.ending h1 {
  font-size: clamp(16px, 6.5vw, 48px);
  line-height: 1.1;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: -0.8px;
  margin: 14px 0 28px;
}
.app-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 100%;
}
.app-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 13px;
  box-shadow: 0 0 0 1px #0000000a;
}
.app-store {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 56px;
  gap: 12px;
  background: #111;
  color: #fff;
  border-radius: 10px;
  padding: 8px 16px;
  text-align: left;
  text-decoration: none;
  font-size: 24px;
  white-space: nowrap;
  line-height: 1.05;
  letter-spacing: -0.4px;
}
.app-store svg {
  width: 27px;
  height: 32px;
  fill: currentColor;
}
.app-store small {
  display: block;
  font-size: 10px;
  letter-spacing: 0.1px;
  margin-bottom: 3px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.no-js {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  text-align: center;
  font-size: 14px;
}
@media (max-height: 640px) {
  .cat-portrait {
    width: 140px;
  }
  .ending {
    padding: 20px;
  }
  .ending h1 {
    margin: 12px 0 20px;
  }
}
@media (min-width: 550px) {
  .birthday-title {
    top: max(24px, calc(50% - min(24vw, 192px) - 72px));
  }
}
@media (max-height: 640px) and (orientation: landscape) {
  .birthday-title {
    top: max(20px, env(safe-area-inset-top));
    font-size: 32px;
  }
  .stage {
    height: calc(100svh - 96px);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
  }
}
