@font-face {
  font-family: "Savery";
  src: url("/fonts/Savery.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "Savery Digits";
  src: url("/fonts/JetBrainsMono-700.woff2") format("woff2");
  unicode-range: U+0028-0029, U+0030-0039;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-400.woff2") format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-500.woff2") format("woff2");
  font-weight: 500;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono-700.woff2") format("woff2");
  font-weight: 700;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("/fonts/press-start-2p.woff2") format("woff2");
  font-display: swap;
}

:root {
  --cream: #f6f3f9;
  --cream-dark: #e8dff2;
  --cream-dim: rgba(246, 243, 249, 0.66);
  --text-floor: 0.7rem;
  --ink: #1a0f2e;
  --ink-subtle: rgba(26, 15, 46, 0.6);
  --ink-faint: rgba(26, 15, 46, 0.1);
  --violet: #8b5cf6;
  --violet-deep: #6d28d9;
  --violet-soft: rgba(139, 92, 246, 0.12);
  --violet-strong: rgba(139, 92, 246, 0.30);
  --cyan: #00d4ff;
  --neon-cyan: #29e2e6;
  --neon-magenta: #f72585;
  --neon-lime: #cdf346;
  --night: #0d0b1c;
  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --radius-sm: 6px;
  --font-display: "Savery Digits", "Savery", sans-serif;
  --font-pixel: "Press Start 2P", monospace;
  --font-body: system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --ease-fast: 150ms ease;
  --ease-medium: 300ms ease;
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

::selection {
  background: var(--violet);
  color: #fff;
}

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
}

main {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4.69vw, 3rem);
  flex: 1;
}

#landing {
  position: relative;
  max-width: none;
  padding: 0;
  overflow: hidden;
  min-height: calc(100svh - 46px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 0%,
      rgba(139, 92, 246, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 88% 100%,
      rgba(0, 212, 255, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 10% 90%,
      rgba(247, 37, 133, 0.05) 0%, transparent 45%);
}

.circuit {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg,
    var(--violet-deep) 0%, var(--violet) 45%, var(--cyan) 100%);
  -webkit-mask-image:
    url("/assets/circuit-board.svg"),
    radial-gradient(85% 80% at 50% 42%, transparent 36%, black 78%);
  mask-image:
    url("/assets/circuit-board.svg"),
    radial-gradient(85% 80% at 50% 42%, transparent 36%, black 78%);
  -webkit-mask-size: 304px 304px, 100% 100%;
  mask-size: 304px 304px, 100% 100%;
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  opacity: 0.34;
}

.hero {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem clamp(1.25rem, 4.69vw, 3rem) 1.5rem;
}

.kicker {
  margin: 0 0 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.45em;
  color: var(--violet-deep);
}

.kicker::before,
.kicker::after {
  color: var(--cyan);
  font-weight: 700;
}

.kicker::before { content: "[ "; }
.kicker::after { content: " ]"; letter-spacing: 0; }

.headline {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 7rem);
  font-weight: 400;
  line-height: 1;
  color: var(--ink);

  text-shadow: 6px 6px 0 rgba(109, 40, 217, 0.16);
  cursor: default;
  user-select: none;
}

.headline .word:last-child .ch { color: var(--violet-deep); }

.headline .word:last-child .ch:hover { color: var(--cyan); }

.word { display: inline-block; }

.headline .ch {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.5em) rotate(4deg);
  animation: rise 700ms var(--spring) forwards;
  animation-delay: calc(var(--i) * 45ms);
  transition: transform 350ms var(--spring), color 350ms ease;
}

.headline .ch:hover {
  transform: translateY(-0.08em) rotate(-2deg) scale(1.06);
  color: var(--violet-deep);
}

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

.tagline {
  margin: 1.8rem auto 2.4rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--ink-subtle);
}

.tagline b {
  color: var(--violet-deep);
  font-weight: 700;
}

#play-btn {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  background: linear-gradient(180deg, var(--violet), var(--violet-deep) 60%);
  border: none;
  border-radius: 10px;
  padding: 1.1rem 3.2rem;
  cursor: pointer;
  box-shadow:
    0 5px 0 #4c1d95,
    0 16px 34px var(--violet-strong);
  transition: transform var(--ease-fast), box-shadow var(--ease-fast),
    filter var(--ease-fast);
}

#play-btn:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 7px 0 #4c1d95,
    0 20px 40px var(--violet-strong);
}

#play-btn:active {
  transform: translateY(3px);
  box-shadow:
    0 2px 0 #4c1d95,
    0 8px 18px var(--violet-strong);
}

.btn-label::before {
  content: "\25B6";
  font-size: 0.7em;
  margin-right: 0.8em;
  vertical-align: 0.1em;
  color: var(--cyan);
}

