/* TussleTails website. Static, no build step (docs/website.md).
   Poster, the game's look (apps/client/src/themes/poster/, docs/ui-themes.md):
   ink black and one element colour at a time, nothing rounded, hard offset
   shadows instead of glows and glass, Anton capitals and Archivo text.
   The page's own colour is Electric's yellow (the game's gold before a
   fighter is shown); a champion, a boss or a Shop piece brings its own.
   Motion moves transform and opacity only, so it runs on the compositor at
   the screen's own rate (60 or 120 Hz), and stops with the pause control
   (site.js: html[data-motion="paused"]) or the device's Reduce Motion. */

@font-face {
  font-family: "Anton";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-vietnamese-400-normal.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Anton";
  font-weight: 400;
  font-display: swap;
  src: url("fonts/anton-latin-400-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Archivo";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo-vietnamese-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
    U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329,
    U+1EA0-1EF9, U+20AB;
}
@font-face {
  font-family: "Archivo";
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/archivo-latin-wght-normal.woff2") format("woff2");
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0d0d0f;
  --ink-1: #151518;
  --ink-2: #1e1e22;
  --ink-3: #2a2a30;
  --paper: #ffffff;
  --dim: #b8b8c0;
  --faint: #92929b;
  --line: rgba(255, 255, 255, 0.12);
  --line-2: rgba(255, 255, 255, 0.24);
  /* Red for stickers and offset shadows; --hot-fill behind white words
     (4.85:1), as in the game. */
  --hot: #ff2e4d;
  --hot-fill: #e0143a;
  --el-electric: #ffd84a;
  --el-fire: #ff7a45;
  --el-water: #4fb3ff;
  --el-aura: #7fe7ff;
  --el-light: #fff1a8;
  --el-psychic: #c47dff;
  --el-earth: #c8955a;
  --el-shadow: #8a6bff;
  --el-nature: #7fcf6a;
  --r-legendary: #ffbf3c;
  --r-mythic: #ff9be0;
  --r-mythic-2: #8a6bff;
  /* The page's colour; a card, boss or piece sets --el on itself. Every
     element colour is light: words on it are ink, never white. */
  --brand: var(--el-electric);
  --el: var(--brand);
  /* --el as words on ink: lifted to OKLCH lightness 0.72 where darker
     (Shadow), as the game's --el-text. */
  --el-text: var(--el);
  --display: "Anton", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bar-h: 60px;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-snap: cubic-bezier(0.7, 0, 0.2, 1);
  /* Halftone: the Lobby's dots. */
  --dots: radial-gradient(circle, rgba(0, 0, 0, 0.16) 1.4px, transparent 1.8px)
    0 0 / 9px 9px;
  color-scheme: dark;
  font-synthesis: none;
}
@supports (color: oklch(from red l c h)) {
  :root,
  [style*="--el"] {
    --el-text: oklch(from var(--el) max(l, 0.72) c h);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
/* Layout rules (display: grid/flex) must never undo the hidden attribute. */
[hidden] {
  display: none !important;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  background: var(--ink);
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
h4 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
button {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 30;
  background: var(--brand);
  color: var(--ink);
  padding: 10px 14px;
  font: 400 1rem/1 var(--display);
  text-transform: uppercase;
  text-decoration: none;
}
.skip:focus {
  top: calc(12px + env(safe-area-inset-top, 0px));
}
.wrap {
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Top bar: an ink strip, the brand and Play ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 21;
  background: var(--ink);
}
.bar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--ink);
  border-bottom: 3px solid var(--brand);
}
.bar-in {
  display: flex;
  align-items: center;
  gap: 12px;
  height: calc(var(--bar-h) - 3px);
  max-width: 1180px;
  margin-inline: auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  font: 400 1.4rem/1 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.brand img {
  border: 2px solid var(--brand);
}
.nav {
  display: none;
  gap: 2px;
  margin-left: auto;
}
.nav a {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--dim);
  text-decoration: none;
  font: 400 1.02rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  /* The word turns to ink (or back) half-way through the block's slide,
     when the block covers most of it (or has mostly left): switching at
     once left ink words on the ink bar until the block arrived. */
  transition: color 0s linear 0.11s;
}
/* A slanted block slides under the link pointed at (Poster's tabs). */
.nav a::before {
  content: "";
  position: absolute;
  inset: 8px 2px;
  z-index: -1;
  background: var(--brand);
  transform: skewX(-12deg) scaleX(0);
  transform-origin: left;
  transition: transform 0.22s var(--ease-out);
}
.nav a:hover,
.nav a:focus-visible,
.nav a[aria-current="true"] {
  color: var(--ink);
}
.nav a:hover::before,
.nav a:focus-visible::before,
.nav a[aria-current="true"]::before {
  transform: skewX(-12deg) scaleX(1);
}
/* Motion paused: the block and the word change together, at once. */
:root[data-motion="paused"] .nav a,
:root[data-motion="paused"] .nav a::before {
  transition: none;
}
.bar .btn-play {
  margin-left: auto;
}
@media (min-width: 820px) {
  .nav {
    display: flex;
  }
  .nav + .btn-play {
    margin-left: 10px;
  }
}

/* ---------- Buttons: blocks that press in ---------- */
.btn {
  --btn-bg: var(--el);
  --btn-ink: var(--ink);
  --btn-shadow: var(--hot);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px;
  border: 0;
  background: var(--btn-bg);
  color: var(--btn-ink);
  box-shadow: 5px 5px 0 var(--btn-shadow);
  font: 400 1.3rem/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.14s var(--ease-out),
    box-shadow 0.14s var(--ease-out);
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--btn-shadow);
}
.btn:active {
  transform: translate(4px, 4px);
  box-shadow: 1px 1px 0 var(--btn-shadow);
  transition-duration: 0.05s;
}
.btn-play {
  --btn-bg: var(--brand);
}
.btn-ghost {
  --btn-bg: transparent;
  --btn-ink: var(--paper);
  --btn-shadow: transparent;
  box-shadow: inset 0 0 0 2px currentColor;
}
.btn-ghost:hover {
  --btn-bg: var(--paper);
  --btn-ink: var(--ink);
  box-shadow: inset 0 0 0 2px var(--paper);
  transform: none;
}
.btn-sm {
  min-height: 44px;
  padding: 0 18px;
  font-size: 1.12rem;
  box-shadow: 4px 4px 0 var(--btn-shadow);
}
.btn-play .arrow {
  display: inline-block;
  transition: transform 0.2s var(--ease-out);
}
.btn-play:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Stickers and eyebrows ---------- */
.eyebrow {
  justify-self: start;
  display: inline-block;
  width: fit-content;
  padding: 6px 10px 5px;
  background: var(--hot-fill);
  color: var(--paper);
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-3deg);
  box-shadow: 3px 3px 0 var(--ink);
}

/* ---------- Hero: the painting framed on the page's colour ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: calc(var(--bar-h) + env(safe-area-inset-top, 0px));
  background: var(--brand);
  color: var(--ink);
  border-bottom: 4px solid var(--ink);
}
/* The halftone sits behind the painting and fades out before the words, so
   nothing speckles behind them. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: var(--dots);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 62%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 62%);
  pointer-events: none;
}
/* The game's name, huge and outlined, behind everything (the Lobby's
   fighter name). */
.hero-word {
  position: absolute;
  left: 50%;
  top: calc(var(--bar-h) + 10%);
  z-index: -1;
  transform: translateX(-50%) rotate(-6deg);
  font: 400 clamp(110px, 19vw, 300px) / 0.8 var(--display);
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.22);
  -webkit-text-stroke: 2px rgba(13, 13, 15, 0.14);
  pointer-events: none;
  user-select: none;
}
@media (max-width: 599px) {
  .hero-word {
    display: none;
  }
}
.hero-frame {
  position: relative;
}
.hero-art {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1.8;
  background: var(--ink);
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 38%;
}
/* "Free to play" and "Open beta" (owner, 28 Nov: the game is marked beta
   on the web while it is finished; the App Store build is not). */
.stickers {
  position: absolute;
  z-index: 2;
  right: max(14px, env(safe-area-inset-right, 0px));
  top: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}
