/* BrickBalls - the game's own page.

   Everything under .bb is styled from the game, not the site: the Space
   hologram plates (indigo, orange glow edge, scanlines), the Carnival candy
   stripe and planks, the Bakery chalkboard, the menu's gold-rimmed indigo
   panels and chunky orange price plates, and the bubbly logo type. Only the
   header and footer around it are the site's. Colours are lifted from
   App/Theme/*Theme.swift in the game repo. */

.bb {
  --bb-ink: #0b0a1f;
  --bb-ink-2: #140f29;
  --bb-indigo: #1a1c42;
  --bb-indigo-2: #0b0d26;
  --bb-indigo-3: #262a5e;
  --bb-purple: #3b1e73;
  --bb-violet: #7b4dff;
  --bb-orange: #ff8c26;
  --bb-orange-deep: #f2560f;
  --bb-gold: #ffcc59;
  --bb-gold-2: #ffb020;
  --bb-gold-deep: #b8731a;
  --bb-teal: #59f2e6;
  --bb-cream: #fff5db;
  --bb-text: #f3f0ff;
  --bb-muted: rgba(243, 240, 255, 0.72);
  --bb-red: #db2933;
  --bb-wood: #b87a3d;
  --bb-wood-dark: #59351a;
  --bb-slate: #29333a;
  --bb-slate-2: #1f272c;
  --bb-chalk: #f7f2e6;
  --bb-pink: #ff5ea3;
  --bb-display: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Varela Round", system-ui, sans-serif;
  --bb-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --bb-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --bb-hex: polygon(16px 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 16px 100%, 0 50%);

  position: relative;
  color: var(--bb-text);
  background: var(--bb-ink);
  overflow: hidden;
}

/* ---------- Type ---------- */
.bb-wrap { max-width: 1180px; margin-inline: auto; padding-inline: 20px; }
.bb-section { position: relative; padding-block: clamp(64px, 9vw, 120px); }
.bb-section__head { max-width: 64ch; margin-bottom: clamp(28px, 4vw, 48px); }

.bb-eyebrow {
  display: inline-block;
  font-family: var(--bb-display);
  font-weight: 800; font-size: 0.8rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--bb-teal);
  text-shadow: 0 0 12px rgba(89, 242, 230, 0.55);
  margin-bottom: 10px;
}
.bb-eyebrow--chalk { color: var(--bb-pink); text-shadow: none; }

/* The logo's type: fat rounded letters, a warm gradient fill, a purple
   outline. Two layers - a stroked copy underneath, the gradient on top -
   because a stroke on gradient-clipped text paints over the fill. */
