:root {
  --black: #050505;
  --ink: #0a0a0a;
  --white: #f0f0eb;
  --muted: #7c7c78;
  --dim: #333330;
  --line: rgba(240, 240, 235, 0.16);
  --accent: #dfff00;
  --display: "Oxanium", "Arial Narrow", sans-serif;
  --mono: "DM Mono", "SFMono-Regular", Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
  font-family: var(--mono);
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  border: 0;
}

#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 72% 43%, rgba(255, 255, 255, 0.035), transparent 28%),
    #050505;
}

.noise {
  position: fixed;
  z-index: 20;
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.65'/%3E%3C/svg%3E");
}

.site-rail {
  position: fixed;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 200svh;
  overflow: hidden;
  transform: translate3d(0, 0, 0);
  transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.site-rail::after {
  position: absolute;
  z-index: 20;
  top: 100svh;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 22px rgba(223, 255, 0, 0.38);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.site-rail.is-transitioning::after {
  opacity: 0.7;
}

.site-rail.is-transmission {
  transform: translate3d(0, -100svh, 0);
}

.audio-toggle {
  position: fixed;
  z-index: 7;
  top: 82px;
  right: 38px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 7px 9px;
  cursor: pointer;
  background: rgba(5, 5, 5, 0.76);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.14em;
  backdrop-filter: blur(8px);
  transition:
    color 0.25s ease,
    border-color 0.25s ease,
    opacity 0.3s ease;
}

.audio-toggle:hover,
.audio-toggle:focus-visible,
.audio-toggle.is-playing {
  border-color: rgba(223, 255, 0, 0.42);
  color: var(--white);
}

.audio-toggle:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

.audio-bars {
  display: flex;
  gap: 2px;
  align-items: center;
  height: 10px;
}

.audio-bars i {
  display: block;
  width: 2px;
  height: 3px;
  background: currentColor;
  transform-origin: bottom;
}

.audio-toggle.is-playing .audio-bars i {
  color: var(--accent);
  animation: audioBar 0.8s ease-in-out infinite alternate;
}

.audio-toggle.is-playing .audio-bars i:nth-child(2) {
  animation-delay: -0.33s;
}

.audio-toggle.is-playing .audio-bars i:nth-child(3) {
  animation-delay: -0.57s;
}

.landing {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100svh;
  padding: 26px 38px 24px;
  transition:
    opacity 0.6s ease,
    transform 0.8s cubic-bezier(0.76, 0, 0.24, 1),
    filter 0.6s ease;
}

.transmission {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: 100%;
  height: 100svh;
  overflow: hidden;
  padding: 26px 38px 24px;
  background:
    radial-gradient(circle at 26% 53%, rgba(223, 255, 0, 0.045), transparent 24%),
    radial-gradient(circle at 72% 46%, rgba(255, 255, 255, 0.025), transparent 34%),
    rgba(5, 5, 5, 0.22);
}

.transmission-topbar {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s 0.35s ease,
    transform 0.8s 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-rail.is-transmission .transmission-topbar {
  opacity: 1;
  transform: translateY(0);
}

.transmission-topbar .brand-mark {
  width: 29px;
  font-size: 8px;
}

.return-button {
  justify-self: end;
  padding: 8px 0;
  cursor: pointer;
  background: transparent;
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.14em;
  transition: color 0.25s ease;
}

.return-button:hover,
.return-button:focus-visible {
  color: var(--accent);
  outline: none;
}

.transmission-body {
  display: grid;
  grid-template-columns: minmax(280px, 0.86fr) minmax(560px, 1.14fr);
  gap: clamp(50px, 8vw, 150px);
  align-items: center;
  width: min(1180px, 89vw);
  min-height: 0;
  margin: auto;
}

.signal-array {
  position: relative;
  width: min(33vw, 410px);
  aspect-ratio: 1;
  opacity: 0;
  transform: scale(0.72) rotate(-12deg);
  transition:
    opacity 0.85s 0.25s ease,
    transform 1.2s 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-rail.is-transmission .signal-array {
  opacity: 1;
  transform: scale(1) rotate(0);
}

.signal-array::before,
.signal-array::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.signal-array::before {
  inset: -19%;
  background:
    linear-gradient(90deg, transparent 49.85%, rgba(240, 240, 235, 0.08) 50%, transparent 50.15%),
    linear-gradient(transparent 49.85%, rgba(240, 240, 235, 0.08) 50%, transparent 50.15%);
  border-radius: 50%;
}

.signal-array::after {
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(240, 240, 235, 0.14) 0 0.35deg,
    transparent 0.35deg 15deg
  );
  border-radius: 50%;
  mask: radial-gradient(circle, transparent 0 92%, #000 92.5%);
}

.signal-orbit {
  position: absolute;
  border: 1px solid rgba(240, 240, 235, 0.18);
  border-radius: 50%;
}

.signal-orbit i {
  position: absolute;
  top: 50%;
  left: -3px;
  width: 6px;
  height: 6px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(240, 240, 235, 0.5);
}

.orbit-outer {
  inset: 3%;
  animation: signalRotate 18s linear infinite;
}

.orbit-middle {
  inset: 17%;
  border-style: dashed;
  animation: signalRotate 12s linear infinite reverse;
}

.orbit-middle i {
  top: auto;
  right: 16%;
  bottom: 3%;
  left: auto;
  width: 4px;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.orbit-inner {
  inset: 31%;
  border-color: rgba(223, 255, 0, 0.37);
  animation: signalBreathe 3.2s ease-in-out infinite;
}

.orbit-inner i {
  top: -2px;
  left: 50%;
  width: 4px;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 13px var(--accent);
}

.signal-core {
  position: absolute;
  z-index: 3;
  inset: 42%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--black);
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(223, 255, 0, 0.06),
    0 0 36px rgba(223, 255, 0, 0.28);
  font-family: var(--display);
  font-size: 13px;
  font-weight: 700;
}

.signal-sweep {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  box-shadow: 0 0 8px rgba(223, 255, 0, 0.65);
  transform-origin: left center;
  animation: signalRotate 4.5s linear infinite;
}

.signal-sweep::before {
  position: absolute;
  top: -42px;
  left: 0;
  width: 100%;
  height: 84px;
  content: "";
  background: conic-gradient(from -13deg at 0 50%, rgba(223, 255, 0, 0.12), transparent 26deg);
}

.signal-array > p {
  position: absolute;
  right: -26px;
  bottom: 2%;
  margin: 0;
  color: #555551;
  font-size: 7px;
  line-height: 1.7;
  letter-spacing: 0.16em;
  text-align: right;
}

.transmission-copy {
  position: relative;
  min-width: 0;
  opacity: 0;
  transform: translateY(34px);
  transition:
    opacity 0.8s 0.42s ease,
    transform 1s 0.42s cubic-bezier(0.16, 1, 0.3, 1);
}

.site-rail.is-transmission .transmission-copy {
  opacity: 1;
  transform: translateY(0);
}

.transmission-copy .eyebrow {
  margin-left: 1px;
}

.transmission-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(45px, 5.8vw, 90px);
  font-weight: 600;
  line-height: 0.83;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.transmission-copy h2 span {
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 240, 235, 0.7);
}

.transmission-timer {
  display: grid;
  grid-template-columns: repeat(3, minmax(68px, 1fr) 12px) minmax(68px, 1fr);
  align-items: start;
  margin-top: clamp(32px, 5vh, 58px);
  padding: 18px 0 16px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.transmission-timer div {
  display: grid;
  gap: 7px;
}

.transmission-timer strong {
  min-width: 2ch;
  color: var(--white);
  font-family: var(--display);
  font-size: clamp(25px, 3.2vw, 48px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.045em;
  font-variant-numeric: tabular-nums;
}

.transmission-timer.is-unavailable strong {
  color: #555551;
}

.transmission-timer span {
  color: #5d5d59;
  font-size: 7px;
  letter-spacing: 0.18em;
}

.transmission-timer > i {
  padding-top: 4px;
  color: #434340;
  font-family: var(--display);
  font-size: 22px;
  font-style: normal;
}

.transmission-meta {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 24px;
  padding: 19px 0;
}

.transmission-meta p {
  display: grid;
  gap: 7px;
  margin: 0;
}

.transmission-meta span {
  color: #4d4d4a;
  font-size: 7px;
  letter-spacing: 0.17em;
}

.transmission-meta strong {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.github-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(240, 240, 235, 0.025);
  border: 1px solid var(--line);
  color: var(--muted);
  text-decoration: none;
  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    color 0.3s ease;
}

.github-link:hover,
.github-link:focus-visible {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--black);
  outline: none;
}

.github-link span {
  font-size: 7px;
  letter-spacing: 0.16em;
}

.github-link strong {
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.transmission-footer {
  opacity: 0;
  transform: translateY(-10px);
  transition:
    opacity 0.7s 0.55s ease,
    transform 0.7s 0.55s ease;
}

.site-rail.is-transmission .transmission-footer {
  opacity: 1;
  transform: translateY(0);
}

.transmission-footer .return-button {
  justify-self: center;
}

.transmission-footer p:last-child {
  text-align: right;
}


.landing.is-leaving {
  opacity: 0;
  filter: blur(8px);
  transform: scale(1.04);
  pointer-events: none;
}

.topbar,
.bottombar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: 100%;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.topbar {
  padding-bottom: 21px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  gap: 12px;
  align-items: center;
  width: max-content;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
}

.brand-mark {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--white);
  font-family: var(--display);
  font-size: 12px;
}

.build-status {
  display: flex;
  gap: 9px;
  align-items: center;
}

.status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent);
  animation: statusPulse 2s ease-in-out infinite;
}

.coordinates {
  margin: 0;
  text-align: right;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 0;
}

.hero-copy {
  width: min(65vw, 970px);
  margin-left: 3vw;
}

.eyebrow {
  margin: 0 0 24px 8px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.26em;
}

h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(68px, 10.5vw, 176px);
  font-weight: 600;
  line-height: 0.76;
  letter-spacing: -0.075em;
  text-transform: uppercase;
}

h1 > span {
  display: block;
}

.secret-letter {
  position: relative;
  display: inline-block;
  width: 0.47em;
  margin: 0 -0.025em;
  padding: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  cursor: default;
  font: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  text-align: center;
  text-transform: inherit;
  vertical-align: baseline;
  transform-origin: 50% 70%;
}

.secret-letter:focus {
  outline: none;
}

.secret-letter:focus-visible {
  outline: 1px dashed rgba(240, 240, 235, 0.45);
  outline-offset: 5px;
}

.secret-letter::before,
.secret-letter::after {
  position: absolute;
  pointer-events: none;
}

.secret-letter.is-breaking {
  animation: letterBreak 0.78s steps(7, end) forwards;
}

.secret-letter.is-broken {
  visibility: hidden;
}

.secret-letter.restored-alien {
  color: var(--accent);
  font-family: var(--display);
  font-weight: 700;
  text-shadow:
    0 0 0.08em var(--accent),
    0 0 0.22em rgba(223, 255, 0, 0.65);
  -webkit-text-stroke: 0.012em #f5ffab;
  animation: restoredAlien 1.6s ease-in-out infinite alternate;
}

.secret-letter.restored-alien::before {
  top: -0.32em;
  left: 50%;
  content: "⌁";
  color: var(--accent);
  font-size: 0.27em;
  letter-spacing: -0.17em;
  text-shadow: 0 0 0.35em var(--accent);
  transform: translateX(-53%) rotate(-12deg);
  -webkit-text-stroke: 0;
}

.secret-letter.restored-alien::after {
  top: -0.18em;
  left: 50%;
  width: 0.16em;
  height: 0.16em;
  content: "";
  background: #f7ffc7;
  border-radius: 50%;
  box-shadow:
    -0.12em -0.04em 0 -0.035em var(--accent),
    0.12em -0.04em 0 -0.035em var(--accent),
    0 0 0.12em var(--accent);
  transform: translateX(-50%);
}

.secret-letter.restored-worm {
  color: #a8d45b;
  font-family: var(--mono);
  font-weight: 500;
  text-shadow:
    0.025em 0.035em 0 #263811,
    0 0 0.18em rgba(131, 192, 72, 0.75);
  -webkit-text-stroke: 0.018em #d9f79f;
  transform: skewX(-7deg);
}

.secret-letter.restored-worm::before {
  right: 0.01em;
  bottom: -0.13em;
  width: 0.1em;
  height: 0.22em;
  content: "";
  background: #8cc64d;
  border-radius: 0 0 50% 50%;
  box-shadow:
    -0.17em 0.06em 0 -0.018em #b9e76a,
    -0.31em -0.01em 0 -0.028em #719f3e;
  animation: slimeDrip 1.8s ease-in-out infinite;
}

.secret-letter.restored-worm::after {
  bottom: -0.1em;
  left: 0.02em;
  width: 0.42em;
  height: 0.07em;
  content: "";
  background: #a8d45b;
  border-radius: 50%;
  filter: blur(0.015em);
}

.secret-letter.restored-astronaut {
  color: transparent;
  font-family: var(--mono);
  font-weight: 500;
  text-shadow: 0 0 0.14em rgba(240, 240, 235, 0.28);
  -webkit-text-stroke: 0.018em #c9c9c2;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 64% 78%, 64% 48%, 0 48%);
}

.secret-letter.restored-astronaut::before {
  top: 0.08em;
  right: -0.09em;
  bottom: 0.04em;
  width: 0.38em;
  content: "";
  border-top: 0.012em dashed #7a7a76;
  border-right: 0.012em dashed #7a7a76;
  border-bottom: 0.012em dashed #7a7a76;
  transform: skewY(-6deg);
}

.secret-letter.restored-astronaut::after {
  top: 0.42em;
  right: -0.06em;
  content: "×";
  color: var(--accent);
  font-family: var(--mono);
  font-size: 0.2em;
  text-shadow: 0 0 0.4em var(--accent);
  -webkit-text-stroke: 0;
}

.was-here {
  margin-left: 0.54em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(240, 240, 235, 0.68);
}

.cursor {
  display: inline;
  color: var(--white);
  -webkit-text-stroke: 0;
  animation: blink 1s steps(1) infinite;
}

.hero-footer {
  display: flex;
  gap: 48px;
  align-items: flex-end;
  margin: 40px 0 0 9px;
}

.hero-footer p {
  margin: 0;
  max-width: 430px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.progress-label {
  color: #555551;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.progress-label b {
  color: var(--white);
  font-weight: 400;
}

.start-orbit {
  position: absolute;
  top: 50%;
  left: 72%;
  width: 210px;
  height: 210px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(240, 240, 235, 0.22);
  border-radius: 50%;
  transition:
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.4s ease;
}

.ring-one::before,
.ring-two::before {
  position: absolute;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--white);
  border-radius: 50%;
}

.ring-one::before {
  top: 18px;
  left: 39px;
}

.ring-two {
  inset: 13px;
  border-style: dashed;
  animation: spin 18s linear infinite;
}

.ring-two::before {
  right: 0;
  bottom: 49px;
}

.start-core {
  position: absolute;
  inset: 31px;
  display: grid;
  place-content: center;
  gap: 10px;
  overflow: hidden;
  background: var(--white);
  color: var(--black);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  transition:
    color 0.35s ease,
    background 0.35s ease,
    transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-core::after {
  position: absolute;
  inset: 0;
  content: "";
  background: var(--accent);
  border-radius: inherit;
  transform: translateY(102%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.start-core > * {
  position: relative;
  z-index: 1;
}

.start-core svg {
  width: 20px;
  margin: auto;
  fill: currentColor;
}

.game-label {
  position: absolute;
  right: -28px;
  bottom: 10px;
  padding: 7px 9px;
  background: var(--black);
  border: 1px solid var(--line);
  font-size: 8px;
  letter-spacing: 0.12em;
  transition: color 0.3s ease;
}

.start-orbit:hover .start-core,
.start-orbit:focus-visible .start-core {
  transform: scale(1.08);
}

.start-orbit:hover .start-core::after,
.start-orbit:focus-visible .start-core::after {
  transform: translateY(0);
}

.start-orbit:hover .ring-one,
.start-orbit:focus-visible .ring-one {
  border-color: rgba(223, 255, 0, 0.75);
  transform: scale(1.08) rotate(-8deg);
}

.start-orbit:hover .game-label {
  color: var(--accent);
}

.start-orbit:focus-visible {
  outline: none;
}

.side-note {
  position: absolute;
  right: 0;
  display: flex;
  gap: 16px;
  align-items: center;
  color: #454542;
  font-size: 8px;
  letter-spacing: 0.17em;
  writing-mode: vertical-rl;
}

.side-line {
  width: 1px;
  height: 50px;
  background: #353533;
}

.bottombar {
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 8px;
}

.bottombar p {
  margin: 0;
}

.bottombar p:last-child {
  text-align: right;
}

.scroll-hint {
  display: flex;
  gap: 9px;
  align-items: center;
}

.scroll-hint span {
  color: var(--white);
}

.local-time {
  margin-left: 14px;
  color: var(--white);
}

/* Hidden letter restoration event */
.easter-stage {
  --egg-x: 50vw;
  --egg-y: 42vh;
  --egg-letter-height: 100px;
  position: fixed;
  z-index: 8;
  inset: 0;
  visibility: hidden;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.easter-stage.is-active {
  visibility: visible;
  opacity: 1;
}

.easter-announcement {
  position: fixed;
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.letter-shards {
  position: absolute;
  z-index: 10;
  top: var(--egg-y);
  left: var(--egg-x);
  width: calc(var(--egg-letter-height) * 0.46);
  height: var(--egg-letter-height);
  opacity: 0;
  transform: translate(-50%, -50%);
}

.easter-stage.is-active .letter-shards {
  opacity: 1;
}

.letter-shards i {
  --shard-x: 0px;
  --shard-y: 60px;
  --shard-r: 35deg;
  position: absolute;
  top: 35%;
  left: 42%;
  width: 24%;
  height: 31%;
  background: var(--white);
  box-shadow: 0 0 8px rgba(240, 240, 235, 0.35);
  clip-path: polygon(0 0, 100% 14%, 73% 100%, 12% 78%);
  animation: shardFall 1.25s cubic-bezier(0.32, 0, 0.67, 0) forwards;
}

.letter-shards i:nth-child(2) {
  --shard-x: 34px;
  --shard-y: 78px;
  --shard-r: 115deg;
  top: 10%;
  left: 52%;
  width: 18%;
  height: 25%;
  animation-delay: 0.07s;
}

.letter-shards i:nth-child(3) {
  --shard-x: -39px;
  --shard-y: 66px;
  --shard-r: -85deg;
  top: 64%;
  left: 18%;
  width: 34%;
  height: 17%;
  animation-delay: 0.04s;
}

.letter-shards i:nth-child(4) {
  --shard-x: 13px;
  --shard-y: 94px;
  --shard-r: 170deg;
  top: 74%;
  left: 58%;
  width: 29%;
  height: 15%;
  animation-delay: 0.11s;
}

.letter-shards i:nth-child(5) {
  --shard-x: -18px;
  --shard-y: 72px;
  --shard-r: -145deg;
  top: 31%;
  left: 8%;
  width: 18%;
  height: 24%;
}

.letter-shards i:nth-child(6) {
  --shard-x: 45px;
  --shard-y: 55px;
  --shard-r: 70deg;
  top: 52%;
  left: 63%;
  width: 20%;
  height: 20%;
  animation-delay: 0.14s;
}

.egg-scene {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
}

.easter-stage.scene-alien .alien-scene,
.easter-stage.scene-worm .worm-scene,
.easter-stage.scene-astronaut .astronaut-scene {
  visibility: visible;
  opacity: 1;
}

/* UFO restoration */
.ufo {
  position: absolute;
  z-index: 5;
  top: calc(var(--egg-y) - 230px);
  left: calc(var(--egg-x) - 76px);
  width: 152px;
  height: 78px;
  filter: drop-shadow(0 0 18px rgba(223, 255, 0, 0.22));
  opacity: 0;
}

.scene-alien .ufo {
  animation: ufoVisit 7.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.ufo i {
  position: absolute;
  display: block;
}

.ufo-antenna {
  top: 0;
  left: 75px;
  width: 1px;
  height: 18px;
  background: var(--accent);
  transform: rotate(8deg);
  transform-origin: bottom;
}

.ufo-antenna::before {
  position: absolute;
  top: -3px;
  left: -2px;
  width: 5px;
  height: 5px;
  content: "";
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.ufo-dome {
  top: 13px;
  left: 52px;
  width: 52px;
  height: 34px;
  background: linear-gradient(160deg, rgba(223, 255, 0, 0.8), rgba(64, 75, 0, 0.18));
  border: 1px solid #dfff00;
  border-radius: 60% 60% 20% 20%;
  box-shadow: inset 0 0 12px rgba(223, 255, 0, 0.3);
}

.ufo-hull {
  top: 39px;
  left: 9px;
  width: 134px;
  height: 29px;
  background: #d4d4cd;
  border-radius: 50% 50% 38% 38%;
  box-shadow:
    inset 0 -8px 0 #555551,
    inset 0 3px 0 #fff;
  clip-path: polygon(15% 0, 85% 0, 100% 45%, 82% 100%, 18% 100%, 0 45%);
}

.ufo-lights {
  top: 53px;
  left: 34px;
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow:
    25px 5px 0 #181812,
    50px 5px 0 var(--accent),
    75px 0 0 #181812,
    0 0 8px var(--accent),
    50px 5px 8px var(--accent);
}

.tractor-beam {
  position: absolute;
  z-index: 2;
  top: calc(var(--egg-y) - 178px);
  left: calc(var(--egg-x) - 57px);
  width: 114px;
  height: 198px;
  background: linear-gradient(
    to bottom,
    rgba(223, 255, 0, 0.32),
    rgba(223, 255, 0, 0.06) 68%,
    transparent
  );
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  opacity: 0;
  transform-origin: top;
}

.scene-alien .tractor-beam {
  animation: beamPulse 4.5s 1.2s ease-in-out forwards;
}

.tiny-alien {
  position: absolute;
  z-index: 6;
  top: calc(var(--egg-y) - 144px);
  left: calc(var(--egg-x) - 18px);
  width: 36px;
  height: 73px;
  opacity: 0;
}

.scene-alien .tiny-alien {
  animation: alienDelivery 5.4s 1.45s ease-in-out forwards;
}

.tiny-alien i {
  position: absolute;
  display: block;
}

.alien-head {
  top: 0;
  left: 4px;
  width: 28px;
  height: 30px;
  background: #bfe84e;
  border-radius: 58% 58% 48% 48%;
  box-shadow: inset 0 -6px 0 #83a934;
}

.alien-head::before,
.alien-head::after {
  position: absolute;
  top: 11px;
  width: 8px;
  height: 5px;
  content: "";
  background: #050505;
  border-radius: 100% 0;
}

.alien-head::before {
  left: 4px;
  transform: rotate(18deg);
}

.alien-head::after {
  right: 4px;
  transform: scaleX(-1) rotate(18deg);
}

.alien-body {
  top: 27px;
  left: 9px;
  width: 19px;
  height: 36px;
  background: #7b9b36;
  clip-path: polygon(20% 0, 80% 0, 100% 62%, 72% 100%, 52% 68%, 28% 100%, 0 62%);
}

.alien-tool {
  top: 36px;
  right: -10px;
  width: 20px;
  height: 4px;
  background: var(--white);
  transform: rotate(35deg);
}

.alien-tool::after {
  position: absolute;
  top: -3px;
  right: -5px;
  width: 7px;
  height: 10px;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.alien-glyph,
.worm-glyph,
.builder-glyph {
  position: absolute;
  z-index: 4;
  top: calc(var(--egg-y) - var(--egg-letter-height) * 0.51);
  left: var(--egg-x);
  color: var(--accent);
  font-family: var(--display);
  font-size: calc(var(--egg-letter-height) * 0.86);
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: translateX(-50%);
}

.scene-alien .alien-glyph {
  animation: alienGlyph 7.2s ease-out forwards;
}

/* Black-hole and worm restoration */
.black-hole {
  position: absolute;
  z-index: 3;
  top: calc(var(--egg-y) - 116px);
  left: calc(var(--egg-x) - 116px);
  width: 232px;
  height: 232px;
  opacity: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle, #000 0 26%, transparent 27%),
    conic-gradient(
      from 20deg,
      transparent,
      #403257,
      #91ac3c,
      #101010,
      #776391,
      transparent,
      #9bc24e,
      transparent
    );
  filter: drop-shadow(0 0 24px rgba(128, 101, 172, 0.35));
}

.black-hole::before,
.black-hole::after {
  position: absolute;
  content: "";
  border: 1px solid rgba(223, 255, 0, 0.36);
  border-radius: 50%;
}

.black-hole::before {
  inset: 21px -16px;
  transform: rotate(28deg) scaleY(0.34);
}

.black-hole::after {
  inset: -9px 27px;
  border-color: rgba(157, 126, 196, 0.46);
  transform: rotate(-22deg) scaleX(0.36);
}

.black-hole i {
  position: absolute;
  inset: 18px;
  border: 3px solid transparent;
  border-top-color: rgba(223, 255, 0, 0.58);
  border-radius: 50%;
}

.black-hole i:nth-child(2) {
  inset: 38px;
  border-top-color: #74608b;
  transform: rotate(120deg);
}

.black-hole i:nth-child(3) {
  inset: 57px;
  border-top-color: #dfff00;
  transform: rotate(230deg);
}

.scene-worm .black-hole {
  animation: blackHoleOpen 7.6s ease-in-out forwards;
}

.scene-worm .black-hole i {
  animation: spin 1.8s linear infinite;
}

.space-worm {
  position: absolute;
  z-index: 6;
  top: calc(var(--egg-y) - 38px);
  left: calc(var(--egg-x) - 210px);
  width: 235px;
  height: 74px;
  opacity: 0;
  transform-origin: right center;
}

.scene-worm .space-worm {
  animation: wormEmerge 6.3s 0.65s ease-in-out forwards;
}

.space-worm i {
  position: absolute;
  display: block;
}

.worm-tail {
  top: 28px;
  left: 0;
  width: 92px;
  height: 23px;
  background: #5b7636;
  border-radius: 100% 0 0 100%;
  transform: rotate(-9deg);
}

.worm-body {
  top: 17px;
  left: 63px;
  width: 125px;
  height: 43px;
  background:
    repeating-linear-gradient(90deg, transparent 0 18px, rgba(0, 0, 0, 0.22) 19px 23px),
    #8cad4e;
  border-radius: 48% 22% 22% 48%;
  box-shadow:
    inset 0 8px 0 rgba(226, 255, 152, 0.23),
    inset 0 -9px 0 #526b31;
}

.worm-head {
  top: 9px;
  right: 0;
  width: 69px;
  height: 59px;
  background: #a8cf5f;
  border-radius: 40% 54% 48% 42%;
  box-shadow: inset -9px -8px 0 #68863b;
}

.worm-head b {
  position: absolute;
  top: 13px;
  right: 15px;
  width: 8px;
  height: 8px;
  background: #090909;
  border: 2px solid #ecffd1;
  border-radius: 50%;
}

.worm-head b:nth-child(2) {
  top: 33px;
  right: 11px;
  width: 6px;
  height: 6px;
}

.worm-mouth {
  top: 25px;
  right: -5px;
  width: 19px;
  height: 24px;
  background: #131313;
  border: 3px solid #68863b;
  border-radius: 50%;
}

.worm-mouth::before,
.worm-mouth::after {
  position: absolute;
  left: 2px;
  width: 9px;
  height: 3px;
  content: "";
  background: #f1f1e8;
}

.worm-mouth::before {
  top: 2px;
  transform: rotate(22deg);
}

.worm-mouth::after {
  bottom: 2px;
  transform: rotate(-22deg);
}

.worm-slime {
  position: absolute;
  z-index: 5;
  top: calc(var(--egg-y) + 22px);
  left: calc(var(--egg-x) - 31px);
  width: 62px;
  height: 8px;
  background: #8fbd4a;
  border-radius: 50%;
  opacity: 0;
  filter: blur(1px);
  box-shadow:
    7px 8px 0 -2px #71983e,
    -11px 5px 0 -3px #b2dc66;
}

.scene-worm .worm-slime {
  animation: slimeAppear 7.6s ease-in-out forwards;
}

.worm-glyph {
  color: #a8d45b;
  font-family: var(--mono);
  text-shadow: 0 0 11px #789a42;
}

.scene-worm .worm-glyph {
  animation: wormGlyph 7.6s ease-out forwards;
}

/* Astronaut construction restoration */
.builder-ship {
  position: absolute;
  z-index: 5;
  top: calc(var(--egg-y) - 170px);
  left: calc(var(--egg-x) + 72px);
  width: 116px;
  height: 72px;
  opacity: 0;
}

.scene-astronaut .builder-ship {
  animation: builderShipVisit 8.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.builder-ship i {
  position: absolute;
  display: block;
}

.ship-body {
  top: 20px;
  left: 9px;
  width: 98px;
  height: 43px;
  background: #d8d8d2;
  clip-path: polygon(16% 0, 78% 0, 100% 50%, 78% 100%, 16% 100%, 0 58%);
  box-shadow: inset 0 -9px 0 #5e5e5a;
}

.ship-window {
  z-index: 2;
  top: 28px;
  left: 54px;
  width: 28px;
  height: 17px;
  background: #171d19;
  border: 2px solid #888881;
  box-shadow: inset 0 0 8px rgba(223, 255, 0, 0.32);
}

.ship-flame {
  top: 32px;
  left: -20px;
  width: 34px;
  height: 17px;
  background: linear-gradient(90deg, transparent, var(--accent));
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
  animation: flameFlicker 0.16s steps(2) infinite;
}

.scaffold {
  position: absolute;
  z-index: 4;
  top: calc(var(--egg-y) - 69px);
  left: calc(var(--egg-x) - 42px);
  width: 84px;
  height: 130px;
  opacity: 0;
  border-right: 2px dashed #686864;
  border-left: 2px dashed #686864;
}

.scene-astronaut .scaffold {
  animation: scaffoldBuild 8.8s ease-in-out forwards;
}

.scaffold i {
  position: absolute;
  right: 0;
  left: 0;
  height: 2px;
  background: #686864;
}

.scaffold i:nth-child(1) {
  top: 8%;
}

.scaffold i:nth-child(2) {
  top: 40%;
}

.scaffold i:nth-child(3) {
  top: 72%;
}

.scaffold i:nth-child(4) {
  top: 8%;
  left: 41px;
  width: 2px;
  height: 90%;
  transform: rotate(31deg);
}

.astronaut {
  position: absolute;
  z-index: 7;
  width: 26px;
  height: 45px;
  opacity: 0;
}

.astronaut i {
  position: absolute;
  top: 0;
  left: 3px;
  width: 20px;
  height: 18px;
  background: #ecece6;
  border: 2px solid #777772;
  border-radius: 45% 45% 38% 38%;
}

.astronaut i::after {
  position: absolute;
  inset: 4px 3px;
  content: "";
  background: #151a18;
  border-radius: 45%;
  box-shadow: inset 0 0 4px rgba(223, 255, 0, 0.45);
}

.astronaut b {
  position: absolute;
  top: 17px;
  left: 6px;
  width: 15px;
  height: 22px;
  background: #c9c9c4;
  clip-path: polygon(0 0, 100% 0, 92% 70%, 100% 100%, 60% 100%, 50% 72%, 40% 100%, 0 100%, 8% 70%);
}

.astronaut-one {
  top: calc(var(--egg-y) - 57px);
  left: calc(var(--egg-x) - 67px);
}

.astronaut-two {
  top: calc(var(--egg-y) + 18px);
  left: calc(var(--egg-x) + 48px);
  transform: rotate(-8deg);
}

.astronaut-three {
  top: calc(var(--egg-y) - 109px);
  left: calc(var(--egg-x) + 22px);
  transform: scale(0.85);
}

.scene-astronaut .astronaut-one {
  animation: builderOne 8.8s ease-in-out forwards;
}

.scene-astronaut .astronaut-two {
  animation: builderTwo 8.8s ease-in-out forwards;
}

.scene-astronaut .astronaut-three {
  animation: builderThree 8.8s ease-in-out forwards;
}

.build-sparks {
  position: absolute;
  z-index: 9;
  top: calc(var(--egg-y) - 18px);
  left: var(--egg-x);
  width: 4px;
  height: 4px;
  opacity: 0;
}

.build-sparks i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  box-shadow: 0 0 7px var(--accent);
}

.build-sparks i:nth-child(1) {
  transform: translate(18px, -16px);
}

.build-sparks i:nth-child(2) {
  transform: translate(-21px, 8px);
}

.build-sparks i:nth-child(3) {
  transform: translate(25px, 17px);
}

.build-sparks i:nth-child(4) {
  transform: translate(-14px, -24px);
}

.scene-astronaut .build-sparks {
  animation: weldingSparks 8.8s steps(2, end) forwards;
}

.builder-glyph {
  color: transparent;
  font-family: var(--mono);
  -webkit-text-stroke: 2px #cecec8;
}

.scene-astronaut .builder-glyph {
  animation: builderGlyph 8.8s ease-in-out forwards;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  animation: reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero h1 {
  animation-delay: 0.12s;
}

.hero-footer {
  animation-delay: 0.22s;
}

.start-orbit {
  animation-delay: 0.35s;
}

/* Game */
.game-screen {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  visibility: hidden;
  overflow: hidden;
  padding: 24px 32px 28px;
  background: rgba(5, 5, 5, 0.88);
  opacity: 0;
  transform: scale(0.96);
  transition:
    opacity 0.65s ease,
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0.65s;
}

.game-screen.is-visible {
  visibility: visible;
  opacity: 1;
  transform: scale(1);
}

.game-scanline {
  position: absolute;
  z-index: 3;
  top: -5%;
  right: 0;
  left: 0;
  height: 2px;
  pointer-events: none;
  background: rgba(223, 255, 0, 0.2);
  box-shadow: 0 0 18px rgba(223, 255, 0, 0.16);
  animation: scan 8s linear infinite;
}

.game-header {
  display: grid;
  z-index: 4;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 9px;
  letter-spacing: 0.15em;
}

.game-header p {
  margin: 0;
}

.game-header p span {
  color: var(--accent);
}

.text-button {
  width: max-content;
  padding: 8px 0;
  cursor: pointer;
  background: none;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  transition: color 0.2s ease;
}

.text-button:last-child {
  justify-self: end;
}

.text-button:hover {
  color: var(--white);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(180px, 260px) auto minmax(180px, 260px);
  gap: clamp(30px, 6vw, 100px);
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 24px 0;
}

.game-panel {
  width: 100%;
  color: var(--muted);
}

.panel-label {
  margin: 0 0 26px;
  color: #555551;
  font-size: 8px;
  letter-spacing: 0.19em;
}

.hold-panel {
  margin-bottom: 28px;
}

.hold-panel .panel-label {
  margin-bottom: 12px;
}

.stats-label {
  margin-bottom: 10px;
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.stat span {
  font-size: 8px;
  letter-spacing: 0.16em;
}

.stat strong {
  color: var(--white);
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.system-message {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 25px;
  color: var(--white);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.board-wrap {
  display: grid;
  place-items: center;
}

.board-frame {
  position: relative;
  padding: 8px;
  background: #080808;
  border: 1px solid rgba(240, 240, 235, 0.28);
  box-shadow:
    0 0 0 1px #000,
    0 28px 80px rgba(0, 0, 0, 0.55);
}

.board-frame::before,
.board-frame::after {
  position: absolute;
  width: 13px;
  height: 13px;
  content: "";
  pointer-events: none;
}

.board-frame::before {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
}

.board-frame::after {
  right: -1px;
  bottom: -1px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
}

#tetris {
  display: block;
  width: min(300px, 38vw);
  height: min(600px, calc(100svh - 145px));
  background: #090909;
  image-rendering: pixelated;
}

.game-overlay {
  position: absolute;
  z-index: 2;
  inset: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 25px;
  background: rgba(5, 5, 5, 0.86);
  text-align: center;
  opacity: 1;
  backdrop-filter: blur(3px);
  transition:
    opacity 0.35s ease,
    visibility 0.35s;
}

.game-overlay.is-hidden {
  visibility: hidden;
  opacity: 0;
}

.overlay-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.22em;
}

.game-overlay h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 45px;
  letter-spacing: 0.06em;
}

.game-overlay > p:not(.overlay-kicker) {
  margin: 8px 0 26px;
  color: var(--muted);
  font-size: 9px;
}

.game-overlay button {
  padding: 13px 19px;
  cursor: pointer;
  background: var(--accent);
  color: var(--black);
  font-family: var(--display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

#nextPiece,
#holdPiece {
  display: block;
  width: 120px;
  height: 120px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--line);
}

#nextPiece {
  margin-bottom: 38px;
}

#holdPiece.is-locked {
  opacity: 0.42;
}

.controls {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.controls .panel-label {
  margin-bottom: 15px;
}

.controls div {
  display: flex;
  gap: 5px;
  align-items: center;
  min-height: 28px;
}

.controls span {
  margin-left: auto;
  font-size: 7px;
  letter-spacing: 0.12em;
}

kbd {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  padding: 0 6px;
  place-items: center;
  background: #111;
  border: 1px solid #333;
  color: var(--white);
  font-family: var(--mono);
  font-size: 8px;
  box-shadow: inset 0 -2px 0 #1e1e1e;
}

.mobile-controls {
  display: none;
}

@keyframes reveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blink {
  0%,
  48% {
    opacity: 1;
  }
  49%,
  100% {
    opacity: 0;
  }
}

@keyframes statusPulse {
  50% {
    opacity: 0.35;
    box-shadow: 0 0 2px var(--accent);
  }
}

@keyframes scan {
  to {
    top: 105%;
  }
}

@keyframes audioBar {
  from {
    transform: scaleY(0.35);
  }
  to {
    transform: scaleY(2.8);
  }
}

@keyframes signalRotate {
  to {
    transform: rotate(360deg);
  }
}

@keyframes signalBreathe {
  50% {
    opacity: 0.4;
    transform: scale(0.88);
  }
}

@keyframes letterBreak {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0);
    filter: none;
  }
  20% {
    transform: translate(-0.02em, 0.015em) rotate(-2deg);
  }
  38% {
    transform: translate(0.03em, -0.02em) rotate(3deg);
    filter: brightness(1.7);
  }
  58% {
    opacity: 1;
    transform: translate(-0.04em, 0.035em) rotate(-7deg) scaleY(0.98);
  }
  100% {
    opacity: 0;
    transform: translate(0.1em, 0.6em) rotate(24deg) scale(0.48);
    filter: blur(2px);
  }
}

@keyframes shardFall {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0) scale(0.4);
  }
  12% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--shard-x), var(--shard-y)) rotate(var(--shard-r)) scale(0.75);
  }
}

@keyframes ufoVisit {
  0% {
    opacity: 0;
    transform: translate(280px, -180px) scale(0.35) rotate(13deg);
  }
  13%,
  72% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0);
  }
  81% {
    opacity: 1;
    transform: translate(-8px, -5px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-350px, -220px) scale(0.28) rotate(-12deg);
  }
}