.sticker {
  display: block;
  padding: 7px 12px 6px;
  background: var(--hot-fill);
  color: var(--paper);
  font: 400 1.05rem/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-4deg);
  box-shadow: 4px 4px 0 var(--ink);
}
.sticker.beta {
  background: var(--ink);
  color: var(--brand);
  transform: rotate(3deg);
  box-shadow: 4px 4px 0 var(--hot);
}
.hero-in {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding: 30px max(20px, env(safe-area-inset-right, 0px)) 40px
    max(20px, env(safe-area-inset-left, 0px));
  display: grid;
  gap: 16px;
  justify-items: start;
}
.hero .eyebrow {
  background: var(--ink);
  color: var(--brand);
  box-shadow: 3px 3px 0 var(--hot);
}
.hero h1 {
  font-size: clamp(3rem, 12vw, 6.2rem);
  line-height: 0.96;
  color: var(--ink);
}
.hero h1 .hi {
  display: inline-block;
  padding: 0.03em 0.14em 0;
  margin: 0.04em 0 0.04em -0.04em;
  background: var(--ink);
  color: var(--brand);
  transform: skewX(-8deg);
}
.hero h1 .hi > span {
  display: inline-block;
  transform: skewX(8deg);
}
.lede {
  font-size: clamp(1.05rem, 2.6vw, 1.25rem);
  font-weight: 500;
  max-width: 36em;
  color: rgba(13, 13, 15, 0.88);
}
.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 16px;
  margin-top: 6px;
}
.hero .btn-play {
  --btn-bg: var(--ink);
  --btn-ink: var(--brand);
}
.hero .btn-ghost {
  --btn-ink: var(--ink);
}
.hero .btn-ghost:hover {
  --btn-bg: var(--ink);
  --btn-ink: var(--brand);
  box-shadow: inset 0 0 0 2px var(--ink);
}
.fine {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(13, 13, 15, 0.86);
}
/* Wide screens: the painting framed in ink with a hard shadow, cut to its
   two fighters and the beam; the words under it, never over a creature
   (owner, 26 Nov). The frame is as tall as the screen leaves room for. */
@media (min-width: 900px) and (min-height: 501px) {
  .hero-frame {
    max-width: 1180px;
    margin: 26px auto 0;
    padding-inline: max(20px, env(safe-area-inset-left, 0px));
  }
  .hero-art {
    aspect-ratio: auto;
    height: clamp(280px, calc(100svh - var(--bar-h) - 400px), 38vw);
    border: 4px solid var(--ink);
    box-shadow: 12px 12px 0 var(--ink);
  }
  .hero-art img {
    object-position: 50% 33%;
  }
  .stickers {
    left: max(40px, env(safe-area-inset-left, 0px));
    right: auto;
    top: -14px;
  }
  .hero-in {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px 40px;
    padding-block: 34px 44px;
  }
  .hero-in > * {
    grid-column: 1;
  }
  .hero-in > .cta {
    grid-column: 2;
    grid-row: 2 / span 2;
    align-self: end;
  }
  .hero h1 {
    font-size: clamp(2.8rem, 4.4vw, 4.6rem);
  }
}
/* Phones held sideways: the painting a band across the top, the words under
   it; nothing on top of the fighters. */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-art {
    aspect-ratio: auto;
    height: clamp(220px, calc(100svh - var(--bar-h) - 30px), 40vw);
  }
  .hero-art img {
    object-position: 50% 40%;
  }
  .hero-in {
    padding-block: 26px 28px;
    gap: 12px;
  }
  .hero h1 {
    font-size: 2.6rem;
  }
  .hero h1 br {
    display: none;
  }
  .lede {
    font-size: 1rem;
  }
  .fine {
    display: none;
  }
}
/* Where the fight sits in the frame, at every frame size (owner, 27 Nov:
   "too much empty floor under it"). In the painting (hero-dusk, 3:2) the
   beam and the two fighters run from 27% to 60% of its height, and the
   floor under them is empty. The fight's middle (43.5%) stands at 56% of
   the frame, a little low, so the arena shows above it and less floor
   below. Where the frame is too short for that (1280 x 720), its feet stay
   8 px inside the bottom edge. The painting never leaves a gap at either
   edge. Units of the frame's own size (cqw, cqh); older browsers keep the
   percentages above. The painting is 2/3 as tall as it is wide, so it
   covers by width in every frame here (1.8:1 and wider). */
@supports (width: 1cqh) {
  .hero-art {
    container-type: size;
  }
  .hero-art img {
    object-position: 50%
      clamp(
        calc(100cqh - 66.667cqw),
        min(calc(56cqh - 29cqw), calc(100cqh - 40cqw - 8px)),
        0px
      );
  }
}

/* ---------- Hero gallery: the game's loading paintings in turn ----------
   (owner, 29 Nov). The one on show fades in over the last and drifts a
   little closer. The first keeps its own framing above; the others fill
   the frame, scaled just enough to cover it, never more (owner: "zoom in
   just enough to fill the frame", no blur at the sides). */
.hero-slide {
  position: absolute;
  inset: 0;
  display: block;
  opacity: 0;
  transition: opacity 1.1s var(--ease-out);
}
.hero-slide.is-on {
  z-index: 1;
  opacity: 1;
}
/* The one leaving stays under the one arriving until the fade is done. */
.hero-slide.was-on {
  opacity: 1;
  transition: none;
}
/* Each fills the frame, scaled just enough to cover it (the frame is
   wider than a painting, so its whole width shows); --y is how far down
   the painting the frame sits. */
.hero-art .hero-slide:not(.hero-slide-first) img {
  object-position: 50% var(--y, 50%);
}
:root:not([data-motion="paused"]) .hero-slide.is-on img,
:root:not([data-motion="paused"]) .hero-slide.was-on img {
  animation: hero-drift 9s linear both;
}
:root[data-motion="paused"] .hero-slide {
  transition: none;
}
@keyframes hero-drift {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.04);
  }
}
/* Without the script there is one painting and nothing to step through. */
:root:not(.js) .hero-nav,
:root:not(.js) .hero-art > .motion {
  display: none;
}
.hero-art {
  touch-action: pan-y;
}
.hero-art > .motion {
  z-index: 3;
  left: 12px;
  bottom: 12px;
  box-shadow: 3px 3px 0 var(--brand);
}
/* Previous, where it is (with the time to the next as a bar), next. */
.hero-nav {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: stretch;
  height: 44px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--brand);
}
.hero-step {
  display: grid;
  place-items: center;
  width: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.hero-step svg {
  width: 20px;
  height: 20px;
}
.hero-step:hover,
.hero-step:focus-visible {
  background: var(--brand);
  color: var(--ink);
}
.hero-count {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  margin: 0;
  padding: 0 6px;
  font: 400 1.05rem/1 var(--display);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  gap: 0.3em;
}
.hero-bar {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
:root:not([data-motion="paused"]) .hero-art.turning .hero-bar {
  animation: turn-bar var(--turn-ms, 6500ms) linear both;
}
/* Wide screens: the controls sit inside the ink frame's edge. */
@media (min-width: 900px) and (min-height: 501px) {
  .hero-nav,
  .hero-art > .motion {
    bottom: 14px;
  }
  .hero-nav {
    right: 14px;
  }
  .hero-art > .motion {
    left: 14px;
  }
}

/* ---------- Play now: a light that runs over it ----------
   (owner, 29 Nov: "make PLAY NOW stand out"). Links only: the account
   page's form buttons stay still. A glow breathes behind the
   button and a streak of light sweeps across it every few seconds; both
   are compositor work (opacity, transform) or a small repaint, and both
   stop with the page's pause switch. */
a.btn-play {
  --glow: var(--brand);
  overflow: visible;
}
.hero a.btn-play {
  --glow: var(--hot);
}
a.btn-play::before {
  content: "";
  position: absolute;
  inset: -5px;
  z-index: -1;
  background: var(--glow);
  filter: blur(12px);
  opacity: 0.45;
  pointer-events: none;
}
a.btn-play::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
      105deg,
      transparent 38%,
      rgba(255, 255, 255, 0.6) 50%,
      transparent 62%
    )
    no-repeat;
  background-size: 260% 100%;
  background-position: 115% 0;
  pointer-events: none;
}
.hero a.btn-play::after {
  background-image: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 216, 74, 0.55) 50%,
    transparent 62%
  );
}
:root:not([data-motion="paused"]) a.btn-play::before {
  animation: play-glow 2.4s ease-in-out infinite;
}
:root:not([data-motion="paused"]) a.btn-play::after {
  animation: play-shine 3.6s var(--ease-snap) infinite;
}
a.btn-play:hover::before,
a.btn-play:focus-visible::before {
  opacity: 0.95;
}
@keyframes play-glow {
  50% {
    opacity: 0.95;
    transform: scale(1.06);
  }
}
/* The streak (a quarter of the button wide) crosses from just off the
   left edge to just off the right, then rests. */
@keyframes play-shine {
  0%,
  60% {
    background-position: 115% 0;
  }
  100% {
    background-position: -15% 0;
  }
}

/* ---------- Bands ---------- */
.band {
  position: relative;
  padding-block: clamp(64px, 9vw, 112px);
}
.band.alt {
  background: var(--ink-1);
}
.head {
  position: relative;
  isolation: isolate;
  display: grid;
  gap: 14px;
  margin-bottom: clamp(30px, 4vw, 48px);
  max-width: 760px;
}
/* The section's number, outlined and huge, behind its title. */
.head[data-n]::before {
  content: attr(data-n);
  position: absolute;
  left: -0.05em;
  top: -0.6em;
  z-index: -1;
  font: 400 clamp(5rem, 14vw, 10rem) / 0.8 var(--display);
  color: transparent;
  -webkit-text-stroke: 2px var(--line-2);
  pointer-events: none;
}
.head h2 {
  font-size: clamp(2.6rem, 7.4vw, 5rem);
  line-height: 0.92;
}
.head h2 .hi {
  color: var(--brand);
}
.sub {
  color: var(--dim);
  font-size: 1.08rem;
  max-width: 42em;
}
.note {
  color: var(--dim);
  margin-top: 30px;
  max-width: 48em;
}