.bb-h {
  position: relative;
  font-family: var(--bb-display);
  font-weight: 900;
  font-size: clamp(1.9rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}
.bb-h--big { font-size: clamp(2.2rem, 5.4vw, 4rem); text-align: center; }
.bb-h__stroke, .bb-h__fill { display: block; }
.bb-h__stroke {
  position: absolute; inset: 0;
  user-select: none; -webkit-user-select: none; /* a decorative copy: not for Cmd-F or select-all */
  color: var(--bb-purple);
  -webkit-text-stroke: 9px var(--bb-purple);
  paint-order: stroke fill;
  filter: drop-shadow(0 6px 0 rgba(28, 12, 60, 0.9)) drop-shadow(0 14px 24px rgba(0, 0, 0, 0.45));
}
.bb-h__fill {
  position: relative;
  background: linear-gradient(180deg, #fff6c9 0%, #ffd85a 38%, #ffa02e 72%, #ff7a1f 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
@supports not (-webkit-text-stroke: 1px #000) {
  .bb-h__stroke { display: none; }
  .bb-h__fill { color: var(--bb-gold); background: none; }
}

.bb-lead { font-size: 1.1rem; line-height: 1.65; color: var(--bb-muted); margin: 14px 0 0; max-width: 60ch; }
.bb p { margin: 0; }

/* ---------- Buttons: the shop's chunky orange plate, the Space hologram pill ---------- */
.bb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 28px;
  font-family: var(--bb-display); font-weight: 800; font-size: 1.02rem;
  border-radius: 18px; border: 0; cursor: pointer;
  text-decoration: none; color: #fff; white-space: nowrap;
  transition: transform 0.18s var(--bb-pop), box-shadow 0.18s var(--bb-ease), filter 0.18s;
}
.bb-btn--plate {
  background: linear-gradient(180deg, #ffb04a 0%, #ff8c26 48%, #f2560f 100%);
  box-shadow: 0 6px 0 #a73a0a, 0 14px 30px -8px rgba(255, 120, 30, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 0 rgba(120, 40, 0, 0.5);
}
.bb-btn--plate:hover { transform: translateY(-2px) scale(1.02); filter: brightness(1.06); }
.bb-btn--plate:active { transform: translateY(3px); box-shadow: 0 2px 0 #a73a0a, 0 6px 14px -6px rgba(255, 120, 30, 0.6), inset 0 2px 0 rgba(255, 255, 255, 0.45); }
.bb-btn--static { cursor: default; }
.bb-btn--static:hover { transform: none; filter: none; }
.bb-btn__dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff6c9;
  box-shadow: 0 0 0 4px rgba(255, 246, 201, 0.3), 0 0 12px #fff;
  animation: bb-blink 1.8s ease-in-out infinite;
}
@keyframes bb-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.bb-btn--holo {
  clip-path: var(--bb-hex);
  background: linear-gradient(180deg, rgba(26, 28, 66, 0.92), rgba(11, 13, 38, 0.95));
  color: var(--bb-teal);
  box-shadow: inset 0 0 0 2px var(--bb-orange);
  padding-inline: 34px;
  text-shadow: 0 0 10px rgba(89, 242, 230, 0.6);
}
.bb-btn--holo:hover { transform: translateY(-2px); color: #fff; box-shadow: inset 0 0 0 2px var(--bb-gold), inset 0 0 24px rgba(255, 140, 38, 0.35); }

/* ---------- Hero ---------- */
.bb-hero {
  position: relative; isolation: isolate;
  /* Fill the screen, but not a 4K portrait monitor. */
  min-height: min(calc(100svh - 68px), 920px);
  display: grid; place-items: center;
  padding: clamp(48px, 7vw, 96px) 20px clamp(80px, 10vw, 128px);
  overflow: hidden;
}
.bb-hero__bg, .bb-hero__sky, .bb-hero__haze, .bb-hero__floats { position: absolute; inset: 0; }
.bb-hero__bg { z-index: 0; }
.bb-hero__bg img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 42%;
  transform-origin: 50% 40%;
  animation: bb-drift 36s ease-in-out infinite alternate;
}
@keyframes bb-drift { from { transform: scale(1.02) translateY(0); } to { transform: scale(1.12) translateY(-2%); } }
.bb-hero__sky { z-index: 1; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.bb-hero__haze {
  z-index: 2; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(11, 10, 31, 0.55) 0%, rgba(11, 10, 31, 0) 22%),
    radial-gradient(60% 45% at 50% 48%, rgba(11, 10, 31, 0.35), rgba(11, 10, 31, 0) 70%),
    linear-gradient(180deg, rgba(11, 10, 31, 0) 55%, var(--bb-ink) 100%);
}
.bb-hero__floats { z-index: 3; pointer-events: none; }
.bb-float {
  position: absolute;
  width: clamp(72px, 10vw, 150px); height: auto;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.55));
  will-change: transform;
  animation: bb-bob var(--dur, 7s) ease-in-out infinite alternate;
}
.bb-float--1 { left: 6%;  top: 14%; --dur: 7.5s; }
.bb-float--2 { left: 78%; top: 12%; --dur: 6.2s; width: clamp(80px, 11vw, 170px); }
.bb-float--3 { left: 10%; top: 58%; --dur: 8.4s; }
.bb-float--4 { left: 84%; top: 52%; --dur: 6.9s; }
.bb-float--5 { left: 66%; top: 76%; --dur: 9.1s; width: clamp(64px, 8vw, 120px); }
.bb-float--6 { left: 22%; top: 82%; --dur: 7.8s; width: clamp(56px, 7vw, 110px); }
@keyframes bb-bob { from { translate: 0 -10px; rotate: -5deg; } to { translate: 0 12px; rotate: 6deg; } }

.bb-hero__inner { position: relative; z-index: 4; text-align: center; max-width: 820px; }
.bb-logo {
  width: min(600px, 86vw); height: auto; margin-inline: auto;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 30px rgba(255, 170, 60, 0.25));
  animation: bb-logo-in 0.9s var(--bb-pop) both, bb-hover 5s ease-in-out 1s infinite alternate;
}
@keyframes bb-logo-in { from { opacity: 0; transform: scale(0.6) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes bb-hover { from { translate: 0 -6px; } to { translate: 0 6px; } }
.bb-hero__title {
  margin: 22px 0 0;
  font-family: var(--bb-display); font-weight: 900;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem); line-height: 1.15;
  color: #fff; text-shadow: 0 2px 0 rgba(28, 12, 60, 0.6), 0 10px 30px rgba(0, 0, 0, 0.55);
}
.bb-hero__title span { color: var(--bb-gold); }
.bb-hero__lead {
  margin: 16px auto 0; max-width: 58ch;
  font-size: 1.1rem; line-height: 1.6; color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.7);
}
.bb-hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.bb-hero__pills {
  list-style: none; padding: 0; margin: 26px 0 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
}
.bb-hero__pills li {
  clip-path: var(--bb-hex);
  padding: 7px 22px;
  background: rgba(11, 13, 38, 0.72);
  box-shadow: inset 0 0 0 1.5px rgba(255, 140, 38, 0.9);
  font-family: var(--bb-display); font-weight: 700; font-size: 0.82rem;
  color: var(--bb-cream);
  /* No backdrop blur: WebKit paints a blurred backdrop as an unclipped
     rectangle behind a clip-path, so the hex would get a ghost box. */
}
.bb-hero__cue {
  position: absolute; z-index: 4; left: 50%; bottom: 22px; translate: -50% 0;
  width: 30px; height: 50px; border-radius: 15px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: grid; justify-items: center; align-items: start; padding-top: 6px;
}
.bb-hero__cue-ball {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #9aa7ff 60%, #4a4f9a);
  animation: bb-cue 1.6s ease-in-out infinite;
}
@keyframes bb-cue { 0%, 100% { translate: 0 0; opacity: 1; } 70% { translate: 0 22px; opacity: 0.2; } 71% { opacity: 0; translate: 0 0; } }