.attract {
  position: relative;
  background:
    linear-gradient(180deg, rgba(13, 11, 28, 0.84), rgba(13, 11, 28, 0.92)),
    url("/assets/game-pattern.jpg") center / cover,
    var(--night);
}

.ticker {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.75rem clamp(1.25rem, 4.69vw, 3rem);
}

.ticker-track {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
}

.ticker-track span {
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(41, 226, 230, 0.75);
  padding: 0.15rem 0.85rem;
  cursor: pointer;
  transition: color var(--ease-fast), text-shadow var(--ease-fast);
}

.ticker-track span:hover {
  color: var(--neon-cyan);
  text-shadow: 0 0 12px rgba(41, 226, 230, 0.7);
}

.ticker-track b {
  color: var(--neon-magenta);
  font-weight: 400;
}

.era-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 4.69vw, 3rem) 1.7rem;
}

.era {
  position: relative;
  padding: 0.4rem 1.6rem;
}

.era + .era { border-left: 1px solid rgba(255, 255, 255, 0.08); }

.era .era-title {
  display: inline-block;
  margin: 0 0.6rem 0.7rem 0;
  font-family: var(--font-pixel);
  font-size: 0.95rem;
  line-height: 1;
}

.era-cyan .era-title {
  color: var(--neon-cyan);
  text-shadow: 0 0 14px rgba(41, 226, 230, 0.55);
}

.era-magenta .era-title {
  color: var(--neon-magenta);
  text-shadow: 0 0 14px rgba(247, 37, 133, 0.55);
}

.era-lime .era-title {
  color: var(--neon-lime);
  text-shadow: 0 0 14px rgba(205, 243, 70, 0.5);
}

.era-sub {
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  font-weight: 700;
  letter-spacing: 0.34em;
  color: var(--cream-dim);
  vertical-align: 0.15em;
}

.era p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.55;
  color: rgba(246, 243, 249, 0.62);
}

.era .era-games {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  letter-spacing: 0.06em;
  color: rgba(246, 243, 249, 0.85);
}

.hosting-note {
  margin: 0;
  padding: 0 1rem 1rem;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  font-weight: 500;
  letter-spacing: 0.3em;
  color: var(--cream-dim);
}

@media (max-width: 900px) {
  .era-grid { grid-template-columns: 1fr; }
  .era + .era {
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.8rem;
    padding-top: 1.2rem;
  }
}

body[data-view="library"],
body[data-view="player"] {
  background:
    linear-gradient(180deg, rgba(13, 11, 28, 0.93), rgba(13, 11, 28, 0.97)),
    url("/assets/game-pattern.jpg") center / cover fixed,
    var(--night);
}

#library { padding-top: 1.8rem; padding-bottom: 3.5rem; }

.page-head {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  margin: 1rem 0 2rem;
}

.wordmark-sm {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: rgba(246, 243, 249, 0.45);
  text-decoration: none;
  transition: color var(--ease-fast);
}

.wordmark-sm:hover { color: var(--neon-cyan); }

.page-head h2 {
  margin: 0;
  font-family: var(--font-pixel);
  font-size: clamp(0.9rem, 2.4vw, 1.3rem);
  color: #fff;
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.65);
}

.count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  color: var(--neon-cyan);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.3rem;
}

.card { --accent: var(--neon-cyan); }
.card:nth-child(3n + 2) { --accent: var(--neon-magenta); }
.card:nth-child(3n) { --accent: var(--neon-lime); }

.card {
  position: relative;
  background: linear-gradient(180deg, #1d1535 0%, #15102a 55%, #100b20 100%);
  clip-path: polygon(
    22px 0, calc(100% - 22px) 0,
    100% 30px, 100% calc(100% - 12px),
    calc(100% - 12px) 100%, 12px 100%,
    0 calc(100% - 12px), 0 30px
  );
  cursor: pointer;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.5));
  transition: transform var(--ease-fast), filter var(--ease-fast);
}

.card:hover {
  transform: translateY(-4px);
  filter:
    drop-shadow(0 0 1px var(--accent))
    drop-shadow(0 0 16px color-mix(in srgb, var(--accent) 55%, transparent))
    drop-shadow(0 14px 22px rgba(0, 0, 0, 0.5));
}

.cab-marquee {
  padding: 0.7rem 1.6rem 0.6rem;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.10), transparent 55%),
    linear-gradient(180deg,
      color-mix(in srgb, var(--accent) 26%, #15102a),
      #15102a);
  border-bottom: 2px solid var(--accent);
}

.cab-marquee h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 12px color-mix(in srgb, var(--accent) 80%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card .shot {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 10px 14px 0;
  background: #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.07),
    inset 0 0 22px rgba(0, 0, 0, 0.8);
}

.card .shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
  filter: brightness(0.9);
  transition: filter var(--ease-fast);
}

.card:hover .shot img { filter: brightness(1.06); }

.card .shot::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(110% 130% at 50% 45%,
    transparent 62%, rgba(0, 0, 0, 0.5) 100%);
  pointer-events: none;
}

