/* WillowinWorlds CSS: BlastBlast! page identity (games/blastblast.html). Loaded after upcoming-game.css.
   Signature: the one-button blast. A pilot hops along dashed ballistic arcs, an expanding shock ring marks every blast,
   speed streaks follow it and gates wait at the top of each arc; the painted world drifts behind.
   Motion language: punchy bursts and arcs. Everything animated is transform/opacity only and lives under
   prefers-reduced-motion: no-preference; the base rules below are the finished static composition. */

body[data-game="blastblast"] {
  --bb-ember: #ff8d3b;
  --bb-ember-hot: #ff5a36;
  --bb-gold: #ffd36a;
  --bb-glow: #4ff3df;
  --bb-hop: 1.6s;
  --bb-run: 6.4s;
}

/* ---------- Hero copy ---------- */
body[data-game="blastblast"] .ug-hero {
  position: relative;
  isolation: isolate;
}

body[data-game="blastblast"] .ug-hero::before {
  content: "";
  position: absolute;
  inset: -6% -12% -4% 34%;
  z-index: -1;
  background: radial-gradient(ellipse 60% 55% at 62% 42%, color-mix(in srgb, var(--bb-ember) 30%, transparent), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 62% 42%, #000 35%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 62% 42%, #000 35%, transparent 75%);
  pointer-events: none;
}

body[data-game="blastblast"] .ug-hero-copy h1 {
  display: flex;
  flex-wrap: wrap;
  column-gap: 0;
  font-weight: 900;
  font-style: italic;
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: nowrap;
}

body[data-game="blastblast"] .bb-t2 {
  color: var(--ug-accent);
  transform: translateY(-0.04em) skewX(-4deg);
  text-shadow: 0 0.06em 0 color-mix(in srgb, var(--bb-ember) 28%, transparent);
}

body[data-game="blastblast"] .ug-tagline {
  font-style: italic;
  letter-spacing: -0.01em;
}

body[data-game="blastblast"] .ug-pill {
  border-radius: 6px;
  transform: skewX(-9deg);
}

body[data-game="blastblast"] .ug-pill::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-inline-end: 8px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

/* Status note reads like hazard tape on a mission brief. */
body[data-game="blastblast"] .ug-status-note {
  position: relative;
  padding-inline-start: 26px;
  border-inline-start-width: 1px;
}

body[data-game="blastblast"] .ug-status-note::before {
  content: "";
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 10px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: repeating-linear-gradient(135deg, var(--bb-ember) 0 6px, var(--ug-bg) 6px 12px);
}

body[data-game="blastblast"] .btn {
  transition:
    transform 0.18s cubic-bezier(0.2, 0.9, 0.2, 1.2),
    box-shadow 0.18s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

body[data-game="blastblast"] .btn-primary {
  box-shadow:
    0 5px 0 color-mix(in srgb, var(--bb-ember) 55%, #000),
    0 16px 30px color-mix(in srgb, var(--bb-ember) 30%, transparent);
}

body[data-game="blastblast"] .btn-primary:hover {
  transform: translateY(-3px) scale(1.025);
  box-shadow:
    0 8px 0 color-mix(in srgb, var(--bb-ember) 55%, #000),
    0 22px 34px color-mix(in srgb, var(--bb-ember) 36%, transparent);
}

body[data-game="blastblast"] .btn-primary:active {
  transform: translateY(3px) scale(0.99);
  box-shadow: 0 2px 0 color-mix(in srgb, var(--bb-ember) 55%, #000);
}

body[data-game="blastblast"] .btn-ghost:hover {
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--bb-ember) 14%, var(--ug-card));
}

/* ---------- Hero stage ---------- */
.bb-stage {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--bb-ember) 48%, var(--ug-line));
  border-width: 2px;
  background: var(--ug-card);
}

.bb-scene {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  container-type: inline-size;
  background: linear-gradient(180deg, #f2a35f, #ffd9a1 58%, #f3a76d);
}

.bb-scene > * {
  position: absolute;
}

/* Painted world: four copies side by side, every second one mirrored, so the drift loops without a seam. */
.bb-world {
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bb-world-track {
  display: flex;
  width: 568cqw;
  height: 100%;
  transform: translateX(-30cqw);
}

.bb-world-track img {
  flex: none;
  width: 142cqw;
  height: 100%;
  object-fit: cover;
}

.bb-world-track .is-mirror {
  transform: scaleX(-1);
}

.bb-scene::before,
.bb-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.bb-scene::before {
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 80% 0%, rgba(255, 224, 170, 0.5), transparent 70%),
    linear-gradient(180deg, rgba(255, 205, 150, 0.4) 0, rgba(255, 190, 140, 0.34) 55%, rgba(9, 19, 38, 0.34));
}

.bb-scene::after {
  z-index: 9;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2), inset 0 -18cqw 22cqw -14cqw rgba(9, 19, 38, 0.4);
}

/* Dashed ballistic arcs: the path the pilot rides. */
.bb-arcs {
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bb-arcs path {
  fill: none;
  stroke: #006f65;
  stroke-opacity: 0.8;
  stroke-width: 0.6;
  stroke-linecap: round;
  stroke-dasharray: 1.5 1.7;
}

/* Gates at the top of an arc: a bezel, studs, a teal glass face. */
.bb-gate {
  z-index: 3;
  top: 12cqw;
  width: 28cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side, transparent 0 74%, #35e8d3 75% 78%, transparent 79%),
    radial-gradient(circle closest-side, rgba(0, 160, 144, 0.24) 0 74%, transparent 75%),
    radial-gradient(circle closest-side, transparent 0 80%, #7e2616 81%, #c9472b 87%, #e8683a 93%, #7e2616 100%);
  box-shadow: 0 0 5cqw rgba(79, 243, 223, 0.38);
}

.bb-gate--one {
  left: 31.5cqw;
}

.bb-gate--two {
  left: 69.5cqw;
}

.bb-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from -5deg, #ffd36a 0 10deg, transparent 10deg 45deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 0 82%, #000 83% 92%, transparent 93%);
  mask-image: radial-gradient(circle closest-side, transparent 0 82%, #000 83% 92%, transparent 93%);
}

.bb-gate::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0.9cqw solid var(--bb-glow);
  border-radius: 50%;
  opacity: 0;
}

/* Speed streaks, a few thin lines made of gradients. */
.bb-streaks {
  top: 0;
  left: 0;
  z-index: 7;
  width: 130cqw;
  height: 100%;
  opacity: 0.55;
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent) 8cqw 17cqw / 26cqw 0.5cqw no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 241, 201, 0.8), transparent) 52cqw 24cqw / 34cqw 0.4cqw no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent) 22cqw 33cqw / 40cqw 0.5cqw no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 241, 201, 0.8), transparent) 78cqw 40cqw / 30cqw 0.4cqw no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.85), transparent) 40cqw 49cqw / 36cqw 0.5cqw no-repeat,
    linear-gradient(90deg, transparent, rgba(255, 241, 201, 0.8), transparent) 96cqw 58cqw / 26cqw 0.4cqw no-repeat;
}

