.ending-window,
.burst-field,
.question-contours {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* Vary size, focal depth and orbit while keeping the text on black. */
.burst-field {
  overflow: hidden;
  background: #000;
  opacity: 0;
}
.burst-field canvas {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: min(var(--size), 800px);
  height: auto;
  opacity: var(--intensity);
  transform: translate(-50%, -50%) rotate(var(--tilt));
  pointer-events: none;
}
.burst-field canvas:nth-child(1) {
  --x: 0%;
  --y: 13%;
  --size: 47vmax;
  --tilt: -37deg;
  --intensity: 0.52;
  --period: 14s;
  --offset: -3s;
}
.burst-field canvas:nth-child(2) {
  --x: 36%;
  --y: -8%;
  --size: 39vmax;
  --tilt: 60deg;
  --intensity: 0.42;
  --period: 19s;
  --offset: -11s;
}
.burst-field canvas:nth-child(3) {
  --x: 86%;
  --y: 3%;
  --size: 44vmax;
  --tilt: 15deg;
  --intensity: 0.72;
  --period: 17s;
  --offset: -5s;
}
.burst-field canvas:nth-child(4) {
  --x: 103%;
  --y: 53%;
  --size: 42vmax;
  --tilt: -63deg;
  --intensity: 0.69;
  --period: 13s;
  --offset: -2s;
}
.burst-field canvas:nth-child(5) {
  --x: 77%;
  --y: 98%;
  --size: 38vmax;
  --tilt: 50deg;
  --intensity: 0.58;
  --period: 21s;
  --offset: -8s;
}
.burst-field canvas:nth-child(6) {
  --x: 11%;
  --y: 102%;
  --size: 35vmax;
  --tilt: -25deg;
  --intensity: 0.52;
  --period: 16s;
  --offset: -6s;
}
.burst-field canvas:nth-child(7) {
  --x: 62%;
  --y: 69%;
  --size: 16vmax;
  --tilt: -85deg;
  --intensity: 0.38;
  --period: 12s;
  --offset: -7s;
}
.burst-field canvas:nth-child(8) {
  --x: 56%;
  --y: 22%;
  --size: 12vmax;
  --tilt: 22deg;
  --intensity: 0.39;
  --period: 18s;
  --offset: -2s;
}
.burst-field canvas:nth-child(9) {
  --x: 97%;
  --y: 81%;
  --size: 11vmax;
  --tilt: 10deg;
  --intensity: 0.38;
  --period: 15s;
  --offset: -9s;
}
@media (prefers-reduced-motion: no-preference) {
  .burst-field canvas {
    animation: finale-drift var(--period) ease-in-out var(--offset) infinite
      alternate;
    animation-play-state: paused;
  }
  .burst-field.is-lit canvas {
    animation-play-state: running;
  }
  @keyframes finale-drift {
    0% {
      transform: translate(-57%, -54%) rotate(var(--tilt)) scale(0.9, 1);
    }
    50% {
      transform: translate(-46%, -43%) rotate(calc(var(--tilt) + 23deg))
        scale(1.04, 0.88);
    }
    100% {
      transform: translate(-40%, -57%) rotate(calc(var(--tilt) - 16deg))
        scale(0.94, 1.13);
    }
  }
}
.ending-window {
  z-index: 2;
}
.ending-page {
  --body: clamp(15px, min(1.35vw, 2.4vh), 21px);
  --gutter: clamp(22px, 6vw, 110px);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: clamp(24px, 6vh, 74px) var(--gutter);
  visibility: hidden;
  color: #fff6fa;
  font:
    500 var(--body) / 1.46 Manrope,
    sans-serif;
  letter-spacing: -0.021em;
  text-align: left;
}
.ending-page:not([inert]) {
  pointer-events: auto;
}
.ending-page :is(h2, h3, p, ol, ul) {
  margin: 0;
}
.ending-page h2 {
  color: inherit;
  font:
    900 clamp(44px, min(5.5vw, 9.6vh), 94px) / 0.99 Montserrat,
    sans-serif;
  letter-spacing: -0.068em;
  text-wrap: balance;
}
.ending-page h2 em {
  display: block;
  width: fit-content;
  padding: 0 0.09em 0.07em 0;
  font:
    italic 400 1.13em/0.99 Georgia,
    serif;
  letter-spacing: -0.072em;
  color: transparent;
  background: var(--capsule-neon-spectrum);
  background-size: 200% 100%;
  background-clip: text;
}
.ending-tail {
  display: grid;
  align-items: center;
  gap: 5%;
  margin-top: clamp(20px, 4.2vh, 52px);
  padding-top: clamp(14px, 2.2vh, 26px);
  border-top: 1px solid #dbbed044;
  font-size: clamp(14px, min(1.15vw, 2.2vh), 18px);
  line-height: 1.48;
}
.question-main {
  display: grid;
  grid-template-columns: 1.13fr 0.87fr;
  align-items: center;
  gap: 5%;
}
.question-intro {
  margin-top: 1em !important;
  max-width: 47ch;
}
.ending-prompts {
  display: grid;
  gap: 0.55em;
  padding: 0;
  margin-top: 1.25em !important;
  list-style: none;
  max-width: 48ch;
}
.ending-prompts li {
  position: relative;
  padding-left: 1em;
  line-height: 1.34;
}
.ending-prompts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.34em;
  height: 0.34em;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, #d4b3dc, #795e8f 52%, #4a2a50);
}
.question-symbol {
  width: min(100%, 43svh);
  aspect-ratio: 340/355;
  justify-self: center;
}
.question-tail {
  grid-template-columns: 0.9fr 1.15fr;
  color: #d8cbd9;
}
.question-contours {
  z-index: 1;
  opacity: 0;
}
.ending-actor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 3;
  max-width: none;
  pointer-events: none;
  opacity: 0;
}
.ending-finder {
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(240px, 38svh, 450px);
  background:
    radial-gradient(ellipse at 76% 52%, #38213e, transparent 56%),
    linear-gradient(120deg, #100e13, #0b090e 68%, #181019);
}
.ending-finder::before {
  content: "";
  position: absolute;
  inset: 6% 3%;
  border: 1px solid #ccaccc;
  --corner: clamp(18px, 2.2vw, 34px);
  mask: conic-gradient(at var(--corner) var(--corner), transparent 25%, #000 0)
    0 0 / calc(100% - var(--corner)) calc(100% - var(--corner));
}
.ending-finder h2 {
  position: relative;
  width: 55%;
  padding: 3% 0 3% 6%;
  font-size: clamp(38px, min(5vw, 8.5vh), 80px);
}
.finder-time {
  position: absolute;
  top: 9%;
  right: 6%;
  display: flex;
  align-items: center;
  gap: 0.55em;
  font:
    600 clamp(13px, 1.4vw, 20px) / 1 ui-monospace,
    monospace;
  color: #f5d7ef;
  letter-spacing: 0.04em;
}
.finder-time::before {
  content: "";
  width: 0.47em;
  height: 0.47em;
  background: #ff488b;
  border-radius: 50%;
}
.camera-dock {
  position: absolute;
  left: 75%;
  top: 53%;
  transform: translate(-50%, -50%);
  width: min(42%, 53svh);
  aspect-ratio: 452/254;
}
.ending-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin-top: clamp(23px, 4vh, 52px) !important;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3%;
}
.ending-steps li {
  position: relative;
  counter-increment: step;
}
.ending-steps li + li {
  border-left: 1px solid #795f7666;
  padding-left: 9%;
}
.ending-steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  margin-bottom: 0.5em;
  font:
    500 0.85em/1.3 ui-monospace,
    monospace;
  color: #c5a8ca;
}
.ending-steps h3 {
  font:
    900 clamp(17px, min(1.65vw, 3.15vh), 28px) / 1.15 Montserrat,
    sans-serif;
  letter-spacing: -0.045em;
  overflow-wrap: break-word;
}
.ending-steps p {
  margin-top: 0.42em;
  color: #d6cbd7;
}
.camera-tail {
  grid-template-columns: 1fr auto;
}
.camera-tail p {
  max-width: 57ch;
}
.burst-main {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: 3%;
}
.burst-copy {
  display: grid;
  gap: clamp(12px, 2.3vh, 25px);
}
.ending-burst h2 {
  font-size: clamp(55px, min(6.5vw, 11.2vh), 113px);
}
.burst-date {
  max-width: 44ch;
  font-weight: 800;
}
.burst-body {
  max-width: 60ch;
}
.burst-wish {
  max-width: 35ch;
  font:
    italic 400 clamp(23px, min(2.7vw, 4.8vh), 42px) / 1.14 Georgia,
    serif;
  letter-spacing: -0.035em;
}
.burst-dock {
  align-self: stretch;
  min-height: 240px;
}
.burst-tail {
  grid-template-columns: auto 1fr;
  border-color: #ffe1f582;
}
.burst-tail p {
  max-width: 64ch;
}
@media (max-width: 740px) {
  .ending-page {
    --body: 15px;
    --gutter: clamp(18px, 5vw, 34px);
    padding-block: clamp(20px, 4.2svh, 38px);
  }
  .ending-page h2 {
    font-size: clamp(32px, 8vw, 58px);
  }
  .question-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 30%;
    gap: 12px 0;
  }
  .question-copy {
    display: contents;
  }
  .question-copy h2 {
    grid-area: 1/1;
  }
  .question-symbol {
    grid-area: 1/2;
    width: min(100%, 130px);
  }
  .question-intro,
  .ending-prompts {
    grid-column: 1/-1;
    margin-top: 0 !important;
  }
  .question-tail,
  .burst-tail,
  .camera-tail {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ending-finder {
    min-height: clamp(196px, 32svh, 260px);
    align-items: flex-start;
  }
  .ending-finder h2 {
    padding: 7% 0 0 7%;
    width: 85%;
    font-size: clamp(28px, 6.8vw, 45px);
  }
  .finder-time {
    top: auto;
    right: auto;
    bottom: 9%;
    left: 7%;
  }
  .camera-dock {
    left: 72%;
    top: 72%;
    width: 49%;
  }
  .ending-steps {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .ending-steps li,
  .ending-steps li + li {
    border: 0;
    padding-left: 30px;
  }
  .ending-steps li::before {
    position: absolute;
    left: 0;
    top: 1px;
  }
  .burst-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 13px;
  }
  .burst-copy {
    display: contents;
  }
  .burst-copy h2 {
    order: 0;
  }
  .burst-date {
    order: 1;
  }
  .burst-dock {
    order: 2;
    min-height: 0;
    height: clamp(98px, 32vw, 155px);
    width: 74%;
    align-self: center;
  }
  .burst-body {
    order: 3;
  }
  .burst-wish {
    order: 4;
  }
  .burst-field canvas {
    width: min(var(--size), 70vw);
  }
  .burst-field canvas:nth-child(7) {
    --x: 94%;
  }
  .burst-field canvas:nth-child(8) {
    --x: 63%;
    --y: 5%;
  }

  .ending-tail {
    font-size: 14px;
  }
}
@media (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .ending-page:not([inert]) h2 em {
    animation: neon-letters 2.9s linear infinite;
  }
}
@media (forced-colors: active) {
  .ending-page h2 em {
    color: CanvasText;
  }
}