/* ---------- Demo stage ---------- */
.bb-demo { background: radial-gradient(90% 60% at 50% 0%, rgba(123, 77, 255, 0.18), transparent 70%); }
.bb-demo__grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.bb-steps { list-style: none; counter-reset: none; padding: 0; margin: 24px 0 28px; display: grid; gap: 16px; }
.bb-steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; color: var(--bb-muted); line-height: 1.55; }
.bb-steps strong { color: #fff; font-family: var(--bb-display); font-weight: 800; }
.bb-steps__n {
  clip-path: var(--bb-hex);
  display: grid; place-items: center;
  width: 44px; height: 38px;
  background: linear-gradient(180deg, var(--bb-indigo), var(--bb-indigo-2));
  box-shadow: inset 0 0 0 2px var(--bb-orange);
  font-family: var(--bb-display); font-weight: 900; color: #fff;
  text-shadow: 0 0 10px var(--bb-orange);
}

.bb-demo__note { margin-top: 4px; font-size: 0.9rem; color: var(--bb-muted); font-style: italic; }

/* The gameplay recording in a phone, because that is where it lives. */
.bb-phone { position: relative; justify-self: center; width: min(240px, 58vw); }
.bb-phone__glow {
  position: absolute; inset: 8% -18%; z-index: 0; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 140, 38, 0.35), rgba(123, 77, 255, 0.25) 45%, transparent 72%);
  filter: blur(18px);
  animation: bb-glow 5s ease-in-out infinite alternate;
}
@keyframes bb-glow { from { opacity: 0.7; scale: 0.96; } to { opacity: 1; scale: 1.04; } }
.bb-phone__frame {
  position: relative; z-index: 1;
  aspect-ratio: 1206 / 2492; /* the recording, status bar cropped off */
  border-radius: 12% / 5.6%;
  padding: 3.2%;
  background: linear-gradient(160deg, #3a3f5e, #15172b 40%, #0b0c1c);
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.12),
    0 0 0 2px rgba(255, 140, 38, 0.55),
    0 40px 80px -30px rgba(0, 0, 0, 0.95),
    0 0 60px -10px rgba(255, 140, 38, 0.35);
  transform: rotate(-2deg);
  transition: transform 0.6s var(--bb-ease);
}
.bb-phone:hover .bb-phone__frame { transform: rotate(0deg) translateY(-4px); }
.bb-phone__video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  border-radius: 9.5% / 4.5%;
  background: #120f33;
}
.bb-phone__toggle {
  position: absolute; z-index: 2; right: -10px; bottom: 14px;
  width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #ffb04a, #f2560f); color: #fff;
  box-shadow: 0 5px 0 #a73a0a, 0 12px 24px -8px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s var(--bb-pop);
}
.bb-phone__toggle:hover { transform: scale(1.08); }
.bb-phone__toggle svg { width: 22px; height: 22px; }
.bb-phone__play { display: none; }
.bb-phone__toggle[aria-pressed="false"] .bb-phone__pause { display: none; }
.bb-phone__toggle[aria-pressed="false"] .bb-phone__play { display: block; }