/* Foreground ground: the capture's own terrain texture under a rolling-hill mask. */
.bb-hills {
  bottom: 0;
  left: 0;
  z-index: 4;
  width: 260cqw;
  height: 15cqw;
  background:
    linear-gradient(180deg, rgba(255, 140, 90, 0.28), transparent 38%),
    url("../assets/upcoming/blastblast/hero-1280.webp") 0 -75cqw / 160cqw auto repeat-x;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 15' preserveAspectRatio='none'%3E%3Cpath d='M0 9C14 9 16 3 28 3S42 10 54 10 68 9 80 9V15H0Z'/%3E%3C/svg%3E") 0 0 / 80cqw 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 15' preserveAspectRatio='none'%3E%3Cpath d='M0 9C14 9 16 3 28 3S42 10 54 10 68 9 80 9V15H0Z'/%3E%3C/svg%3E") 0 0 / 80cqw 100% repeat-x;
  transform: translateX(-40cqw);
}

/* Shock rings: one per blast, centred on the nozzle at the moment of the blast. */
.bb-ring {
  z-index: 5;
  top: 46.4cqw;
  width: 18cqw;
  aspect-ratio: 1;
  border: 1.3cqw solid #fff6d8;
  border-radius: 50%;
  background: radial-gradient(circle, #fffbe8 0 16%, rgba(255, 190, 90, 0.7) 34%, rgba(255, 110, 40, 0.28) 56%, transparent 64%);
  box-shadow:
    0 0 0 2cqw rgba(255, 120, 30, 0.85),
    0 0 0 3.6cqw rgba(255, 90, 54, 0.38),
    inset 0 0 3cqw rgba(255, 200, 120, 0.8),
    0 0 5cqw rgba(255, 130, 40, 0.8);
  opacity: 0;
}

.bb-ring--one {
  left: 5.5cqw;
  opacity: 0.6;
  transform: translateX(-3cqw) scale(1.1);
}

/* The moving blast: one ring that rides on the pilot's flight and goes off at the bottom of every hop (it replaces three
   separate rings, one animation instead of three). Its own motion cancels the flight, so each ring stays where its blast happened. */
.bb-ring--blast {
  position: absolute;
  top: 8.4cqw;
  left: -9cqw;
  z-index: -1;
  opacity: 0;
}

/* The pilot (cutout of the editor capture) and its hop. */
.bb-flight {
  top: 38cqw;
  left: 0;
  z-index: 6;
  width: 25cqw;
  transform: translateX(33cqw);
}

.bb-lift {
  transform: translateY(-24cqw) rotate(-5deg);
}

.bb-pilot {
  display: block;
  width: 100%;
  height: auto;
  transform-origin: 50% 72%;
  filter: drop-shadow(0 1.2cqw 1.6cqw rgba(60, 20, 10, 0.35));
}

/* Text-free HUD in the game's own language: a pressure gauge with ticks, and a six-node route rail. */
.bb-hud {
  top: 3cqw;
  left: 3cqw;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 2.4cqw;
  padding: 1.7cqw 2.6cqw;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 99px;
  background: rgba(9, 19, 38, 0.66);
}

.bb-gauge {
  position: relative;
  display: block;
  width: 26cqw;
  height: 2.6cqw;
  overflow: hidden;
  border-radius: 99px;
  background: linear-gradient(90deg, #1dc9b5 0 42%, #ffb13b 42% 76.9%, #ff5a36 77% 100%);
}

.bb-gauge i {
  position: absolute;
  inset: 0;
  background: #1a2538;
  transform: translateX(64%);
}

.bb-gauge::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, transparent 0 calc(10% - 1px), rgba(9, 19, 38, 0.85) calc(10% - 1px) 10%);
}

.bb-rail {
  display: flex;
  align-items: center;
  gap: 1.1cqw;
}

.bb-rail b {
  display: block;
  width: 2.1cqw;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.bb-rail b:nth-child(-n + 3) {
  background: var(--bb-ember);
  box-shadow: 0 0 1.4cqw rgba(255, 141, 59, 0.8);
}

.bb-stage figcaption {
  border-top: 2px solid color-mix(in srgb, var(--bb-ember) 40%, var(--ug-line));
  background: var(--ug-card-2);
  color: var(--ug-muted);
}

/* ---------- Page sections ---------- */
body[data-game="blastblast"] .eyebrow {
  border-radius: 6px;
  transform: skewX(-9deg);
  font-weight: 850;
}

body[data-game="blastblast"] .eyebrow::before {
  width: 10px;
  height: 10px;
  border: 2px solid var(--ug-fill);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ug-fill) 26%, transparent);
}