.card .shot::after {
  content: "\25B6  PRESS START";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0 0.65rem;
  text-align: center;
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--accent);
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.88) 45%);
  opacity: 0;
  transition: opacity var(--ease-fast);
}

.card:hover .shot::after { opacity: 1; }

.card .shot .placeholder {
  font-family: var(--font-pixel);
  font-size: 2.4rem;
  color: var(--accent);
  opacity: 0.8;
}

.cab-deck {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem 0.9rem;
}

.cab-deck i {
  flex-shrink: 0;
  border-radius: 50%;
}

.cab-deck .stick {
  width: 13px;
  height: 13px;
  background: radial-gradient(circle at 35% 30%, #fff3, transparent 50%),
    var(--accent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
}

.cab-deck .btn-a,
.cab-deck .btn-b {
  width: 8px;
  height: 8px;
  background: rgba(246, 243, 249, 0.25);
}

.card:hover .cab-deck .btn-a { background: var(--neon-magenta); }
.card:hover .cab-deck .btn-b { background: var(--neon-lime); }

.cab-deck p {
  margin: 0 0 0 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  line-height: 1.55;
  color: rgba(246, 243, 249, 0.5);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-align: center;
  color: rgba(246, 243, 249, 0.5);
  padding: 4rem 1rem;
  grid-column: 1 / -1;
}

#player {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 1.2rem;
  padding-bottom: 1.6rem;
}

#player .tv { width: 100%; }

.tv {
  max-width: 880px;
  margin: 0 auto;
  background: linear-gradient(180deg, #2b2150 0%, #1c1335 30%, #120a22 100%);
  border-radius: 26px;
  padding: 0 22px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.10),
    0 0 0 1px rgba(255, 255, 255, 0.07),
    0 0 90px -20px rgba(139, 92, 246, 0.55),
    0 30px 70px rgba(0, 0, 0, 0.6);
}

.tv-top {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0.8rem 0.4rem;
}

.tv-brand {
  justify-self: start;
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: rgba(246, 243, 249, 0.45);
  letter-spacing: 0.05em;
}

.tv-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.led {
  justify-self: end;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f0b429;
  box-shadow: 0 0 10px #f0b429;
  animation: led-blink 900ms ease-in-out infinite;
}

.led.on {
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan);
  animation: none;
}

@keyframes led-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.screen {
  position: relative;
  background: #000;
  border-radius: 18px / 22px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.9),
    inset 0 0 34px rgba(0, 0, 0, 0.8);
}

.screen { --px: 4px; }

#screen {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  image-rendering: pixelated;
  filter: blur(calc(var(--px) * 0.05)) contrast(1.1) saturate(1.25) brightness(1.03);
  background: #0b0716;
}

#dos-root {

  position: relative;
  z-index: 0;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
}

#dos-root canvas {
  image-rendering: auto !important;
  filter: blur(calc(var(--px) * 0.14)) contrast(1.1) saturate(1.28) brightness(1.04);
}

.screen[data-crt="soft"] .phosphor { display: none; }

.screen[data-crt="soft"] .crt { opacity: 0.55; }

.screen[data-crt="soft"] #dos-root canvas {
  filter: blur(calc(var(--px) * 0.07)) contrast(1.06) saturate(1.15);
}

.screen[data-crt="off"] .phosphor,
.screen[data-crt="off"] .crt,
.screen[data-crt="off"] #halation { display: none; }

.screen[data-crt="off"] #dos-root canvas {
  filter: none;
  image-rendering: pixelated !important;
}

.screen[data-crt="off"] #screen { filter: none; }

#halation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 52;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0.5;
}

.phosphor {
  position: absolute;
  inset: 0;
  z-index: 53;
  pointer-events: none;
  backdrop-filter: blur(calc(var(--px) * 0.45)) brightness(1.3) saturate(1.5);
  -webkit-mask-image: repeating-linear-gradient(0deg,
    black 0px, black calc(var(--px) * 0.4),
    transparent calc(var(--px) * 0.4), transparent var(--px));
  mask-image: repeating-linear-gradient(0deg,
    black 0px, black calc(var(--px) * 0.4),
    transparent calc(var(--px) * 0.4), transparent var(--px));
}

