@font-face {
  font-family: VT323;
  src: url('assets/vt323.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --space: #090925;
  --ink: #f5f1ff;
  --muted: #ada7cb;
  --yellow: #eafa78;
  --portrait: clamp(150px, 21vw, 256px);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  background: var(--space);
  color: var(--ink);
  font:
    18px VT323,
    monospace;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 6px;
}
button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
#universe {
  height: 100%;
  height: 100svh;
  isolation: isolate;
  overflow: hidden;
  position: relative;
  background: radial-gradient(
    ellipse at 50% 49%,
    #1c164b 0%,
    #0d0d2e 48%,
    var(--space) 85%
  );
}
#space {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}
.masthead {
  position: absolute;
  top: max(30px, env(safe-area-inset-top));
  left: 38px;
  z-index: 3;
}
.wordmark {
  font-size: 30px;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0;
}
.wordmark > span:first-child {
  color: var(--muted);
}
.wordmark-star {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--yellow);
  stroke-width: 1.4;
  margin-left: 12px;
}
.masthead p {
  font-size: 16px;
  margin: 6px 0 0;
  color: var(--muted);
}
.utility {
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px;
  color: var(--muted);
  min-height: 44px;
  white-space: nowrap;
}
.utility:hover {
  color: var(--ink);
  background: #ffffff09;
}
.sound {
  position: absolute;
  right: 30px;
  top: 27px;
  z-index: 5;
}
.sound[aria-pressed='true'] {
  color: var(--yellow);
}
.intro {
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.intro.dismissed {
  opacity: 0;
}
.instructions {
  position: absolute;
  top: calc(50% + var(--portrait) / 2 + 32px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.instructions h1 {
  font-size: clamp(30px, 3.5vw, 45px);
  font-weight: 400;
  margin: 0;
  letter-spacing: -0.025em;
}
.instructions p {
  margin: 8px 0 0;
  font-size: 19px;
  color: var(--muted);
}
.instructions > svg {
  position: absolute;
  width: 74px;
  height: 60px;
  top: -47px;
  right: -69px;
  fill: none;
  stroke: var(--yellow);
  stroke-width: 2;
  transform: rotate(-9deg);
}
.tony {
  position: absolute;
  width: var(--portrait);
  height: var(--portrait);
  top: 0;
  left: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  z-index: 2;
  box-shadow: 0 18px 65px #04020d85;
}
.tony:active {
  cursor: grabbing;
}
.portrait-ring {
  position: absolute;
  inset: 0;
  padding: 5px;
  border-radius: 50%;
  display: block;
  background: conic-gradient(
    #ff80c4,
    #ce91ff,
    #74c6ff,
    #95f9ba,
    #f5f684,
    #ffab75,
    #ff80c4
  );
  overflow: hidden;
  transform: rotate(0deg);
}
.portrait-ring img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  transform: scale(1.2);
  clip-path: circle(41.6%);
}
.grab-tag {
  position: absolute;
  bottom: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-7deg);
  font-size: 15px;
  letter-spacing: 0.09em;
  color: #111126;
  background: var(--yellow);
  border: 3px solid #16122f;
  padding: 5px 14px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.launched .grab-tag {
  opacity: 0;
}
.ambient-copy {
  position: absolute;
  pointer-events: none;
  font-size: 19px;
  z-index: -1;
}
.copy-one {
  top: 26%;
  right: 13%;
  color: #ead876;
  transform: rotate(12deg);
}
.copy-two {
  bottom: 25%;
  right: 8%;
  color: #c89cdc;
  transform: rotate(-10deg);
  font-size: 17px;
}
.copy-three {
  left: 14%;
  bottom: 28%;
  color: #88d9da;
  transform: rotate(-14deg);
  font-size: 25px;
}
.bottom-bar {
  position: absolute;
  left: 38px;
  right: 38px;
  bottom: max(64px, calc(env(safe-area-inset-bottom) + 48px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  z-index: 4;
  pointer-events: none;
}
.bottom-bar > * {
  pointer-events: auto;
}
.bounce-counter {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-variant-numeric: tabular-nums;
}
.status-light {
  height: 6px;
  width: 6px;
  background: var(--yellow);
  box-shadow: 0 2px 8px #eafa7860;
}
.counter-label {
  font-size: 16px;
  color: var(--muted);
}
.micro-footer {
  position: absolute;
  bottom: max(21px, env(safe-area-inset-bottom));
  left: 38px;
  right: 38px;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  gap: 10px;
}
.reaction {
  position: absolute;
  top: 110px;
  left: 50%;
  transform: translateX(-50%) rotate(-4deg);
  color: var(--yellow);
  font-size: 27px;
  pointer-events: none;
  width: min(640px, calc(100% - 48px));
  text-align: center;
  text-wrap: balance;
  z-index: 3;
}
.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-script {
  position: absolute;
  top: 15%;
  text-align: center;
  width: 100%;
  color: var(--yellow);
}
.finale {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--space);
}
.finale::backdrop {
  background: transparent;
}
.finale > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.finale[open] {
  background: transparent;
}
.finale[open] > img {
  transform-origin: var(--blast-x, 50%) var(--blast-y, 50%);
  animation: finale-reveal 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.16s both;
}
.finale-blast {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.finale-blast::before,
.finale-blast span {
  position: absolute;
  left: var(--blast-x, 50%);
  top: var(--blast-y, 50%);
  opacity: 0;
}
.finale-blast::before {
  content: '';
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fffbe2 0 12%,
    #ffde63 22%,
    #ff861f 34%,
    #ed392700 65%
  );
}
.finale-blast span {
  width: clamp(18px, 4vw, 60px);
  height: 8px;
  background: #ffeaa4;
}
.finale-blast span:nth-child(3n) {
  background: #ff792c;
  height: 14px;
}
.finale[open] .finale-blast::before {
  animation: finale-explosion 0.7s ease-out both;
}
.finale[open] .finale-blast span {
  animation: finale-fragment 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes finale-explosion {
  0% {
    transform: translate(-50%, -50%) scale(0.02);
    opacity: 1;
  }
  25% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(3);
    opacity: 0;
  }
}
@keyframes finale-fragment {
  0% {
    transform: rotate(var(--direction)) translateX(0) scaleX(0.3);
    opacity: 1;
  }
  100% {
    transform: rotate(var(--direction)) translateX(var(--distance)) scaleX(0.1);
    opacity: 0;
  }
}
@keyframes finale-reveal {
  from {
    transform: scale(0.04);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.finale-replay {
  position: absolute;
  right: max(24px, env(safe-area-inset-right));
  bottom: max(24px, env(safe-area-inset-bottom));
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  background: var(--space);
  color: var(--yellow);
  font-size: 22px;
}
.finale-replay:hover {
  background: var(--yellow);
  color: var(--space);
}
@media (max-width: 650px) {
  :root {
    --portrait: 180px;
  }
  .masthead {
    left: 20px;
    top: max(22px, env(safe-area-inset-top));
  }
  .wordmark {
    font-size: 25px;
  }
  .wordmark-star {
    font-size: 20px;
    margin-left: 8px;
  }
  .masthead p {
    font-size: 13px;
    max-width: 210px;
  }
  .sound {
    top: 19px;
    right: 10px;
  }
  .sound span {
    display: none;
  }
  .sound svg {
    width: 21px;
    height: 21px;
  }
  .instructions h1 {
    font-size: 36px;
  }
  .instructions p {
    font-size: 17px;
  }
  .instructions > svg {
    width: 49px;
    right: -36px;
    top: -43px;
  }
  .copy-one {
    right: 8%;
    top: 23%;
    font-size: 16px;
  }
  .copy-two {
    right: 6%;
    bottom: 25%;
    font-size: 13px;
  }
  .copy-three {
    left: 9%;
    bottom: 31%;
    font-size: 21px;
  }
  .bottom-bar {
    left: 16px;
    right: 16px;
    bottom: max(49px, calc(env(safe-area-inset-bottom) + 40px));
    align-items: flex-start;
  }
  .bounce-counter {
    font-size: 22px;
  }
  .counter-label {
    font-size: 14px;
  }
  .utility {
    padding: 11px 9px;
    font-size: 16px;
  }
  .micro-footer {
    left: 20px;
    right: 20px;
    bottom: max(16px, env(safe-area-inset-bottom));
    font-size: 12px;
  }
  .micro-footer > span:last-child {
    display: none;
  }
  .reaction {
    top: 95px;
    font-size: 20px;
  }
}
@media (max-height: 550px) {
  :root {
    --portrait: 130px;
  }
  .masthead {
    top: 14px;
  }
  .masthead p,
  .instructions p,
  .counter-label {
    display: none;
  }
  .instructions {
    top: calc(50% + var(--portrait) / 2 + 16px);
  }
  .instructions h1 {
    font-size: 27px;
  }
  .bottom-bar {
    bottom: 35px;
    flex-direction: row;
  }
  .micro-footer {
    bottom: 8px;
  }
  .reaction {
    top: 50px;
  }
  .sound {
    top: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .finale[open] > img,
  .finale[open] .finale-blast::before,
  .finale[open] .finale-blast span {
    animation: none;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