body[data-game="blastblast"] .game-page-section h2 {
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.02em;
}

body[data-game="blastblast"] .game-page-section h2::after {
  content: "";
  display: block;
  width: 3.4rem;
  height: 5px;
  margin-top: 0.6rem;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--ug-fill), var(--bb-ember-hot) 70%, transparent);
  transition: width 0.45s cubic-bezier(0.2, 0.9, 0.2, 1);
}

body[data-game="blastblast"] .soft-card:hover h2::after {
  width: 7rem;
}

body[data-game="blastblast"] .soft-card {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-game="blastblast"] .soft-card:hover {
  border-color: color-mix(in srgb, var(--bb-ember) 46%, var(--ug-line));
}

/* Facts: instrument cells with a gauge tick on the left. */
.ug-facts .game-page-facts > div {
  border-inline-start: 4px solid var(--ug-fill);
  border-radius: 6px var(--radius-md) var(--radius-md) 6px;
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1.2), border-color 0.25s ease;
}

.ug-facts .game-page-facts > div:hover {
  transform: translateY(-3px);
  border-color: var(--bb-ember-hot);
}

body[data-game="blastblast"] .game-page-facts dt {
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* How it plays: three pictograms with an idle motion each (needle, ring, dot through a gate). */
.ug-steps li {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1.2), border-color 0.3s ease, box-shadow 0.3s ease;
}

.ug-steps li:hover {
  transform: translateY(-4px);
  border-color: var(--bb-ember);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--bb-ember) 22%, transparent);
}

.ug-steps li strong {
  padding-inline-end: 4.2rem;
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 900;
}

.ug-steps li::before,
.ug-steps li::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  pointer-events: none;
}

.ug-steps li::before {
  border: 2px solid color-mix(in srgb, var(--bb-ember) 72%, transparent);
  background: radial-gradient(circle, color-mix(in srgb, var(--bb-ember) 22%, transparent) 0 58%, transparent 62%);
}

/* 1 Pump: a gauge needle that swings up when the card is hovered. */
.ug-steps li:nth-child(1)::after {
  background: linear-gradient(var(--ug-accent), var(--ug-accent)) 50% 7px / 3px 19px no-repeat;
  transform: rotate(-38deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1.2);
}

.ug-steps li:nth-child(1):hover::after {
  transform: rotate(58deg);
}

/* 2 Blast: a ring that has just gone off. */
.ug-steps li:nth-child(2)::after {
  border: 2px solid var(--ug-accent);
  opacity: 0.5;
  transform: scale(0.8);
}

/* 3 Thread the gates: a dot that passes through the ring when the card is hovered. */
.ug-steps li:nth-child(3)::before {
  border-style: dashed;
}

.ug-steps li:nth-child(3)::after {
  top: 33px;
  right: 14px;
  width: 10px;
  height: 10px;
  background: var(--ug-accent);
  transform: translateX(-34px);
  transition: transform 0.7s cubic-bezier(0.3, 0.9, 0.3, 1);
}

.ug-steps li:nth-child(3):hover::after {
  transform: translateX(-8px);
}

/* Features: instrument panels with a numbered header and a ruler that stretches on hover. */
.ug-features {
  counter-reset: bbf;
}

.ug-features .detail-card {
  position: relative;
  padding-top: 2.6rem;
  counter-increment: bbf;
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1.2), border-color 0.28s ease, box-shadow 0.28s ease;
}

.ug-features .detail-card::before {
  content: counter(bbf, decimal-leading-zero);
  position: absolute;
  top: 12px;
  right: 16px;
  color: var(--ug-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.ug-features .detail-card::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  width: calc(100% - 96px);
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--ug-fill) 0 2px, transparent 2px 9px);
  opacity: 0.7;
  transform: scaleX(0.3);
  transform-origin: left;
  transition: transform 0.5s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.ug-features .detail-card:hover {
  transform: translateY(-4px);
  border-color: var(--bb-ember);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--bb-ember) 20%, transparent);
}

.ug-features .detail-card:hover::after {
  transform: scaleX(1);
}

.ug-features .detail-card h3 {
  font-style: italic;
  font-weight: 900;
}

/* Direction list: a ring instead of a diamond. */
body[data-game="blastblast"] .ug-next li::before {
  width: 14px;
  height: 14px;
  border: 2px solid var(--ug-fill);
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--ug-fill) 22%, transparent);
  transform: none;
}

body[data-game="blastblast"] .ug-next li {
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1.2), border-color 0.25s ease;
}

body[data-game="blastblast"] .ug-next li:hover {
  transform: translateX(4px);
  border-color: var(--bb-ember);
}

