:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #060712;
  color: #f5f7ff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }

body {
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(circle at 46% 43%, rgba(76, 76, 173, 0.1), transparent 31rem),
    linear-gradient(145deg, #080914 0%, #050610 56%, #09071a 100%);
}

.memory-field {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.memory-field.is-ready { opacity: 1; }

.atmosphere, .atmosphere::before {
  position: fixed;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.atmosphere::before {
  content: "";
  opacity: 0.2;
  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='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.glow, .orbit, .star { position: absolute; display: block; }
.glow { border-radius: 50%; filter: blur(90px); }

.glow-one {
  width: 36rem;
  height: 36rem;
  top: -18rem;
  right: -7rem;
  background: rgba(58, 130, 246, 0.19);
}

.glow-two {
  width: 30rem;
  height: 30rem;
  left: -16rem;
  bottom: -18rem;
  background: rgba(127, 74, 255, 0.17);
}

.orbit {
  border: 1px solid rgba(160, 179, 255, 0.1);
  border-radius: 50%;
  transform: rotate(-19deg);
}

.orbit-one { width: 37rem; height: 18rem; top: 19%; right: -13rem; }
.orbit-two { width: 22rem; height: 9rem; bottom: 10%; left: -9rem; }

.star {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(221, 229, 255, 0.7);
  box-shadow: 0 0 16px 2px rgba(94, 149, 255, 0.45);
}

.star-one { top: 21%; left: 18%; }
.star-two { top: 37%; right: 19%; }
.star-three { right: 29%; bottom: 20%; }

.fragment-field {
  position: fixed;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.memory-fragment {
  --size: 0.34rem;
  --duration: 8s;
  --delay: 0s;
  appearance: none;
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 2.25rem;
  height: 2.25rem;
  margin: -1.125rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  pointer-events: auto;
  cursor: crosshair;
  animation: fragment-drift var(--duration) ease-in-out var(--delay) infinite alternate;
  transition: filter 180ms ease;
}

.memory-fragment::before,
.memory-fragment::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.memory-fragment::before {
  width: var(--size);
  height: var(--size);
  background: #dce9ff;
  box-shadow:
    0 0 0 1px rgba(180, 204, 255, 0.22),
    0 0 12px 3px rgba(102, 163, 255, 0.52),
    0 0 28px 8px rgba(129, 92, 255, 0.18);
}

.memory-fragment::after {
  width: 1.35rem;
  height: 1.35rem;
  border: 1px solid rgba(172, 195, 255, 0.14);
  opacity: 0;
  transition: opacity 180ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.memory-fragment:hover,
.memory-fragment:focus-visible {
  filter: brightness(1.65);
  outline: none;
}

.memory-fragment:hover::after,
.memory-fragment:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.65);
}

.memory-fragment.is-captured {
  pointer-events: none;
  animation: fragment-capture 560ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.play-hint {
  position: fixed;
  z-index: 3;
  bottom: 4.9rem;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 0.72rem;
  padding: 0.45rem 0.68rem;
  border: 1px solid rgba(152, 175, 255, 0.09);
  border-radius: 999px;
  color: rgba(190, 200, 227, 0.56);
  background: rgba(8, 10, 26, 0.22);
  backdrop-filter: blur(10px);
  transform: translateX(-50%);
  font-size: 0.66rem;
  font-weight: 570;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  transition: color 300ms ease, border-color 300ms ease, box-shadow 300ms ease;
}

.play-score {
  display: inline-flex;
  gap: 0.16rem;
  color: rgba(146, 171, 255, 0.86);
  font-variant-numeric: tabular-nums;
}

body.play-complete .play-hint {
  color: #eff4ff;
  border-color: rgba(148, 175, 255, 0.32);
  box-shadow: 0 0 32px rgba(105, 119, 255, 0.16);
}

.site-header, footer {
  position: relative;
  z-index: 2;
  width: min(100% - 3rem, 76rem);
  margin-inline: auto;
}

.site-header { display: flex; align-items: center; height: 7rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #f7f8ff;
  font-size: 1.02rem;
  font-weight: 720;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.brand > span > span { color: #8f86ff; }

main {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: calc(100svh - 12rem);
  padding: 1rem 1.5rem 5rem;
}

.message { width: min(100%, 68rem); text-align: center; }

.language {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.8rem;
  padding: 0.45rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #a9b0c8;
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.21em;
  text-transform: uppercase;
}

.language:hover,
.language:focus-visible {
  color: #eef1ff;
  outline: none;
  background: rgba(255, 255, 255, 0.045);
}

.language span {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #72a9ff;
  box-shadow: 0 0 18px rgba(114, 169, 255, 0.85);
}

h1 {
  margin: 0;
  font-size: clamp(2.65rem, 7.4vw, 6.6rem);
  font-weight: 620;
  letter-spacing: -0.065em;
  line-height: 0.98;
  text-wrap: balance;
  transition: opacity 240ms ease, transform 240ms ease, filter 240ms ease;
}

h1 span,
h1 em {
  display: block;
}

h1 em {
  margin-top: 0.2em;
  color: transparent;
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.065em;
  background: linear-gradient(103deg, #f6f7ff 14%, #9ebaff 52%, #9783ff 88%);
  -webkit-background-clip: text;
  background-clip: text;
}

h1.is-changing {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(0.35rem);
}

footer {
  position: fixed;
  right: 0;
  bottom: 2.2rem;
  left: 0;
  display: flex;
  gap: 0.55rem;
  justify-content: center;
  color: rgba(167, 175, 201, 0.52);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .site-header { height: 5.5rem; }
  main { min-height: calc(100svh - 8rem); padding-bottom: 4rem; }
  h1 { font-size: clamp(2.55rem, 12.5vw, 4.3rem); line-height: 1.02; }
  .orbit-one { right: -25rem; }
  .play-hint { bottom: 3.65rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .glow-one { animation: drift-one 12s ease-in-out infinite alternate; }
  .glow-two { animation: drift-two 15s ease-in-out infinite alternate; }
  .star { animation: breathe 3.6s ease-in-out infinite alternate; }
}

@media (prefers-reduced-motion: reduce) {
  .memory-field { display: none; }
  .memory-fragment { animation: none; }
}

@keyframes drift-one { to { transform: translate(-3rem, 2rem) scale(1.08); } }
@keyframes drift-two { to { transform: translate(3.5rem, -1.5rem) scale(1.1); } }
@keyframes breathe { to { opacity: 0.35; transform: scale(0.75); } }

@keyframes fragment-drift {
  0% { transform: translate3d(-0.35rem, -0.2rem, 0) scale(0.9); }
  55% { transform: translate3d(0.4rem, 0.55rem, 0) scale(1.08); }
  100% { transform: translate3d(0.75rem, -0.45rem, 0) scale(0.96); }
}

@keyframes fragment-capture {
  0% { opacity: 1; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.55); filter: brightness(2.1); }
  100% { opacity: 0; transform: scale(0); filter: blur(4px); }
}
