:root {
  color-scheme: dark;
  --ink: #030204;
  --purple-ink: #18111f;
  --bone: #d9c9a7;
  --cyan: #51d6ff;
  --green: #86b33b;
  --violet: #b85acb;
  --amber: #ffb13b;
  --ember: #ff6b28;
  --ember-core: #ffd447;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  background: var(--ink);
}

body {
  overflow: hidden;
  color: var(--bone);
  font-family: "Courier New", Courier, monospace;
}

button,
a {
  font: inherit;
}

.experience {
  position: relative;
  display: grid;
  width: 100vw;
  height: 100svh;
  min-height: 320px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, #130d1a 0, #08060b 55%, #020203 100%);
  isolation: isolate;
}

.stage {
  position: relative;
  width: min(100vw, 150svh);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: #020203;
  box-shadow: 0 0 10vw rgba(35, 17, 46, 0.32);
}

.opening,
.console,
.art,
.scanlines,
.vignette {
  position: absolute;
  inset: 0;
}

.opening,
.console {
  overflow: hidden;
}

.art {
  width: 100%;
  height: 100%;
  object-fit: fill;
  image-rendering: pixelated;
  user-select: none;
  pointer-events: none;
}

.art--shadow {
  z-index: 1;
  filter: brightness(0.026) saturate(0.36) contrast(1.35);
}

.art--ember-light {
  z-index: 2;
  opacity: 0;
  filter: sepia(0.78) saturate(1.65) brightness(0.66) contrast(1.16)
    hue-rotate(330deg);
  -webkit-mask-image: radial-gradient(
    circle at 41.35% 68.15%,
    #000 0,
    rgba(0, 0, 0, 0.96) 5%,
    rgba(0, 0, 0, 0.7) 15%,
    rgba(0, 0, 0, 0.2) 30%,
    transparent 45%
  );
  mask-image: radial-gradient(
    circle at 41.35% 68.15%,
    #000 0,
    rgba(0, 0, 0, 0.96) 5%,
    rgba(0, 0, 0, 0.7) 15%,
    rgba(0, 0, 0, 0.2) 30%,
    transparent 45%
  );
}

.art--final {
  z-index: 3;
  opacity: 0;
  filter: brightness(0.86) saturate(0.96) contrast(1.08);
}

.is-running .art--ember-light {
  animation: ember-reveal 5.8s steps(26, end) both;
}

.is-running .art--final {
  animation: final-reveal 9.7s steps(38, end) both;
}

.screen-light {
  --wake: 5.65s;
  z-index: 4;
  opacity: 0;
  filter: brightness(0.94) saturate(1.04) contrast(1.08);
}

.is-running .screen-light {
  animation:
    screen-wake 1.05s steps(1, end) var(--wake) both,
    screen-idle 5s steps(1, end) calc(var(--wake) + 1.05s) infinite;
}