/* Gallery. */
.ug-shot img {
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.ug-shot:hover img {
  transform: scale(1.05);
}

body[data-game="blastblast"] .ug-shot {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

body[data-game="blastblast"] .ug-shot:hover {
  border-color: var(--bb-ember);
  box-shadow: 0 14px 30px color-mix(in srgb, var(--bb-ember) 20%, transparent);
}

/* FAQ. */
body[data-game="blastblast"] .ug-faq .detail-card {
  border-inline-start: 4px solid var(--ug-accent-2);
  transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.2, 1.2), border-color 0.25s ease;
}

body[data-game="blastblast"] .ug-faq .detail-card:hover {
  transform: translateX(4px);
  border-color: var(--bb-ember);
}

/* Vote: a blast ring keeps going off in the corner. */
.ug-vote {
  position: relative;
  overflow: clip;
}

.ug-vote::before,
.ug-vote::after {
  content: "";
  position: absolute;
  top: 26px;
  right: 30px;
  width: 84px;
  height: 84px;
  border: 3px solid var(--bb-ember);
  border-radius: 50%;
  pointer-events: none;
}

.ug-vote::before {
  opacity: 0.55;
  transform: scale(0.55);
}

.ug-vote::after {
  opacity: 0.3;
  transform: scale(1);
}

body[data-game="blastblast"] .social-link {
  transition: transform 0.2s cubic-bezier(0.2, 0.9, 0.2, 1.2), border-color 0.2s ease, background 0.2s ease;
}

body[data-game="blastblast"] .social-link:hover {
  transform: translateY(-3px);
}

/* ---------- Page-wide world ---------- */
/* The painted citadel from the captures sits fixed behind everything; hazards drift across it and speed lines run through it.
   Sections keep their cards (slightly see-through), so the world shows in the margins, the gaps and faintly behind the cards. */
body[data-game="blastblast"] {
  --bb-streak: 255, 214, 150;
}

body[data-game="blastblast"][data-theme="light"] {
  --bb-streak: 255, 130, 56;
}

body[data-game="blastblast"] .game-detail-shell {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

body[data-game="blastblast"] .game-detail-shell > :is(.ug-hero, .game-page-grid) {
  position: relative;
  z-index: 2;
}

body[data-game="blastblast"] :is(.lab-related, .game-footer) {
  position: relative;
  z-index: 3;
}

body[data-game="blastblast"] .lab-related {
  overflow-x: clip;
}

/* Page-long rings that scroll with the content, one cluster every screen or two. */
body[data-game="blastblast"] .game-detail-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle closest-side, transparent 0 54%, color-mix(in srgb, var(--bb-ember) 26%, transparent) 55% 56.5%, transparent 57% 70%, color-mix(in srgb, var(--bb-ember) 16%, transparent) 71% 72%, transparent 73% 86%, color-mix(in srgb, var(--bb-ember) 10%, transparent) 87% 88%, transparent 89%) 104% 22% / 520px 520px no-repeat,
    radial-gradient(circle closest-side, transparent 0 54%, color-mix(in srgb, var(--bb-ember) 22%, transparent) 55% 56.5%, transparent 57% 70%, color-mix(in srgb, var(--bb-ember) 14%, transparent) 71% 72%, transparent 73% 86%, color-mix(in srgb, var(--bb-ember) 9%, transparent) 87% 88%, transparent 89%) -6% 52% / 440px 440px no-repeat,
    radial-gradient(circle closest-side, transparent 0 54%, color-mix(in srgb, var(--bb-ember) 24%, transparent) 55% 56.5%, transparent 57% 70%, color-mix(in srgb, var(--bb-ember) 15%, transparent) 71% 72%, transparent 73% 86%, color-mix(in srgb, var(--bb-ember) 9%, transparent) 87% 88%, transparent 89%) 106% 84% / 480px 480px no-repeat;
}

.bb-page-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  isolation: isolate;
}

.bb-page-backdrop > * {
  position: absolute;
}

.bb-page-backdrop::before,
.bb-page-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Veil: dense on the left where the hero text sits, lighter over the art on the right. */
.bb-page-backdrop::before {
  z-index: 4;
}

.bb-page-backdrop::after {
  z-index: 5;
}

body[data-game="blastblast"][data-theme="dark"] .bb-page-backdrop::before {
  background:
    linear-gradient(90deg, rgba(9, 19, 38, 0.68) 0, rgba(9, 19, 38, 0.46) 50%, rgba(9, 19, 38, 0.22) 100%),
    radial-gradient(ellipse 60% 50% at 84% 12%, rgba(255, 141, 59, 0.24), transparent 70%);
}

body[data-game="blastblast"][data-theme="dark"] .bb-page-backdrop::after {
  background: linear-gradient(180deg, transparent 52%, rgba(6, 13, 25, 0.72));
}

body[data-game="blastblast"][data-theme="light"] .bb-page-backdrop::before {
  background:
    linear-gradient(90deg, rgba(255, 241, 231, 0.74) 0, rgba(255, 241, 231, 0.5) 50%, rgba(255, 241, 231, 0.26) 100%),
    radial-gradient(ellipse 60% 50% at 84% 12%, rgba(255, 141, 59, 0.2), transparent 70%);
}

body[data-game="blastblast"][data-theme="light"] .bb-page-backdrop::after {
  background: linear-gradient(180deg, transparent 56%, rgba(255, 214, 180, 0.6));
}