.crt {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  border-radius: inherit;
  background:
    repeating-linear-gradient(0deg,
      transparent 0px, transparent calc(var(--px) * 0.72),
      rgba(0, 0, 0, 0.28) calc(var(--px) * 0.72), rgba(0, 0, 0, 0.28) var(--px)),
    repeating-linear-gradient(90deg,
      rgba(255, 60, 90, 0.05) 0px,
      rgba(255, 60, 90, 0.05) calc(var(--px) * 0.333),
      rgba(60, 255, 150, 0.04) calc(var(--px) * 0.333),
      rgba(60, 255, 150, 0.04) calc(var(--px) * 0.667),
      rgba(60, 120, 255, 0.05) calc(var(--px) * 0.667),
      rgba(60, 120, 255, 0.05) var(--px));
}

.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(105% 130% at 50% 45%,
    transparent 58%, rgba(0, 0, 0, 0.42) 100%);
}

.crt::after {

  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(118deg,
    rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.025) 18%,
    transparent 32%);
}

.screen:fullscreen {
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen:fullscreen #dos-root,
.screen:fullscreen #screen {
  width: auto;
  height: 100%;
  margin: 0 auto;
}

.deck {
  display: flex;
  justify-content: center;
  gap: 2.2rem;
  padding: 1rem 0 1.2rem;
}

.knob-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
}

.knob {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  line-height: 1;
  color: var(--cream);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 55%),
    #2a2046;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 3px 0 rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  cursor: pointer;
  transition: border-color var(--ease-fast), color var(--ease-fast);
}

.knob:hover {
  border-color: var(--violet);
  color: #fff;
}

.knob:active {
  transform: translateY(2px);
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.knob.off { color: rgba(246, 243, 249, 0.35); }

.knob-group label {
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--cream-dim);
  pointer-events: none;
}

#dos-root .bg-black\/70 {
  background: transparent !important;
  justify-content: flex-end !important;
  padding-bottom: 1.1rem !important;
}

#dos-root .bg-black\/70 > div {
  font-family: var(--font-mono) !important;
}

#dos-root .bg-black\/70 > div.text-4xl {
  font-size: var(--text-floor) !important;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  background: rgba(18, 10, 34, 0.85);
  border: 1px solid var(--violet-strong);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
}

#dos-root .bg-black\/70 > div.text-xl {
  font-size: var(--text-floor) !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(246, 243, 249, 0.5);
}

#dos-root .bg-black\/70 > div:nth-child(n + 3) {
  display: none;
}

.boot {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.6rem;
  background:
    radial-gradient(90% 90% at 50% 20%, #241341 0%, #120a22 70%),
    #120a22;
  z-index: 58;
  overflow: hidden;
  transition: opacity 600ms ease, visibility 600ms;
}

.boot::after {

  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -20%;
  height: 18%;
  background: linear-gradient(180deg,
    transparent, rgba(139, 92, 246, 0.16), transparent);
  animation: sweep 2.4s linear infinite;
}

@keyframes sweep {
  to { top: 120%; }
}

.boot.off {
  opacity: 0;
  visibility: hidden;
}

.boot h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 3.6rem);
  font-weight: 400;
  color: var(--cream);
  text-align: center;
  padding: 0 1rem;
}

.boot h2 .ch {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(0.5em) rotate(4deg);
  animation: rise 600ms var(--spring) forwards;
  animation-delay: calc(var(--i) * 40ms);
}

.boot-bar {
  width: min(280px, 60%);
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  overflow: hidden;
}

.boot-bar i {
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  border-radius: 2px;
  animation: scan 1.1s ease-in-out infinite alternate;
}

@keyframes scan {
  from { transform: translateX(-60%); }
  to   { transform: translateX(260%); }
}

.boot-loading {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  font-weight: 700;
  letter-spacing: 0.5em;
  color: rgba(246, 243, 249, 0.85);
  animation: led-blink 1.4s ease-in-out infinite;
}

.hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: rgba(246, 243, 249, 0.5);
  margin: 1.3rem 0 0;
}

.hint b {
  color: var(--neon-cyan);
  font-weight: 700;
  text-transform: uppercase;
}

.hint i {
  font-style: normal;
  color: var(--neon-magenta);
  padding: 0 0.7rem;
}

footer {
  text-align: center;
  padding: 0.9rem;
  background: var(--night);
}

footer p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: var(--text-floor);
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--cream-dim);
}

.footer-link {
  color: var(--neon-cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease-fast), color var(--ease-fast);
}

.footer-link:hover,
.footer-link:focus-visible {
  color: var(--cream);
  border-bottom-color: var(--neon-cyan);
}

@media (prefers-reduced-motion: reduce) {
  .boot::after, .boot-bar i, .boot-loading, .led { animation: none; }
  .headline .ch, .boot h2 .ch { animation-duration: 1ms; }
}