.screen-light--one {
  --wake: 5.65s;
  -webkit-mask-image: radial-gradient(ellipse 53% 68% at 26% 20%, #000 0 18%, rgba(0, 0, 0, 0.8) 43%, transparent 100%);
  mask-image: radial-gradient(ellipse 53% 68% at 26% 20%, #000 0 18%, rgba(0, 0, 0, 0.8) 43%, transparent 100%);
}

.screen-light--two {
  --wake: 5.98s;
  -webkit-mask-image: radial-gradient(ellipse 53% 68% at 74% 20%, #000 0 18%, rgba(0, 0, 0, 0.82) 43%, transparent 100%);
  mask-image: radial-gradient(ellipse 53% 68% at 74% 20%, #000 0 18%, rgba(0, 0, 0, 0.82) 43%, transparent 100%);
}

.screen-light--three {
  --wake: 6.33s;
  -webkit-mask-image: radial-gradient(ellipse 55% 72% at 25% 57%, #000 0 17%, rgba(0, 0, 0, 0.78) 44%, transparent 100%);
  mask-image: radial-gradient(ellipse 55% 72% at 25% 57%, #000 0 17%, rgba(0, 0, 0, 0.78) 44%, transparent 100%);
}

.screen-light--four {
  --wake: 6.68s;
  -webkit-mask-image: radial-gradient(ellipse 55% 72% at 75% 57%, #000 0 17%, rgba(0, 0, 0, 0.78) 44%, transparent 100%);
  mask-image: radial-gradient(ellipse 55% 72% at 75% 57%, #000 0 17%, rgba(0, 0, 0, 0.78) 44%, transparent 100%);
}

.screen-light--five {
  --wake: 7.03s;
  -webkit-mask-image: radial-gradient(ellipse 46% 58% at 50% 85%, #000 0 14%, rgba(0, 0, 0, 0.72) 42%, transparent 100%);
  mask-image: radial-gradient(ellipse 46% 58% at 50% 85%, #000 0 14%, rgba(0, 0, 0, 0.72) 42%, transparent 100%);
}

.sleeping-screen {
  position: absolute;
  z-index: 6;
  top: 5.55%;
  width: 31.7%;
  height: 29.2%;
  border-radius: 7% / 10%;
  background: #010202;
  box-shadow:
    0 0 1.6vw 0.45vw rgba(0, 0, 0, 0.96),
    inset 0 0 2.2vw #000;
  opacity: 1;
  pointer-events: none;
}

.sleeping-screen--rogue {
  left: 10.35%;
}

.sleeping-screen--unix {
  left: 57.45%;
}

.is-running .sleeping-screen--rogue {
  animation: screen-uncover 0.95s steps(1, end) 5.65s forwards;
}

.is-running .sleeping-screen--unix {
  animation: screen-uncover 0.95s steps(1, end) 5.98s forwards;
}

.reveal-display {
  position: absolute;
  z-index: 5;
  top: 44.5%;
  width: 40.5%;
  height: 25.2%;
  overflow: hidden;
  border-radius: 2% / 4%;
  opacity: 0;
  mix-blend-mode: screen;
  pointer-events: none;
}

.reveal-display::after {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0 2px,
    rgba(0, 0, 0, 0.38) 3px 4px
  );
  content: "";
}

.reveal-display svg {
  display: block;
  width: 100%;
  height: 100%;
}

.reveal-display path,
.reveal-display circle,
.reveal-display rect,
.reveal-display ellipse {
  vector-effect: non-scaling-stroke;
}

.reveal-display text {
  font-family: "Courier New", Courier, monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.reveal-display--war {
  left: 4.8%;
  color: #ffb13b;
  background: rgba(17, 8, 1, 0.42);
  clip-path: polygon(0 0, 61% 0, 69% 100%, 0 100%);
}

.is-running .reveal-display--war {
  animation: reveal-display-in 0.9s steps(5, end) 6.33s forwards;
}

.war-grid {
  fill: none;
  stroke: currentColor;
  stroke-width: 0.6;
  opacity: 0.16;
}

.war-map {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  opacity: 0.72;
}

.war-arcs {
  fill: none;
  stroke: #ffd8a1;
  stroke-width: 1.4;
  stroke-dasharray: 7 5;
}

.war-blasts {
  fill: none;
  stroke: #fff8e7;
  stroke-width: 2;
}

.reveal-display--war text {
  fill: #ffd8a1;
}

.reveal-display--signal {
  right: 4.7%;
  color: #51d6ff;
  background: rgba(0, 10, 15, 0.42);
  clip-path: polygon(39% 0, 100% 0, 100% 100%, 31% 100%);
}

.is-running .reveal-display--signal {
  animation: reveal-display-in 0.9s steps(5, end) 6.68s forwards;
}

.signal-grid,
.detector-window,
.integral-image,
.detector-cascade {
  fill: none;
  stroke: currentColor;
}

.signal-grid {
  stroke-width: 0.6;
  opacity: 0.16;
}

.detector-window {
  stroke: #b5f3ff;
  stroke-width: 1.4;
}

.detector-window ellipse,
.detector-window path {
  opacity: 0.55;
}

.detector-window rect {
  fill: none;
  stroke: #b5f3ff;
  stroke-width: 1.5;
}

.detector-window .haar-dark {
  fill: rgba(81, 214, 255, 0.42);
  stroke: #e4fbff;
}

.integral-image {
  stroke-width: 0.85;
  opacity: 0.72;
}

.integral-image rect:nth-of-type(2) {
  fill: rgba(81, 214, 255, 0.12);
  stroke: #b5f3ff;
  stroke-width: 1.6;
}

.integral-image circle {
  fill: #e4fbff;
  stroke: none;
}

.detector-cascade {
  stroke: currentColor;
  stroke-width: 1.2;
}

.detector-cascade rect:last-of-type {
  fill: rgba(81, 214, 255, 0.16);
  stroke: #e4fbff;
}

.reveal-display--signal text {
  fill: #b5f3ff;
}

.ember {
  position: absolute;
  z-index: 8;
  left: 41.35%;
  top: 68.15%;
  width: clamp(6px, 0.85vw, 14px);
  aspect-ratio: 1;
  background: var(--ember);
  box-shadow:
    0 0 5px 2px rgba(255, 107, 40, 0.95),
    0 0 18px 7px rgba(255, 77, 24, 0.64),
    0 0 52px 20px rgba(236, 45, 14, 0.27);
  opacity: 0;
  transform: translate(-50%, -50%);
}

.ember::after {
  position: absolute;
  inset: 27%;
  background: var(--ember-core);
  content: "";
  box-shadow: 0 0 6px 2px rgba(255, 212, 71, 0.9);
}

.is-running .ember {
  animation: ember-bowl 5.8s steps(18, end) both;
}

.is-vanishing .opening {
  animation: wizard-vanish 1.35s steps(1, end) forwards;
}

.console {
  z-index: 12;
  opacity: 0;
  pointer-events: none;
}

.wizard-gone .console {
  animation: console-return 1.1s steps(1, end) both;
}

.ui-active .console {
  opacity: 1;
  pointer-events: auto;
}

.art--console {
  z-index: 1;
  filter: brightness(0.8) saturate(0.92) contrast(1.08);
}

.secondary-dimmer {
  position: absolute;
  z-index: 3;
  border-radius: 2%;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.08) 0 2px,
      rgba(0, 0, 0, 0.22) 3px 4px
    ),
    rgba(2, 3, 5, 0.52);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.68);
  opacity: 0;
  pointer-events: none;
}

.ui-active .secondary-dimmer {
  animation: secondary-dim-in 0.55s steps(5, end) forwards;
}

.secondary-dimmer--rogue {
  left: 10.35%;
  top: 5.55%;
  width: 31.55%;
  height: 29.2%;
}

.secondary-dimmer--unix {
  left: 57.45%;
  top: 5.55%;
  width: 31.85%;
  height: 29.2%;
}

.archive-screen {
  position: absolute;
  z-index: 4;
  top: 5.55%;
  display: grid;
  width: 31.7%;
  height: 29.2%;
  padding: clamp(0.55rem, 1.45vw, 1.45rem);
  overflow: hidden;
  align-content: center;
  border-radius: 7% / 10%;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 2px,
      rgba(0, 0, 0, 0.38) 3px 4px
    ),
    radial-gradient(ellipse at center, rgba(18, 21, 12, 0.94), #020403 74%);
  box-shadow: inset 0 0 2.2vw #000;
  opacity: 0;
  text-shadow: 0 0 0.45rem currentColor;
  pointer-events: none;
}

.wizard-gone .archive-screen {
  animation: archive-screen-in 0.62s steps(5, end) forwards;
}

.archive-screen--amber {
  left: 10.35%;
  color: var(--amber);
}

.archive-screen--green {
  left: 57.45%;
  color: #4cff76;
}

.archive-screen__index {
  margin-bottom: clamp(0.35rem, 0.8vw, 0.8rem);
  font-size: clamp(0.34rem, 0.68vw, 0.72rem);
  letter-spacing: 0.1em;
  opacity: 0.68;
}

.archive-screen strong {
  font-size: clamp(0.86rem, 2.15vw, 2.15rem);
  letter-spacing: -0.05em;
  line-height: 0.92;
}

.archive-screen__rule {
  width: 100%;
  height: 2px;
  margin: clamp(0.35rem, 0.8vw, 0.8rem) 0;
  background: currentColor;
  box-shadow: 0 0 0.5rem currentColor;
  opacity: 0.52;
}

.archive-screen small {
  font-size: clamp(0.3rem, 0.56vw, 0.62rem);
  line-height: 1.45;
  letter-spacing: 0.08em;
  opacity: 0.62;
}

.unix-treatment {
  position: absolute;
  z-index: 27;
  left: 57.45%;
  top: 5.55%;
  width: 31.85%;
  height: 29.2%;
  border-radius: 7% / 10%;
  background:
    repeating-linear-gradient(
      to bottom,
      rgba(2, 18, 9, 0.04) 0 1px,
      rgba(0, 0, 0, 0.38) 1px 3px,
      transparent 3px 5px
    ),
    rgba(0, 9, 5, 0.14);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.46);
  opacity: 0.58;
  -webkit-backdrop-filter: blur(1.05px) brightness(0.82) contrast(0.9);
  backdrop-filter: blur(1.05px) brightness(0.82) contrast(0.9);
  mix-blend-mode: multiply;
  pointer-events: none;
  transition: opacity 0.5s steps(5, end);
}

.ui-active .unix-treatment {
  opacity: 0.82;
}

.console-crest {
  position: absolute;
  left: 47.42%;
  top: 18.62%;
  width: 5.16%;
  height: auto;
  aspect-ratio: 1;
  image-rendering: pixelated;
  opacity: 0;
  object-fit: contain;
  pointer-events: none;
}

.console-crest--opening {
  z-index: 7;
}

.console-crest--interface {
  z-index: 4;
}

.is-running .console-crest--opening {
  animation: crest-in 0.8s steps(5, end) 5.85s forwards;
}

.wizard-gone .console-crest--interface {
  opacity: 1;
}

.portal {
  position: absolute;
  z-index: 5;
  display: grid;
  overflow: hidden;
  color: var(--bone);
  background: #05090b;
  box-shadow: inset 0 0 16px rgba(0, 0, 0, 0.85);
  opacity: 0;
  text-decoration: none;
  image-rendering: pixelated;
}

.portal__link {
  position: absolute;
  inset: 0;
  display: grid;
  color: inherit;
  text-decoration: none;
}

.ui-active .portal {
  animation: portal-live 0.55s steps(5, end) forwards;
}

.portal--horse {
  left: 4.1%;
  top: 43.4%;
  width: 43.1%;
  height: 27.9%;
  cursor: pointer;
}

.portal--vault {
  left: 54.4%;
  top: 43.4%;
  width: 41.4%;
  height: 27.9%;
  cursor: not-allowed;
}

.portal--contact {
  left: 39.15%;
  top: 78.45%;
  width: 21.7%;
  height: 14%;
  cursor: not-allowed;
}

.portal__art,
.portal__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.portal__art {
  object-fit: cover;
  filter: brightness(0.58) saturate(0.72) contrast(1.12);
  transform: scale(1.03);
  transition: filter 160ms steps(3, end), transform 160ms steps(3, end);
}

.portal__shade {
  background:
    linear-gradient(to top, rgba(4, 2, 7, 0.92), transparent 62%),
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.18) 3px 4px);
}

.portal__copy {
  position: relative;
  z-index: 3;
  display: grid;
  padding: clamp(0.55rem, 1.4vw, 1.4rem);
  align-content: end;
  text-shadow: 2px 2px 0 #07050a;
}

.portal__copy small {
  color: var(--cyan);
  font-size: clamp(0.35rem, 0.62vw, 0.72rem);
  letter-spacing: 0.13em;
}

.portal__copy strong {
  color: #fff4dc;
  font-size: clamp(0.9rem, 2.5vw, 2.5rem);
  letter-spacing: -0.06em;
  line-height: 0.92;
}

.portal__copy em {
  margin-top: 0.45rem;
  color: rgba(217, 201, 167, 0.72);
  font-size: clamp(0.42rem, 0.72vw, 0.78rem);
  font-style: normal;
}

.portal--horse:hover .portal__art,
.portal__link:focus-visible .portal__art {
  filter: brightness(0.78) saturate(0.95) contrast(1.08);
  transform: scale(1.06);
}

.portal__link:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -4px;
}

.portal__info {
  position: absolute;
  z-index: 8;
  top: clamp(4px, 0.65vw, 10px);
  right: clamp(4px, 0.65vw, 10px);
  display: grid;
  width: clamp(36px, 2.8vw, 42px);
  padding: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(81, 214, 255, 0.72);
  color: #fff4dc;
  background: rgba(5, 9, 11, 0.88);
  box-shadow:
    2px 2px 0 rgba(3, 2, 4, 0.88),
    inset 0 0 8px rgba(81, 214, 255, 0.18);
  font-size: clamp(0.85rem, 1.75vw, 1.45rem);
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.portal__info:hover,
.portal__info:focus-visible {
  border-color: var(--ember-core);
  color: var(--ember-core);
  background: rgba(24, 17, 31, 0.96);
  outline: none;
}

.infographic-dialog {
  width: min(92vw, 780px);
  height: min(94svh, 1100px);
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 3px solid var(--bone);
  color: var(--bone);
  background: #120e18;
  box-shadow: 10px 10px 0 rgba(3, 2, 4, 0.9);
}

.infographic-dialog::backdrop {
  background: rgba(2, 1, 3, 0.88);
}

.infographic-dialog__frame {
  display: grid;
  height: 100%;
  grid-template-rows: auto minmax(0, 1fr);
}

.infographic-dialog__header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0.7rem 0.55rem 1rem;
  border-bottom: 2px solid rgba(217, 201, 167, 0.46);
  background: #201827;
}

.infographic-dialog__header h2 {
  margin: 0;
  color: var(--ember-core);
  font-size: clamp(0.72rem, 2vw, 1rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.infographic-dialog__close {
  display: grid;
  width: 38px;
  padding: 0;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(217, 201, 167, 0.4);
  color: var(--bone);
  background: rgba(3, 2, 4, 0.72);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.infographic-dialog__close:hover,
.infographic-dialog__close:focus-visible {
  border-color: var(--cyan);
  color: var(--cyan);
  outline: none;
}

.infographic-dialog__document {
  width: 100%;
  height: 100%;
  border: 0;
  background: #120e18;
}

.portal--vault,
.portal--contact {
  background:
    repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.2) 3px 4px),
    radial-gradient(circle at 50% 42%, rgba(124, 75, 145, 0.18), transparent 58%),
    #05090b;
}

.portal--contact .portal__copy small {
  color: var(--violet);
}

.portal--vault .portal__copy small {
  color: var(--cyan);
}

.portal--vault .portal__copy strong,
.portal--contact .portal__copy strong {
  color: rgba(217, 201, 167, 0.5);
}

.portal--contact .portal__copy {
  padding: clamp(0.22rem, 0.65vw, 0.7rem);
}

.portal--contact .portal__copy strong {
  font-size: clamp(0.55rem, 1.35vw, 1.35rem);
}

.portal--contact .portal__copy em {
  margin-top: 0.15rem;
  font-size: clamp(0.3rem, 0.53vw, 0.58rem);
}

.vault-sigil {
  position: absolute;
  left: 50%;
  top: 39%;
  width: 18%;
  aspect-ratio: 1;
  border: 1px solid rgba(81, 214, 255, 0.17);
  opacity: 0.65;
  transform: translate(-50%, -50%) rotate(45deg);
  box-shadow:
    inset 0 0 12px rgba(81, 214, 255, 0.08),
    0 0 12px rgba(184, 90, 203, 0.08);
}

.contact-signal {
  position: absolute;
  left: 12%;
  top: 18%;
  width: 76%;
  height: 2px;
  background: rgba(184, 90, 203, 0.35);
  box-shadow:
    0 12px 0 rgba(81, 214, 255, 0.16),
    0 24px 0 rgba(134, 179, 59, 0.18),
    0 18px 0 rgba(184, 90, 203, 0.13);
  animation: signal-drift 3.4s steps(12, end) infinite;
}

.wisps {
  position: absolute;
  z-index: 7;
  left: 42%;
  top: 48%;
  width: 16%;
  height: 35%;
  pointer-events: none;
}

.wisp {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: clamp(3px, 0.35vw, 6px);
  aspect-ratio: 1;
  background: rgba(194, 185, 201, 0.5);
  box-shadow:
    5px -4px 0 rgba(180, 171, 190, 0.4),
    10px -9px 0 rgba(151, 141, 163, 0.3),
    6px -15px 0 rgba(151, 141, 163, 0.22),
    13px -20px 0 rgba(133, 122, 148, 0.15);
  opacity: 0;
}

.wizard-gone .wisp {
  animation: wisp-away 4.8s steps(28, end) both;
}

.wizard-gone .wisp--two {
  left: 41%;
  animation-delay: 0.32s;
  transform: scale(0.8);
}

.wizard-gone .wisp--three {
  left: 58%;
  animation-delay: 0.68s;
  transform: scale(0.62);
}

.scanlines {
  z-index: 30;
  background: repeating-linear-gradient(
    to bottom,
    rgba(2, 2, 3, 0.02) 0 2px,
    rgba(0, 0, 0, 0.14) 3px 4px
  );
  opacity: 0.45;
  pointer-events: none;
}

.vignette {
  z-index: 31;
  background:
    radial-gradient(ellipse at 50% 48%, transparent 40%, rgba(4, 2, 7, 0.3) 72%, rgba(1, 1, 2, 0.88) 110%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.3), transparent 18% 80%, #020203);
  pointer-events: none;
}

.controls {
  position: fixed;
  z-index: 50;
  right: clamp(10px, 1.8vw, 28px);
  bottom: clamp(10px, 1.8vw, 24px);
  display: flex;
  gap: 0.55rem;
  opacity: 0;
  visibility: hidden;
  animation: controls-in 0.4s steps(4, end) 13.8s forwards;
}

.ui-active .controls {
  visibility: visible;
}

.control {
  border: 1px solid rgba(217, 201, 167, 0.2);
  padding: 0.52rem 0.66rem;
  color: rgba(217, 201, 167, 0.58);
  background: rgba(7, 5, 10, 0.78);
  font-size: clamp(0.58rem, 0.86vw, 0.74rem);
  letter-spacing: 0.04em;
  text-decoration: none;
  cursor: pointer;
}

.control:hover,
.control:focus-visible {
  border-color: rgba(81, 214, 255, 0.62);
  color: var(--bone);
  outline: none;
}

.status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@keyframes ember-reveal {
  0%, 21% { opacity: 0; }
  33% { opacity: 0.16; }
  49% { opacity: 0.68; }
  61% { opacity: 0.92; }
  72% { opacity: 0.4; }
  86%, 100% { opacity: 0; }
}

@keyframes reveal-display-in {
  0% { opacity: 0; filter: brightness(0); }
  18% { opacity: 0.92; filter: brightness(1.35); }
  31% { opacity: 0.08; }
  48% { opacity: 0.78; }
  62% { opacity: 0.22; }
  100% { opacity: 0.68; filter: brightness(0.9); }
}

@keyframes archive-screen-in {
  0% { opacity: 0; filter: brightness(0); transform: scaleY(0.04); }
  26% { opacity: 0.9; filter: brightness(1.3); transform: scaleY(0.04); }
  48% { opacity: 0.12; }
  72% { opacity: 0.86; transform: scaleY(1); }
  100% { opacity: 1; filter: brightness(1); transform: scaleY(1); }
}

@keyframes crest-in {
  0%, 28% { opacity: 0; }
  35% { opacity: 0.9; }
  48% { opacity: 0.1; }
  62% { opacity: 0.72; }
  100% { opacity: 1; }
}

@keyframes ember-bowl {
  0%, 21% { opacity: 0; transform: translate(-50%, -50%) scale(0.45); }
  36% { opacity: 0.62; }
  54% { opacity: 1; transform: translate(-50%, -50%) scale(1.12); }
  65% { opacity: 0.82; transform: translate(-50%, -50%) scale(0.92); }
  83%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(0.4); }
}

@keyframes screen-wake {
  0% { opacity: 0; }
  10% { opacity: 0.72; }
  19% { opacity: 0.04; }
  31% { opacity: 0.48; }
  43% { opacity: 0; }
  59% { opacity: 0.42; }
  72% { opacity: 0.15; }
  84% { opacity: 0.36; }
  100% { opacity: 0.28; }
}

@keyframes screen-uncover {
  0%, 18%, 42% { opacity: 1; }
  19%, 43% { opacity: 0.08; }
  31%, 57% { opacity: 0.72; }
  70% { opacity: 0.28; }
  100% { opacity: 0; }
}

@keyframes screen-idle {
  0%, 31%, 35%, 79%, 83%, 100% { opacity: 0.16; }
  32% { opacity: 0.22; }
  33% { opacity: 0.1; }
  80% { opacity: 0.13; }
  81% { opacity: 0.2; }
}

@keyframes final-reveal {
  0%, 76% { opacity: 0; }
  79% { opacity: 0.42; }
  82% { opacity: 0.24; }
  86% { opacity: 0.78; }
  89% { opacity: 0.62; }
  93%, 100% { opacity: 1; }
}

@keyframes wizard-vanish {
  0% { opacity: 1; }
  12% { opacity: 0.12; }
  23% { opacity: 1; }
  37% { opacity: 0.03; }
  49% { opacity: 1; }
  62%, 100% { opacity: 0; }
}

@keyframes console-return {
  0% { opacity: 0; filter: brightness(0.12); }
  12% { opacity: 0.92; filter: brightness(1.1); }
  21% { opacity: 0.08; }
  33% { opacity: 1; filter: brightness(0.9); }
  43% { opacity: 0.24; }
  57%, 100% { opacity: 1; filter: brightness(1); }
}

@keyframes portal-live {
  0% { opacity: 0; filter: brightness(0); transform: scaleY(0.02); }
  24% { opacity: 0.92; filter: brightness(1.2); transform: scaleY(0.02); }
  43% { opacity: 0.1; }
  68% { opacity: 0.86; transform: scaleY(1); }
  100% { opacity: 1; filter: brightness(1); transform: scaleY(1); }
}

@keyframes wisp-away {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  12% { opacity: 0.62; }
  47% { opacity: 0.42; transform: translate(-18%, -42%) scale(1); }
  100% { opacity: 0; transform: translate(26%, -135%) scale(1.45); }
}

@keyframes signal-drift {
  0%, 100% { transform: translateX(-5%); opacity: 0.32; }
  50% { transform: translateX(5%); opacity: 0.56; }
}

@keyframes controls-in {
  to { opacity: 1; }
}

@keyframes secondary-dim-in {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@media (max-aspect-ratio: 3 / 4) {
  .control {
    font-size: 0;
  }

  .control:first-child span {
    font-size: 1rem;
  }

}

@media (prefers-reduced-motion: reduce) {
  .opening {
    display: none;
  }

  .console {
    opacity: 1;
    pointer-events: auto;
    animation: none !important;
  }

  .portal {
    opacity: 1;
    transform: none;
    animation: none !important;
  }

  .secondary-dimmer {
    opacity: 1;
    animation: none !important;
  }

  .archive-screen {
    opacity: 1;
    animation: none !important;
  }

  .wisps,
  .ember,
  .screen-light,
  .sleeping-screen {
    display: none;
  }

  .controls {
    opacity: 1;
    visibility: visible;
    animation: none;
  }
}