@keyframes beamPulse {
  0%,
  100% {
    opacity: 0;
    transform: scaleX(0.16) scaleY(0);
  }
  12%,
  70% {
    opacity: 0.7;
    transform: scaleX(1) scaleY(1);
  }
  35% {
    opacity: 0.3;
  }
  45% {
    opacity: 0.85;
  }
}

@keyframes alienDelivery {
  0% {
    opacity: 0;
    transform: translateY(-55px) scale(0.4);
  }
  14%,
  67% {
    opacity: 1;
    transform: translateY(123px) scale(1);
  }
  72% {
    transform: translateY(123px) rotate(-14deg);
  }
  79% {
    transform: translateY(123px) rotate(12deg);
  }
  100% {
    opacity: 0;
    transform: translateY(-58px) scale(0.4);
  }
}

@keyframes alienGlyph {
  0%,
  55% {
    opacity: 0;
    transform: translateX(-50%) scale(0.15);
  }
  68%,
  91% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
    text-shadow: 0 0 18px var(--accent);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) scale(1);
  }
}

@keyframes restoredAlien {
  from {
    filter: brightness(0.88);
  }
  to {
    filter: brightness(1.18);
  }
}

@keyframes blackHoleOpen {
  0%,
  100% {
    opacity: 0;
    transform: scale(0) rotate(0);
  }
  14% {
    opacity: 0.9;
    transform: scale(0.72) rotate(85deg);
  }
  27%,
  74% {
    opacity: 1;
    transform: scale(1) rotate(240deg);
  }
  90% {
    opacity: 0.8;
    transform: scale(0.28) rotate(520deg);
  }
}

