/* About, 2026: "how Suicaptor works" as six chapters that open on their own as you scroll.
   Layout first, motion second: without /v2/about.js (or with reduced motion) every step,
   scene and number is visible in a plain two-column (or single-column) flow. */

/* ---------- Page canvas ---------- */
:root .about-page main, :root[data-theme="dark"] .about-page main { background: transparent; overflow-x: clip; }
.ab-page { position: relative; padding-bottom: 8px; }
:is(.ab-page, .ab-finale) :is(h1, h2, h3) { color: var(--v2-text); font-family: var(--v2-display); font-weight: 800; letter-spacing: -.035em; text-wrap: balance; }
:is(.ab-page, .ab-finale) p { text-wrap: pretty; }
:root .ab-page code, :root[data-theme="dark"] .ab-page code {
  padding: .1em .42em;
  border: 1px solid var(--v2-line);
  border-radius: 7px;
  color: var(--v2-text);
  background: var(--v2-elev-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .86em;
  white-space: nowrap;
}
:is(.ab-page, .ab-finale) a:not(.v2-button):focus-visible { outline: 3px solid var(--v2-violet); outline-offset: 3px; border-radius: 6px; }
.ab-tone-pink { --ab-tone: var(--v2-pink); --ab-glow: rgba(226, 61, 139, .16); --ab-glow-strong: rgba(226, 61, 139, .55); }
.ab-tone-cyan { --ab-tone: var(--v2-cyan); --ab-glow: rgba(30, 160, 210, .15); --ab-glow-strong: rgba(30, 160, 210, .5); }
.ab-tone-violet { --ab-tone: var(--v2-violet); --ab-glow: rgba(106, 89, 227, .16); --ab-glow-strong: rgba(106, 89, 227, .55); }
.ab-tone-gold { --ab-tone: var(--v2-gold); --ab-glow: rgba(214, 160, 50, .18); --ab-glow-strong: rgba(214, 160, 50, .55); }
:root[data-theme="dark"] .ab-tone-pink { --ab-glow: rgba(255, 140, 200, .12); }
:root[data-theme="dark"] .ab-tone-cyan { --ab-glow: rgba(111, 224, 245, .1); }
:root[data-theme="dark"] .ab-tone-violet { --ab-glow: rgba(183, 167, 255, .12); }
:root[data-theme="dark"] .ab-tone-gold { --ab-glow: rgba(245, 212, 139, .11); }

/* Bar lengths that follow config values (see widthClass in aboutView.ts). */
.ab-w-5 { --w: .05; } .ab-w-10 { --w: .1; } .ab-w-15 { --w: .15; } .ab-w-20 { --w: .2; } .ab-w-25 { --w: .25; }
.ab-w-30 { --w: .3; } .ab-w-35 { --w: .35; } .ab-w-40 { --w: .4; } .ab-w-45 { --w: .45; } .ab-w-50 { --w: .5; }
.ab-w-55 { --w: .55; } .ab-w-60 { --w: .6; } .ab-w-65 { --w: .65; } .ab-w-70 { --w: .7; } .ab-w-75 { --w: .75; }
.ab-w-80 { --w: .8; } .ab-w-85 { --w: .85; } .ab-w-90 { --w: .9; } .ab-w-95 { --w: .95; } .ab-w-100 { --w: 1; }

/* ---------- Hero ---------- */
.ab-hero {
  display: grid;
  justify-items: center;
  gap: clamp(30px, 3.6vw, 46px);
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(112px, 13vh, 138px) 0 clamp(26px, 3vw, 38px);
  text-align: center;
}
.ab-hero-copy { display: grid; justify-items: center; gap: 22px; max-width: 980px; }
.ab-hero h1 { margin: 0; font-size: clamp(42px, 5.8vw, 82px); line-height: .98; letter-spacing: -.045em; }
.ab-hero h1 .v2-gradient-text { display: block; padding-bottom: .06em; }
.ab-lede { max-width: 56ch; margin: 0; color: var(--v2-soft); font-size: clamp(17px, 1.35vw, 20px); line-height: 1.55; }
.ab-actions { justify-content: center; }
.ab-hero-fine { max-width: 62ch; }
.ab-hero-stage { position: relative; width: min(1120px, calc(100% - 40px)); margin: clamp(30px, 4vw, 52px) auto 0; perspective: 1700px; isolation: isolate; }
.ab-hero-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 4% -6%;
  border-radius: 40px;
  background: conic-gradient(from 0deg, rgba(255, 120, 190, .55), rgba(140, 120, 255, .5), rgba(110, 210, 255, .45), rgba(255, 190, 140, .45), rgba(255, 120, 190, .55));
  filter: blur(60px);
  opacity: .45;
}
:root[data-theme="dark"] .ab-hero-stage::before { opacity: .3; }
.ab-hero-art {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--v2-line-2);
  border-radius: clamp(18px, 2.4vw, 32px);
  background: var(--v2-elev);
  box-shadow: var(--v2-shadow-lg);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-origin: 50% 100%;
  transition: transform .6s var(--v2-ease-out);
  isolation: isolate;
}
.ab-hero-art img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; }
.ab-hero-glare {
  position: absolute;
  inset: 0;
  background: radial-gradient(640px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .42), transparent 46%);
  mix-blend-mode: soft-light;
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}
.ab-hero-art:hover .ab-hero-glare { opacity: 1; }

/* ---------- Chapter rail ---------- */
.ab-rail {
  position: sticky;
  top: 84px;
  z-index: 40;
  display: flex;
  justify-content: center;
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  pointer-events: none;
}
.ab-rail-scroll {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 5px;
  border: 1px solid var(--v2-line);
  border-radius: 18px;
  background: var(--v2-glass);
  box-shadow: var(--v2-shadow);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  pointer-events: auto;
  scrollbar-width: none;
}
.ab-rail-scroll::-webkit-scrollbar { display: none; }
.ab-rail-list { position: relative; display: flex; gap: 2px; width: max-content; margin: 0; padding: 0; list-style: none; }
.ab-rail-list::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 13px;
  background: rgba(106, 89, 227, .075);
  clip-path: inset(0 var(--ink-r, 100%) 0 var(--ink-l, 0px) round 13px);
  opacity: 0;
  transition: clip-path .55s var(--v2-ease-out), opacity .3s ease;
}
:root[data-theme="dark"] .ab-rail-list::before { background: var(--v2-elev-2); }
.ab-rail.has-current .ab-rail-list::before { opacity: 1; }
.ab-rail a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 13px;
  color: var(--v2-muted);
  font-size: 14px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .2s ease;
}
.ab-rail a:hover, .ab-rail a.v2-current { color: var(--v2-text); }
.ab-rail a::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 6px;
  height: 2px;
  border-radius: 2px;
  background: var(--ab-tone);
  transform: scaleX(var(--ab-p, 0));
  transform-origin: 0 50%;
}
.ab-rail-num { color: var(--ab-tone); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.ab-rail a:focus-visible { outline-offset: -3px; }

/* ---------- Chapters ---------- */
.ab-chapter { position: relative; width: min(1240px, calc(100% - 40px)); margin: clamp(72px, 10vw, 128px) auto 0; padding-top: 24px; }
.ab-head {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: 10px clamp(18px, 3vw, 40px);
  margin-bottom: clamp(36px, 5vw, 64px);
}
.ab-head-num {
  color: transparent;
  background: linear-gradient(165deg, var(--ab-tone) 10%, transparent 92%);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--v2-display);
  font-size: clamp(92px, 13vw, 196px);
  font-weight: 900;
  letter-spacing: -.07em;
  line-height: .76;
  user-select: none;
}
.ab-head-copy { display: grid; justify-items: start; gap: 14px; padding-bottom: 6px; }
.ab-head .v2-eyebrow { color: var(--ab-tone); }
.ab-head .v2-eyebrow::before { content: none; }
.ab-head h2 { max-width: 19ch; margin: 0; font-size: clamp(34px, 4.4vw, 58px); line-height: 1.03; }
.ab-head h2 .v2-gradient-text { display: inline-block; }
.ab-head-lede { max-width: 50ch; margin: 0; color: var(--v2-soft); font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; }