/* ---------- At a glance: the facts, then the champion tape ---------- */
.facts {
  padding-block: 0;
  overflow: hidden;
}
.facts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding-block: 30px 18px;
  gap: 22px 12px;
}
.facts-row li {
  display: grid;
  gap: 4px;
  padding-left: 14px;
  border-left: 4px solid var(--brand);
}
.facts-row b {
  font: 400 clamp(2.8rem, 7vw, 4.2rem) / 0.9 var(--display);
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.facts-row span {
  color: var(--dim);
  font: 400 0.98rem/1.2 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
@media (min-width: 700px) {
  .facts-row {
    grid-template-columns: repeat(4, 1fr);
  }
}
/* The champion ticker: a tilted tape of the roster drifting across. */
.ticker {
  position: relative;
  margin: 22px -2vw 26px;
  padding: 10px 0;
  background: var(--brand);
  transform: rotate(-1.6deg);
  box-shadow: 0 6px 0 var(--hot);
  overflow: hidden;
}
.ticker-run {
  display: flex;
  gap: 10px;
  width: max-content;
}
.tick {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 4px 16px 4px 4px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font: 400 1.05rem/1 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: transform 0.15s var(--ease-out);
}
.tick img {
  width: 44px;
  height: 44px;
  background: var(--dots), var(--el);
}
.tick:hover,
.tick:focus-visible {
  transform: translateY(-3px) rotate(-2deg);
  background: var(--paper);
  color: var(--ink);
}

/* ---------- Roster: poster cards, two per element ---------- */
.roster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (min-width: 640px) {
  .roster {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .roster {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.mon {
  display: grid;
}
.mon-btn {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  text-decoration: none;
  color: inherit;
  background: var(--ink-2);
  box-shadow: 0 0 0 0 var(--el);
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}
.mon-art {
  position: relative;
  display: grid;
  place-items: center;
  padding: 12px 10px 4px;
  background: var(--dots), var(--el);
  overflow: hidden;
}
/* A slanted ink cut across the art's foot (the Lobby's slab edge). */
.mon-art::after {
  content: "";
  position: absolute;
  inset: auto -2px -1px;
  height: 22px;
  background: var(--ink-2);
  clip-path: polygon(0 60%, 100% 0, 100% 100%, 0 100%);
}
.mon img {
  position: relative;
  z-index: 1;
  width: min(150px, 92%);
  aspect-ratio: 200 / 202;
  transition: transform 0.25s var(--ease-out);
}
.mon-tx {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 6px 12px 14px;
}
.mon h3 {
  font-size: 1.75rem;
}
.el {
  font: 400 0.95rem/1.3 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--el-text);
}
.role {
  color: var(--dim);
  font-size: 0.95rem;
  line-height: 1.35;
}
.mon-btn:hover,
.mon-btn:focus-visible {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 0 var(--el);
}
.mon-btn:hover img,
.mon-btn:focus-visible img {
  transform: translateY(-6px) scale(1.07) rotate(-2deg);
}
.mon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 0 var(--el);
}

/* ---------- Element filter: slanted tabs ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.chip {
  --el: var(--paper);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  background: var(--ink-2);
  color: var(--paper);
  font: 400 1.02rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
  transition:
    background-color 0.15s,
    color 0.15s;
}
.chip .dot {
  width: 10px;
  height: 10px;
  background: var(--el);
  transform: rotate(45deg);
}
.chip:hover {
  background: var(--ink-3);
}
.chip[aria-pressed="true"] {
  background: var(--el);
  color: var(--ink);
}
.chip[aria-pressed="true"] .dot {
  background: var(--ink);
}
.chip[data-filter="all"][aria-pressed="true"] {
  background: var(--brand);
}
.hint {
  color: var(--dim);
  font-size: 0.98rem;
  margin-top: 16px;
}
.roster > li[hidden] {
  display: none;
}

/* ---------- Modes ---------- */
.modes {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 640px) {
  .modes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1000px) {
  .modes {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.modes li {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: start;
  gap: 8px 12px;
  padding: 0 18px 22px;
  background: var(--ink-2);
  transition:
    transform 0.2s var(--ease-out),
    box-shadow 0.2s var(--ease-out);
}
.modes li:hover {
  transform: translate(-4px, -4px);
  box-shadow: 8px 8px 0 var(--brand);
}
/* Each mode's picture runs edge to edge across the top of its card. */
.mode-art {
  grid-column: 1 / -1;
  display: block;
  margin: 0 -18px 8px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--ink);
  border-bottom: 4px solid var(--brand);
}
.mode-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.modes li:hover .mode-art img {
  transform: scale(1.06);
}
.modes h3 {
  font-size: 2rem;
}
.modes .count {
  align-self: center;
  padding: 6px 9px 5px;
  background: var(--brand);
  color: var(--ink);
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: rotate(-3deg);
}
.modes li > p:last-child {
  grid-column: 1 / -1;
  color: var(--dim);
}
.modes li > p a {
  color: var(--paper);
}

/* ---------- Raid bosses: a stage and a picker ---------- */
/* A stage shows one boss's splash at a time (only its picture downloads);
   the seven bosses under it, in the Raid Hub's order, pick which. */
.raid-week {
  display: grid;
  gap: 14px;
}
.raid-stage {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  isolation: isolate;
}
.raid {
  position: relative;
  display: grid;
  border: 4px solid var(--el);
  overflow: hidden;
}
.raid-art {
  position: relative;
  grid-area: 1 / 1;
  display: block;
  overflow: hidden;
}
.raid-art img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.raid-tx {
  grid-area: 2 / 1;
  display: grid;
  gap: 8px;
  align-content: end;
  justify-items: start;
  padding: 18px 16px 20px;
  color: var(--paper);
  background: var(--ink);
  border-top: 4px solid var(--el);
}
.raid h3 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  line-height: 0.9;
}
.raid-when {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 400 0.92rem/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--el-text);
}
.start-tag {
  display: inline-block;
  padding: 5px 8px 4px;
  background: var(--hot-fill);
  color: var(--paper);
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 var(--paper);
}
.stars {
  color: var(--el);
  letter-spacing: 0.1em;
  font-size: 1rem;
  line-height: 1;
}
.stars span {
  color: var(--dim);
}
.epithet {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dim);
  line-height: 1.3;
}
.blurb {
  display: none;
  margin-top: 4px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--dim);
}
.beat {
  margin-top: 8px;
  display: grid;
  gap: 4px;
  padding: 10px 14px 12px;
  background: var(--el);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--hot);
}
.beat span {
  font: 400 0.9rem/1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.trick {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 700;
}
/* Wider screens: the splash and the words side by side, never on top of each
   other, so no word covers a boss's face. --fx keeps the boss's face in view
   where the picture is cut. */
@media (min-width: 600px) {
  .raid {
    height: clamp(320px, 46vw, 560px);
    max-height: max(300px, 100svh - 120px);
    grid-template-columns: minmax(0, 1fr) minmax(260px, 38%);
    background: var(--ink);
  }
  .raid[data-side="left"] {
    grid-template-columns: minmax(260px, 38%) minmax(0, 1fr);
  }
  .raid-art {
    grid-area: 1 / 1;
  }
  .raid[data-side="left"] .raid-art {
    grid-area: 1 / 2;
  }
  .raid-art img {
    aspect-ratio: auto;
    object-position: var(--fx, 50%) 50%;
  }
  /* The words' panel meets the splash on a slant, edged in the boss's
     colour. */
  .raid-tx {
    position: relative;
    grid-area: 1 / 2;
    align-self: stretch;
    align-content: center;
    padding: 20px clamp(16px, 2.6vw, 36px) 20px clamp(10px, 1.4vw, 16px);
    border-top: 0;
    background: none;
    isolation: isolate;
  }
  .raid-tx::before {
    content: "";
    position: absolute;
    inset: 0 0 0 -56px;
    z-index: -1;
    background: var(--ink);
    clip-path: polygon(56px 0, 100% 0, 100% 100%, 0 100%);
  }
  .raid-tx::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 -56px;
    width: 64px;
    z-index: -1;
    background: var(--el);
    clip-path: polygon(52px 0, 60px 0, 8px 100%, 0 100%);
  }
  .raid[data-side="left"] .raid-tx {
    grid-area: 1 / 1;
    padding: 20px clamp(10px, 1.4vw, 16px) 20px clamp(16px, 2.6vw, 36px);
  }
  .raid[data-side="left"] .raid-tx::before {
    inset: 0 -56px 0 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - 56px) 100%, 0 100%);
  }
  .raid[data-side="left"] .raid-tx::after {
    inset: 0 -56px 0 auto;
    clip-path: polygon(56px 0, 64px 0, 12px 100%, 4px 100%);
  }
}
@media (min-width: 1000px) {
  .blurb {
    display: block;
  }
}
.raid-picks {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}
.pick {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 5px;
  min-height: 64px;
  padding: 8px 2px;
  border: 0;
  background: var(--ink-2);
  color: var(--dim);
  cursor: pointer;
  transition:
    background-color 0.18s,
    color 0.18s,
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out);
}
.pick img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  object-position: 50% 24%;
  border: 2px solid var(--el);
  filter: saturate(0.55) brightness(0.75);
  transition: filter 0.2s;
}
.pick .s {
  color: var(--el);
  font-size: 0.68rem;
  line-height: 1;
}
/* Read out on phones too (the tab's name), but shown from 760px. */
.pick .n {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  font: 400 0.95rem/1.1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
}
.pick:hover {
  color: var(--paper);
  background: var(--ink-3);
}
.pick:hover img,
.pick[aria-selected="true"] img {
  filter: none;
}
.pick[aria-selected="true"] {
  background: var(--el);
  color: var(--ink);
  transform: translateY(-4px);
  box-shadow: 0 4px 0 var(--hot);
}
.pick[aria-selected="true"] .s {
  color: var(--ink);
}
.pick[aria-selected="true"] img {
  border-color: var(--ink);
}
@media (min-width: 760px) {
  .pick {
    padding: 10px 6px;
  }
  .pick img {
    width: 56px;
    height: 56px;
  }
  .pick .n {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }
}