/* ---------- Worlds carousel ---------- */
.bb-worlds { padding-block: clamp(40px, 6vw, 72px); background: linear-gradient(180deg, transparent, rgba(26, 28, 66, 0.35) 30%, rgba(26, 28, 66, 0.35) 70%, transparent); }
.bb-worlds .bb-section__head { margin-bottom: clamp(18px, 3vw, 28px); }
.bb-carousel-shell { position: relative; max-width: 1180px; margin-inline: auto; }
/* Four worlds, one row. On a desk they share the width; on a phone the row
   scrolls and snaps, one card at a time. */
.bb-carousel {
  list-style: none; margin: 0; padding: 10px 20px 18px;
  display: flex; gap: clamp(14px, 2vw, 22px);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.bb-carousel::-webkit-scrollbar { display: none; }
.bb-world { flex: 0 0 min(230px, 64vw); scroll-snap-align: start; }
@media (min-width: 900px) {
  .bb-carousel { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .bb-world { flex: none; }
}
.bb-world__card { position: relative; height: 100%; display: flex; flex-direction: column; transition: transform 0.4s var(--bb-ease); }
.bb-world:hover .bb-world__card { transform: translateY(-6px); }
.bb-world__art { position: relative; aspect-ratio: 1 / 1.05; overflow: hidden; }
.bb-world__art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transition: transform 0.7s var(--bb-ease); }
.bb-world:hover .bb-world__art img { transform: scale(1.05); }
.bb-world__caption { padding: 12px 14px 14px; flex: 1; }
.bb-world__name { margin: 0 0 2px; font-family: var(--bb-display); font-weight: 900; font-size: 1.25rem; }
.bb-world__tagline { font-weight: 600; font-size: 0.9rem; line-height: 1.4; color: #fff; }
.bb-world__feel { margin-top: 8px; font-size: 0.93rem; line-height: 1.5; color: var(--bb-muted); }

/* Space: a hologram plate - hex-cut, orange glow edge, scanlines. */
.bb-world--space .bb-world__card {
  clip-path: var(--bb-hex);
  background: linear-gradient(180deg, rgba(26, 28, 66, 0.96), rgba(11, 13, 38, 0.98));
  box-shadow: inset 0 0 0 2px var(--bb-orange);
}
.bb-world--space { filter: drop-shadow(0 0 14px rgba(255, 140, 38, 0.45)); }
.bb-world--space .bb-world__art::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.bb-world--space .bb-world__name { color: var(--bb-teal); text-shadow: 0 0 14px rgba(89, 242, 230, 0.6); }

/* Carnival: a candy-stripe frame, a wooden plank caption, a string of bulbs. */
.bb-world--carnival .bb-world__card {
  border-radius: 22px; padding: 9px;
  background: repeating-linear-gradient(135deg, var(--bb-red) 0 14px, var(--bb-cream) 14px 28px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.bb-world--carnival .bb-world__art { border-radius: 14px 14px 0 0; }
.bb-world--carnival .bb-world__caption {
  position: relative; border-radius: 0 0 14px 14px;
  background: linear-gradient(180deg, var(--bb-wood), #8a5526 70%, var(--bb-wood-dark));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.25), inset 0 -3px 0 rgba(0, 0, 0, 0.3);
  color: var(--bb-cream);
}
.bb-world--carnival .bb-world__caption::before {
  content: ""; position: absolute; left: 10px; right: 10px; top: -5px; height: 10px;
  background: radial-gradient(circle, #fff8c8 0 2.5px, rgba(255, 248, 200, 0.4) 3.5px, transparent 4.5px) 0 0 / 16px 10px repeat-x;
  animation: bb-bulbs 1.2s steps(2) infinite;
}
@keyframes bb-bulbs { to { background-position-x: 16px; } }
.bb-world--carnival .bb-world__name { color: #fff; text-shadow: 0 2px 0 var(--bb-red), 0 4px 10px rgba(0, 0, 0, 0.5); }
.bb-world--carnival .bb-world__feel { color: rgba(255, 245, 219, 0.82); }

/* Bakery: a chalkboard in an oak frame, chalk writing, a pink icing ribbon. */
.bb-world--bakery .bb-world__card {
  border-radius: 20px; padding: 8px;
  background: linear-gradient(180deg, #d9a35e, #a86f33);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.35), 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.bb-world--bakery .bb-world__art { border-radius: 14px 14px 0 0; }
.bb-world--bakery .bb-world__caption {
  border-radius: 0 0 14px 14px;
  background: radial-gradient(120% 80% at 30% 20%, #33404a, var(--bb-slate) 60%, var(--bb-slate-2));
  color: var(--bb-chalk);
  box-shadow: inset 0 0 0 2px rgba(247, 242, 230, 0.35), inset 0 0 0 5px var(--bb-slate), inset 0 0 0 6px rgba(247, 242, 230, 0.2);
}
.bb-world--bakery .bb-world__name { color: var(--bb-chalk); text-shadow: 0 0 1px #fff, 0 2px 8px rgba(0, 0, 0, 0.4); }
.bb-world--bakery .bb-world__feel { color: rgba(247, 242, 230, 0.78); }

/* The seasonal world: the art is a secret, the palette gives the season away
   a little - pumpkin orange, then holly red and gold, then spring pastel. */
.bb-world--season .bb-world__card {
  border-radius: 20px; padding: 8px;
  background: linear-gradient(160deg, var(--bb-gold), var(--bb-orange) 50%, var(--bb-violet));
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.8);
}
.bb-world__art--season {
  display: grid; place-items: center; border-radius: 13px 13px 0 0;
  background: linear-gradient(160deg, #2a1452, #0f0b26 60%, #1a0f3a);
  animation: bb-season 12s ease-in-out infinite;
}
@keyframes bb-season {
  0%, 28%   { background: linear-gradient(160deg, #3a1a0a, #140824 55%, #2a0f3a); }
  33%, 61%  { background: linear-gradient(160deg, #3a0b14, #0b2416 55%, #3a2a08); }
  66%, 94%  { background: linear-gradient(160deg, #2a3a5a, #4a2a5a 55%, #2a4a3a); }
  100%      { background: linear-gradient(160deg, #3a1a0a, #140824 55%, #2a0f3a); }
}
.bb-world--season .bb-world__caption { border-radius: 0 0 13px 13px; background: linear-gradient(180deg, #1e1a46, var(--bb-indigo-2)); }
.bb-world__q {
  font-family: var(--bb-display); font-weight: 900; font-size: 6rem; line-height: 1;
  color: #fff; -webkit-text-stroke: 3px var(--bb-purple);
  text-shadow: 0 6px 0 var(--bb-purple), 0 0 30px rgba(255, 204, 89, 0.45);
  animation: bb-hover 3s ease-in-out infinite alternate;
}
.bb-world__sparkle {
  position: absolute; width: 10px; height: 10px;
  background: #fff; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: bb-twinkle 2.4s ease-in-out infinite;
}
.bb-world__sparkle--1 { left: 18%; top: 22%; }
.bb-world__sparkle--2 { left: 74%; top: 30%; animation-delay: 0.8s; width: 14px; height: 14px; }
.bb-world__sparkle--3 { left: 60%; top: 74%; animation-delay: 1.6s; }
@keyframes bb-twinkle { 0%, 100% { opacity: 0.2; scale: 0.6; } 50% { opacity: 1; scale: 1.2; } }
.bb-world--season .bb-world__name { color: var(--bb-gold); }

.bb-carousel__arrow {
  position: absolute; top: 40%; z-index: 2;
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #ffb04a, #f2560f);
  color: #fff; box-shadow: 0 5px 0 #a73a0a, 0 12px 24px -8px rgba(0, 0, 0, 0.7);
  transition: transform 0.18s var(--bb-pop), opacity 0.2s;
}
.bb-carousel__arrow svg { width: 24px; height: 24px; }
.bb-carousel__arrow:hover { transform: scale(1.08); }
.bb-carousel__arrow--prev { left: -6px; }
.bb-carousel__arrow--next { right: -6px; }
@media (min-width: 1260px) { .bb-carousel__arrow--prev { left: -30px; } .bb-carousel__arrow--next { right: -30px; } }
.bb-carousel__arrow[disabled] { opacity: 0.25; cursor: default; transform: none; }
.bb-carousel-shell.is-flat .bb-carousel__arrow, .bb-carousel-shell.is-flat .bb-carousel__dots { display: none; }
.bb-carousel__dots { display: flex; justify-content: center; gap: 8px; }
.bb-carousel__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(243, 240, 255, 0.25); transition: all 0.3s; }
.bb-carousel__dots i.is-on { width: 26px; border-radius: 4px; background: var(--bb-orange); box-shadow: 0 0 10px var(--bb-orange); }

/* ---------- Modes: the menu's indigo panels with a gold rim ---------- */
.bb-modes__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bb-panel {
  position: relative; overflow: hidden;
  padding: 28px 28px 30px;
  border-radius: 22px;
  background: linear-gradient(180deg, var(--bb-indigo-3), var(--bb-indigo) 50%, var(--bb-indigo-2));
  box-shadow: inset 0 0 0 2px var(--bb-gold-deep), inset 0 0 0 4px rgba(255, 204, 89, 0.25), 0 24px 50px -30px rgba(0, 0, 0, 0.9);
  color: var(--bb-muted); line-height: 1.6;
}
.bb-panel__title { margin: 0 0 10px; font-family: var(--bb-display); font-weight: 900; font-size: 1.5rem; color: #fff; }
.bb-panel__sprite {
  position: absolute; right: -18px; top: -22px; width: 150px; height: auto;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.5)); opacity: 0.9;
  animation: bb-hover 4s ease-in-out infinite alternate;
}
.bb-panel p { padding-right: 90px; }
.bb-panel--daily { background: linear-gradient(180deg, #3a2a6e, #1e1a4a 50%, var(--bb-indigo-2)); }

/* 1-on-1: the hologram console, full width. */
.bb-vs {
  grid-column: 1 / -1;
  position: relative; overflow: hidden;
  padding: 30px 32px 34px;
  clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 50%, calc(100% - 22px) 100%, 22px 100%, 0 50%);
  background: linear-gradient(180deg, rgba(26, 28, 66, 0.96), rgba(11, 13, 38, 0.98));
  box-shadow: inset 0 0 0 2px var(--bb-orange), inset 0 0 50px rgba(255, 140, 38, 0.12);
  color: var(--bb-muted); line-height: 1.6;
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center;
}
.bb-vs__scan {
  position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px);
}
.bb-vs__scan::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22%;
  background: linear-gradient(180deg, transparent, rgba(89, 242, 230, 0.12), transparent);
  animation: bb-scan 4s linear infinite;
}
@keyframes bb-scan { from { top: -25%; } to { top: 110%; } }
.bb-vs__seats { grid-row: 1 / span 3; display: flex; align-items: center; justify-content: center; gap: 18px; }
.bb-vs__seat { display: grid; justify-items: center; gap: 6px; }
.bb-vs__seat img { width: 120px; height: 120px; filter: drop-shadow(0 12px 14px rgba(0, 0, 0, 0.5)); }
.bb-vs__name {
  clip-path: var(--bb-hex); padding: 4px 18px;
  background: var(--bb-indigo-2); box-shadow: inset 0 0 0 1.5px var(--bb-orange);
  font-family: var(--bb-display); font-weight: 800; font-size: 0.82rem; color: #fff;
}
.bb-vs__balls { display: flex; gap: 4px; }
.bb-vs__balls i { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #8a93d6 60%, #3d4487); }
.bb-vs__seat:last-child .bb-vs__balls i:nth-child(n+5) { opacity: 0.25; }
.bb-vs__badge {
  font-family: var(--bb-display); font-weight: 900; font-size: 2.4rem;
  color: var(--bb-gold); -webkit-text-stroke: 2px var(--bb-purple);
  text-shadow: 0 5px 0 var(--bb-purple), 0 0 24px rgba(255, 204, 89, 0.55);
  animation: bb-vs-pulse 1.6s ease-in-out infinite alternate;
}
@keyframes bb-vs-pulse { from { scale: 1; } to { scale: 1.12; } }
.bb-vs .bb-panel__title { color: var(--bb-teal); text-shadow: 0 0 14px rgba(89, 242, 230, 0.6); }
.bb-vs__premium {
  justify-self: start; margin-top: 14px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border-radius: 999px;
  background: linear-gradient(180deg, #ffe08a, #ffb020); color: #4a2a00;
  font-family: var(--bb-display); font-weight: 800; font-size: 0.76rem; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- Cannon marquee ---------- */
.bb-cannons { overflow: hidden; }
.bb-marquee {
  --gap: 22px;
  overflow: hidden; padding-block: 12px;
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.bb-marquee__track {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--gap); width: max-content;
  animation: bb-marquee 38s linear infinite;
}
.bb-marquee:hover .bb-marquee__track { animation-play-state: paused; }
@keyframes bb-marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.bb-cannon-tile { flex: 0 0 200px; display: grid; justify-items: center; gap: 8px; text-align: center; }
.bb-cannon-tile__plate {
  width: 170px; height: 170px; border-radius: 50%; overflow: hidden;
  background: #292b38;
  box-shadow: inset 0 0 0 3px var(--bb-gold-deep), inset 0 0 0 5px rgba(255, 204, 89, 0.3), 0 20px 30px -16px rgba(0, 0, 0, 0.9);
  transition: transform 0.3s var(--bb-pop);
}
.bb-cannon-tile:hover .bb-cannon-tile__plate { transform: scale(1.06) rotate(-4deg); }
.bb-cannon-tile__plate img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.15); }
.bb-cannon-tile__name { font-family: var(--bb-display); font-weight: 800; color: #fff; }
.bb-cannon-tile__price {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 14px; border-radius: 12px;
  background: linear-gradient(180deg, #ffb04a, #f2560f); color: #fff;
  box-shadow: 0 3px 0 #a73a0a;
  font-family: var(--bb-display); font-weight: 800; font-size: 0.85rem;
}
.bb-coin { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffcc59 50%, #b8731a); box-shadow: 0 0 0 1px #8a5410; }

/* ---------- Streak ---------- */
.bb-streak { background: radial-gradient(70% 70% at 80% 50%, rgba(255, 110, 40, 0.14), transparent 70%); }
.bb-streak__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.bb-streak__facts { display: grid; gap: 10px; margin: 24px 0 0; }
.bb-streak__facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding-top: 10px; border-top: 1px solid rgba(243, 240, 255, 0.14); }
.bb-streak__facts dt { font-family: var(--bb-display); font-weight: 800; color: var(--bb-gold); }
.bb-streak__facts dd { margin: 0; color: var(--bb-muted); }
.bb-week { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bb-day {
  position: relative; display: grid; justify-items: center; gap: 4px;
  padding: 16px 8px 14px; border-radius: 18px;
  background: linear-gradient(180deg, var(--bb-indigo-3), var(--bb-indigo-2));
  box-shadow: inset 0 0 0 2px rgba(255, 204, 89, 0.25);
  transform: scale(0.92); opacity: 0.55;
  transition: transform 0.5s var(--bb-pop), opacity 0.4s, box-shadow 0.4s;
}
.bb-day--big { grid-column: span 2; }
.bb-week.is-lit .bb-day { transform: none; opacity: 1; box-shadow: inset 0 0 0 2px var(--bb-gold), 0 0 24px -6px rgba(255, 170, 60, 0.7); transition-delay: var(--d, 0s); }
.bb-day__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bb-muted); }
.bb-day__flame {
  width: 26px; height: 32px;
  background: radial-gradient(50% 40% at 50% 80%, #fff2a8 0 20%, #ffb020 45%, #ff5a1f 70%, transparent 72%);
  clip-path: polygon(50% 0, 78% 30%, 100% 62%, 88% 92%, 50% 100%, 12% 92%, 0 62%, 22% 30%);
  filter: drop-shadow(0 0 8px rgba(255, 140, 38, 0.8));
  transform-origin: 50% 100%;
}
.bb-week.is-lit .bb-day__flame { animation: bb-flame 1.1s ease-in-out infinite alternate; animation-delay: var(--d, 0s); }
@keyframes bb-flame { from { scale: 0.92 0.95; rotate: -4deg; } to { scale: 1.06 1.1; rotate: 4deg; } }
.bb-day__prize { font-family: var(--bb-display); font-weight: 900; font-size: 1.15rem; color: var(--bb-gold); }
.bb-day--big .bb-day__prize { font-size: 1.6rem; }
.bb-day--big .bb-day__flame { width: 34px; height: 42px; }

/* ---------- Plans ---------- */
.bb-plans__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.bb-plan {
  position: relative; overflow: hidden;
  padding: 30px 30px 32px; border-radius: 24px;
  background: linear-gradient(180deg, var(--bb-indigo-3), var(--bb-indigo) 50%, var(--bb-indigo-2));
  box-shadow: inset 0 0 0 2px rgba(243, 240, 255, 0.14), 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}
.bb-plan__name { margin: 0; font-family: var(--bb-display); font-weight: 900; font-size: 1.6rem; color: #fff; }
.bb-plan__price { margin: 6px 0 18px; font-family: var(--bb-display); font-weight: 900; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.1; color: var(--bb-gold); }
.bb-plan__price span { display: block; margin-top: 6px; font-size: 0.85rem; font-weight: 700; color: var(--bb-muted); letter-spacing: 0.06em; text-transform: uppercase; }
.bb-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; color: var(--bb-muted); line-height: 1.5; }
.bb-checks li { position: relative; padding-left: 32px; }
.bb-checks li::before {
  content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #8a93d6 60%, #3d4487);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.bb-plan--premium {
  box-shadow: inset 0 0 0 3px var(--bb-gold), inset 0 0 0 6px rgba(255, 204, 89, 0.25), 0 0 50px -10px rgba(255, 204, 89, 0.4), 0 24px 50px -30px rgba(0, 0, 0, 0.9);
}
.bb-plan--premium::after {
  content: ""; position: absolute; top: -40%; bottom: -40%; width: 60px; left: -80px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 180, 0.28), transparent);
  rotate: 18deg; animation: bb-shine 4.5s ease-in-out infinite;
}
@keyframes bb-shine { 0%, 60% { left: -80px; } 100% { left: 120%; } }
.bb-plan--premium .bb-checks li::before { background: radial-gradient(circle at 35% 30%, #fff6c9, var(--bb-gold) 55%, var(--bb-gold-deep)); }
.bb-plan__crown { position: absolute; right: 24px; top: 24px; color: var(--bb-gold); filter: drop-shadow(0 0 12px rgba(255, 204, 89, 0.8)); animation: bb-hover 3s ease-in-out infinite alternate; }
.bb-plans__note { margin-top: 22px; max-width: 70ch; color: var(--bb-muted); line-height: 1.6; font-size: 0.95rem; }

/* ---------- FAQ: the Bakery chalkboard ---------- */
.bb-board {
  padding: clamp(28px, 4vw, 48px); border-radius: 26px;
  background: radial-gradient(120% 90% at 20% 10%, #35434d, var(--bb-slate) 55%, var(--bb-slate-2));
  box-shadow:
    inset 0 0 0 3px rgba(247, 242, 230, 0.25), inset 0 0 0 10px var(--bb-slate),
    0 0 0 10px #c98f4f, 0 0 0 13px #8a5526, 0 30px 60px -30px rgba(0, 0, 0, 0.9);
  color: var(--bb-chalk);
}
.bb-board__title { margin: 0 0 22px; font-family: var(--bb-display); font-weight: 900; font-size: clamp(1.8rem, 3.6vw, 2.6rem); color: var(--bb-chalk); text-shadow: 0 0 1px #fff; }
.bb-board__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 28px; }
.bb-q { border-top: 2px dashed rgba(247, 242, 230, 0.3); padding: 14px 0 6px; }
.bb-q summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font-family: var(--bb-display); font-weight: 800; font-size: 1.08rem; color: #fff; }
.bb-q summary::-webkit-details-marker { display: none; }
.bb-q summary::before { content: "+"; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--bb-pink); color: #fff; font-weight: 900; flex-shrink: 0; transition: rotate 0.3s var(--bb-pop); }
.bb-q[open] summary::before { rotate: 45deg; }
.bb-q p { margin: 10px 0 8px 36px; line-height: 1.6; color: rgba(247, 242, 230, 0.82); }

/* ---------- Final call ---------- */
.bb-cta { overflow: hidden; background: radial-gradient(70% 90% at 50% 100%, rgba(123, 77, 255, 0.35), transparent 70%); }
.bb-cta__confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.bb-cta__inner { position: relative; text-align: center; display: grid; justify-items: center; }
.bb-cta__logo { width: min(360px, 70vw); height: auto; margin-bottom: 18px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.55)); }
.bb-cta .bb-lead { text-align: center; margin-inline: auto; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .bb-demo__grid, .bb-streak__grid { grid-template-columns: 1fr; }
  .bb-vs { grid-template-columns: 1fr; }
  .bb-vs__seats { grid-row: auto; }
}
@media (max-width: 760px) {
  .bb-modes__grid, .bb-plans__grid, .bb-board__grid { grid-template-columns: 1fr; }
  .bb-panel p { padding-right: 0; }
  .bb-panel__sprite { width: 110px; opacity: 0.5; }
  .bb-week { grid-template-columns: repeat(4, 1fr); }
  .bb-float--4, .bb-float--5 { display: none; }
  .bb-carousel__arrow { display: none; }
  .bb-h__stroke { -webkit-text-stroke-width: 7px; }
}
@media (max-width: 480px) {
  .bb-hero { min-height: auto; }
  .bb-hero__pills li { padding-inline: 16px; font-size: 0.76rem; }
  .bb-btn { min-height: 50px; padding-inline: 22px; font-size: 0.95rem; }
  .bb-day__prize { font-size: 1rem; }
  /* Two fixed-size avatars plus the badge do not fit a 360px console. */
  .bb-vs { padding-inline: 22px; }
  .bb-vs__seat img { width: 84px; height: 84px; }
}

/* Motion: the page should still read as the game with everything still. */
@media (prefers-reduced-motion: reduce) {
  .bb *, .bb *::before, .bb *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .bb-hero__bg img { animation: none; }
  .bb-marquee__track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; }
  .bb-marquee { mask-image: none; -webkit-mask-image: none; }
  .bb-day { transform: none; opacity: 1; }
}

/* The game's legal and support pages, under the final call. Scoped under .bb
   because `.bb p { margin: 0 }` would otherwise win and swallow the margin. */
.bb .bb-legal {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.4rem;
  margin-top: 3rem; font-size: 0.92rem;
}
.bb-legal a { color: rgba(255, 255, 255, 0.7); text-decoration: underline; text-underline-offset: 3px; }
.bb-legal a:hover { color: var(--bb-gold); }