/* ---------- Story: steps beside their scenes ---------- */
.ab-story { position: relative; display: grid; gap: 22px; }
.ab-step { position: relative; z-index: 1; display: grid; min-width: 0; }
.ab-step-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-content: start;
  column-gap: 18px;
  row-gap: 12px;
  padding: 26px 28px;
  border: 1px solid transparent;
  border-radius: var(--v2-radius-lg);
}
.ab-step-card > * { position: relative; z-index: 1; grid-column: 2; margin: 0; }
.ab-step-card > .ab-step-num { grid-column: 1; grid-row: 1; }
.ab-step-num {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--v2-line-2);
  border-radius: 14px;
  color: var(--ab-tone);
  background: var(--v2-elev);
  font-family: var(--v2-display);
  font-size: 18px;
  font-weight: 800;
  transition: transform .5s var(--v2-spring), background .4s ease, color .4s ease, border-color .4s ease, box-shadow .4s ease;
}
.ab-step.v2-active .ab-step-num {
  border-color: transparent;
  color: #fff;
  background: var(--v2-grad);
  box-shadow: 0 10px 24px -12px var(--ab-glow-strong);
  transform: scale(1.06);
}
:root[data-theme="dark"] .ab-step.v2-active .ab-step-num { color: #12142a; }
.ab-step h3 { align-self: center; font-size: clamp(23px, 2.1vw, 30px); line-height: 1.1; }
.ab-step p { max-width: 48ch; color: var(--v2-soft); font-size: 16.5px; line-height: 1.6; transition: color .4s ease; }
.ab-step .ab-note { color: var(--v2-muted); font-size: 14.5px; line-height: 1.55; }
.ab-step .ab-note a, .ab-fine-list a { color: var(--v2-text); font-weight: 650; text-decoration: underline; text-decoration-color: var(--v2-line-2); text-underline-offset: 3px; }
.ab-step strong { color: var(--v2-text); font-weight: 700; }
.ab-step .v2-link { justify-self: start; font-size: 14.5px; }
.ab-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0 0; padding: 0; list-style: none; }
.ab-tags li { padding: 5px 11px; border: 1px solid var(--v2-line); border-radius: 999px; color: var(--v2-soft); background: var(--v2-elev-2); font-size: 13px; font-weight: 650; }
.ab-fine-list { display: grid; gap: 7px; max-width: 50ch; padding: 0; list-style: none; }
.ab-fine-list li { position: relative; padding-left: 18px; color: var(--v2-muted); font-size: 14.5px; line-height: 1.5; }
.ab-fine-list li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--ab-tone); }

.ab-scene { position: relative; display: grid; place-items: center; align-content: center; min-width: 0; margin: 0; }

/* Two columns on wider screens: each step sits beside its own scene. */
@media (min-width: 900px) {
  .ab-story { grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr); align-items: center; column-gap: clamp(28px, 4.5vw, 64px); row-gap: clamp(48px, 6vw, 84px); }
  .ab-step { grid-column: 1; }
  .ab-scene { grid-column: 2; }
}