/* ---------- The Plaza ---------- */
/* Everything the Plaza has, not how to fish (owner, 29 Nov). The band takes
   Water's blue as its colour, as a champion's panel takes its element's:
   the title's key words, the places' edges, the numbers and the button. */
.plaza {
  --brand: var(--el-water);
  --el: var(--el-water);
}
.plaza-top {
  align-items: center;
}
@media (min-width: 900px) {
  .plaza-top {
    grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
  }
  .plaza-top .head {
    margin-bottom: 0;
  }
}
/* A picture for each place on the Plaza's map, one at a time, turning on
   its own like the Shop's spotlight (owner, 29 Nov): the frame holds the
   place on show with its name and line under the picture, and the picker
   below has every place's thumbnail and name. */
.plaza-show {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.plaza-stage {
  margin: 0 10px 10px 0;
  border: 4px solid var(--brand);
  box-shadow: 10px 10px 0 var(--hot);
  background: var(--ink);
}
.plaza-scene {
  margin: 0;
}
.plaza-scene img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.plaza-scene figcaption {
  display: grid;
  gap: 2px;
  min-height: 64px;
  align-content: center;
  padding: 10px 14px;
  background: var(--ink-2);
  border-top: 4px solid var(--brand);
}
.plaza-scene b {
  color: var(--paper);
  font: 400 1.35rem/1.05 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.plaza-scene span {
  color: var(--dim);
  line-height: 1.35;
}
/* Four to a row: the map's eight places in two even rows. */
.plaza-picks {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
/* A phone held sideways: the picture beside its picker, so the place on
   show and the picks fit the short screen together. */
@media (min-width: 640px) and (max-width: 899px) {
  .plaza-show {
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    align-items: start;
  }
  .plaza-picks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.plaza-pick {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 6px;
  min-height: 44px;
  padding: 0 0 8px;
  border: 0;
  background: var(--ink-2);
  color: var(--dim);
  font: 400 0.9rem/1.1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    color 0.18s;
}
.plaza-pick img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-bottom: 3px solid var(--brand);
}
.plaza-pick span {
  padding: 0 4px;
  text-wrap: balance;
}
.plaza-pick:hover {
  color: var(--paper);
  transform: translateY(-3px);
}
.plaza-pick[aria-selected="true"] {
  color: var(--ink);
  background: var(--brand);
  transform: translateY(-4px);
  box-shadow: 0 4px 0 var(--hot);
}
.plaza-pick[aria-selected="true"] img {
  border-color: var(--ink);
}
/* A bar fills under the place on show while the pictures turn. */
.plaza-pick[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 4px;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--turn, 1));
}
.plaza-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(30px, 5vw, 48px);
}
.plaza-facts li {
  display: grid;
  gap: 4px;
  align-content: start;
  padding-left: 12px;
  border-left: 4px solid var(--brand);
}
.plaza-facts b {
  font: 400 clamp(2.4rem, 7vw, 3.8rem) / 0.9 var(--display);
  color: var(--brand);
  font-variant-numeric: tabular-nums;
}
.plaza-facts span {
  color: var(--dim);
  font: 400 0.95rem/1.2 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.plaza-cta {
  margin-top: 26px;
}

/* ---------- Make it yours: the Shop's window ---------- */
.split {
  display: grid;
  gap: 8px 48px;
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }
}
/* One piece at a time on a lit stage: the fitting room's own loop at 60
   frames a second, light rays turning behind it in its rarity's colour,
   sparks rising; six pieces to pick from under it. site.js turns it every
   few seconds until the reader picks one. */
.shop-show {
  display: grid;
  gap: 16px;
}
.spot {
  --r: var(--r-legendary);
  --r2: var(--el-fire);
  --el: var(--r);
  display: grid;
  background: var(--ink-2);
  border: 4px solid var(--r);
  box-shadow: 10px 10px 0 var(--hot);
}
.spot.r-mythical {
  --r: var(--r-mythic);
  --r2: var(--r-mythic-2);
}
@media (min-width: 640px) {
  .spot {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: stretch;
  }
}
.spot-tx {
  display: grid;
  gap: 8px;
  align-content: center;
  justify-items: start;
  padding: 20px 20px 24px;
}
@media (min-width: 640px) {
  .spot-tx {
    padding: 26px clamp(18px, 3vw, 40px) 26px clamp(16px, 2vw, 28px);
  }
}
.spot-r {
  padding: 5px 9px 4px;
  background: var(--r);
  color: var(--ink);
  font: 400 0.92rem/1 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.spot h3 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.9;
}
.spot-k {
  color: var(--r);
  font: 400 1.05rem/1.2 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.spot-d {
  max-width: 44ch;
  color: var(--dim);
}
.spot-note {
  font-size: 0.95rem;
  color: var(--dim);
}
.spot-go {
  --btn-bg: var(--r);
  margin-top: 10px;
}
.shop-picks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (min-width: 640px) {
  .shop-picks {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.shop-pick {
  --r: var(--r-legendary);
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 6px 6px 10px;
  border: 0;
  background: var(--ink-2);
  color: var(--dim);
  font: 400 0.95rem/1.1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.18s var(--ease-out),
    box-shadow 0.18s var(--ease-out),
    color 0.18s;
}
.shop-pick.r-mythical {
  --r: var(--r-mythic);
}
.shop-pick img {
  width: 100%;
  max-width: 110px;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 3px solid var(--r);
}
.shop-pick:hover {
  color: var(--paper);
  transform: translateY(-3px);
}
.shop-pick[aria-selected="true"] {
  color: var(--ink);
  background: var(--r);
  transform: translateY(-4px);
  box-shadow: 0 4px 0 var(--hot);
}
.shop-pick[aria-selected="true"] img {
  border-color: var(--ink);
}
/* A bar fills under the piece on show while the spotlight turns. */
.shop-pick[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 4px;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(var(--turn, 1));
}

/* ---------- Stages: a skin loop in a frame, with its effects ---------- */
/* Shared by the Shop spotlight and the champion panel: the fitting room's
   own stage, recorded at 60 frames a second (media/skins/), its rarity's
   rays turning behind and sparks rising in front. The poster shows until
   the loop plays, in Low Power Mode, and while motion is paused. */
.stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 1;
  width: 100%;
  background: var(--ink);
}
.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.stage-rays {
  position: absolute;
  inset: -30%;
  z-index: 1;
  pointer-events: none;
  background: repeating-conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--r, var(--el)) 30%, transparent) 0deg 8deg,
    transparent 8deg 22deg
  );
  /* A ring of light round the fighter, never over it; no blend mode, so
     turning it costs the compositor one layer (older phones). */
  -webkit-mask-image: radial-gradient(
    closest-side,
    transparent 36%,
    #000 58%,
    transparent 90%
  );
  mask-image: radial-gradient(
    closest-side,
    transparent 36%,
    #000 58%,
    transparent 90%
  );
  opacity: 0.4;
}
.r-mythical .stage-rays {
  background: repeating-conic-gradient(
    from 0deg,
    color-mix(in srgb, var(--r) 32%, transparent) 0deg 8deg,
    transparent 8deg 16deg,
    color-mix(in srgb, var(--r2) 32%, transparent) 16deg 24deg,
    transparent 24deg 34deg
  );
}
/* Sparks: three tiles of dots of unrelated sizes on a layer twice the
   stage's height, moved up by transform (no repaint per frame). */
