.ab-fx {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  overflow: hidden;
}

.ab-sparkle {
  position: absolute;
  overflow: visible;
  filter: drop-shadow(0 0 5px rgba(235, 244, 255, 0.9)) drop-shadow(0 0 22px rgba(150, 200, 255, 0.4));
}

.ab-sparkle-star,
.ab-sparkle-core,
.ab-sparkle-mote,
.ab-sparkle-shard {
  fill: #ffffff;
}

.ab-sparkle-ray {
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.ab-sparkle-ring {
  fill: none;
  stroke: rgba(248, 251, 255, 0.95);
  stroke-width: 1.6;
  stroke-dasharray: 10 7;
}

.ab-sparkle-ring.is-thin {
  stroke: rgba(236, 244, 255, 0.7);
  stroke-width: 1;
  stroke-dasharray: 2 6;
}

.ab-sparkle-halo {
  fill: rgba(214, 232, 255, 0.42);
}

.ab-sparkle-flare {
  fill: rgba(244, 249, 255, 0.95);
}

.ab-wipe {
  --wipe-blur: 0px;
  --wipe-bright: 1;
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  backdrop-filter: blur(var(--wipe-blur)) brightness(var(--wipe-bright)) saturate(1.25);
  -webkit-backdrop-filter: blur(var(--wipe-blur)) brightness(var(--wipe-bright)) saturate(1.25);
}

.ab-wipe-svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.ab-wipe-rims {
  filter: drop-shadow(0 0 2px rgba(235, 244, 255, 0.9)) drop-shadow(0 0 9px rgba(150, 200, 255, 0.45));
}

.ab-wipe-rim {
  fill: none;
  stroke: rgba(236, 245, 255, 0.4);
  stroke-width: 1;
  stroke-linejoin: round;
}

.ab-wipe-rim.is-bright {
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 1.4;
}

.ab-wipe-spec {
  fill: rgba(240, 247, 255, 0.8);
}

.ab-wipe-star {
  fill: #ffffff;
  filter: drop-shadow(0 0 6px rgba(220, 236, 255, 0.95));
}

.ab-wipe-line {
  fill: #ffffff;
}

.ab-wipe-line.is-prism {
  fill: rgba(140, 205, 255, 0.7);
}

.ab-boot {
  position: fixed;
  top: 50%;
  right: clamp(24px, calc(7 * var(--vw, 1vw)), 150px);
  z-index: 2;
  width: min(calc(80 * var(--vh, 1vh)), calc(46 * var(--vw, 1vw)));
  aspect-ratio: 1;
  translate: 0 -50%;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;
  filter: blur(0.9px) drop-shadow(0 0 1.6px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 14px rgba(160, 205, 255, 0.45));
}

.ab-boot.is-on {
  opacity: clamp(0, calc(1 - var(--descend) * 1.5), 1);
}

body.ab-root[data-fragment] .ab-boot {
  visibility: hidden;
}

.ab-boot-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ab-boot-svg path,
.ab-boot-svg line,
.ab-boot-svg circle,
.ab-boot-svg rect {
  fill: none;
  stroke: #eef5ff;
  stroke-width: 1.6;
}

.ab-boot-svg .is-main {
  stroke: #ffffff;
  stroke-width: 2.4;
}

.ab-boot-svg .is-soft {
  stroke: rgba(236, 244, 255, 0.55);
  stroke-width: 1.3;
}

.ab-boot-svg .is-thick {
  stroke: #ffffff;
  stroke-width: 7;
}

.ab-boot-svg .is-dash {
  stroke: rgba(236, 244, 255, 0.38);
  stroke-dasharray: 3 9;
}

.ab-boot-svg .ab-boot-tick {
  stroke: rgba(236, 244, 255, 0.45);
  stroke-width: 1.2;
}

.ab-boot-svg .ab-boot-tick.is-major {
  stroke: #ffffff;
  stroke-width: 2;
}

.ab-boot-svg .ab-boot-dot {
  stroke: rgba(236, 244, 255, 0.75);
}

.ab-boot-svg .ab-boot-sweeparc {
  stroke-width: 3.2;
  stroke-linecap: round;
}

.ab-boot-svg .ab-boot-chevron {
  stroke: #ffffff;
  stroke-width: 2;
}

.ab-boot-svg .ab-boot-mark {
  stroke: rgba(236, 244, 255, 0.7);
  stroke-width: 1.4;
}

.ab-boot-svg .ab-boot-pill {
  fill: rgba(4, 7, 14, 0.55);
  stroke: rgba(240, 246, 255, 0.8);
}

.ab-boot-svg .ab-boot-arrow {
  fill: #ffffff;
  stroke: none;
}

.ab-boot-svg .ab-boot-pulse {
  stroke: #ffffff;
  stroke-width: 1.4;
}

.ab-boot-svg .ab-boot-node circle {
  fill: rgba(4, 7, 14, 0.85);
}

.ab-boot-svg .ab-boot-node .is-fill {
  fill: #ffffff;
  stroke: none;
}

.ab-boot-svg text {
  fill: rgba(240, 246, 255, 0.85);
  font-family: var(--font-hud);
  font-size: 15px;
  letter-spacing: 0.18em;
}

.ab-boot-svg .ab-boot-pilltext,
.ab-boot-svg .ab-boot-num {
  fill: #f6faff;
  font-size: 18px;
  letter-spacing: 0.16em;
}

.ab-chapter-rule > i {
  scale: 0 1;
  transform-origin: left;
  transition: scale 1600ms var(--ease-decel) 300ms;
}

.ab-stage.is-visible .ab-chapter-rule > i {
  scale: 1 1;
}

.ab-rule-node {
  width: 7px;
  height: 7px;
  border: 1px solid var(--instr);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 500ms var(--ease-standard) 1500ms;
}

.ab-stage.is-visible .ab-rule-node {
  opacity: 0.8;
}

.ab-chev {
  display: flex;
  gap: 1px;
}

.ab-chev span {
  width: 6px;
  height: 6px;
  border-top: 1px solid var(--instr);
  border-right: 1px solid var(--instr);
  rotate: 45deg;
  opacity: 0.15;
  animation: ab-chev 1.8s var(--ease-symmetric) infinite;
}

.ab-chev span:nth-child(2) { animation-delay: 0.2s; }
.ab-chev span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ab-chev {
  0%, 100% { opacity: 0.15; }
  40%      { opacity: 0.9; }
}

.ab-glitch {
  display: inline-block;
}

.ab-glitch:hover,
*:hover > .ab-glitch,
*:focus-visible > .ab-glitch {
  animation: ab-glitch 420ms steps(1, end) 1;
}

@keyframes ab-glitch {
  0%   { text-shadow: 2px 0 rgba(140, 200, 255, 0.9), -2px 0 rgba(255, 255, 255, 0.55); translate: 0 0; }
  20%  { text-shadow: -2px 0 rgba(140, 200, 255, 0.9), 2px 0 rgba(255, 255, 255, 0.5); translate: 1px 0; clip-path: inset(0 0 45% 0); }
  40%  { text-shadow: 1px 0 rgba(140, 200, 255, 0.8), -1px 0 rgba(255, 255, 255, 0.4); translate: -1px 0; clip-path: inset(40% 0 0 0); }
  60%  { text-shadow: -1px 0 rgba(140, 200, 255, 0.7); translate: 0 0; clip-path: none; }
  100% { text-shadow: none; translate: 0 0; clip-path: none; }
}

.ab-frame {
  --corner: 16px;
  position: relative;
}

.ab-frame {
  isolation: isolate;
}

.ab-frame::before {
  content: '';
  position: absolute;
  inset: -44px;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(380px circle at calc(var(--mx, -600px) / var(--page-scale, 1) + 44px) calc(var(--my, -600px) / var(--page-scale, 1) + 44px), rgba(232, 242, 255, 0.08), transparent 45%),
    rgba(3, 7, 16, 0.78);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  -webkit-mask-image:
    linear-gradient(to right, transparent 0, #000 88px, #000 calc(100% - 88px), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 88px, #000 calc(100% - 88px), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0, #000 88px, #000 calc(100% - 88px), transparent 100%),
    linear-gradient(to bottom, transparent 0, #000 88px, #000 calc(100% - 88px), transparent 100%);
  mask-composite: intersect;
}

.ab-frame-svg {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.ab-frame-line {
  fill: none;
  stroke: rgba(236, 244, 255, 0.1);
  stroke-width: 1;
  transition: stroke 400ms var(--ease-standard);
}

.ab-frame:hover .ab-frame-line {
  stroke: rgba(246, 250, 255, 0.32);
}

.ab-frame-accent {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  filter: drop-shadow(0 0 4px rgba(210, 230, 255, 0.8));
  transition: transform 500ms var(--ease-decel);
}

.ab-frame:hover .ab-frame-accent.is-tl {
  transform: translate(-5px, -5px);
}

.ab-frame:hover .ab-frame-accent.is-br {
  transform: translate(5px, 5px);
}

.ab-frame-tab {
  fill: #ffffff;
}

.ab-frame-stripe {
  fill: rgba(244, 249, 255, 0.55);
}

.ab-frame-pip {
  fill: rgba(244, 249, 255, 0.5);
}

.ab-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(185, 214, 248, 0.08), transparent) no-repeat;
  background-size: 100% 40%;
  background-position: 0 -80%;
}

.ab-stage.is-visible .ab-frame::after,
.ab-frame.is-pulse::after {
  animation: ab-scan 1.5s var(--ease-decel) 1;
}

@keyframes ab-scan {
  from { background-position: 0 -80%; }
  to   { background-position: 0 180%; }
}

@media (max-width: 860px) {
  .ab-boot {
    right: calc(-22 * var(--vw, 1vw));
    width: calc(92 * var(--vw, 1vw));
  }

  .ab-boot.is-on {
    opacity: clamp(0, calc(0.32 - var(--descend)), 0.32);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ab-chapter-rule > i,
  .ab-rule-node {
    scale: 1 1;
    opacity: 1;
    transition: none;
  }

  .ab-chev span,
  .ab-glitch,
  .ab-frame::after {
    animation: none !important;
  }
}