.bb-bg-far {
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.bb-bg-far img {
  display: block;
  width: 114vw;
  max-width: none;
  height: 100%;
  object-fit: cover;
  object-position: 30% 70%;
}

/* Hazards drifting past: two identical halves side by side, so sliding by one half loops without a seam. */
.bb-bg-mid {
  top: 0;
  left: 0;
  z-index: 3;
  display: flex;
  width: 200vw;
  height: 100%;
  opacity: 0.5;
  transform: translateX(-6vw);
}

.bb-bg-half {
  position: relative;
  flex: 0 0 100vw;
  height: 100%;
}

.bb-bg-half > * {
  position: absolute;
}

.bb-bg-gate {
  border-radius: 50%;
  aspect-ratio: 1;
  background:
    radial-gradient(circle closest-side, transparent 0 74%, #35e8d3 75% 78%, transparent 79%),
    radial-gradient(circle closest-side, rgba(0, 160, 144, 0.24) 0 74%, transparent 75%),
    radial-gradient(circle closest-side, transparent 0 80%, #7e2616 81%, #c9472b 87%, #e8683a 93%, #7e2616 100%);
  box-shadow: 0 0 4vmin rgba(79, 243, 223, 0.35);
}

.bb-bg-gate::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: repeating-conic-gradient(from -5deg, #ffd36a 0 10deg, transparent 10deg 45deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 0 82%, #000 83% 92%, transparent 93%);
  mask-image: radial-gradient(circle closest-side, transparent 0 82%, #000 83% 92%, transparent 93%);
}

.bb-bg-gate--a {
  top: 16vh;
  left: 9vw;
  width: 24vmin;
}

.bb-bg-gate--b {
  top: 46vh;
  left: 58vw;
  width: 15vmin;
}

/* A red-gold bar hazard, cropped from the capture. */
.bb-bg-bar {
  top: 68vh;
  left: 31vw;
  width: 26vmin;
  height: 5.3vmin;
  border-radius: 99px;
  background: url("../assets/upcoming/blastblast/gallery-hazards.webp") -159.7vmin -58vmin / 187.7vmin auto no-repeat;
  transform: rotate(-14deg);
}

.bb-bg-pole {
  bottom: -2vh;
  left: 83vw;
  width: 1.1vmin;
  height: 46vh;
  border-radius: 99px 99px 0 0;
  background: linear-gradient(90deg, #232a3a, #0d111b);
}

.bb-bg-pole::before {
  content: "";
  position: absolute;
  top: -1.4vmin;
  left: 50%;
  width: 2.4vmin;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8ff6e8, #00a090 70%);
  transform: translateX(-50%);
}

/* Speed lines: 160vw wide, two copies of the same pattern, sliding by one copy (axis-aligned, so it is only moved, never redrawn). */
.bb-bg-streaks {
  top: 0;
  left: 0;
  z-index: 2;
  width: 160vw;
  height: 100%;
  opacity: 0.55;
  background:
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.5), transparent) 6vw 14% / 16vw 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.4), transparent) 30vw 31% / 22vw 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.55), transparent) 52vw 47% / 14vw 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.4), transparent) 66vw 63% / 20vw 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.5), transparent) 14vw 76% / 18vw 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.35), transparent) 44vw 88% / 24vw 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.5), transparent) 86vw 14% / 16vw 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.4), transparent) 110vw 31% / 22vw 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.55), transparent) 132vw 47% / 14vw 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.4), transparent) 146vw 63% / 20vw 2px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.5), transparent) 94vw 76% / 18vw 3px no-repeat,
    linear-gradient(90deg, transparent, rgba(var(--bb-streak), 0.35), transparent) 124vw 88% / 24vw 2px no-repeat;
}

/* Far blasts: warm glow at the edges that flares and dies. */
.bb-bg-glow {
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 36% 32% at 88% 22%, var(--bb-flare), transparent 70%),
    radial-gradient(ellipse 34% 30% at 6% 82%, var(--bb-flare-2), transparent 70%);
}

/* Shock rings from the hero stage: four concentric rings, each flashing in turn from the inside out, so the blast seems to travel
   (opacity only: nothing is scaled or redrawn). They live in the hero and scroll away with it, so they never pass behind the text
   cards below; the biggest one stays inside the right half so it never reaches the hero copy. */
.bb-hero-waves {
  --cx: calc(50% + min(1180px, 100vw - 40px) * 0.26);
  --cy: 44%;
  position: absolute;
  top: calc(-1 * clamp(34px, 5vw, 62px));
  right: 0;
  bottom: 0;
  left: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bb-hero-waves > span {
  position: absolute;
  top: var(--cy);
  left: var(--cx);
  width: 0;
  height: 0;
}

.bb-hero-waves i {
  --d: 12vmax;
  position: absolute;
  top: calc(var(--d) / -2);
  left: calc(var(--d) / -2);
  width: var(--d);
  height: var(--d);
  border: 3px solid var(--bb-wave);
  border-radius: 50%;
  background: radial-gradient(circle closest-side, transparent 72%, var(--bb-wave-fill));
  opacity: 0;
}

.bb-hero-waves i::before {
  content: "";
  position: absolute;
  inset: calc(var(--d) * 0.035);
  border: 2px dashed var(--bb-wave-2);
  border-radius: 50%;
}

.bb-hero-waves i:nth-child(2) { --d: 22vmax; }
.bb-hero-waves i:nth-child(3) { --d: 33vmax; }
.bb-hero-waves i:nth-child(4) { --d: 44vmax; }
.bb-hero-waves i:nth-child(5) { display: none; }

/* Debris and embers live in lanes: full strength beside the content, and a low floor behind it, so the bright chunks never lower the
   contrast of the translucent cards' text (the small embers keep more of their strength, they are too small to matter). */
.bb-bg-lane {
  inset: 0;
  z-index: 6;
  overflow: hidden;
}

.bb-bg-lane--embers {
  z-index: 7;
}

/* Debris thrown out by the blasts: steel shards and a few red-hot chunks, two copies side by side so the drift loops. */
.bb-bg-debris {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  width: 200vw;
  height: 100%;
  opacity: 0.4;
}

.bb-bg-debris .bb-bg-half i {
  --x: 10;
  --y: 20;
  --s: 3.4;
  --r: 0deg;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--s) * 1vmin);
  aspect-ratio: 1.5;
  background: linear-gradient(120deg, var(--bb-shard-hi) 0 12%, var(--bb-shard-mid) 13% 58%, var(--bb-shard-lo));
  clip-path: polygon(0 62%, 62% 0, 100% 38%, 24% 100%);
  transform: rotate(var(--r));
}

/* Three slivers: a long quad, a spike and a notched plate. */
.bb-bg-debris .bb-bg-half i:nth-child(3n + 2) {
  clip-path: polygon(0 100%, 58% 0, 100% 46%);
}

.bb-bg-debris .bb-bg-half i:nth-child(3n) {
  clip-path: polygon(0 20%, 46% 0, 100% 14%, 78% 62%, 52% 100%, 20% 70%);
}