.stage-sparks {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 200%;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 23% 61%, #fff 0 1.2px, transparent 2px),
    radial-gradient(
      circle at 71% 18%,
      color-mix(in srgb, var(--r, var(--el)) 90%, #fff) 0 1.8px,
      transparent 2.8px
    ),
    radial-gradient(
      circle at 44% 83%,
      color-mix(in srgb, var(--r2, var(--el)) 80%, #fff) 0 1.4px,
      transparent 2.4px
    );
  background-size:
    97px 131px,
    163px 149px,
    211px 233px;
  opacity: 0.5;
}
/* The frame's corner marks: a poster's registration ticks. */
.stage::after {
  content: "";
  position: absolute;
  inset: 10px;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(var(--r, var(--el)), var(--r, var(--el))) 0 0 / 22px 3px,
    linear-gradient(var(--r, var(--el)), var(--r, var(--el))) 0 0 / 3px 22px,
    linear-gradient(var(--r, var(--el)), var(--r, var(--el))) 100% 100% / 22px
      3px,
    linear-gradient(var(--r, var(--el)), var(--r, var(--el))) 100% 100% / 3px
      22px;
  background-repeat: no-repeat;
}
/* The slash: an element-coloured bar that cuts across the stage when the
   look on it changes (site.js adds .slash). */
.stage-slash {
  position: absolute;
  inset: -20% -60%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    100deg,
    transparent 42%,
    var(--r, var(--el)) 42% 50%,
    var(--paper) 50% 51.5%,
    transparent 51.5%
  );
  transform: translateX(-100%);
  opacity: 0;
}
/* Pause and play for every loop on the page (WCAG 2.2.2): one switch for
   all motion, shown on each stage. */
.motion {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 3px 3px 0 var(--r, var(--el));
  cursor: pointer;
}
.motion svg {
  width: 20px;
  height: 20px;
}
.motion .i-play,
[data-motion="paused"] .motion .i-pause {
  display: none;
}
[data-motion="paused"] .motion .i-play {
  display: block;
}
.motion:hover {
  background: var(--paper);
  color: var(--ink);
}
.spot .stage {
  border-bottom: 4px solid var(--r);
}
@media (min-width: 640px) {
  .spot .stage {
    border-bottom: 0;
    border-right: 4px solid var(--r);
  }
}

/* ---------- Mobile apps ---------- */
.app {
  background:
    linear-gradient(var(--ink-1), var(--ink-1)) padding-box,
    var(--ink-1);
  overflow: hidden;
}
/* A yellow slab behind the phone, never behind the words: under them on a
   narrow screen, beside them on a wide one. */
.app::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: min(52%, 620px);
  background: var(--dots), var(--brand);
  clip-path: polygon(0 16%, 100% 0, 100% 100%, 0 100%);
  pointer-events: none;
}
@media (min-width: 900px) {
  .app::before {
    inset: 0 0 auto auto;
    width: min(58vw, 760px);
    height: 100%;
    clip-path: polygon(45% 0, 100% 0, 100% 100%, 12% 100%);
  }
}
.app .wrap {
  position: relative;
}
/* Play in the browser and Join the iPhone beta: one column, one width (the
   wider label's), so they read as one set. */
.app .cta {
  display: grid;
  width: max-content;
  max-width: 100%;
}
.app-side {
  display: grid;
  gap: 18px;
  align-self: center;
}
/* A phone held sideways, playing a real match (img/shots, from the game). */
.phone {
  margin: 0;
  padding: 10px 14px;
  border-radius: 26px;
  background: var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  border: 3px solid var(--ink-3);
  transform: rotate(-2deg);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
}
/* After the duel, a raid, the Plaza and a 2v2 come on in turn over it, four
   seconds each (opacity only); paused, the duel stays. A plain phone of our
   own, no maker's details (Apple's marketing guidelines, 3 Dec 2026). The
   duel sits in its <picture>, so the three are the figure's own imgs 1-3. */
.phone {
  position: relative;
}
.phone .phone-next {
  position: absolute;
  inset: 10px 14px;
  width: calc(100% - 28px);
  height: calc(100% - 20px);
  object-fit: cover;
  opacity: 0;
}
:root:not([data-motion="paused"]) .phone-next {
  animation: phone-turn 16s linear infinite;
}
:root:not([data-motion="paused"]) .phone-next:nth-of-type(1) {
  animation-delay: 4s;
}
:root:not([data-motion="paused"]) .phone-next:nth-of-type(2) {
  animation-delay: 8s;
}
:root:not([data-motion="paused"]) .phone-next:nth-of-type(3) {
  animation-delay: 12s;
}
@keyframes phone-turn {
  0%,
  28%,
  100% {
    opacity: 0;
  }
  3%,
  25% {
    opacity: 1;
  }
}
.stores {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-self: center;
}
.store {
  display: grid;
  /* Neighbour cards share one height: the words stay at the top of each, so
     the stickers and the names line up across them. */
  align-content: start;
  gap: 2px;
  padding: 16px 20px 18px;
  background: var(--ink);
  border-left: 6px solid var(--hot);
  box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.35);
}
/* "Coming soon" as a sticker: white on the red fill reads at 4.85:1 (the
   red as words on ink was 3.65:1). */
.store-k {
  justify-self: start;
  margin-bottom: 4px;
  padding: 4px 8px 3px;
  background: var(--hot-fill);
  color: var(--paper);
  font: 400 0.92rem/1.2 var(--display);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.store-n {
  font: 400 2rem/1.05 var(--display);
  text-transform: uppercase;
}
.store-d {
  color: var(--dim);
  font-size: 0.95rem;
}
/* The iPhone beta's card carries the game's own app icon (never Apple's
   logo: Apple's marketing guidelines).
   The icon sits beside the sticker and the name; the line under them runs
   the card's full width, so a narrow card keeps it to two lines. */
.store.has-icon {
  grid-template-columns: 56px 1fr;
  column-gap: 14px;
}
.store.has-icon > .store-k,
.store.has-icon > .store-n {
  grid-column: 2;
}
.store.has-icon > .store-d {
  grid-column: 1 / -1;
  margin-top: 8px;
}
.store-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 56px;
  height: 56px;
  box-shadow: 4px 4px 0 var(--hot);
}
.store-d a {
  color: var(--paper);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Footer ---------- */
.foot {
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--brand);
  padding-block: 40px calc(36px + env(safe-area-inset-bottom, 0px));
  background: var(--ink);
}
.foot-word {
  font: 400 clamp(3.4rem, 13vw, 9rem) / 0.85 var(--display);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px var(--line-2);
  white-space: nowrap;
  margin-bottom: 18px;
  user-select: none;
}
.foot-in {
  display: grid;
  gap: 16px;
}
.foot-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-inline: -10px;
}
.foot-nav a {
  display: grid;
  place-items: center;
  min-height: 44px;
  color: var(--dim);
  padding: 0 10px;
  text-decoration: none;
  font: 400 1rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.foot-nav a[href^="mailto:"] {
  font: 500 0.95rem/1 var(--body);
  letter-spacing: 0;
  text-transform: none;
}
/* The game's Instagram: the app's own colours beside the word, so it is
   known at a glance. */
.foot-nav .foot-ig {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.foot-nav a:hover {
  color: var(--brand);
}
.copy {
  color: var(--dim);
  font-size: 0.95rem;
}
@media (min-width: 900px) {
  .foot-in {
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .foot-nav {
    justify-content: flex-end;
  }
  .copy {
    grid-column: 1 / -1;
  }
}

/* ---------- Champion panel ---------- */
.panel-open {
  overflow: hidden;
}
.champ {
  --r: var(--el);
  width: min(
    1100px,
    100vw - 24px - env(safe-area-inset-left, 0px) -
      env(safe-area-inset-right, 0px)
  );
  max-width: none;
  max-height: min(92svh, 900px);
  padding: 0;
  border: 4px solid var(--el);
  background: var(--ink-1);
  color: var(--paper);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 12px 12px 0 var(--hot);
  view-transition-name: champ;
}
.champ::backdrop {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.07) 1.4px, transparent 1.8px)
      0 0 / 9px 9px,
    rgba(4, 4, 6, 0.86);
}
.champ-in {
  position: relative;
  display: grid;
}
/* Two columns on a wide screen, and on a phone held sideways. */
@media (min-width: 820px), (min-width: 600px) and (max-height: 500px) {
  .champ-in {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }
  /* The stage stays in view while the details scroll beside it. */
  .champ-in > .champ-stage {
    position: sticky;
    top: 0;
    align-self: start;
    min-height: min(calc(92svh - 8px), 892px);
  }
}
.champ-x {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 6;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--el);
  color: var(--ink);
  cursor: pointer;
}
.champ-x:hover {
  background: var(--paper);
}
.champ-stage {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 20px 18px 18px;
  background: var(--dots), var(--el);
  overflow: hidden;
  isolation: isolate;
}
/* The champion's name, huge and outlined, behind the stage. */
.champ-big {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: -1;
  transform: translate(-50%, -50%) rotate(-8deg);
  font: 400 clamp(90px, 18vw, 190px) / 0.8 var(--display);
  text-transform: uppercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.4);
  -webkit-text-stroke: 2px rgba(13, 13, 15, 0.5);
  pointer-events: none;
}
.champ-frame {
  position: relative;
  width: min(100%, 440px, 58svh);
  justify-self: center;
  border: 4px solid var(--ink);
  box-shadow: 10px 10px 0 var(--ink);
  view-transition-name: champ-art;
}
.champ-frame .stage {
  background: var(--ink);
}
/* The look on show, a tag across the frame's top-left corner (over the
   stage's sky, clear of the fighter). */