@keyframes wormEmerge {
  0% {
    opacity: 0;
    transform: translateX(190px) scaleX(0.08);
  }
  18% {
    opacity: 1;
    transform: translateX(150px) scaleX(0.45) rotate(4deg);
  }
  43%,
  72% {
    opacity: 1;
    transform: translateX(0) scaleX(1) rotate(-2deg);
  }
  51% {
    transform: translateX(8px) scaleX(1.04) rotate(3deg);
  }
  100% {
    opacity: 0;
    transform: translateX(190px) scaleX(0.08);
  }
}

@keyframes slimeAppear {
  0%,
  47%,
  100% {
    opacity: 0;
    transform: scaleX(0.2);
  }
  56%,
  90% {
    opacity: 0.9;
    transform: scaleX(1);
  }
}

@keyframes wormGlyph {
  0%,
  51% {
    opacity: 0;
    transform: translate(-50%, -0.1em) rotate(-16deg) scale(0.35);
  }
  63%,
  92% {
    opacity: 1;
    transform: translate(-50%, 0) rotate(0) scale(1);
  }
  100% {
    opacity: 0;
  }
}

@keyframes slimeDrip {
  0%,
  100% {
    transform: scaleY(0.45);
    transform-origin: top;
  }
  60% {
    transform: scaleY(1.18);
    transform-origin: top;
  }
}