.bb-bg-debris .bb-bg-half i:nth-child(1) { --x: 6; --y: 18; --s: 4.6; --r: 24deg; }
.bb-bg-debris .bb-bg-half i:nth-child(2) { --x: 14; --y: 64; --s: 3; --r: -40deg; }
.bb-bg-debris .bb-bg-half i:nth-child(3) { --x: 27; --y: 36; --s: 3.6; --r: 70deg; }
.bb-bg-debris .bb-bg-half i:nth-child(4) { --x: 38; --y: 82; --s: 5.4; --r: 15deg; }
.bb-bg-debris .bb-bg-half i:nth-child(5) { --x: 49; --y: 12; --s: 2.6; --r: 110deg; }
.bb-bg-debris .bb-bg-half i:nth-child(6) { --x: 58; --y: 52; --s: 3.2; --r: -20deg; }
.bb-bg-debris .bb-bg-half i:nth-child(7) { --x: 69; --y: 28; --s: 5; --r: 200deg; }
.bb-bg-debris .bb-bg-half i:nth-child(8) { --x: 78; --y: 74; --s: 2.8; --r: 60deg; }
.bb-bg-debris .bb-bg-half i:nth-child(9) { --x: 90; --y: 44; --s: 4; --r: -65deg; }
.bb-bg-debris .bb-bg-half i:nth-child(10) { --x: 96; --y: 90; --s: 3.2; --r: 140deg; }