.champ-look {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  max-width: calc(100% - 12px);
  padding: 6px 10px 5px;
  background: var(--ink);
  color: var(--paper);
  font: 400 0.92rem/1.15 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.champ-look b {
  margin-right: 6px;
  font-weight: 400;
  color: var(--r);
}
/* Previous, the skin count, next: a row under the strip. */
.champ-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: min(100%, 440px);
  justify-self: center;
}
/* Words on a solid block between the arrows, never on the halftone. */
.champ-count {
  flex: 1;
  align-self: stretch;
  display: grid;
  place-items: center;
  padding: 4px 10px;
  background: var(--ink);
  color: var(--paper);
  font: 600 0.95rem/1.3 var(--body);
  text-align: center;
  text-wrap: balance;
}
.champ-step {
  flex: none;
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1.9rem/1 var(--display);
  cursor: pointer;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
.champ-step:hover {
  background: var(--paper);
  color: var(--ink);
}
/* The skins: Classic and the featured ones, each a still of its loop. */
.skins {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: min(100%, 440px);
  justify-self: center;
}
.skin {
  --r: var(--paper);
  position: relative;
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 0;
  padding: 0;
  border: 0;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  text-align: center;
  transition:
    transform 0.15s var(--ease-out),
    box-shadow 0.15s var(--ease-out);
}
.skin.r-legendary {
  --r: var(--r-legendary);
}
.skin.r-mythical {
  --r: var(--r-mythic);
}
.skin img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-bottom: 3px solid var(--r);
}
.skin-n {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skin-r {
  display: none;
}
.skin:hover {
  transform: translateY(-3px);
}
.skin[aria-pressed="true"] {
  transform: translateY(-4px);
  box-shadow:
    0 0 0 3px var(--ink),
    4px 4px 0 3px var(--paper);
}
/* One column (phones held upright): the stage starts under the close
   button. */
@media (max-width: 819px) and (min-height: 501px), (max-width: 599px) {
  .champ-stage {
    padding-top: 56px;
  }
}
/* Phones held sideways: a smaller frame, so the stage fits the height. */
@media (max-height: 500px) {
  .champ-stage {
    gap: 8px;
    padding-block: 12px;
  }
  .champ-frame {
    width: min(100%, 50svh);
  }
  .skins,
  .champ-nav {
    width: min(100%, 320px);
  }
  .champ-step {
    width: 44px;
    height: 44px;
  }
  .champ-look {
    padding: 4px 7px 3px;
    font-size: 0.875rem;
  }
}
.champ-info {
  display: grid;
  align-content: start;
  background: var(--ink-1);
  justify-items: start;
  gap: 10px;
  padding: 26px max(20px, env(safe-area-inset-right, 0px)) 30px 22px;
  min-width: 0;
  view-transition-name: champ-info;
}
.champ-info > * {
  justify-self: stretch;
}
.champ-el {
  justify-self: start !important;
  padding: 5px 9px 4px;
  background: var(--el);
  color: var(--ink);
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.champ h2 {
  font-size: clamp(3rem, 8vw, 4.6rem);
  line-height: 0.88;
}
.champ-role {
  font: 400 1.15rem/1.2 var(--display);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--el-text);
}
.champ-desc,
.champ-passive {
  color: var(--dim);
}
.champ-h {
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  margin-top: 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--line);
}
.stats {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
}
.stat {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
}
.stat dt {
  color: var(--dim);
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.stat dd {
  margin: 0;
  order: 3;
  font: 700 1.02rem/1 var(--body);
  font-variant-numeric: tabular-nums;
  text-align: right;
  min-width: 76px;
}
.stat .meter {
  display: block;
  height: 12px;
  background: var(--ink-3);
  overflow: hidden;
  transform: skewX(-14deg);
}
.stat .meter::before {
  content: "";
  display: block;
  height: 100%;
  width: 100%;
  background: var(--el);
  transform-origin: left;
  transform: scaleX(var(--v));
  transition: transform 0.5s var(--ease-out);
}
.moves {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
.mv {
  display: grid;
  gap: 4px;
  justify-items: center;
  align-content: center;
  min-height: 66px;
  padding: 8px 4px;
  border: 0;
  background: var(--ink-2);
  color: var(--paper);
  cursor: pointer;
  text-align: center;
  transition:
    background-color 0.15s,
    color 0.15s,
    transform 0.15s var(--ease-out);
}
.mv-k {
  font: 400 1.1rem/1 var(--display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--el-text);
}
.mv-n {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--dim);
}
/* A narrow phone: the tabs show their key (Basic, 1, 2, 3, Ult); the name
   is read out, and shown in full in the move below. */
@media (max-width: 479px) {
  .mv-n {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .mv {
    position: relative;
    min-height: 52px;
  }
}
.mv:hover {
  background: var(--ink-3);
}
.mv[aria-selected="true"] {
  background: var(--el);
  color: var(--ink);
  transform: translateY(-3px);
  box-shadow: 0 3px 0 var(--hot);
}
.mv[aria-selected="true"] .mv-k,
.mv[aria-selected="true"] .mv-n {
  color: var(--ink);
}
.mv.ult {
  box-shadow: inset 0 0 0 2px var(--el);
}
.mv.ult[aria-selected="true"] {
  box-shadow: 0 3px 0 var(--hot);
}
.move {
  display: grid;
  gap: 8px;
  padding: 16px 18px 18px;
  background: var(--ink-2);
  border-left: 5px solid var(--el);
  min-height: 150px;
  align-content: start;
}
.move-slot {
  font: 400 0.95rem/1 var(--display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dim);
}
.move-name {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1;
}
.move-desc {
  color: var(--paper);
}
.move-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}
.move-facts li {
  padding: 6px 9px 5px;
  background: var(--ink);
  color: var(--el-text);
  font: 700 0.9rem/1 var(--body);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.champ-play {
  --btn-bg: var(--el);
  justify-self: start !important;
  margin-top: 12px;
}

/* ---------- Motion ---------- */
/* Revealed on scroll, readable from the start (a still or a full-page
   capture still shows it). Browsers with scroll-driven animations run it
   on the compositor; others get site.js's IntersectionObserver (.reveal). */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
}
@keyframes wipe-in {
  from {
    opacity: 0;
    transform: translateX(-36px) skewX(-8deg);
  }
}
@keyframes ticker {
  to {
    transform: translateX(calc(-50% - 5px));
  }
}
@keyframes turn {
  to {
    transform: rotate(1turn);
  }
}
@keyframes sparks {
  to {
    transform: translateY(-50%);
  }
}
@keyframes slash {
  0% {
    opacity: 1;
    transform: translateX(-70%);
  }
  100% {
    opacity: 1;
    transform: translateX(70%);
  }
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes turn-bar {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
:root:not([data-motion="paused"]) .ticker-run {
  animation: ticker 70s linear infinite;
}
/* The tape holds still under a mouse, or while the keyboard is on one of
   its names. Not after a tap: a phone keeps :hover on what was last
   tapped, and closing a champion's panel puts focus back on the name that
   opened it, so the tape stood still until the reader tapped somewhere
   else (owner, 27 Nov). Nor under a mouse left on it by the click that
   closed the panel (.free, site.js), until it leaves. */
@media (hover: hover) and (pointer: fine) {
  .ticker:not(.free):hover .ticker-run {
    animation-play-state: paused;
  }
}
.ticker:has(:focus-visible) .ticker-run {
  animation-play-state: paused;
}
:root:not([data-motion="paused"]) .stage-rays {
  animation: turn 30s linear infinite;
}
:root:not([data-motion="paused"]) .stage-sparks {
  animation: sparks 12s linear infinite;
}
:root:not([data-motion="paused"]) .stage.slash .stage-slash {
  animation: slash 0.55s var(--ease-snap) both;
}
:root:not([data-motion="paused"])
  :is(
    .shop-show.turning .shop-pick,
    .plaza-show.turning .plaza-pick
  )[aria-selected="true"]::after {
  animation: turn-bar var(--turn-ms, 7000ms) linear both;
}
:root:not([data-motion="paused"]) .hero-in > * {
  animation: rise 0.7s var(--ease-out) both;
}
:root:not([data-motion="paused"]) .hero-in > :nth-child(2) {
  animation-delay: 0.07s;
}
:root:not([data-motion="paused"]) .hero-in > :nth-child(3) {
  animation-delay: 0.14s;
}
:root:not([data-motion="paused"]) .hero-in > :nth-child(n + 4) {
  animation-delay: 0.21s;
}
:root:not([data-motion="paused"]) .plaza-scene.enter,
:root:not([data-motion="paused"]) .move.pop,
:root:not([data-motion="paused"]) .enter .raid-tx > *,
:root:not([data-motion="paused"]) .enter .spot-tx > * {
  animation: pop-in 0.4s var(--ease-out) both;
}
:root:not([data-motion="paused"]) .enter .raid-tx > :nth-child(n + 3),
:root:not([data-motion="paused"]) .enter .spot-tx > :nth-child(n + 3) {
  animation-delay: 0.06s;
}
/* Every entrance fills both ways: an element not yet in view already waits
   at its first frame, so nothing changes at the moment it starts to enter.
   With forwards only it kept its own look below the screen's foot and
   snapped to the first frame there, unseen on a desktop, but on an iPhone
   Safari also draws the page under its bottom toolbar, below the edge the
   timeline measures: a title or card showed whole in that band, blinked
   out as it crossed the edge and came back in (owner, 28 Nov). Each one
   moves only with the scroll, so no state jumps at any point. Leaving needs
   no such care: its last frame is above the screen's top, under the bar. */
@supports (animation-timeline: view()) {
  :root:not([data-motion="paused"]) .head > * {
    animation: wipe-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 80%;
  }
  :root:not([data-motion="paused"])
    :is(
      .roster > li,
      .modes > li,
      .stores > li,
      .raid-week,
      .shop-show,
      .plaza-show
    ) {
    animation: rise linear both;
    animation-timeline: view();
    animation-range: entry var(--lag, 0%) entry calc(60% + var(--lag, 0%));
  }
}
/* ...and each leaves the way it suits as it goes off the top (owner,
   28 Nov: "words and panels gather in as you reach them, then each moves
   off its own way for the next part"): a title wipes out to the left, a
   card lifts away, a row's cards one after another. Only while it crosses
   the screen's top edge, and no fill: once off screen, and before, it is
   its own self. Words stay whole until most of the box has gone. The tall
   panels (a raid, the Shop) only ease back, never fade, since their lower
   half is still being read. */
@supports (animation-timeline: view()) and
  (animation-range: exit-crossing 0% exit-crossing 100%) {
  :root:not([data-motion="paused"]) .head > * {
    animation:
      wipe-in linear both,
      wipe-out linear none;
    animation-timeline: view(), view();
    animation-range:
      entry 0% entry 80%,
      exit-crossing 0% exit-crossing 100%;
  }
  :root:not([data-motion="paused"])
    :is(.roster > li, .modes > li, .stores > li) {
    animation:
      rise linear both,
      lift-off linear none;
    animation-timeline: view(), view();
    animation-range:
      entry var(--lag, 0%) entry calc(60% + var(--lag, 0%)),
      exit-crossing var(--lag, 0%) exit-crossing 100%;
  }
  :root:not([data-motion="paused"]) :is(.raid-week, .shop-show) {
    transform-origin: 50% 100%;
    animation:
      rise linear both,
      ease-back linear none;
    animation-timeline: view(), view();
    animation-range:
      entry 0% entry 60%,
      exit-crossing 0% exit-crossing 100%;
  }
}
@keyframes wipe-out {
  40% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(-48px, -18px) skewX(-8deg);
  }
}
@keyframes lift-off {
  35% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateY(-56px) scale(0.94);
  }
}
@keyframes ease-back {
  to {
    transform: scale(0.95);
  }
}
/* Scroll-driven, part two (owner, 27 Nov: "scroll-driven animation, done
   properly"). Each one follows the reader's own scroll and nothing else: no
   pinning, no change to scroll speed, no script. Transform, translate and
   opacity only, so the compositor draws them. Where these timelines are
   missing (iOS 18 and older), none of it exists and the page is its own
   still self; with motion paused, the same. */
@supports (animation-timeline: view()) and
  (animation-range: exit-crossing 0% exit-crossing 100%) {
  /* A view() timeline follows the nearest scroll container, and
     overflow: hidden makes one: these bands clip instead (the same cut, not
     a scroller), so what is inside them follows the page. flow-root keeps
     the block formatting context hidden gave them. */
  .hero,
  .app {
    display: flow-root;
    overflow: clip;
  }
  /* 1. How far down the page: a red stripe fills the bar's yellow edge. */
  :root:not([data-motion="paused"]) .bar::after {
    content: "";
    position: absolute;
    inset: auto 0 -3px;
    height: 3px;
    background: var(--hot);
    transform-origin: 0 50%;
    pointer-events: none;
    animation: read-on linear both;
    animation-timeline: scroll(root block);
  }
  /* 2. The hero leaves: its painting sinks back and leans, and the
     outlined name behind it drifts slower than the page. */
  .hero {
    view-timeline: --hero block;
  }
  .hero-frame {
    view-timeline: --hero-frame block;
  }
  :root:not([data-motion="paused"]) .hero-art {
    transform-origin: 50% 100%;
    animation: sink-back linear both;
    animation-timeline: --hero-frame;
    animation-range: exit-crossing 0% exit-crossing 85%;
  }
  :root:not([data-motion="paused"]) .hero-word {
    animation: word-drift linear both;
    animation-timeline: --hero;
    animation-range: exit-crossing 0% exit-crossing 100%;
  }
  /* 3. Cards in a row arrive one after another, left to right; the boss
     faces come in from above and below in turn. */
  @media (min-width: 640px) and (max-width: 999px) {
    .modes > li:nth-child(2n) {
      --lag: 12%;
    }
  }
  @media (min-width: 1000px) {
    .modes > li:nth-child(3n + 2) {
      --lag: 10%;
    }
    .modes > li:nth-child(3n) {
      --lag: 20%;
    }
  }
  :root:not([data-motion="paused"]) .pick {
    animation: face-up linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
  :root:not([data-motion="paused"]) .pick:nth-child(2n) {
    animation-name: face-down;
    animation-range: entry 0% cover 34%;
  }
  /* 4. The phone straightens up to its own slight lean as it rises. */
  :root:not([data-motion="paused"]) .phone {
    animation:
      phone-up linear both,
      phone-off linear none;
    animation-timeline: view(), view();
    animation-range:
      entry 0% cover 45%,
      exit-crossing 0% exit-crossing 100%;
  }
}
@keyframes read-on {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes sink-back {
  to {
    transform: scale(0.9) rotate(-1.5deg);
  }
}
@keyframes word-drift {
  to {
    transform: translate(calc(-50% - 9vw), 38%) rotate(-6deg);
  }
}
@keyframes face-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
}
@keyframes face-down {
  from {
    opacity: 0;
    transform: translateY(-22px);
  }
}
@keyframes phone-off {
  to {
    transform: translateY(-40px) rotate(4deg) scale(0.96);
  }
}
@keyframes phone-up {
  from {
    transform: translateY(56px) rotate(-8deg) scale(0.96);
  }
}
@supports not (animation-timeline: view()) {
  .js:not([data-motion="paused"]) .reveal {
    opacity: 0.35;
    transform: translateY(26px);
    transition:
      opacity 0.6s ease var(--d, 0ms),
      transform 0.6s var(--ease-out) var(--d, 0ms);
  }
  .js .reveal.in {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Panel transitions (View Transitions, site.js) ---------- */
/* html[data-vt] says which: "open" and "close" (a champion card's portrait
   grows into the panel's stage and back, the panel wipes in and out on a
   slant), "next" and "prev" (the details slide the way you go), "look" (a
   new skin cuts in on the stage), "cut" (a raid boss or Shop piece cuts in)
   and "filter" (the roster's cards move to their new places). Browsers
   without view transitions switch at once, with the small entrances above. */
::view-transition-group(*) {
  animation-duration: 0.42s;
  animation-timing-function: var(--ease-snap);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
}
/* A panel cuts over the one before it: the old picture stays whole under
   the new one (no see-through middle, no added-up colours), so these pairs
   blend normally instead of the cross-fade's plus-lighter. */
::view-transition-old(champ-art),
::view-transition-new(champ-art),
::view-transition-old(champ-info),
::view-transition-new(champ-info),
::view-transition-old(raid-stage),
::view-transition-new(raid-stage),
::view-transition-old(spot),
::view-transition-new(spot) {
  mix-blend-mode: normal;
}
/* The details slide inside their own column, never over the backdrop. */
::view-transition-group(champ-info) {
  overflow: clip;
}
:root[data-vt="open"]::view-transition-new(champ) {
  animation: vt-wipe-in 0.46s var(--ease-snap) both;
}
:root[data-vt="open"]::view-transition-new(champ-info) {
  animation: vt-in-right 0.42s var(--ease-out) 0.16s both;
}
:root[data-vt="close"]::view-transition-old(champ) {
  animation: vt-wipe-out 0.34s var(--ease-snap) both;
}
:root[data-vt="close"]::view-transition-old(champ-info) {
  animation: vt-fade-out 0.14s ease both;
}
:root:is([data-vt="next"], [data-vt="prev"])::view-transition-group(
    champ-info
  ) {
  animation: none;
}
:root[data-vt="next"]::view-transition-old(champ-info) {
  animation: vt-out-left 0.36s var(--ease-snap) both;
}
:root[data-vt="next"]::view-transition-new(champ-info) {
  animation: vt-in-right 0.36s var(--ease-snap) both;
}
:root[data-vt="prev"]::view-transition-old(champ-info) {
  animation: vt-out-right 0.36s var(--ease-snap) both;
}
:root[data-vt="prev"]::view-transition-new(champ-info) {
  animation: vt-in-left 0.36s var(--ease-snap) both;
}
:root:is(
    [data-vt="next"],
    [data-vt="prev"],
    [data-vt="look"]
  )::view-transition-group(champ-art),
:root[data-vt="cut"]::view-transition-group(raid-stage),
:root[data-vt="cut"]::view-transition-group(spot) {
  animation: none;
}
:root:is(
    [data-vt="next"],
    [data-vt="prev"],
    [data-vt="look"]
  )::view-transition-old(champ-art),
:root[data-vt="cut"]::view-transition-old(raid-stage),
:root[data-vt="cut"]::view-transition-old(spot) {
  animation: vt-hold 0.5s linear both;
}
:root:is(
    [data-vt="next"],
    [data-vt="prev"],
    [data-vt="look"]
  )::view-transition-new(champ-art),
:root[data-vt="cut"]::view-transition-new(raid-stage),
:root[data-vt="cut"]::view-transition-new(spot) {
  animation: vt-cut-in 0.5s var(--ease-snap) both;
}
@keyframes vt-hold {
  to {
    opacity: 1;
  }
}
@keyframes vt-wipe-in {
  from {
    clip-path: polygon(0 0, 0 0, -20% 100%, -20% 100%);
  }
  to {
    clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%);
  }
}
@keyframes vt-wipe-out {
  from {
    clip-path: polygon(0 0, 120% 0, 100% 100%, -20% 100%);
  }
  to {
    clip-path: polygon(120% 0, 120% 0, 100% 100%, 100% 100%);
  }
}
@keyframes vt-cut-in {
  from {
    clip-path: polygon(-30% 0, -10% 0, -30% 100%, -50% 100%);
  }
  to {
    clip-path: polygon(-30% 0, 150% 0, 130% 100%, -50% 100%);
  }
}
@keyframes vt-fade-out {
  to {
    opacity: 0;
  }
}
@keyframes vt-out-left {
  to {
    transform: translateX(-30%);
  }
}
@keyframes vt-out-right {
  to {
    transform: translateX(30%);
  }
}
@keyframes vt-in-right {
  from {
    transform: translateX(100%);
  }
}
@keyframes vt-in-left {
  from {
    transform: translateX(-100%);
  }
}
/* Moving between the website's pages (Home, Account) cross-fades. */
@view-transition {
  navigation: auto;
}

/* ---------- Account page (/account/) ---------- */
.acct {
  padding-block: calc(var(--bar-h) + 44px + env(safe-area-inset-top, 0px)) 56px;
  display: grid;
  gap: 18px;
  max-width: 880px;
}
.acct h1 {
  font-size: clamp(3rem, 9vw, 4.6rem);
}
.acct-card {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 22px 20px 24px;
  background: var(--ink-2);
  border-left: 5px solid var(--brand);
}
.acct-card h2 {
  font-size: 2rem;
}
.acct-sub {
  color: var(--dim);
}
.acct-sub a,
.link {
  color: var(--brand);
}
.acct-on,
.acct-forms {
  display: grid;
  gap: 18px;
}
@media (min-width: 760px) {
  .acct-forms {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.acct-form {
  display: grid;
  gap: 8px;
}
.acct-field {
  display: grid;
  gap: 8px;
}
.acct-form label {
  font: 400 1rem/1.2 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.acct-form input[type="email"],
.acct-form input[type="password"] {
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid var(--line-2);
  border-radius: 0;
  background: var(--ink);
  color: var(--paper);
  font: 400 1rem/1 var(--body);
}
.acct-form input:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
  border-color: var(--brand);
}
.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 400 1rem/1.3 var(--body) !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}
.acct-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.acct-card > .btn,
.acct-form .btn,
.acct-row .btn {
  justify-self: start;
}
.acct .btn-ghost {
  --btn-ink: var(--paper);
}
.link {
  background: none;
  border: 0;
  min-height: 44px;
  padding: 0 4px;
  font: 600 0.95rem/1 var(--body);
  text-decoration: underline;
  cursor: pointer;
}
.acct-msg {
  color: #ff9aa5;
  font-weight: 600;
}
.acct-msg.ok,
.acct-note {
  color: #7fe3a0;
  font-weight: 600;
}
.acct-who h2 {
  font-size: 2.6rem;
}
.acct-who .eyebrow {
  margin-bottom: 4px;
}
/* Sign in with Apple, styled as Apple asks (HIG): the white button on a dark
   background, the Apple logo, "Sign in with Apple" in the system font and
   sentence case, not our capitals. Same height as Sign in. */
.acct-apple {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 26px 0 22px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font:
    600 1.15rem/1 -apple-system,
    BlinkMacSystemFont,
    "SF Pro Text",
    "Helvetica Neue",
    Helvetica,
    Arial,
    sans-serif;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}
.acct-apple[hidden] {
  display: none;
}
.acct-apple:hover {
  background: #e8e8ed;
}
.acct-apple svg {
  width: 17px;
  height: 20px;
  flex: none;
  margin-top: -2px;
}
/* "Signed up with Apple?" (non-Apple devices; src/account.ts): a plain
   link, not Apple's button. The text lines up with the form's left edge,
   past the link's 4px padding. */
.acct-apple-reveal {
  justify-self: start;
  margin-left: -4px;
}
button.btn-play {
  cursor: pointer;
}
button.btn-play:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* ---------- Stats page (/stats/, admins only) ---------- */
.st-page {
  max-width: 980px;
}
.stats-on {
  display: grid;
  gap: 18px;
}
.stats-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 420px;
}
/* .btn-sm's shadow would hide the ghost outline: keep it. */
.stats-range .btn {
  box-shadow: inset 0 0 0 2px var(--line-2);
}
.stats-range .btn[aria-pressed="true"] {
  --btn-bg: var(--brand);
  --btn-ink: var(--ink);
  box-shadow: inset 0 0 0 2px var(--brand);
}
.stats-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stats-tile {
  gap: 6px;
  padding: 16px 16px 18px;
}
.stats-num {
  font: 400 clamp(2rem, 6vw, 3rem) / 1 var(--display);
  font-variant-numeric: tabular-nums;
}
@media (max-width: 520px) {
  .stats-tiles {
    grid-template-columns: 1fr;
  }
}
.stats-chart {
  position: relative;
}
.stats-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.stats-chart .grid,
.stats-chart .base {
  stroke: var(--line);
  stroke-width: 1;
}
.stats-chart .base {
  stroke: var(--line-2);
}
.stats-chart .ylab,
.stats-chart .xlab {
  fill: var(--dim);
  font: 500 12px/1 var(--body);
  font-variant-numeric: tabular-nums;
}
.stats-chart .ylab {
  text-anchor: end;
}
.stats-chart .hit {
  fill: transparent;
}
.stats-chart .fill {
  fill: var(--brand);
}
.stats-chart .bar {
  outline: none;
}
.stats-chart .bar.on .hit {
  fill: rgba(255, 255, 255, 0.06);
}
.stats-chart .bar:focus-visible .hit {
  stroke: var(--brand);
  stroke-width: 2;
}
.stats-tip {
  position: absolute;
  top: -8px;
  transform: translate(-50%, -100%);
  padding: 8px 10px;
  background: var(--paper);
  color: var(--ink);
  font: 600 0.9rem/1.2 var(--body);
  white-space: nowrap;
  pointer-events: none;
}
.stats-tip[hidden] {
  display: none;
}
.stats-foot,
.stats-note {
  font-size: 0.92rem;
}
.stats-lists {
  display: grid;
  gap: 18px;
}
@media (min-width: 960px) {
  .stats-lists {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.stats-table {
  width: 100%;
  border-collapse: collapse;
}
.stats-table th,
.stats-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font: 500 1rem/1.3 var(--body);
}
.stats-table thead th {
  color: var(--dim);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.stats-table .num {
  width: 5.5em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.stats-table tbody th {
  overflow-wrap: break-word;
  padding-right: 12px;
}
.stats-empty {
  color: var(--dim);
}

/* ---------- Back to top (to-top.js) ---------- */
/* A square block in the bottom corner, clear of the safe areas; it slides
   in once the reader is well down the page. 48 px: an easy thumb. */
.to-top {
  position: fixed;
  right: max(16px, calc(env(safe-area-inset-right, 0px) + 12px));
  bottom: max(16px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  z-index: 40;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 0;
  background: var(--brand);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--hot);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0s linear 0.2s;
}
/* Room under the footer's last line: at the very bottom of the page the
   button sits below the footer's links, never on them. */
.foot {
  padding-bottom: calc(48px + 28px + env(safe-area-inset-bottom, 0px));
}
.to-top.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}
.to-top:hover {
  background: var(--paper);
}
.to-top:focus-visible {
  outline: 3px solid var(--paper);
  outline-offset: 3px;
}
.to-top svg {
  display: block;
}

/* The device's Reduce Motion, before site.js has run (and without it):
   nothing moves on its own. site.js then pauses the loops too, and the
   stages' play button starts them for a reader who wants them. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  html:not(.js) *,
  html:not(.js) *::before,
  html:not(.js) *::after {
    animation: none !important;
    transition: none !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .ticker {
    overflow-x: auto;
  }
}
[data-motion="paused"] .ticker {
  overflow-x: auto;
}

/* ---------- /iphone/: the iPhone beta's short link ---------- */
.go-page {
  display: grid;
  gap: 16px;
  align-content: center;
  min-height: 100svh;
  max-width: 34em;
  padding-block: 40px;
}
.go-page h1 {
  font-size: clamp(2.4rem, 9vw, 4rem);
}
.go-page p {
  color: var(--dim);
}
/* A phone stacks the hero's two buttons: one column, one width. */
@media (max-width: 480px) {
  .hero .cta {
    display: grid;
    width: max-content;
    max-width: 100%;
  }
}