/* ---------- Scene building blocks ---------- */
.ab-panel {
  position: relative;
  display: grid;
  gap: 18px;
  width: min(100%, 520px);
  padding: clamp(22px, 3vw, 34px);
  border: 1px solid var(--v2-line);
  border-radius: var(--v2-radius-lg);
  background: radial-gradient(120% 90% at 100% 0%, var(--ab-glow), transparent 58%), var(--v2-elev);
  box-shadow: var(--v2-shadow-lg);
  isolation: isolate;
}
.ab-panel-kicker { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: var(--ab-tone); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.ab-panel-note { margin: 0; color: var(--v2-muted); font-size: 14px; line-height: 1.5; }
.ab-scene-note { max-width: 46ch; margin: 2px 0 0; color: var(--v2-muted); font-size: 13.5px; line-height: 1.5; text-align: center; }

/* Illustrated demos in a soft device frame. */
.ab-device {
  position: relative;
  width: 100%;
  padding: 0 8px 8px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 22px;
  background: #15172b;
  box-shadow: var(--v2-shadow-lg), 0 40px 90px -48px var(--ab-glow-strong);
}
.ab-device::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 12% -4% -10%;
  border-radius: 40px;
  background: radial-gradient(closest-side, var(--ab-glow-strong), transparent);
  filter: blur(40px);
  opacity: .5;
}
.ab-device-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 10px 6px 9px 10px; }
.ab-device-channel { color: #b5bac1; font-size: 13px; font-weight: 650; }
.ab-demo-tag { padding: 4px 10px; border: 1px solid rgba(255, 255, 255, .14); border-radius: 999px; color: #f3f3fb; background: rgba(255, 255, 255, .07); font-size: 12px; font-weight: 650; white-space: nowrap; }
.ab-device img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border-radius: 14px; }

/* Chapter 1: starter journey, wishlist pity and rewards. */
.ab-checklist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ab-checklist li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 14px;
  padding: 11px 14px 11px 11px;
  border: 1px solid var(--v2-line);
  border-radius: 18px;
  color: var(--v2-text);
  background: var(--v2-bg-2);
  font-size: 16px;
  font-weight: 650;
}
.ab-emoji { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--v2-elev-2); font-size: 21px; line-height: 1; }
.ab-tick { width: 28px; height: 28px; padding: 5px; border-radius: 50%; color: #fff; background: var(--v2-grad); }
:root[data-theme="dark"] .ab-tick { color: #12142a; }

.ab-meters { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.ab-meters li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 10px 14px; }
.ab-meter-label { color: var(--v2-soft); font-size: 15px; font-weight: 650; }
.ab-meter-label b { color: var(--v2-text); font-family: var(--v2-display); font-size: 22px; }
.ab-meter-label { grid-row: 1; grid-column: 1; }
.ab-meter-value { grid-row: 1; grid-column: 2; color: var(--v2-muted); font-size: 14px; font-weight: 600; text-align: right; }
.ab-meter-value b { color: var(--v2-text); font-family: var(--v2-display); font-size: 22px; }
.ab-meter { grid-column: 1 / -1; display: block; inline-size: calc(var(--w, 1) * 100%); height: 14px; overflow: hidden; border-radius: 999px; background: var(--v2-elev-2); }
.ab-meter i { display: block; height: 100%; border-radius: inherit; background: var(--v2-grad); transform-origin: 0 50%; }

.ab-loot { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ab-loot li { grid-column: span 2; display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 118px; padding: 16px 10px; border: 1px solid var(--v2-line); border-radius: 20px; background: var(--v2-bg-2); text-align: center; }
.ab-loot li:nth-child(n + 4) { grid-column: span 3; }
.ab-loot b { color: var(--v2-text); font-family: var(--v2-display); font-size: 36px; line-height: 1; letter-spacing: -.03em; }
.ab-loot span { color: var(--v2-muted); font-size: 13.5px; font-weight: 650; }

/* Chapter 2: card stack, upgrade levels, protection. */
.ab-stack { display: grid; justify-items: center; gap: 22px; width: 100%; }
.ab-tabs { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 300px); margin: 0; padding: 5px; border: 1px solid var(--v2-line); border-radius: 15px; background: var(--v2-glass); list-style: none; isolation: isolate; }
.ab-tabs::before { content: ""; position: absolute; z-index: -1; top: 5px; bottom: 5px; left: 5px; width: calc((100% - 10px) / 3); border-radius: 11px; background: var(--v2-elev-2); box-shadow: 0 1px 2px rgba(22, 20, 60, .08); }
.ab-tabs li { padding: 8px 6px; color: var(--v2-soft); font-size: 13.5px; font-weight: 700; text-align: center; }
.ab-stack-cards { position: relative; width: min(100%, 420px); aspect-ratio: 1.08 / 1; transform: perspective(1200px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--v2-ease-out); }
.ab-stack-cards img { position: absolute; top: 3%; width: 54%; height: auto; aspect-ratio: 2 / 3; border-radius: 4.6% / 3.1%; filter: drop-shadow(0 22px 26px rgba(22, 14, 60, .35)); transition: transform .9s var(--v2-spring); }
:root[data-theme="dark"] .ab-stack-cards img { filter: drop-shadow(0 22px 26px rgba(0, 0, 0, .6)); }
.ab-stack-back { left: 6%; transform: rotate(-8deg) translateY(5%); }
.ab-stack-front { z-index: 1; right: 6%; transform: rotate(6deg); }

.ab-lvl { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: end; gap: 6px; min-height: 172px; margin: 0; padding: 0; list-style: none; }
.ab-lvl li { display: grid; justify-items: center; gap: 8px; }
.ab-lvl-dots { display: flex; flex-direction: column-reverse; gap: 5px; }
.ab-lvl-dots i { display: block; width: 18px; height: 18px; border-radius: 6px; background: var(--v2-grad); box-shadow: 0 6px 12px -6px var(--ab-glow-strong); }
.ab-lvl li:nth-child(-n + 5) .ab-lvl-dots i { background: var(--ab-tone); }
.ab-lvl b { color: var(--v2-muted); font-size: 12.5px; font-weight: 750; font-variant-numeric: tabular-nums; }
.ab-milestones { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px; border: 1px solid var(--v2-line); border-radius: 16px; background: var(--v2-bg-2); text-align: center; }
.ab-milestones b { display: block; color: var(--v2-text); font-family: var(--v2-display); font-size: 21px; }
.ab-milestones small { display: block; margin-top: 2px; color: var(--v2-muted); font-size: 12px; font-weight: 750; letter-spacing: .04em; }
.ab-milestones i { color: var(--ab-tone); font-style: normal; font-weight: 800; }

.ab-protect { justify-items: center; text-align: center; }
.ab-lock { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 30px; color: #fff; background: var(--v2-grad); box-shadow: 0 0 0 10px var(--ab-glow), 0 22px 40px -18px var(--ab-glow-strong); }
:root[data-theme="dark"] .ab-lock { color: #12142a; }
.ab-lock .ab-shackle { transform-box: fill-box; transform-origin: 50% 100%; }
.ab-shields { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ab-shields li { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px 8px 10px; border: 1px solid var(--v2-line); border-radius: 999px; color: var(--v2-text); background: var(--v2-bg-2); font-size: 14.5px; font-weight: 650; }
.ab-shields svg { color: var(--ab-tone); }

/* Chapter 3: Frames, chest odds, Dyes and Chroma (Frame and Dye samples are styled in /about.css). */
.ab-scene-frames { width: 100%; }
.ab-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ab-facts span { display: grid; justify-items: center; gap: 5px; padding: 16px 8px; border: 1px solid var(--v2-line); border-radius: 18px; background: var(--v2-bg-2); text-align: center; }
.ab-facts b { color: var(--v2-text); font-family: var(--v2-display); font-size: 34px; line-height: 1; letter-spacing: -.03em; }
.ab-facts small { color: var(--v2-muted); font-size: 12.5px; font-weight: 700; }
.ab-split { display: flex; gap: 5px; height: 20px; }
.ab-split > span { display: block; flex: var(--w, .5) 1 0; min-width: 14px; overflow: hidden; border-radius: 999px; }
.ab-split i { display: block; height: 100%; transform-origin: 0 50%; }
.ab-split-common i { background: linear-gradient(90deg, #c8c9dd, #a9acc8); }
:root[data-theme="dark"] .ab-split-common i { background: linear-gradient(90deg, #4a4e72, #6a6e94); }
.ab-split-prismatic i { background: linear-gradient(90deg, #ff8cc8, #b7a7ff, #6fe0f5); }
.ab-split-legend { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: -6px 0 0; color: var(--v2-soft); font-size: 14px; font-weight: 650; }
.ab-split-legend span { display: inline-flex; align-items: center; gap: 8px; }
.ab-dot { width: 10px; height: 10px; border-radius: 50%; }
.ab-dot-common { background: #a9acc8; }
.ab-dot-prismatic { background: linear-gradient(135deg, #ff8cc8, #b7a7ff, #6fe0f5); }

.ab-scene-dyes { gap: 18px; }
.ab-before-after { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2vw, 18px); }
.ab-before-after img, .ab-chroma-card img { border-radius: 7% / 4.6%; background: radial-gradient(ellipse at 50% 38%, #2c3766, #0e1430 74%); }
.ab-before-after img { width: clamp(104px, 11vw, 148px); height: auto; aspect-ratio: 2 / 3; filter: drop-shadow(0 16px 22px rgba(22, 14, 60, .3)); }
.ab-ba-arrow { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border: 1px solid var(--v2-line); border-radius: 50%; color: var(--ab-tone); background: var(--v2-elev); box-shadow: var(--v2-shadow); }

.ab-chroma { justify-items: center; }
.ab-chroma-pair { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2vw, 18px); }
.ab-chroma-card { display: grid; justify-items: center; gap: 8px; }
.ab-chroma-card img { width: clamp(108px, 12vw, 160px); height: auto; aspect-ratio: 2 / 3; filter: drop-shadow(0 16px 22px rgba(22, 14, 60, .3)); }
.ab-chroma-card small { color: var(--v2-muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ab-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin: 0; padding: 0; list-style: none; }
.ab-flow li { position: relative; display: grid; gap: 3px; padding: 12px 8px; border: 1px solid var(--v2-line); border-radius: 16px; background: var(--v2-bg-2); text-align: center; }
.ab-flow b { color: var(--v2-text); font-size: 15px; }
.ab-flow span { color: var(--v2-muted); font-size: 13px; font-weight: 600; }

/* Chapter 4: dates. */
.ab-place { position: relative; width: min(100%, 470px); overflow: hidden; border-radius: 30px; box-shadow: var(--v2-shadow-lg); isolation: isolate; }
.ab-place img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.ab-place-name, .ab-place-tally {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  color: #fff;
  background: rgba(12, 10, 30, .66);
  font-size: 14px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.ab-place-name { left: 16px; bottom: 16px; }
.ab-place-tally { top: 16px; right: 16px; font-size: 13px; }
.ab-like { color: #ffb3da; letter-spacing: .12em; }
.ab-strike { color: #ffd6b0; letter-spacing: .12em; }

.ab-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.ab-slots li { position: relative; display: grid; justify-items: center; gap: 3px; padding: 18px 8px; overflow: hidden; border: 1px solid var(--v2-line); border-radius: 18px; background: var(--v2-bg-2); text-align: center; isolation: isolate; }
.ab-slot-fill { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, transparent, var(--ab-glow) 30%, var(--ab-glow)); transform-origin: 50% 100%; }
.ab-slots b { color: var(--v2-text); font-family: var(--v2-display); font-size: 26px; line-height: 1.05; }
.ab-slots small { color: var(--v2-muted); font-size: 12.5px; font-weight: 700; }
.ab-cooldown { display: grid; gap: 8px; color: var(--v2-soft); font-size: 14.5px; font-weight: 600; }
.ab-cooldown b { color: var(--v2-text); }
.ab-cooldown-bar { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--v2-elev-2); }
.ab-cooldown-bar i { display: block; height: 100%; background: var(--v2-grad); transform-origin: 0 50%; }
.ab-letter { margin: 0; padding: 11px 14px; border-radius: 14px; color: var(--v2-soft); background: var(--v2-elev-2); font-size: 14.5px; font-weight: 600; }

.ab-shops { position: relative; width: min(100%, 500px); aspect-ratio: 1.25 / 1; }
.ab-shop { position: absolute; display: block; width: 60%; }
.ab-shop img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border: 3px solid var(--v2-elev); border-radius: 24px; background: var(--v2-elev-2); box-shadow: var(--v2-shadow-lg); }
.ab-shop small { position: absolute; left: 12px; bottom: 12px; padding: 7px 13px; border-radius: 999px; color: #fff; background: rgba(12, 10, 30, .66); font-size: 13px; font-weight: 700; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ab-shop-bouquet { top: 0; left: 0; transform: rotate(-5deg); }
.ab-shop-ring { z-index: 1; right: 0; bottom: 0; transform: rotate(4deg); }

.ab-bond { justify-items: center; overflow: hidden; padding-block: 48px 36px; text-align: center; }
.ab-bond-orbit { position: absolute; top: 18px; left: 50%; width: 196px; height: 196px; margin-left: -98px; border: 1px dashed var(--v2-line-2); border-radius: 50%; }
.ab-bond-orbit i { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--ab-tone); box-shadow: 0 0 14px var(--ab-tone); }
.ab-bond-orbit i:nth-child(1) { top: -5px; left: calc(50% - 5px); }
.ab-bond-orbit i:nth-child(2) { bottom: 18%; left: 3%; }
.ab-bond-orbit i:nth-child(3) { bottom: 18%; right: 3%; }
.ab-bond-mark { position: relative; display: grid; place-items: center; width: 124px; height: 124px; margin-top: 4px; border-radius: 50%; color: #fff; background: var(--v2-grad); box-shadow: 0 0 0 12px var(--ab-glow), 0 28px 50px -20px var(--ab-glow-strong); }
:root[data-theme="dark"] .ab-bond-mark { color: #12142a; }
.ab-bond-title { max-width: 18ch; margin: 44px 0 0; color: var(--v2-text); font-family: var(--v2-display); font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }

/* Chapter 5: battles. */
.ab-arena { position: relative; width: 100%; overflow: hidden; border-radius: 28px; box-shadow: var(--v2-shadow-lg); isolation: isolate; }
.ab-arena img { display: block; width: 100%; height: auto; object-fit: contain; }
.ab-arena-tags { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; margin: 0; padding: 14px; list-style: none; background: #201f38; }
.ab-arena-tags li { padding: 9px 15px; border: 1px solid rgba(255, 255, 255, .8); border-radius: 999px; color: #1b1840; background: rgba(255, 255, 255, .9); font-size: 14px; font-weight: 750; box-shadow: 0 12px 26px -14px rgba(20, 10, 50, .6); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ab-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ab-mode-col { display: grid; align-content: start; gap: 12px; padding: 16px; border: 1px solid var(--v2-line); border-radius: 22px; background: var(--v2-bg-2); }
.ab-mode-col > p { margin: 0; font-size: 18px; }
.ab-mode-col ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ab-mode-col li { display: grid; gap: 2px; padding: 13px 14px; border: 1px solid var(--v2-line); border-radius: 15px; background: var(--v2-elev); }
.ab-mode-col b { color: var(--v2-text); font-size: 17px; }
.ab-mode-col li span { color: var(--v2-muted); font-size: 13.5px; font-weight: 600; }

/* Notes and spec strips. */
.ab-disclosure {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: 860px;
  margin: clamp(40px, 5vw, 64px) auto 0;
  padding: 16px 20px;
  border: 1px dashed var(--v2-line-2);
  border-radius: 18px;
  color: var(--v2-muted);
  background: var(--v2-glass);
  font-size: 14.5px;
  line-height: 1.55;
}
.ab-disclosure svg { flex: 0 0 auto; margin-top: 1px; color: var(--ab-tone); }
.ab-disclosure strong { color: var(--v2-text); }
.ab-specs { display: grid; gap: 18px; margin-top: clamp(48px, 6vw, 80px); }
.ab-contract { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.ab-contract li { display: grid; align-content: start; gap: 6px; padding: 18px; border: 1px solid var(--v2-line); border-radius: 20px; color: var(--v2-muted); background: var(--v2-elev); font-size: 14px; line-height: 1.5; box-shadow: var(--v2-shadow); }
.ab-contract b { color: var(--v2-text); font-size: 15.5px; }
.ab-specs-note { margin: 0; color: var(--v2-soft); font-size: 15px; line-height: 1.55; text-align: center; }
.ab-specs-note strong { color: var(--v2-text); }
.ab-commands { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ab-commands a { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 6px 14px 6px 8px; border: 1px solid var(--v2-line); border-radius: 999px; color: var(--v2-soft); background: var(--v2-glass); font-size: 13.5px; font-weight: 650; transition: border-color .2s ease, transform .25s var(--v2-spring), color .2s ease; }
.ab-commands a:hover { color: var(--v2-text); border-color: var(--ab-tone); transform: translateY(-2px); }

/* ---------- Chapter 6: Prestige vault and the long run ---------- */
.ab-vault {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .92fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  padding: clamp(24px, 4.5vw, 60px);
  overflow: hidden;
  border: 1px solid rgba(214, 160, 50, .3);
  border-radius: 36px;
  background:
    radial-gradient(80% 70% at 88% 8%, rgba(255, 214, 120, .26), transparent 62%),
    radial-gradient(60% 60% at 0% 100%, rgba(226, 61, 139, .1), transparent 62%),
    var(--v2-elev);
  box-shadow: var(--v2-shadow-lg);
  isolation: isolate;
}
:root[data-theme="dark"] .ab-vault {
  border-color: rgba(245, 212, 139, .2);
  background:
    radial-gradient(80% 70% at 88% 8%, rgba(245, 212, 139, .14), transparent 62%),
    radial-gradient(60% 60% at 0% 100%, rgba(255, 140, 200, .07), transparent 62%),
    var(--v2-elev);
}
.ab-vault::before {
  content: "PR";
  position: absolute;
  z-index: -1;
  right: -.06em;
  bottom: -.2em;
  color: transparent;
  background: linear-gradient(160deg, rgba(214, 160, 50, .2), transparent 70%);
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--v2-display);
  font-size: clamp(180px, 26vw, 360px);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: 1;
  pointer-events: none;
}
.ab-vault-copy { display: grid; gap: 18px; }
.ab-vault-copy p { margin: 0; color: var(--v2-soft); font-size: 16.5px; line-height: 1.6; }
.ab-vault-copy strong { color: var(--v2-text); }
.ab-vault-copy .ab-vault-lede { color: var(--v2-text); font-size: clamp(19px, 1.6vw, 22px); font-weight: 650; line-height: 1.4; }
.ab-vault-copy .ab-note { color: var(--v2-muted); font-size: 14.5px; }
.ab-vault-boost { padding-left: 14px; border-left: 3px solid var(--v2-gold); }
.ab-odds { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.25fr); align-items: center; gap: 8px; padding: 18px 14px; border: 1px solid var(--v2-line); border-radius: 22px; background: var(--v2-bg-2); }
.ab-odds span { display: grid; justify-items: center; gap: 4px; min-width: 0; text-align: center; }
.ab-odds b { color: var(--v2-text); font-family: var(--v2-display); font-size: clamp(28px, 3vw, 42px); line-height: 1; letter-spacing: -.03em; }
.ab-odds .ab-odds-result b { color: transparent; background: var(--v2-grad); -webkit-background-clip: text; background-clip: text; }
.ab-odds small { color: var(--v2-muted); font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.ab-odds i { color: var(--v2-pink); font-size: 22px; font-style: normal; font-weight: 800; }
.ab-rarity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr); align-items: end; gap: clamp(14px, 2.2vw, 26px); transform: perspective(1400px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--v2-ease-out); }
.ab-rarity-card { display: grid; justify-items: center; gap: 12px; min-width: 0; margin: 0; text-align: center; }
.ab-rarity-art { position: relative; display: block; width: 100%; max-width: 260px; border-radius: 4.6% / 3.1%; filter: drop-shadow(0 22px 28px rgba(22, 14, 60, .35)); }
.ab-rarity-prestige .ab-rarity-art { filter: drop-shadow(0 0 22px rgba(255, 196, 90, .55)) drop-shadow(0 22px 28px rgba(22, 14, 60, .35)); }
.ab-rarity-card img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; border-radius: 4.6% / 3.1%; }
.ab-rarity-label { padding: 5px 12px; border: 1px solid var(--v2-line-2); border-radius: 999px; color: var(--v2-soft); background: var(--v2-glass); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.ab-rarity-prestige .ab-rarity-label { border-color: rgba(214, 160, 50, .45); color: var(--v2-gold); }
.ab-rarity-card figcaption { display: grid; gap: 3px; max-width: 28ch; }
.ab-rarity-card figcaption strong { color: var(--v2-text); font-size: 14.5px; }
.ab-rarity-card figcaption span { color: var(--v2-muted); font-size: 13.5px; line-height: 1.45; }

.ab-suiroll {
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: clamp(24px, 3.6vw, 48px);
  margin-top: clamp(40px, 5vw, 68px);
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--v2-line);
  border-radius: 32px;
  background: radial-gradient(circle at 82% 24%, rgba(124, 92, 255, .18), transparent 56%), var(--v2-elev);
  box-shadow: var(--v2-shadow-lg);
}
.ab-suiroll-copy { display: grid; justify-items: start; gap: 14px; }
.ab-suiroll-copy h3 { margin: 0; font-size: clamp(26px, 2.8vw, 38px); line-height: 1.08; letter-spacing: -.025em; }
.ab-suiroll-copy p { margin: 0; color: var(--v2-soft); font-size: 16px; line-height: 1.6; }
.ab-suiroll-copy strong { color: var(--v2-text); }
.ab-suiroll-copy .ab-note { color: var(--v2-muted); font-size: 14.5px; }
.ab-suiroll-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.ab-suiroll-stage { display: grid; gap: 10px; margin: 0; }
.ab-suiroll-stage img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; border: 1px solid var(--v2-line-2); border-radius: 20px; box-shadow: 0 24px 48px -22px rgba(12, 10, 44, .55); }
.ab-suiroll-stage figcaption { color: var(--v2-muted); font-size: 13px; text-align: center; }

.ab-longrun { display: grid; justify-items: start; gap: 22px; margin-top: clamp(56px, 7vw, 96px); }
.ab-longrun .v2-eyebrow::before { background: currentColor; }
.ab-longrun-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; width: 100%; margin: 0; padding: 0; list-style: none; }
.ab-longrun-grid li { display: grid; grid-template-rows: auto 1fr auto; gap: 10px; padding: 24px; border: 1px solid var(--v2-line); border-radius: 24px; background: var(--v2-elev); box-shadow: var(--v2-shadow); transition: transform .35s var(--v2-spring), border-color .25s ease; }
.ab-longrun-grid li:hover { transform: translateY(-4px); border-color: var(--v2-line-2); }
.ab-longrun-grid h3 { margin: 0; font-size: 21px; letter-spacing: -.02em; }
.ab-longrun-grid p { margin: 0; color: var(--v2-soft); font-size: 15px; line-height: 1.55; }
.ab-longrun-grid .v2-link { font-size: 14px; }

/* ---------- Finale ---------- */
.ab-finale {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 24px;
  width: min(1240px, calc(100% - 40px));
  margin: clamp(96px, 12vw, 160px) auto 64px;
  padding: clamp(48px, 7vw, 92px) clamp(18px, 4vw, 48px);
  overflow: hidden;
  border: 1px solid var(--v2-line);
  border-radius: 36px;
  background: var(--v2-grad-glow), var(--v2-elev);
  box-shadow: var(--v2-shadow-lg);
  text-align: center;
  isolation: isolate;
}
.ab-finale h2 { max-width: 17ch; margin: 0; font-size: clamp(34px, 4.8vw, 62px); line-height: 1.04; }
.ab-finale h2 .v2-gradient-text { display: inline-block; }
.ab-finale .v2-fine { max-width: 62ch; color: var(--v2-soft); }
.ab-finale-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 0; }
.ab-loop { position: relative; display: flex; justify-content: center; gap: clamp(12px, 3.2vw, 44px); margin: 0; padding: 0; list-style: none; }
.ab-loop::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 28px;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--v2-grad);
  transform-origin: 0 50%;
  opacity: .7;
}
.ab-loop li { display: grid; justify-items: center; gap: 9px; min-width: 56px; color: var(--v2-soft); font-size: 13.5px; font-weight: 700; }
.ab-loop-icon { display: grid; place-items: center; width: 56px; height: 56px; border: 1px solid var(--v2-line-2); border-radius: 18px; color: var(--ab-tone); background: var(--v2-elev); box-shadow: var(--v2-shadow); }

/* ---------- Sticky stage (wide, tall screens with motion; set by /v2/about.js) ---------- */
@media screen and (min-width: 1000px) and (min-height: 620px) {
  .ab-stage .ab-story {
    --ab-stage-h: min(580px, calc(100vh - 230px));
    --ab-stage-top: max(148px, calc(50vh - var(--ab-stage-h) / 2 + 52px));
    --ab-out: -34px;
    --ab-in: 34px;
    align-items: stretch;
    row-gap: 0;
    grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  }
  .ab-stage .ab-story[data-dir="up"] { --ab-out: 34px; --ab-in: -34px; }
  .ab-stage .ab-step { align-items: center; min-height: 62vh; }
  .ab-stage .ab-step-card { transition: transform .6s var(--v2-ease-out); }
  .ab-stage .ab-step-card::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -1px;
    border: 1px solid var(--v2-line);
    border-radius: inherit;
    background: var(--v2-glass);
    box-shadow: var(--v2-shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity .5s ease;
  }
  .ab-stage .ab-step.v2-active .ab-step-card { transform: translateX(6px); }
  .ab-stage .ab-step.v2-active .ab-step-card::before { opacity: 1; }
  .ab-stage .ab-step:not(.v2-active) p { color: var(--v2-muted); }
  .ab-stage .ab-story::before, .ab-stage .ab-story::after {
    content: "";
    position: absolute;
    top: 16vh;
    bottom: 16vh;
    left: 49px;
    width: 2px;
    border-radius: 2px;
    background: var(--v2-line-2);
  }
  .ab-stage .ab-story::after { background: var(--v2-grad); transform: scaleY(var(--ab-fill, 0)); transform-origin: 50% 0; transition: transform .7s var(--v2-ease-out); }
  .ab-stage .ab-story-3[data-v2-active="0"] { --ab-fill: .3333; }
  .ab-stage .ab-story-3[data-v2-active="1"] { --ab-fill: .6667; }
  .ab-stage .ab-story-3[data-v2-active="2"] { --ab-fill: 1; }
  .ab-stage .ab-story-4[data-v2-active="0"] { --ab-fill: .25; }
  .ab-stage .ab-story-4[data-v2-active="1"] { --ab-fill: .5; }
  .ab-stage .ab-story-4[data-v2-active="2"] { --ab-fill: .75; }
  .ab-stage .ab-story-4[data-v2-active="3"] { --ab-fill: 1; }
  .ab-stage .ab-scene {
    position: sticky;
    top: var(--ab-stage-top);
    grid-row: 1 / span 4;
    align-self: start;
    display: none;
    height: var(--ab-stage-h);
    opacity: 0;
    transform: translate3d(0, var(--ab-out), 0) scale(.965);
    filter: blur(6px);
    transition: opacity .45s ease, transform .75s var(--v2-ease-out), filter .45s ease, display .75s allow-discrete;
  }
  .ab-stage .ab-story-3 .ab-scene { grid-row: 1 / span 3; }
  .ab-stage .ab-scene.is-on { display: grid; opacity: 1; transform: none; filter: none; }
  .ab-stage .ab-scene.is-instant { transition: none; }
  @starting-style {
    .ab-stage .ab-scene.is-on { opacity: 0; transform: translate3d(0, var(--ab-in), 0) scale(.965); filter: blur(6px); }
  }
  .ab-stage .ab-scene :is(.ab-panel, .ab-device, .ab-arena, .ab-place, .ab-shops, .ab-stack) { max-height: var(--ab-stage-h); }
  .ab-stage .ab-scene-demo, .ab-stage .ab-scene-arena { align-content: center; }
}

/* ---------- Scene entrances (only once /v2/about.js confirms motion: html.ab-motion) ---------- */
@keyframes ab-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } }
@keyframes ab-slide { from { opacity: 0; transform: translate3d(-18px, 0, 0); } }
@keyframes ab-pop { from { opacity: 0; transform: scale(.55) rotate(-8deg); } 70% { opacity: 1; } }
@keyframes ab-grow-x { from { transform: scaleX(0); } }
@keyframes ab-grow-y { from { transform: scaleY(0); } }
@keyframes ab-develop { from { opacity: .35; filter: saturate(0) brightness(1.15); } }
@keyframes ab-zoom { from { transform: scale(1.14); } }
@keyframes ab-close { from { transform: translateY(-4px); } }
@keyframes ab-fan-back { from { opacity: 0; transform: translate3d(32%, 2%, 0) rotate(0deg) scale(.94); } }
@keyframes ab-fan-front { from { transform: translate3d(-34%, 0, 0) rotate(0deg) scale(.94); } }
@keyframes ab-deal-l { from { opacity: 0; transform: translate3d(18%, 14%, 0) rotate(4deg) scale(.9); } }
@keyframes ab-deal-r { from { opacity: 0; transform: translate3d(-18%, -10%, 0) rotate(-6deg) scale(.9); } }
@keyframes ab-from-left { from { opacity: 0; transform: translate3d(-28px, 0, 0); } }
@keyframes ab-from-right { from { opacity: 0; transform: translate3d(28px, 0, 0); } }
@keyframes ab-tab-cycle { 0%, 28% { transform: translateX(0); } 33%, 61% { transform: translateX(100%); } 66%, 94% { transform: translateX(200%); } 100% { transform: translateX(0); } }
@keyframes ab-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@keyframes ab-orbit { to { transform: rotate(1turn); } }
@keyframes ab-comet { from { transform: translateX(0); opacity: 0; } 12%, 88% { opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
@keyframes ab-sheen { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(230%) skewX(-18deg); } }
@keyframes ab-breathe { 0%, 100% { opacity: .38; transform: scale(1); } 50% { opacity: .55; transform: scale(1.04); } }

/* Flowing layout: each scene rises in once it scrolls into view (transition only on reveal). */
.ab-motion:not(.ab-stage) .ab-scene.is-on { transition: opacity .8s var(--v2-ease-out), transform .9s var(--v2-ease-out); }
.ab-motion:not(.ab-stage) .ab-scene:not(.is-on) { opacity: 0; transform: translate3d(0, 34px, 0) scale(.97); }
.ab-motion:not(.ab-stage) .ab-scene.is-instant { transition: none; }

/* Inner choreography plays whenever a scene turns on (and replays when the stage returns to it). */
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li { animation: ab-slide .55s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li:nth-child(2) { animation-delay: .08s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li:nth-child(3) { animation-delay: .16s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li:nth-child(4) { animation-delay: .24s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-tick { animation: ab-pop .5s var(--v2-spring) both; animation-delay: .45s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li:nth-child(2) .ab-tick { animation-delay: .62s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li:nth-child(3) .ab-tick { animation-delay: .79s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-checklist li:nth-child(4) .ab-tick { animation-delay: .96s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-device img { animation: ab-rise .7s var(--v2-ease-out) both .1s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-meter i { animation: ab-grow-x 1.2s var(--v2-ease-out) both .25s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-meters li:nth-child(2) .ab-meter i { animation-delay: .45s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-loot li { animation: ab-pop .6s var(--v2-spring) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-loot li:nth-child(2) { animation-delay: .07s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-loot li:nth-child(3) { animation-delay: .14s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-loot li:nth-child(4) { animation-delay: .21s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-loot li:nth-child(5) { animation-delay: .28s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-stack-back { animation: ab-fan-back .9s var(--v2-spring) both .1s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-stack-front { animation: ab-fan-front .9s var(--v2-spring) both .1s; }
.ab-motion .ab-scene.is-on .ab-stack-cards { animation: ab-float 6s ease-in-out infinite 1s; }
.ab-motion .ab-scene.is-on .ab-tabs::before { animation: ab-tab-cycle 7.5s var(--v2-ease-in-out) infinite 1s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-lvl-dots i { animation: ab-pop .45s var(--v2-spring) both; animation-delay: calc(var(--li, 0) * 70ms + var(--k, 0) * 55ms + .1s); }
.ab-lvl li:nth-child(2) { --li: 1; } .ab-lvl li:nth-child(3) { --li: 2; } .ab-lvl li:nth-child(4) { --li: 3; } .ab-lvl li:nth-child(5) { --li: 4; }
.ab-lvl li:nth-child(6) { --li: 5; } .ab-lvl li:nth-child(7) { --li: 6; } .ab-lvl li:nth-child(8) { --li: 7; } .ab-lvl li:nth-child(9) { --li: 8; }
.ab-lvl li:nth-child(10) { --li: 9; }
.ab-lvl-dots i:nth-child(2) { --k: 1; } .ab-lvl-dots i:nth-child(3) { --k: 2; } .ab-lvl-dots i:nth-child(4) { --k: 3; }
.ab-lvl-dots i:nth-child(5) { --k: 4; } .ab-lvl-dots i:nth-child(6) { --k: 5; } .ab-lvl-dots i:nth-child(n + 7) { --k: 6; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-lock { animation: ab-pop .6s var(--v2-spring) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-lock .ab-shackle { animation: ab-close .35s var(--v2-ease-out) both .55s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shields li { animation: ab-rise .5s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shields li:nth-child(1) { animation-delay: .3s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shields li:nth-child(2) { animation-delay: .37s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shields li:nth-child(3) { animation-delay: .44s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shields li:nth-child(4) { animation-delay: .51s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shields li:nth-child(5) { animation-delay: .58s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .about-frame-common { animation: ab-from-left .8s var(--v2-ease-out) both .05s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .about-frame-prismatic { animation: ab-from-right .8s var(--v2-ease-out) both .18s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-facts span { animation: ab-rise .55s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-facts span:nth-child(2) { animation-delay: .08s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-facts span:nth-child(3) { animation-delay: .16s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-split i { animation: ab-grow-x 1.1s var(--v2-ease-out) both .35s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-split-prismatic i { animation-delay: 1.1s; animation-duration: .6s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-before-after img:last-of-type { animation: ab-develop 1.3s var(--v2-ease-out) both .4s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .about-dye-sample { animation: ab-rise .6s var(--v2-ease-out) both .2s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .about-dye-premium { animation-delay: .32s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-chroma-after img { animation: ab-develop 1.4s var(--v2-ease-out) both .35s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-flow li { animation: ab-rise .5s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-flow li:nth-child(1) { animation-delay: .5s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-flow li:nth-child(2) { animation-delay: .62s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-flow li:nth-child(3) { animation-delay: .74s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-place img { animation: ab-zoom 1.8s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-place-tally { animation: ab-from-right .6s var(--v2-ease-out) both .45s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-place-name { animation: ab-from-left .6s var(--v2-ease-out) both .3s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-slot-fill { animation: ab-grow-y .7s var(--v2-ease-out) both .3s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-slots li:nth-child(2) .ab-slot-fill { animation-delay: .55s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-slots li:nth-child(3) .ab-slot-fill { animation-delay: .8s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-cooldown-bar i { animation: ab-grow-x 1.6s var(--v2-ease-in-out) both .2s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shop-bouquet { animation: ab-deal-l .9s var(--v2-spring) both .05s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-shop-ring { animation: ab-deal-r .9s var(--v2-spring) both .2s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-bond-mark { animation: ab-pop .7s var(--v2-spring) both .1s; }
.ab-motion .ab-scene.is-on .ab-bond-orbit { animation: ab-orbit 16s linear infinite; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-arena img { animation: ab-zoom 1.6s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-arena-tags li { animation: ab-rise .55s var(--v2-ease-out) both; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-arena-tags li:nth-child(1) { animation-delay: .35s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-arena-tags li:nth-child(2) { animation-delay: .45s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-arena-tags li:nth-child(3) { animation-delay: .55s; }

.ab-motion .ab-scene.is-on:not(.is-instant) .ab-mode-col:first-child { animation: ab-from-left .7s var(--v2-ease-out) both .05s; }
.ab-motion .ab-scene.is-on:not(.is-instant) .ab-mode-col:last-child { animation: ab-from-right .7s var(--v2-ease-out) both .18s; }

/* Prestige vault and finale (data-ab-scene blocks always flow; hidden parts wait for .is-on). */
.ab-motion .ab-odds:not(.is-on) > :is(span, i),
.ab-motion .ab-rarity:not(.is-on) .ab-rarity-card,
.ab-motion .ab-finale:not(.is-on) .ab-loop li { opacity: 0; }
.ab-motion .ab-finale:not(.is-on) .ab-loop::before { transform: scaleX(0); }
.ab-motion .ab-odds.is-on:not(.is-instant) > :is(span, i) { animation: ab-pop .55s var(--v2-spring) both; }
.ab-motion .ab-odds.is-on:not(.is-instant) > :nth-child(2) { animation-delay: .12s; }
.ab-motion .ab-odds.is-on:not(.is-instant) > :nth-child(3) { animation-delay: .24s; }
.ab-motion .ab-odds.is-on:not(.is-instant) > :nth-child(4) { animation-delay: .36s; }
.ab-motion .ab-odds.is-on:not(.is-instant) > :nth-child(5) { animation-delay: .52s; animation-duration: .8s; }
.ab-motion .ab-rarity.is-on:not(.is-instant) .ab-rarity-ssr { animation: ab-from-left .8s var(--v2-ease-out) both .05s; }
.ab-motion .ab-rarity.is-on:not(.is-instant) .ab-rarity-prestige { animation: ab-rise .9s var(--v2-ease-out) both .25s; }
.ab-rarity-prestige .ab-rarity-art { overflow: hidden; isolation: isolate; }
.ab-rarity-prestige .ab-rarity-art::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: -10% auto -10% 0;
  width: 46%;
  background: linear-gradient(100deg, transparent, rgba(255, 238, 190, .55), transparent);
  transform: translateX(-130%) skewX(-18deg);
  pointer-events: none;
  opacity: 0;
}
.ab-motion .ab-rarity.is-on .ab-rarity-prestige .ab-rarity-art::after { opacity: 1; animation: ab-sheen 4.2s var(--v2-ease-in-out) infinite 1.3s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop::before { animation: ab-grow-x 1.2s var(--v2-ease-out) both .1s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li { animation: ab-pop .55s var(--v2-spring) both; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li:nth-child(1) { animation-delay: .15s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li:nth-child(2) { animation-delay: .3s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li:nth-child(3) { animation-delay: .45s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li:nth-child(4) { animation-delay: .6s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li:nth-child(5) { animation-delay: .75s; }
.ab-motion .ab-finale.is-on:not(.is-instant) .ab-loop li:nth-child(6) { animation-delay: .9s; }
.ab-loop-wrap { position: relative; isolation: isolate; }
.ab-comet { position: absolute; z-index: -1; top: 21px; left: 28px; right: 28px; height: 16px; overflow: hidden; pointer-events: none; }
.ab-comet::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0 50%, #fff 0 3px, rgba(255, 255, 255, .7) 4px, transparent 6px),
    radial-gradient(18px 8px at 0 50%, rgba(183, 167, 255, .9), transparent);
  opacity: 0;
}
.ab-motion .ab-finale.is-on .ab-comet::before { animation: ab-comet 4.8s var(--v2-ease-in-out) infinite 1.6s; }

/* Hero: the artwork tilts up to face you as you scroll; chapter numerals drift for depth (scroll-driven, where supported). */
.v2-motion .ab-hero-stage::before { animation: ab-breathe 9s ease-in-out infinite; }
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .v2-motion .ab-hero-art {
      animation: ab-hero-rise linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 min(62vh, 560px);
    }
  }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .v2-motion .ab-head-num { animation: ab-num-drift linear both; animation-timeline: view(); animation-range: cover; }
  }
}
@keyframes ab-num-drift { from { translate: 0 34px; } to { translate: 0 -34px; } }
@keyframes ab-hero-rise {
  from { rotate: x 12deg; scale: .95; }
  to { rotate: x 0deg; scale: 1; }
}

/* Loops rest off screen, on hidden tabs and with Save-Data. */
:is(.ab-page, .ab-finale) :is(.v2-offscreen, .v2-offscreen *)::before,
:is(.ab-page, .ab-finale) :is(.v2-offscreen, .v2-offscreen *)::after { animation-play-state: paused !important; }
body:is([data-motion-state="data-saving"], [data-motion-state="hidden"]) :is(.ab-hero-stage, .ab-stack-cards, .ab-tabs, .ab-bond-orbit, .ab-rarity-prestige, .ab-loop, .ab-comet),
body:is([data-motion-state="data-saving"], [data-motion-state="hidden"]) :is(.ab-hero-stage, .ab-tabs, .ab-rarity-prestige, .ab-loop, .ab-comet)::before,
body:is([data-motion-state="data-saving"], [data-motion-state="hidden"]) :is(.ab-rarity-art, .ab-loop)::after { animation-play-state: paused !important; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1080px) {
  .ab-contract { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ab-longrun-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 899px) {
  .ab-story { gap: 18px; }
  .ab-scene { margin-bottom: 40px; }
  .ab-scene:last-child { margin-bottom: 0; }
  .ab-step-card { padding: 4px 0 0; }
  .ab-vault, .ab-suiroll { grid-template-columns: 1fr; }
  .ab-rarity { width: min(100%, 520px); justify-self: center; }
}
@media (max-width: 640px) {
  .ab-hero { width: calc(100% - 32px); padding-top: 96px; }
  .ab-hero-stage { width: calc(100% - 32px); margin-top: 26px; }
  .ab-hero h1 { font-size: clamp(38px, 10.6vw, 52px); }
  .ab-actions { width: 100%; gap: 10px; }
  .ab-actions .v2-button { flex: 1 1 auto; min-height: 50px; padding: 0 16px; font-size: 15.5px; white-space: nowrap; }
  .ab-hero-art { border-radius: 18px; }
  .ab-rail { top: 74px; width: calc(100% - 16px); }
  .ab-rail-scroll {
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent);
  }
  .ab-rail a { padding: 0 12px; font-size: 13.5px; }
  .ab-rail a::after { left: 12px; right: 12px; }
  .ab-chapter, .ab-finale { width: calc(100% - 32px); }
  .ab-head { grid-template-columns: 1fr; gap: 4px; }
  .ab-head-num { font-size: 84px; line-height: .8; }
  .ab-head h2 { font-size: clamp(32px, 9vw, 40px); }
  .ab-step-card { grid-template-columns: 36px minmax(0, 1fr); column-gap: 14px; }
  .ab-step-num { width: 36px; height: 36px; border-radius: 12px; font-size: 16px; }
  .ab-step p { font-size: 16px; }
  .ab-panel { padding: 20px; border-radius: 24px; }
  .ab-device { padding: 0 6px 6px; border-radius: 18px; }
  .ab-device-bar { padding: 8px 4px 7px 8px; }
  .ab-device-channel { display: none; }
  .ab-device img { border-radius: 12px; }
  .ab-checklist li { grid-template-columns: 38px minmax(0, 1fr) 26px; gap: 10px; font-size: 15px; }
  .ab-emoji { width: 38px; height: 38px; font-size: 19px; }
  .ab-loot { gap: 8px; }
  .ab-loot li { min-height: 96px; padding: 12px 6px; }
  .ab-loot b { font-size: 28px; }
  .ab-loot span { font-size: 12.5px; }
  .ab-lvl { gap: 4px; min-height: 150px; }
  .ab-lvl-dots i { width: 14px; height: 14px; border-radius: 5px; }
  .ab-lvl b { font-size: 11px; }
  .ab-facts b { font-size: 28px; }
  .ab-facts small { font-size: 11.5px; }
  .ab-flow li { padding: 10px 4px; }
  .ab-flow b { font-size: 14px; }
  .ab-flow span { font-size: 12px; }
  .ab-place-tally { top: 12px; right: 12px; }
  .ab-place-name { left: 12px; bottom: 12px; }
  .ab-slots b { font-size: 22px; }
  .ab-arena-tags { bottom: 8%; gap: 6px; }
  .ab-arena-tags li { padding: 6px 11px; font-size: 12.5px; }
  .ab-modes { gap: 10px; padding: 14px; }
  .ab-mode-col { padding: 12px; }
  .ab-mode-col li { padding: 11px; }
  .ab-mode-col b { font-size: 16px; }
  .ab-contract, .ab-longrun-grid { grid-template-columns: 1fr; }
  .ab-commands { justify-content: flex-start; }
  .ab-specs-note { text-align: left; }
  .ab-disclosure { padding: 14px 16px; }
  .ab-vault, .ab-suiroll { padding: 22px 18px; border-radius: 28px; }
  .ab-vault::before { font-size: 160px; }
  .ab-odds { gap: 4px; padding: 14px 8px; }
  .ab-odds b { font-size: 26px; }
  .ab-odds small { font-size: 10.5px; letter-spacing: .02em; }
  .ab-odds i { font-size: 17px; }
  .ab-rarity-card figcaption span { font-size: 12.5px; }
  .ab-finale { padding: 44px 16px; border-radius: 28px; }
  .ab-loop { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 8px; width: 100%; }
  .ab-loop::before, .ab-comet { display: none; }
  .ab-loop-icon { width: 48px; height: 48px; border-radius: 15px; }
}

/* ---------- Reduced motion and print: everything still, everything visible ---------- */
@media (prefers-reduced-motion: reduce) {
  :is(.ab-page, .ab-finale) *, :is(.ab-page, .ab-finale) *::before, :is(.ab-page, .ab-finale) *::after { animation: none !important; transition-duration: .01ms !important; }
  .ab-scene { opacity: 1 !important; transform: none !important; filter: none !important; }
  .ab-hero-art { transform: none !important; }
}
@media print {
  .ab-rail { display: none; }
  :is(.ab-page, .ab-finale) *, :is(.ab-page, .ab-finale) *::before, :is(.ab-page, .ab-finale) *::after { animation: none !important; transition: none !important; }
  .ab-scene, .ab-scene * { opacity: 1 !important; filter: none !important; }
  .ab-scene { display: grid !important; position: static !important; transform: none !important; break-inside: avoid; }
  .ab-odds > *, .ab-rarity-card, .ab-loop li { opacity: 1 !important; transform: none !important; }
  .ab-loop::before { transform: none !important; }
  .ab-hero-stage { break-inside: avoid; }
  .ab-hero-art { transform: none !important; box-shadow: none; }
}

.ab-stage .ab-scene-questions .ab-arena img { max-height: var(--ab-stage-h); object-fit: contain; }