/* The red-hot chunks. */
.bb-bg-debris .bb-bg-half i:nth-child(2),
.bb-bg-debris .bb-bg-half i:nth-child(5),
.bb-bg-debris .bb-bg-half i:nth-child(8) {
  background: linear-gradient(120deg, #ffd36a 0 14%, #ff5a36 15% 58%, #7e2616);
}

/* Embers and sparks rising: a tile of glowing dots, two tiles tall, sliding by one tile. */
.bb-bg-embers {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 200vh;
  opacity: 0.7;
  background-repeat: repeat-y;
  background-size: 100% 50%;
  background-image:
    radial-gradient(circle 10px at 79.4% 9.3%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 13px at 56.4% 69.6%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 10px at 40.7% 61.0%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 16px at 97.8% 35.6%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 13px at 56.9% 86.3%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 13px at 29.9% 59.9%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 10px at 6.9% 5.2%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 16px at 22.6% 83.1%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 13px at 27.4% 40.7%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 13px at 32.5% 76.1%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 16px at 79.4% 49.1%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 13px at 79.9% 31.2%, var(--bb-e2) 0 30%, transparent 100%),
    radial-gradient(circle 2px at 65.8% 24.8%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 5.5px at 41.3% 81.7%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 41.5% 71.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 15.1% 16.3%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 16.8% 47.2%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 84.4% 37.2%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 60.5% 29.2%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 10.3% 14.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2px at 40.7% 17.9%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 56.1% 39.6%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 29.3% 47.2%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 17.6% 95.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 45.4% 39.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 45.1% 51.9%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 5.5px at 97.2% 63.3%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 33.9% 26.9%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 42.8% 27.6%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 52.4% 91.1%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 93.2% 91.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 14.8% 23.9%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 94.1% 86.8%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 89.6% 75.1%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 92.7% 51.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2px at 82.1% 60.9%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 34.3% 9.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 6.1% 93.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 77.8% 15.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 81.1% 95.9%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 64.6% 53.5%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2px at 67.5% 7.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 5.5px at 33.5% 81.8%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 96.9% 29.3%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 68.9% 75.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 71.1% 94.7%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 54.8% 14.5%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 5.5px at 71.4% 41.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 58.9% 47.7%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2px at 17.5% 57.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 96.3% 16.5%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3.5px at 57.9% 9.1%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 71.4% 85.1%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 2.5px at 10.2% 37.8%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 3px at 77.8% 72.0%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(circle 4.5px at 41.2% 95.4%, var(--bb-e0) 0 36%, var(--bb-e1) 40% 70%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 84.2% 83.2%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 20.1% 74.6%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 2.6% 51.2%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 34.8% 96.6%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 95.9% 5.4%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 3.4% 63.4%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 4.8% 30.1%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 47.9% 4.7%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 5.4% 86.8%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 70.7% 14.1%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 15.5% 36.2%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 22.3% 7.9%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 3.2% 74.8%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 73.0% 62.3%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 29.9% 17.0%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%),
    radial-gradient(ellipse 1.8px 9px at 53.0% 57.3%, var(--bb-e0) 0 40%, var(--bb-e1) 60%, transparent 100%);
}

/* Soft scrims behind the two blocks of text that sit straight on the world (hero copy, related worlds); they fade out, no box. */
body[data-game="blastblast"] .ug-hero-copy,
body[data-game="blastblast"] .lab-related-inner {
  position: relative;
  isolation: isolate;
}

body[data-game="blastblast"] .ug-hero-copy::before,
body[data-game="blastblast"] .lab-related-inner::before {
  content: "";
  position: absolute;
  inset: -56px -96px;
  z-index: -1;
  pointer-events: none;
  background: var(--bb-scrim);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent), linear-gradient(180deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 96px, #000 calc(100% - 96px), transparent), linear-gradient(180deg, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

body[data-game="blastblast"] .lab-related-inner::before {
  inset: -48px -80px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 80px, #000 calc(100% - 80px), transparent), linear-gradient(180deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 80px, #000 calc(100% - 80px), transparent), linear-gradient(180deg, transparent, #000 48px, #000 calc(100% - 48px), transparent);
}

body[data-game="blastblast"][data-theme="dark"] {
  --bb-scrim: rgba(9, 19, 38, 0.84);
  --bb-e0: #fff0c2;
  --bb-e1: rgba(255, 141, 59, 0.9);
  --bb-e2: rgba(255, 106, 40, 0.3);
  --bb-wave: rgba(255, 177, 77, 0.85);
  --bb-wave-2: rgba(255, 211, 106, 0.6);
  --bb-wave-fill: rgba(255, 106, 40, 0.3);
  --bb-wave-glow: rgba(255, 90, 54, 0.8);
  --bb-flare: rgba(255, 106, 40, 0.34);
  --bb-flare-2: rgba(255, 70, 40, 0.26);
  --bb-shard-hi: #8b97b6;
  --bb-shard-mid: #2a3347;
  --bb-shard-lo: #0e121d;
}

body[data-game="blastblast"][data-theme="light"] {
  --bb-scrim: rgba(255, 241, 231, 0.88);
  --bb-e0: #ffd27a;
  --bb-e1: rgba(232, 80, 30, 0.9);
  --bb-e2: rgba(232, 100, 40, 0.26);
  --bb-wave: rgba(201, 71, 43, 0.75);
  --bb-wave-2: rgba(201, 71, 43, 0.55);
  --bb-wave-fill: rgba(232, 104, 58, 0.26);
  --bb-wave-glow: rgba(232, 104, 58, 0.6);
  --bb-flare: rgba(255, 141, 59, 0.36);
  --bb-flare-2: rgba(255, 120, 60, 0.28);
  --bb-shard-hi: #e9c7a6;
  --bb-shard-mid: #8a4a36;
  --bb-shard-lo: #4a2a22;
}

/* Cards stay readable but let the world show through a little. */
body[data-game="blastblast"] .soft-card {
  background: linear-gradient(160deg, color-mix(in srgb, var(--ug-card) 92%, transparent), color-mix(in srgb, var(--ug-card) 86%, transparent));
}

@media (max-width: 920px) {
  /* The hero stacks: the shock rings go off behind the stage, centred. */
  .bb-hero-waves {
    --cx: 50%;
    --cy: 66%;
  }

  /* Text spans the full width: an even, denser veil. */
  body[data-game="blastblast"][data-theme="dark"] .bb-page-backdrop::before {
    background: linear-gradient(180deg, rgba(9, 19, 38, 0.82), rgba(9, 19, 38, 0.74));
  }

  body[data-game="blastblast"][data-theme="light"] .bb-page-backdrop::before {
    background: linear-gradient(180deg, rgba(255, 241, 231, 0.84), rgba(255, 241, 231, 0.76));
  }
}

@media (max-width: 760px) {
  /* Phones: the painted backdrop, the veil, the flares, the shock rings and the embers. */
  .bb-bg-mid,
  .bb-bg-streaks,
  .bb-bg-debris,
  .bb-hero-waves i:nth-child(n + 3) {
    display: none;
  }

  body[data-game="blastblast"] .game-detail-shell::before {
    display: none;
  }
}

/* More worlds in the lab (shared .lab-related markup). */
body[data-game="blastblast"] .lab-related-title {
  font-style: italic;
  font-weight: 900;
}

body[data-game="blastblast"] .lab-related-link {
  border-inline-start: 4px solid var(--ug-fill);
  border-radius: 6px var(--radius-md) var(--radius-md) 6px;
}

body[data-game="blastblast"] .lab-related-link:hover {
  border-color: var(--bb-ember);
}

@media (max-width: 920px) {
  .bb-stage {
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
  }

  body[data-game="blastblast"] .ug-hero::before {
    inset: 44% -12% -4% -12%;
  }
}

@media (max-width: 520px) {
  .ug-vote::before,
  .ug-vote::after {
    display: none;
  }

  body[data-game="blastblast"] .ug-hero-copy h1 {
    font-size: clamp(2.2rem, 13vw, 3.4rem);
  }
}

/* ---------- Motion (transform and opacity only) ---------- */
/* Budget: 10 infinite animations on the page backdrop (art pan, glow, streaks, hazards, debris, embers, four rings), 8 in the hero stage and 2 on the cards.
   Only translate and opacity move; big layers are axis-aligned and unmasked, so nothing has to be redrawn per frame.
   Everything below is the finished static composition until motion is allowed. */
@media (prefers-reduced-motion: no-preference) {
  .bb-world-track {
    animation: bb-drift 60s linear infinite;
  }

  .bb-bg-glow {
    animation: bb-bg-flicker 9s linear infinite;
  }

  .bb-hero-waves i {
    animation: bb-bg-ring 4.4s linear infinite;
  }

  .bb-hero-waves i:nth-child(2) { animation-delay: 0.55s; }
  .bb-hero-waves i:nth-child(3) { animation-delay: 1.1s; }
  .bb-hero-waves i:nth-child(4) { animation-delay: 1.65s; }

  .bb-bg-far img {
    animation: bb-bg-pan 80s ease-in-out infinite alternate;
  }

  .bb-bg-mid {
    animation: bb-bg-drift 90s linear infinite;
  }

  .bb-bg-streaks {
    animation: bb-bg-streaks 16s linear infinite;
  }

  .bb-bg-debris {
    animation: bb-bg-debris 44s linear infinite;
  }

  .bb-bg-embers {
    animation: bb-bg-embers 30s linear infinite;
  }

  .bb-flight {
    animation: bb-run var(--bb-run) linear infinite;
  }

  .bb-lift {
    animation: bb-hop var(--bb-run) linear infinite;
  }

  .bb-pilot {
    animation: bb-kick var(--bb-hop) linear infinite;
  }

  .bb-ring--one {
    opacity: 0;
  }

  .bb-ring--blast {
    animation: bb-ring-blast var(--bb-hop) linear infinite;
  }

  .bb-streaks {
    animation: bb-streaks var(--bb-hop) linear infinite;
  }

  .bb-gate--one::after {
    animation: bb-gate-pulse var(--bb-run) linear infinite;
  }

  .bb-gauge i {
    animation: bb-gauge var(--bb-hop) linear infinite;
  }

  .ug-steps li:nth-child(2)::after {
    animation: bb-step-ring 2.8s cubic-bezier(0.1, 0.7, 0.3, 1) infinite;
  }

  .ug-vote::after {
    animation: bb-vote-ring 3.6s cubic-bezier(0.1, 0.7, 0.3, 1) infinite;
  }
}

@keyframes bb-bg-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-100vw); }
}

@keyframes bb-bg-streaks {
  from { transform: translateX(0); }
  to { transform: translateX(-80vw); }
}