@keyframes builderShipVisit {
  0% {
    opacity: 0;
    transform: translate(380px, -120px) scale(0.4) rotate(-9deg);
  }
  14%,
  82% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(360px, -180px) scale(0.35) rotate(12deg);
  }
}

@keyframes flameFlicker {
  50% {
    transform: scaleX(0.7);
    filter: brightness(1.7);
  }
}

@keyframes scaffoldBuild {
  0%,
  22% {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: bottom;
  }
  35%,
  87% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 0;
  }
}

@keyframes builderOne {
  0%,
  23% {
    opacity: 0;
    transform: translate(150px, -80px) scale(0.6);
  }
  34%,
  88% {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
  52% {
    transform: translate(7px, -6px) rotate(7deg);
  }
  100% {
    opacity: 0;
    transform: translate(140px, -95px) scale(0.5);
  }
}

@keyframes builderTwo {
  0%,
  29% {
    opacity: 0;
    transform: translate(110px, -120px) scale(0.5);
  }
  40%,
  87% {
    opacity: 1;
    transform: translate(0, 0) scale(1) rotate(-8deg);
  }
  63% {
    transform: translate(-8px, -8px) rotate(-15deg);
  }
  100% {
    opacity: 0;
    transform: translate(120px, -120px) scale(0.45);
  }
}

@keyframes builderThree {
  0%,
  33% {
    opacity: 0;
    transform: translate(90px, -80px) scale(0.4);
  }
  43%,
  88% {
    opacity: 1;
    transform: translate(0, 0) scale(0.85);
  }
  67% {
    transform: translate(-5px, 9px) scale(0.85) rotate(8deg);
  }
  100% {
    opacity: 0;
    transform: translate(95px, -90px) scale(0.4);
  }
}

@keyframes weldingSparks {
  0%,
  38%,
  100% {
    opacity: 0;
    transform: scale(0.2);
  }
  43%,
  48%,
  55%,
  63%,
  72%,
  80% {
    opacity: 1;
    transform: scale(1.6) rotate(40deg);
  }
  46%,
  52%,
  59%,
  68%,
  76% {
    opacity: 0.15;
    transform: scale(0.45) rotate(-20deg);
  }
}

@keyframes builderGlyph {
  0%,
  32% {
    opacity: 0;
    clip-path: inset(100% 0 0 0);
  }
  44% {
    opacity: 1;
    clip-path: inset(68% 0 0 0);
  }
  63% {
    clip-path: inset(29% 0 0 0);
  }
  82%,
  94% {
    opacity: 1;
    clip-path: inset(0 0 20% 0);
  }
  100% {
    opacity: 0;
    clip-path: inset(0 0 20% 0);
  }
}

@media (max-width: 900px) {
  .landing {
    padding: 22px;
  }

  .transmission {
    padding: 22px;
  }

  .audio-toggle {
    top: 72px;
    right: 22px;
  }

  .coordinates,
  .scroll-hint {
    display: none;
  }

  .topbar,
  .bottombar {
    grid-template-columns: 1fr auto;
  }

  .build-status {
    justify-self: end;
  }

  .hero-copy {
    width: 100%;
    margin-left: 0;
  }

  h1 {
    font-size: clamp(56px, 15vw, 112px);
  }

  .start-orbit {
    top: auto;
    right: 2vw;
    bottom: 7%;
    left: auto;
    width: 150px;
    height: 150px;
    transform: none;
  }

  .start-core {
    inset: 24px;
  }

  .game-label {
    right: -5px;
  }

  .hero-footer {
    max-width: 50%;
    margin-top: 28px;
  }

  .side-note {
    display: none;
  }

  .transmission-body {
    grid-template-columns: minmax(220px, 0.7fr) minmax(430px, 1.3fr);
    gap: 30px;
    width: 94vw;
  }

  .signal-array {
    width: min(34vw, 330px);
  }

  .transmission-copy h2 {
    font-size: clamp(43px, 6.8vw, 68px);
  }

  .bottombar p:last-child {
    grid-column: 2;
  }

  .game-layout {
    grid-template-columns: 120px auto 120px;
    gap: 24px;
  }

  .stat {
    display: block;
  }

  .stat strong {
    display: block;
    margin-top: 5px;
  }
}

@media (max-width: 650px) {
  .landing {
    padding: 18px;
  }

  .transmission {
    padding: 18px;
  }

  .audio-toggle {
    top: 62px;
    right: 18px;
    padding: 6px 7px;
  }

  .topbar {
    padding-bottom: 14px;
  }

  .hero {
    align-items: flex-start;
    padding-top: 15vh;
  }

  h1 {
    font-size: clamp(50px, 17vw, 82px);
    line-height: 0.84;
  }

  .was-here {
    margin-left: 0;
  }

  .hero-footer {
    max-width: 78%;
    margin: 24px 0 0;
  }

  .hero-footer p {
    font-size: 9px;
  }

  .progress-label {
    display: none;
  }

  .start-orbit {
    right: 3vw;
    bottom: 4vh;
    width: 138px;
    height: 138px;
  }

  .ufo,
  .black-hole,
  .space-worm,
  .builder-ship,
  .scaffold {
    scale: 0.78;
  }

  .tiny-alien,
  .astronaut {
    scale: 0.86;
  }

  .start-core {
    inset: 21px;
  }

  .bottombar {
    display: flex;
    justify-content: space-between;
  }

  .transmission-topbar .build-status {
    display: none;
  }

  .transmission-topbar {
    grid-template-columns: 1fr auto;
  }

  .transmission-topbar .brand > span:last-child {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .transmission-body {
    display: block;
    width: 100%;
    padding-top: clamp(42px, 9vh, 74px);
  }

  .signal-array {
    position: absolute;
    top: 15%;
    right: -22%;
    width: 67vw;
    opacity: 0.12;
  }

  .site-rail.is-transmission .signal-array {
    opacity: 0.22;
  }

  .transmission-copy {
    z-index: 2;
  }

  .transmission-copy h2 {
    font-size: clamp(39px, 12vw, 58px);
    line-height: 0.88;
  }

  .transmission-timer {
    grid-template-columns: repeat(3, minmax(46px, 1fr) 7px) minmax(46px, 1fr);
    margin-top: clamp(28px, 5vh, 45px);
    padding: 16px 0 14px;
  }

  .transmission-timer strong {
    font-size: clamp(25px, 8vw, 34px);
  }

  .transmission-timer > i {
    font-size: 15px;
  }

  .transmission-timer span {
    overflow: hidden;
    font-size: 6px;
    letter-spacing: 0.08em;
  }

  .transmission-meta {
    display: block;
    padding: 15px 0;
  }

  .transmission-meta p + p {
    margin-top: 12px;
  }

  .github-link {
    padding: 12px;
  }

  .transmission-footer p:first-child {
    display: none;
  }

  .transmission-footer .return-button {
    order: 2;
    margin-left: auto;
  }

  .transmission-footer p:last-child {
    order: 1;
  }

  .game-screen {
    display: block;
    overflow: hidden;
    padding: 16px 14px 12px;
  }

  .game-header {
    grid-template-columns: 1fr auto;
  }

  .game-header p {
    display: none;
  }

  .game-layout {
    display: grid;
    grid-template-columns: 1fr;
    height: calc(100svh - 61px);
    overflow: hidden;
    padding: 12px 0 76px;
  }

  .game-panel {
    display: none;
  }

  #tetris {
    width: min(78vw, 300px);
    height: min(156vw, calc(100svh - 165px));
    max-height: 600px;
  }

  .mobile-controls {
    position: fixed;
    z-index: 5;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr) 1.25fr 1.25fr;
    gap: 3px;
    padding: 8px;
    background: rgba(5, 5, 5, 0.95);
    border-top: 1px solid var(--line);
  }

  .mobile-controls button {
    min-height: 48px;
    background: #141414;
    border: 1px solid #292929;
    font-size: 16px;
  }

  .mobile-controls button:nth-last-child(-n + 2) {
    background: var(--accent);
    color: var(--black);
    font-family: var(--display);
    font-size: 9px;
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