/* Debris: two identical halves side by side; sliding by one half loops without a seam. */
@keyframes bb-bg-debris {
  from { transform: translateX(0); }
  to { transform: translateX(-100vw); }
}

/* Embers: the layer is two tiles tall and loops by one tile. */
@keyframes bb-bg-embers {
  from { transform: translateY(0); }
  to { transform: translateY(-100vh); }
}

/* Shock rings: a flash that fades out, one ring after the other, from the inside out. */
@keyframes bb-bg-ring {
  0%   { opacity: 0; }
  6%   { opacity: 0.95; }
  38%  { opacity: 0; }
  100% { opacity: 0; }
}

/* The castle art pans slowly behind everything. */
@keyframes bb-bg-pan {
  from { transform: translateX(0); }
  to { transform: translateX(-14vw); }
}

/* Far blasts: the glow at the edges flares and dies, off the beat of the rings. */
@keyframes bb-bg-flicker {
  0%   { opacity: 0.55; }
  5%   { opacity: 1; }
  11%  { opacity: 0.6; }
  38%  { opacity: 0.5; }
  43%  { opacity: 0.9; }
  47%  { opacity: 0.55; }
  71%  { opacity: 0.6; }
  76%  { opacity: 1; }
  83%  { opacity: 0.55; }
  100% { opacity: 0.55; }
}

@keyframes bb-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-284cqw); }
}

/* Linear in x across four hops: the pilot enters left, blasts at 14, 52 and 90 cqw, leaves right. */
@keyframes bb-run {
  from { transform: translateX(-24cqw); }
  to { transform: translateX(128cqw); }
}

/* Four hops: ease-out on the way up (the blast), ease-in on the way down. */
@keyframes bb-hop {
  0%     { transform: translateY(0) rotate(8deg); animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
  12.5%  { transform: translateY(-24cqw) rotate(-9deg); animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); }
  25%    { transform: translateY(0) rotate(8deg); animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
  37.5%  { transform: translateY(-24cqw) rotate(-9deg); animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); }
  50%    { transform: translateY(0) rotate(8deg); animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
  62.5%  { transform: translateY(-24cqw) rotate(-9deg); animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); }
  75%    { transform: translateY(0) rotate(8deg); animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94); }
  87.5%  { transform: translateY(-24cqw) rotate(-9deg); animation-timing-function: cubic-bezier(0.55, 0.085, 0.68, 0.53); }
  100%   { transform: translateY(0) rotate(8deg); }
}

/* Squash before the blast, stretch as the recoil lets go. */
@keyframes bb-kick {
  0%   { transform: scale(1.14, 0.86); animation-timing-function: ease-out; }
  7%   { transform: scale(0.93, 1.1); animation-timing-function: ease-in-out; }
  22%  { transform: scale(1, 1); }
  78%  { transform: scale(1, 1); animation-timing-function: ease-in; }
  100% { transform: scale(1.14, 0.86); }
}

/* One blast per hop. The ring rides on the pilot, so it slides back at the flight's speed (plus a little for the world)
   and stays where the blast happened; its scale follows an ease-out curve written out as steps, so one linear
   timing function serves both the slide and the burst. */
@keyframes bb-ring-blast {
  0%    { opacity: 1.00; transform: translateX(0cqw) scale(0.15); }
  1.2%  { opacity: 0.87; transform: translateX(-0.6cqw) scale(0.36); }
  3%    { opacity: 0.71; transform: translateX(-1.6cqw) scale(0.60); }
  6%    { opacity: 0.53; transform: translateX(-3.2cqw) scale(0.88); }
  10%   { opacity: 0.37; transform: translateX(-5.4cqw) scale(1.12); }
  16%   { opacity: 0.23; transform: translateX(-8.6cqw) scale(1.35); }
  24%   { opacity: 0.12; transform: translateX(-13cqw) scale(1.52); }
  34%   { opacity: 0.05; transform: translateX(-18.4cqw) scale(1.63); }
  45%   { opacity: 0.01; transform: translateX(-24.3cqw) scale(1.69); }
  56.2%, 100% { opacity: 0; transform: translateX(-30.4cqw) scale(1.7); }
}

@keyframes bb-streaks {
  0%   { opacity: 0; transform: translateX(8cqw); }
  14%  { opacity: 0.95; }
  55%  { opacity: 0.55; }
  100% { opacity: 0; transform: translateX(-24cqw); }
}

/* Two pulses in one run, one per gate: the ring flashes at the first gate, then (invisible) moves to the second gate and flashes again. */
@keyframes bb-gate-pulse {
  0%, 37.4% { opacity: 0; transform: translateX(0) scale(1); }
  37.5% { opacity: 0.95; transform: translateX(0) scale(1); animation-timing-function: cubic-bezier(0.1, 0.7, 0.3, 1); }
  49.5% { opacity: 0; transform: translateX(0) scale(1.4); }
  62.4% { opacity: 0; transform: translateX(38cqw) scale(1); }
  62.5% { opacity: 0.95; transform: translateX(38cqw) scale(1); animation-timing-function: cubic-bezier(0.1, 0.7, 0.3, 1); }
  74.5%, 100% { opacity: 0; transform: translateX(38cqw) scale(1.4); }
}

/* The gauge fills while you pump and empties at the blast. */
@keyframes bb-gauge {
  0%   { transform: translateX(6%); }
  90%  { transform: translateX(84%); }
  100% { transform: translateX(6%); }
}

@keyframes bb-step-ring {
  0%   { opacity: 0.7; transform: scale(0.35); }
  70%  { opacity: 0; transform: scale(1.5); }
  100% { opacity: 0; transform: scale(1.5); }
}

@keyframes bb-vote-ring {
  0%   { opacity: 0.6; transform: scale(0.5); }
  75%  { opacity: 0; transform: scale(1.9); }
  100% { opacity: 0; transform: scale(1.9); }
}
