:root {
  --bg-0: #170733;
  --bg-1: #2a0f5c;
  --ink: #fff;
  --ink-dim: #cdb8ff;
  --well: rgba(20, 6, 50, .55);

  --pink: #ff4fa3;
  --pink-d: #c9186f;
  --lemon: #ffd93b;
  --lemon-d: #e59a00;
  --mint: #3df5b0;
  --sky: #49c6ff;
  --grape: #b56bff;
  --cherry: #ff5468;
  --outline: #6b1040;

  --font-display: 'Lilita One', 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --font-body: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', 'Nunito', system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  background:
    radial-gradient(rgba(255, 255, 255, .055) 2px, transparent 2.6px) 0 0 / 30px 30px,
    radial-gradient(1100px 620px at 8% -8%, rgba(140, 70, 255, .55), transparent 70%),
    radial-gradient(900px 600px at 100% 0%, rgba(255, 79, 163, .38), transparent 70%),
    radial-gradient(900px 700px at 60% 110%, rgba(73, 198, 255, .22), transparent 70%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* ---------- ambient background ---------- */
.blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.blobs i {
  position: absolute;
  width: 420px; height: 420px;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  animation: floaty 16s ease-in-out infinite alternate;
}
.blobs i:nth-child(1) { left: -120px; top: 30%; background: var(--pink); }
.blobs i:nth-child(2) { right: -140px; top: 55%; background: var(--sky); animation-delay: -5s; }
.blobs i:nth-child(3) { left: 40%; bottom: -220px; background: var(--grape); animation-delay: -9s; }

/* ---------- shell ---------- */
.app {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  height: 100vh;
  height: 100dvh;
  max-width: 1480px;
  margin: 0 auto;
  padding: 14px 18px 20px;
}

.layout {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 16px;
  min-height: 0;
}

.center {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr) auto;
  gap: 12px;
  min-height: 0;
  min-width: 0;
}

.card {
  background: linear-gradient(180deg, rgba(98, 46, 200, .8), rgba(60, 24, 136, .86));
  border: 2px solid rgba(255, 255, 255, .17);
  border-radius: 24px;
  box-shadow:
    0 6px 0 rgba(20, 6, 50, .6),
    0 18px 34px rgba(0, 0, 0, .35),
    inset 0 2px 0 rgba(255, 255, 255, .2);
}

/* ---------- top bar ---------- */
.topbar { display: flex; align-items: center; gap: 14px; min-width: 0; }

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand__plane {
  width: 62px; height: 44px; flex: none;
  filter: drop-shadow(0 4px 0 rgba(20, 6, 50, .5));
  animation: hover 2.6s ease-in-out infinite alternate;
}
.brand__text { display: grid; line-height: 1; }
.brand__name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: .5px;
  text-shadow: 0 3px 0 var(--pink-d), 0 6px 10px rgba(0, 0, 0, .35);
  white-space: nowrap;
}
.brand__name b {
  font-weight: 400;
  margin-left: 5px;
  color: var(--lemon);
  text-shadow: 0 3px 0 var(--lemon-d), 0 6px 10px rgba(0, 0, 0, .35);
}
.brand__tag {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.fun-chip {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: #0c4a34;
  background: linear-gradient(180deg, #9dffd8, var(--mint));
  box-shadow: 0 3px 0 #0a9e68, inset 0 1.5px 0 rgba(255, 255, 255, .7);
  white-space: nowrap;
}

.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* The offers — the sign-up bonus and "Refer to earn": beside the header buttons on a wide screen, a row of
   their own under them on a narrower one. account.js shows the row while either is on, and marks a pair. */
.promos { display: flex; align-items: center; gap: 12px; flex: none; margin-left: auto; }
.promos:not([hidden]) + .topbar__right { margin-left: 0; }
.promos > button { flex: none; }

.refer-btn {
  padding: 8px 16px 9px;
  border: 0; border-radius: 999px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .5px;
  color: #fff;
  background: linear-gradient(180deg, #ff86c2, #ff2d87);
  box-shadow: 0 4px 0 #a80d58, inset 0 2px 0 rgba(255, 255, 255, .6);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
  white-space: nowrap;
  transition: transform .07s, box-shadow .07s, filter .15s;
}
.refer-btn:hover { filter: brightness(1.08); }
.refer-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #a80d58, inset 0 2px 0 rgba(255, 255, 255, .6); }
.refer-btn small { display: none; font: 600 13px var(--font-body); letter-spacing: 0; }
.refer-btn.is-active { color: #0c4a34; text-shadow: none; background: linear-gradient(180deg, #b6ffe2, var(--mint)); box-shadow: 0 4px 0 #0a9e68, inset 0 2px 0 rgba(255, 255, 255, .8); }
.refer-btn.is-active:active { box-shadow: 0 1px 0 #0a9e68, inset 0 2px 0 rgba(255, 255, 255, .8); }

/* The sign-up bonus offer: candy gold, a soft glow and a shine that sweeps across now and then — the
   brightest thing in the header. Two lines: what you get, and what to do for it. */
.welcome-btn {
  position: relative;
  display: grid; justify-items: center; align-content: center;
  padding: 4px 18px 6px;
  border: 0; border-radius: 999px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .5px; line-height: 1.12;
  color: #5a2a00;
  background: linear-gradient(180deg, #fff7a8, #ffd93b 46%, #ffaa1c);
  box-shadow: 0 4px 0 #c76a00, 0 0 0 2px rgba(255, 244, 170, .45), 0 4px 22px rgba(255, 200, 40, .55), inset 0 2px 0 rgba(255, 255, 255, .8);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate; /* the shine runs between the gold and the words */
  transition: transform .07s, box-shadow .07s, filter .15s;
}
.welcome-btn::after {
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; z-index: -1;
  width: 40%;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .9) 50%, transparent 80%);
  transform: translateX(-140%) skewX(-20deg);
  animation: shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
.welcome-btn:hover { filter: brightness(1.05) saturate(1.1); }
.welcome-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c76a00, 0 0 0 2px rgba(255, 244, 170, .45), 0 2px 12px rgba(255, 200, 40, .5), inset 0 2px 0 rgba(255, 255, 255, .8); }
.welcome-btn i { display: inline-block; font-style: normal; animation: giftShake 3.4s ease-in-out infinite; }
.welcome-btn b { font-weight: 400; color: #e0106e; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.welcome-btn small { font: 600 12px var(--font-body); letter-spacing: 0; color: #7a3b00; text-shadow: none; }
.linkbtn { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; color: var(--ink-dim); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: #fff; }
.modal__card > .linkbtn { display: block; margin: 12px auto 0; }
.invite.is-shown { animation: wonGlow .9s ease-out; }

.icon-btn {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 0; border-radius: 50%;
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  background: linear-gradient(180deg, #9a6bff, #5a2bd6);
  box-shadow: 0 4px 0 #34128f, inset 0 2px 0 rgba(255, 255, 255, .45);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { filter: brightness(1.12); }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #34128f, inset 0 2px 0 rgba(255, 255, 255, .45); }
.icon-btn .snd-off { display: none; }
.icon-btn[aria-pressed="false"] .snd-on { display: none; }
.icon-btn[aria-pressed="false"] .snd-off { display: inline; }
.icon-btn[aria-pressed="false"] { background: linear-gradient(180deg, #7d7399, #4a4266); box-shadow: 0 4px 0 #2b2540, inset 0 2px 0 rgba(255, 255, 255, .3); }

.balance {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 16px 5px 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #3a1582, #260c5c);
  border: 2px solid rgba(255, 255, 255, .22);
  box-shadow: inset 0 3px 7px rgba(0, 0, 0, .45), 0 4px 0 rgba(20, 6, 50, .55);
  font-family: var(--font-display);
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}
.balance__coin, .coin {
  display: grid; place-items: center;
  width: 32px; height: 32px; flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fffbd0, #ffd93b 46%, #f2a400);
  box-shadow: inset 0 -3px 0 rgba(170, 90, 0, .5), 0 2px 0 #a86200;
}
.balance__coin::after { content: '★'; font-size: 16px; color: #c47a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.balance.is-bump { animation: bump .28s; }
.balance__cur { font-family: var(--font-body); font-size: 12px; font-weight: 700; letter-spacing: 1px; color: var(--ink-dim); margin-right: -3px; }
.balance__add {
  display: grid; place-items: center;
  width: 28px; height: 28px;
  margin: 0 -9px 0 2px;
  border: 0; border-radius: 50%;
  font-family: var(--font-display); font-size: 20px; line-height: 1;
  color: #0c4a34;
  background: linear-gradient(180deg, #9dffd8, var(--mint));
  box-shadow: 0 3px 0 #0a9e68, inset 0 1.5px 0 rgba(255, 255, 255, .7);
  transition: transform .06s, box-shadow .06s;
}
.balance__add:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a9e68, inset 0 1.5px 0 rgba(255, 255, 255, .7); }

.guest { display: flex; gap: 8px; }
.pill-btn {
  padding: 8px 18px 9px;
  border: 0; border-radius: 999px;
  font-family: var(--font-display); font-size: 16px; letter-spacing: .5px;
  color: #5a2a00;
  background: linear-gradient(180deg, #fff07a, #ffb300);
  box-shadow: 0 4px 0 #c77700, inset 0 2px 0 rgba(255, 255, 255, .7);
  white-space: nowrap;
  transition: transform .07s, box-shadow .07s, filter .15s;
}
.pill-btn:hover { filter: brightness(1.07); }
.pill-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c77700, inset 0 2px 0 rgba(255, 255, 255, .7); }
.pill-btn--ghost { color: #fff; background: linear-gradient(180deg, #9a6bff, #5a2bd6); box-shadow: 0 4px 0 #34128f, inset 0 2px 0 rgba(255, 255, 255, .45); }
.pill-btn--ghost:active { box-shadow: 0 1px 0 #34128f, inset 0 2px 0 rgba(255, 255, 255, .45); }

.fun-chip[data-mode="test"] { color: #5a2a00; background: linear-gradient(180deg, #fff07a, #ffb300); box-shadow: 0 3px 0 #c77700, inset 0 1.5px 0 rgba(255, 255, 255, .7); }

/* ---------- history ---------- */
.history {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 8px 9px 16px;
  border-radius: 999px;
  background: rgba(20, 6, 50, .5);
  border: 2px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35);
  min-width: 0;
}
.history__label {
  flex: none;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--ink-dim);
}
.history__pills {
  display: flex; gap: 7px;
  min-width: 0; flex: 1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
  mask-image: linear-gradient(90deg, #000 82%, transparent);
}
.pill, .xpill {
  flex: none;
  padding: 3px 11px 4px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: .3px;
  color: #fff;
  background: linear-gradient(180deg, var(--p1), var(--p2));
  box-shadow: 0 3px 0 var(--p3), inset 0 1.5px 0 rgba(255, 255, 255, .5);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}
.pill--lo, .xpill--lo { --p1: #7ad7ff; --p2: #2a9df4; --p3: #1466b3; }
.pill--mid, .xpill--mid { --p1: #d79bff; --p2: #a04bf0; --p3: #6421b0; }
.pill--hi, .xpill--hi { --p1: #fff38a; --p2: #ffb300; --p3: #c77700; color: #5a2a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .5); }
.pill.is-new { animation: pillIn .5s cubic-bezier(.2, 1.6, .4, 1); }

/* ---------- recent wins ---------- */
.strips { display: grid; gap: 8px; min-width: 0; }
.wins {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 8px 5px 16px;
  border-radius: 999px;
  background: rgba(20, 6, 50, .5);
  border: 2px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35);
  min-width: 0;
}
.wins[hidden] { display: none; }
.wins__view {
  flex: 1; min-width: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 92%, transparent);
}
.wins__track, .wins__set { display: flex; width: max-content; }
/* Only when the wins do not fit: the list is doubled and slides by half its width, so the loop is seamless. */
.wins__track.is-moving { animation: winsSlide var(--dur, 40s) linear infinite; }
.wins:hover .wins__track.is-moving { animation-play-state: paused; }
.wins__item { display: flex; align-items: center; gap: 6px; flex: none; margin-right: 24px; font-size: 13px; white-space: nowrap; color: var(--ink-dim); }
.wins__item .ava { width: 22px; height: 22px; font-size: 12px; }
.wins__item b { font-weight: 600; color: #fff; }
.wins__item .wins__amt { font-family: var(--font-display); font-weight: 400; font-size: 14px; color: var(--mint); }

/* ---------- stage ---------- */
.stage-frame {
  position: relative;
  padding: 8px;
  border-radius: 32px;
  background: repeating-linear-gradient(-45deg, #ff5fa8 0 14px, #fff 14px 28px);
  background-size: 39.598px 39.598px;
  box-shadow: 0 8px 0 #a3125c, 0 22px 40px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .5);
  min-height: 0;
}
.stage-frame:has(.stage[data-phase="flying"]) { animation: stripes .9s linear infinite; }

.stage {
  position: relative;
  height: 100%;
  border-radius: 25px;
  overflow: hidden;
  background: #56ccff;
  container-type: size;
  box-shadow: inset 0 0 0 3px rgba(107, 16, 64, .55);
  isolation: isolate;

  --m-fill: #fff;
  --m-edge: #1f7fe0;
  --m-deep: #0e4fa3;
  --m-glow: rgba(73, 198, 255, .75);
}
.stage[data-tier="mid"] { --m-edge: #b01fc9; --m-deep: #6d0f8f; --m-glow: rgba(255, 79, 163, .8); }
.stage[data-tier="hi"] { --m-fill: #fff6b8; --m-edge: #f07a00; --m-deep: #a84300; --m-glow: rgba(255, 217, 59, .9); }
.stage[data-phase="crashed"] { --m-fill: #ffe1e5; --m-edge: #e0213f; --m-deep: #8a0c22; --m-glow: rgba(255, 84, 104, .75); }
.stage.is-shake { animation: stageShake .45s; }

.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.stage::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), transparent 20%), radial-gradient(120% 90% at 50% 40%, transparent 60%, rgba(40, 0, 70, .32));
  pointer-events: none;
}
.stage__flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.stage__flash.is-on { animation: flash .45s ease-out; }
.stage__flash.is-boom { background: #ffeeb0; animation: boomFlash .5s ease-out; }

.stage__hud {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  text-align: center;
  pointer-events: none;
}
.waiting, .flight { grid-area: 1 / 1; }
.flight { transform: translate(-5cqw, -7cqh); } /* sit up-left of the flight path */
.stage[data-phase="betting"] .flight,
.stage:not([data-phase="betting"]) .waiting { display: none; }

.waiting { display: grid; justify-items: center; gap: 12px; animation: popIn .35s cubic-bezier(.2, 1.5, .4, 1); }
.waiting__title {
  font-family: var(--font-display);
  font-size: 44px;
  font-size: clamp(26px, 7cqw, 56px);
  text-shadow: 0 3px 0 var(--pink-d), 0 6px 0 #8a0f4d, 0 12px 20px rgba(40, 0, 70, .45);
  -webkit-text-stroke: 2px var(--pink-d);
  paint-order: stroke fill;
}
.waiting__bar {
  width: min(320px, 62cqw);
  height: 22px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(40, 8, 80, .6);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45), 0 2px 0 rgba(255, 255, 255, .35);
}
.waiting__bar i {
  display: block; height: 100%; width: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(-45deg, #ffd93b 0 9px, #ff8a3d 9px 18px);
  background-size: 25.456px 25.456px;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6);
  animation: stripesSm .6s linear infinite;
}
.waiting__time {
  padding: 3px 14px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  background: rgba(40, 8, 80, .55);
}
.waiting__time b { display: inline-block; min-width: 2.2ch; font-family: var(--font-display); font-weight: 400; color: var(--lemon); font-variant-numeric: tabular-nums; }

.outcome {
  display: none;
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: 30px;
  font-size: clamp(20px, 5cqw, 40px);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 3px 0 #8a0c22, 0 8px 16px rgba(40, 0, 70, .5);
}
.stage[data-phase="crashed"] .outcome { display: block; animation: popIn .35s cubic-bezier(.2, 1.6, .4, 1); }
.stage[data-phase="crashed"] .outcome.is-slam { animation: slam .42s cubic-bezier(.2, 1.5, .4, 1); }

.mult {
  font-family: var(--font-display);
  font-size: 110px;
  font-size: clamp(54px, 15cqw, 150px);
  line-height: .95;
  letter-spacing: 1px;
  color: var(--m-fill);
  font-variant-numeric: tabular-nums;
  -webkit-text-stroke: 3px var(--m-edge);
  paint-order: stroke fill;
  text-shadow:
    0 2px 0 var(--m-edge), 0 4px 0 var(--m-edge), 0 6px 0 var(--m-edge),
    0 8px 0 var(--m-deep), 0 10px 0 var(--m-deep),
    0 18px 26px rgba(30, 0, 60, .45),
    0 0 46px var(--m-glow);
}
.mult.is-bump { animation: multBump .38s cubic-bezier(.2, 1.6, .4, 1); }

.banner {
  position: absolute; left: 0; right: 0; top: 13%; z-index: 3;
  text-align: center;
  font-family: var(--font-display);
  font-size: 60px;
  font-size: clamp(30px, 9cqw, 84px);
  color: var(--lemon);
  -webkit-text-stroke: 3px #e2571b;
  paint-order: stroke fill;
  text-shadow: 0 4px 0 #e2571b, 0 8px 0 #9a2f00, 0 16px 26px rgba(40, 0, 70, .5);
  pointer-events: none;
  opacity: 0;
}
.banner.is-on { animation: bannerPop 1.7s cubic-bezier(.2, 1.4, .4, 1) forwards; }

.toasts {
  position: absolute; top: 12px; left: 50%; z-index: 4;
  display: grid; gap: 6px; justify-items: center;
  transform: translateX(-50%);
  width: max-content; max-width: 92%;
  pointer-events: none;
}
.toast {
  padding: 6px 16px 7px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  color: #0c4a34;
  background: linear-gradient(180deg, #b6ffe2, var(--mint));
  box-shadow: 0 4px 0 #0a9e68, 0 10px 18px rgba(0, 0, 0, .3), inset 0 1.5px 0 rgba(255, 255, 255, .8);
  animation: toastIn 2.6s cubic-bezier(.2, 1.4, .4, 1) forwards;
}
.toast b { font-family: var(--font-display); font-weight: 400; }
.toast--warn { color: #5a2a00; background: linear-gradient(180deg, #ffe873, #ffb300); box-shadow: 0 4px 0 #c77700, 0 10px 18px rgba(0, 0, 0, .3), inset 0 1.5px 0 rgba(255, 255, 255, .8); }

.stage__round {
  position: absolute; z-index: 3;
  padding: 3px 11px;
  border: 0; border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #fff;
  background: rgba(40, 8, 80, .5);
}
.stage__round { left: 14px; top: 12px; }
.stage__zone {
  position: absolute; right: 14px; top: 12px; z-index: 3;
  padding: 3px 12px 4px;
  border-radius: 999px;
  font-size: 12px; font-weight: 600;
  color: #fff;
  background: rgba(40, 8, 80, .5);
  transition: background .4s;
}
.stage__zone[data-zone="1"] { background: rgba(214, 60, 150, .6); }
.stage__zone[data-zone="2"] { background: rgba(36, 20, 84, .78); }
.stage__zone[data-zone="3"] { background: rgba(226, 104, 40, .7); }
.stage__zone[data-zone="4"] { background: rgba(12, 6, 46, .8); box-shadow: 0 0 14px rgba(110, 240, 220, .6); }
.stage__zone.is-pop { animation: zonePop .6s cubic-bezier(.2, 1.6, .4, 1); }

/* ---------- bet panels ---------- */
.bets { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 6px; }

.bet {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "ctrl cta" "opts opts";
  gap: 10px 12px;
  padding: 12px 12px 10px;
}
.bet.is-won { animation: wonGlow .9s ease-out; }
.bet.is-lost { animation: shakeX .4s; }

.bet__ctrl { grid-area: ctrl; display: grid; gap: 9px; align-content: center; transition: opacity .15s; }
.bet.is-locked .bet__ctrl { opacity: .5; pointer-events: none; }

.stepper {
  display: flex; align-items: center; gap: 4px;
  padding: 5px;
  border-radius: 999px;
  background: var(--well);
  border: 2px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45);
}
.stepper__btn {
  flex: none;
  width: 30px; height: 30px;
  border: 0; border-radius: 50%;
  font-family: var(--font-display);
  font-size: 20px; line-height: 1;
  color: #fff;
  background: linear-gradient(180deg, #ff86c2, #ff2d87);
  box-shadow: 0 3px 0 #a80d58, inset 0 1.5px 0 rgba(255, 255, 255, .6);
  transition: transform .06s, box-shadow .06s;
}
.stepper__btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #a80d58, inset 0 1.5px 0 rgba(255, 255, 255, .6); }
.stepper__input {
  flex: 1; min-width: 0; width: 100%;
  padding: 0;
  border: 0; outline: 0; background: none;
  text-align: center;
  font-family: var(--font-display);
  font-size: 19px; /* small enough that 1000.00 fits in a narrow panel */
  font-variant-numeric: tabular-nums;
}

.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.chips button {
  padding: 4px 0 5px;
  border: 0; border-radius: 12px;
  font-size: 14px; font-weight: 600;
  background: linear-gradient(180deg, #9a6bff, #5a2bd6);
  box-shadow: 0 3px 0 #34128f, inset 0 1.5px 0 rgba(255, 255, 255, .4);
  transition: transform .06s, box-shadow .06s, filter .15s;
}
.chips button:hover { filter: brightness(1.15); }
.chips button:active { transform: translateY(2px); box-shadow: 0 1px 0 #34128f, inset 0 1.5px 0 rgba(255, 255, 255, .4); }

.cta {
  grid-area: cta;
  position: relative;
  display: grid; place-content: center; gap: 1px;
  min-height: 92px;
  padding: 8px 10px;
  border: 0; border-radius: 22px;
  font-family: var(--font-display);
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .25);
  background: linear-gradient(180deg, var(--c1), var(--c2));
  box-shadow:
    0 7px 0 var(--c3),
    0 14px 22px rgba(0, 0, 0, .35),
    inset 0 2px 0 rgba(255, 255, 255, .6),
    inset 0 -8px 14px rgba(0, 0, 0, .12);
  overflow: hidden;
  transition: transform .07s, box-shadow .07s, filter .15s;
  touch-action: manipulation;
  user-select: none;
}
.cta::before {
  content: '';
  position: absolute; left: 5%; right: 5%; top: 6%; height: 40%;
  border-radius: 16px 16px 50% 50% / 16px 16px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .06));
  pointer-events: none;
}
.cta:hover { filter: brightness(1.07) saturate(1.08); }
.cta:active { transform: translateY(5px); box-shadow: 0 2px 0 var(--c3), 0 6px 10px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -8px 14px rgba(0, 0, 0, .12); }
.cta__label { position: relative; text-transform: uppercase; font-size: 28px; font-size: clamp(22px, 2.3vw, 31px); letter-spacing: 1.5px; line-height: 1.05; }
.cta__sub { position: relative; font-family: var(--font-body); font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; opacity: .96; }
.cta--bet { --c1: #9cff66; --c2: #36c81c; --c3: #1b860b; }
.cta--cancel { --c1: #ff97a3; --c2: #f03352; --c3: #a3122c; }
.cta--queued { --c1: #ffb37a; --c2: #ff7a1f; --c3: #b54a06; }
.cta--cash { --c1: #fff07a; --c2: #ffb300; --c3: #c77700; color: #5a2a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .55); animation: cashPulse .55s ease-in-out infinite alternate; }
.cta--cash .cta__sub { font-family: var(--font-display); font-weight: 400; font-size: 22px; }

.bet__auto {
  grid-area: opts;
  display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap;
  padding-top: 9px;
  border-top: 2px dashed rgba(255, 255, 255, .16);
  font-size: 14px;
}
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch i {
  position: relative; flex: none;
  width: 42px; height: 24px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .55), 0 1px 0 rgba(255, 255, 255, .18);
  transition: background .15s;
}
.switch i::after {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #d9cfff);
  box-shadow: 0 2px 0 rgba(0, 0, 0, .3);
  transition: transform .18s cubic-bezier(.2, 1.6, .4, 1);
}
.switch input:checked + i { background: linear-gradient(180deg, #7df5ae, #1fc46a); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--lemon); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: .5; }

.bet__cash { flex: 1 1 auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.autox {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 11px 4px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5);
  font-family: var(--font-display);
  color: var(--lemon);
}
.autox input { width: 46px; padding: 0; border: 0; outline: 0; background: none; text-align: right; font-family: var(--font-display); font-size: 16px; color: var(--lemon); }
.autox input:disabled { opacity: .5; }

/* ---------- side panel ---------- */
.side { display: flex; flex-direction: column; min-height: 0; padding: 12px; }

.tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: var(--well);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .45);
}
.tab {
  padding: 6px 4px 7px;
  border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-dim);
  background: none;
  white-space: nowrap;
  transition: color .15s;
}
.tab.is-active {
  color: #fff;
  background: linear-gradient(180deg, #ff86c2, #ff2d87);
  box-shadow: 0 3px 0 #a80d58, inset 0 1.5px 0 rgba(255, 255, 255, .55);
}

.side__summary { display: flex; justify-content: space-between; gap: 10px; padding: 12px 6px 8px; }
.side__summary div { display: grid; gap: 1px; }
.side__summary b { font-family: var(--font-display); font-weight: 400; font-size: 22px; font-variant-numeric: tabular-nums; }
.side__summary span { font-size: 12px; color: var(--ink-dim); }
.side__total { text-align: right; }
.side__total b { color: var(--mint); }

.side__head, .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px 58px 68px;
  align-items: center;
  gap: 6px;
}
.side__head {
  padding: 4px 10px 6px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--ink-dim);
}
.side__head span:nth-child(2), .side__head span:nth-child(4) { text-align: right; }
.side__head span:nth-child(3) { text-align: center; }

.side__list {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .28) transparent;
}
.side__list::-webkit-scrollbar { width: 6px; }
.side__list::-webkit-scrollbar-thumb { border-radius: 6px; background: rgba(255, 255, 255, .28); }

.row {
  padding: 5px 9px;
  border-radius: 14px;
  border: 1.5px solid transparent;
  background: rgba(20, 6, 50, .4);
  font-size: 14px;
}
.row + .row { margin-top: 5px; }
.row.is-won { background: linear-gradient(90deg, rgba(61, 245, 176, .32), rgba(61, 245, 176, .1)); border-color: rgba(61, 245, 176, .6); }
.row.is-lost { opacity: .5; }
.row.is-me { border-color: var(--lemon); }
.who { display: flex; align-items: center; gap: 7px; min-width: 0; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava {
  display: grid; place-items: center; flex: none;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-style: normal; font-size: 14px;
  background: hsl(var(--h, 300) 92% 74%);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), inset 0 2px 0 rgba(255, 255, 255, .55);
}
.num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row.is-won .win { color: var(--mint); }
.xcell { text-align: center; color: var(--ink-dim); }
.xpill { display: inline-block; padding: 1px 8px 2px; font-size: 13px; box-shadow: 0 2px 0 var(--p3), inset 0 1.5px 0 rgba(255, 255, 255, .5); }
.empty { padding: 26px 12px; text-align: center; color: var(--ink-dim); font-size: 14px; }

/* ---------- modals ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center;
  padding: 18px;
  background: rgba(16, 4, 40, .72);
  backdrop-filter: blur(6px);
}
.modal__card {
  position: relative;
  width: min(580px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 22px 24px 20px;
  animation: popIn .28s cubic-bezier(.2, 1.5, .4, 1);
}
.modal__card h2 { margin: 0 0 12px; font-family: var(--font-display); font-weight: 400; font-size: 30px; text-shadow: 0 3px 0 var(--pink-d); }
.modal__close {
  position: absolute; right: 14px; top: 14px;
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  font-family: var(--font-display); font-size: 22px; line-height: 1;
  background: linear-gradient(180deg, #ff97a3, #f03352);
  box-shadow: 0 3px 0 #a3122c, inset 0 1.5px 0 rgba(255, 255, 255, .55);
}
.steps { margin: 0 0 12px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.steps li { position: relative; padding: 9px 12px 9px 50px; border-radius: 16px; background: rgba(20, 6, 50, .4); counter-increment: s; }
.steps li::before {
  content: counter(s);
  position: absolute; left: 10px; top: 50%;
  display: grid; place-items: center;
  width: 30px; height: 30px; margin-top: -15px;
  border-radius: 50%;
  font-family: var(--font-display);
  color: #5a2a00;
  background: linear-gradient(180deg, #fff07a, #ffb300);
  box-shadow: 0 3px 0 #c77700;
}
.muted { margin: 8px 0 0; font-size: 14px; color: var(--ink-dim); }
kbd { padding: 1px 7px; border-radius: 7px; font: 600 12px ui-monospace, Menlo, monospace; color: #fff; background: rgba(20, 6, 50, .6); box-shadow: 0 2px 0 rgba(0, 0, 0, .4); }

/* ---------- forms, wallet, account ---------- */
.modal__card--narrow { width: min(440px, 100%); }
.tabs--two { grid-template-columns: repeat(2, 1fr); }
.cta.is-busy { pointer-events: none; filter: saturate(.55) brightness(.92); }

.form { display: grid; gap: 12px; margin-top: 14px; }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 600; }
.field > span { color: var(--ink-dim); }
.field input {
  width: 100%;
  padding: 11px 14px;
  border: 2px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  outline: 0;
  font-size: 16px; font-weight: 500;
  color: #fff;
  background: var(--well);
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, .4);
  transition: border-color .15s;
}
.field input::placeholder { color: rgba(205, 184, 255, .5); }
.field input:focus { border-color: var(--lemon); }
.field small { font-weight: 500; font-size: 12px; color: var(--ink-dim); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--pink); }
.check--small { align-items: center; gap: 8px; margin-top: -4px; font-size: 13px; color: var(--ink-dim); }
.check--small input { width: 17px; height: 17px; }
.form .chips button { padding: 7px 0 8px; font-size: 15px; }
.form__error { margin: 0; padding: 9px 13px; border-radius: 12px; font-size: 14px; font-weight: 600; color: #ffe1e5; background: rgba(240, 51, 82, .28); border: 1.5px solid rgba(255, 84, 104, .6); }
.form__submit { grid-area: auto; min-height: 58px; width: 100%; margin-top: 2px; }
.form__submit .cta__label { font-size: 21px; }
.form__submit:disabled { cursor: default; }

/* Forgot password: the link beside "Show password", the two reset steps and their link rows. */
.form__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; margin-top: -4px; }
.form__row .check--small { margin-top: 0; }
/* "Reset your password" is the longest title: on a phone it shrinks a little, then wraps, rather than run under the close button. */
#authTitle { padding-right: 36px; font-size: min(30px, 7.4vw); }
.form__lead { margin: 0; }
.form__lead.is-fresh { animation: leadFlash 1.2s ease-out; }
.form__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 22px; margin-top: 4px; }
/* Bigger tap targets on phones without making the rows any taller. */
.form__row .linkbtn, .form__links .linkbtn { margin: -6px 0; padding: 6px 2px; }
.linkbtn:disabled { color: var(--ink-dim); opacity: .65; text-decoration: none; cursor: default; font-variant-numeric: tabular-nums; }
.field input.field__code {
  padding: 8px 10px 9px calc(10px + .45em); /* the extra left padding balances the spacing after the last digit */
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: .45em;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: var(--lemon);
}
.field input.field__code::placeholder { color: rgba(205, 184, 255, .28); }
@keyframes leadFlash { from { color: var(--lemon); } }

.notice { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 14px; font-size: 14px; font-weight: 600; background: rgba(20, 6, 50, .5); border: 1.5px solid rgba(255, 255, 255, .16); }
.notice--good { color: #06402b; background: linear-gradient(180deg, #b6ffe2, var(--mint)); border-color: #0a9e68; }
.notice--bad { color: #ffe1e5; background: rgba(240, 51, 82, .28); border-color: rgba(255, 84, 104, .6); }
.notice--wait::before, .spinner {
  content: ''; flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25);
  border-top-color: var(--lemon);
  animation: spin .8s linear infinite;
}

.wallet__balance { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: -2px 0 12px; padding: 10px 14px; border-radius: 16px; background: var(--well); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .4); }
.wallet__balance span { font-size: 13px; font-weight: 600; color: var(--ink-dim); }
.wallet__balance b { font-family: var(--font-display); font-weight: 400; font-size: 24px; color: var(--lemon); font-variant-numeric: tabular-nums; }
/* The withdraw tab, while some of the player's deposits still has to be played through. */
.notice--due { align-items: flex-start; background: rgba(255, 217, 59, .1); border-color: rgba(255, 217, 59, .55); }
.notice__icon { flex: none; font-size: 20px; line-height: 1.15; }
.notice__body { display: grid; gap: 3px; min-width: 0; }
.notice__body b { font-size: 15px; line-height: 1.25; color: var(--lemon); font-variant-numeric: tabular-nums; }
.notice__body small { font-size: 12.5px; font-weight: 500; line-height: 1.35; color: var(--ink-dim); }

.txns { display: grid; gap: 6px; margin-top: 14px; max-height: 46vh; overflow-y: auto; }
.txn { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 14px; background: rgba(20, 6, 50, .4); font-size: 14px; }
.txn__what { display: grid; min-width: 0; }
.txn__what span { font-size: 12px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.txn__amount { font-family: var(--font-display); font-size: 16px; font-variant-numeric: tabular-nums; }
.txn--deposit .txn__amount { color: var(--mint); }
.txn__status { padding: 2px 9px 3px; border-radius: 999px; font-size: 12px; font-weight: 700; color: #5a2a00; background: var(--lemon); }
.txn--completed .txn__status { color: #06402b; background: var(--mint); }
.txn--failed .txn__status, .txn--rejected .txn__status, .txn--reversed .txn__status { color: #fff; background: var(--cherry); }
.txn--failed .txn__amount, .txn--rejected .txn__amount, .txn--reversed .txn__amount { opacity: .5; text-decoration: line-through; }

.facts { display: grid; gap: 6px; margin: 0 0 12px; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 13px; border-radius: 14px; background: rgba(20, 6, 50, .4); font-size: 14px; }
.facts dt { color: var(--ink-dim); }
.facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.facts--tight { margin: 0; }
.facts--tight div:last-child dd { color: var(--lemon); }
#accountBalance { font-family: var(--font-display); font-weight: 400; font-size: 18px; color: var(--lemon); font-variant-numeric: tabular-nums; }
.account__money { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 2px 0 14px; }
.account__money .cta--cash { animation: none; }
.account__money + .muted { margin: 0 0 14px; }

/* ---------- referrals ---------- */
.bonusline { margin: -4px 0 12px; padding: 8px 13px; border-radius: 14px; font-size: 13px; font-weight: 600; color: #5a2a00; background: linear-gradient(180deg, #fff07a, #ffcf3f); }
#accountBonus { color: var(--lemon); }
.invite { margin: 0 0 14px; padding: 14px 14px 12px; border-radius: 18px; background: rgba(20, 6, 50, .4); border: 1.5px dashed rgba(255, 217, 59, .55); }
.invite h3 { margin: 0 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 21px; color: var(--lemon); }
.invite .muted { margin: 0 0 10px; font-size: 13px; }
.copyrow { display: flex; gap: 8px; align-items: center; }
.copyrow input {
  flex: 1; min-width: 0;
  padding: 9px 12px;
  border: 2px solid rgba(255, 255, 255, .14); border-radius: 12px; outline: 0;
  font: 500 13px ui-monospace, 'SF Mono', Menlo, monospace;
  color: #fff; background: var(--well);
}
.copyrow .pill-btn { flex: none; padding: 8px 14px 9px; font-size: 14px; }
.tally { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0 0; }
.tally div { display: grid; gap: 1px; padding: 7px 4px; border-radius: 12px; text-align: center; background: rgba(20, 6, 50, .45); }
.tally dd { margin: 0; font-family: var(--font-display); font-size: 19px; font-variant-numeric: tabular-nums; }
.tally dt { order: 2; font-size: 11px; color: var(--ink-dim); }
.invite .txns { margin-top: 8px; max-height: 150px; }
/* On a phone the longer statuses ("Signed up · not played yet") wrap rather than hide the friend's join date. */
.invite .txn { grid-template-columns: minmax(6.2em, 1fr) auto; padding: 6px 12px; font-size: 13px; }
.invite .txn__status { text-align: center; line-height: 1.2; text-wrap: balance; border-radius: 11px; }
.invite + .muted { margin: 0 0 14px; }

/* ---------- sign-up bonus ---------- */
/* A gold ticket at the top of the sign-up form. */
.bonus-ribbon {
  position: relative;
  display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 2px 12px;
  padding: 12px 16px 13px 14px;
  border-radius: 18px;
  color: #5a2a00;
  background: linear-gradient(135deg, #fff7a8, #ffd93b 48%, #ffaa1c);
  box-shadow: 0 4px 0 #c76a00, 0 8px 22px rgba(255, 190, 40, .3), inset 0 2px 0 rgba(255, 255, 255, .8);
  overflow: hidden;
  isolation: isolate;
}
.bonus-ribbon::before { /* the ticket's dashed edge */
  content: '';
  position: absolute; inset: 5px;
  border: 2px dashed rgba(180, 90, 0, .4);
  border-radius: 13px;
  pointer-events: none;
}
.bonus-ribbon::after { /* the same shine as the header button */
  content: '';
  position: absolute; top: 0; bottom: 0; left: 0; z-index: -1;
  width: 35%;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .85) 50%, transparent 80%);
  transform: translateX(-140%) skewX(-20deg);
  animation: shine 3.4s ease-in-out .8s infinite;
  pointer-events: none;
}
.bonus-ribbon__gift { grid-row: span 2; font-size: 40px; line-height: 1; filter: drop-shadow(0 3px 0 rgba(150, 70, 0, .3)); animation: giftShake 3.4s ease-in-out .8s infinite; }
.bonus-ribbon__title { font-family: var(--font-display); font-weight: 400; font-size: 23px; line-height: 1.05; letter-spacing: .3px; color: #8a1048; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); text-wrap: balance; }
.bonus-ribbon__text { font-size: 13px; font-weight: 600; line-height: 1.3; }
/* How the bonus becomes cash, under both lines and the gift, set off by the ticket's own dashes. */
.bonus-ribbon__terms { grid-column: 1 / -1; margin-top: 7px; padding-top: 7px; border-top: 2px dashed rgba(180, 90, 0, .3); font-size: 12px; font-weight: 600; line-height: 1.3; color: #6e3700; }

/* The deposit tab, while the player can still get it. */
.notice--bonus { color: #5a2a00; background: linear-gradient(180deg, #fff3a0, #ffcf3f); border: 0; box-shadow: 0 3px 0 #c76a00, inset 0 1.5px 0 rgba(255, 255, 255, .75); }
.notice--bonus::before { content: '🎁'; flex: none; font-size: 22px; line-height: 1; }
.form .chips button { position: relative; }
.chips button[data-badge] { box-shadow: 0 3px 0 #34128f, 0 0 0 2px var(--lemon), inset 0 1.5px 0 rgba(255, 255, 255, .4); }
.chips button[data-badge]::after {
  content: attr(data-badge);
  position: absolute; top: -10px; right: -6px;
  padding: 1px 6px 2px;
  border-radius: 999px;
  font: 400 12px var(--font-display); letter-spacing: .3px;
  color: #5a2a00;
  background: linear-gradient(180deg, #fff27a, #ffb300);
  box-shadow: 0 2px 0 #c77700;
  transform: rotate(8deg);
  pointer-events: none;
}

/* In the profile, and in How to play. */
.facts .facts__offer { background: rgba(255, 217, 59, .14); box-shadow: inset 0 0 0 1.5px rgba(255, 217, 59, .55); }
.facts__offer dd { color: var(--lemon); }
.help__bonus { margin: 0 0 4px; padding: 9px 13px; border-radius: 14px; font-size: 14px; font-weight: 600; color: #5a2a00; background: linear-gradient(180deg, #fff3a0, #ffcf3f); box-shadow: 0 3px 0 #c76a00; }
.help__bonus::before { content: '🎁 '; }

/* The celebration when it arrives: a big gift on a slowly turning sunburst. */
.bonusmodal { text-align: center; }
.bonusmodal__gift { position: relative; display: grid; place-items: center; width: 136px; height: 136px; margin: 0 auto 4px; }
.bonusmodal__gift::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 217, 59, .5) 0 9deg, transparent 9deg 22.5deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 35%, transparent);
  mask-image: radial-gradient(closest-side, #000 35%, transparent);
  animation: spin 16s linear infinite;
}
.bonusmodal__gift span {
  position: relative;
  font-size: 78px; line-height: 1;
  filter: drop-shadow(0 6px 0 rgba(20, 6, 50, .45));
  animation: giftPop .7s cubic-bezier(.2, 1.6, .4, 1) both, giftBob 1.6s ease-in-out .7s infinite alternate;
}
.bonusmodal h2 { margin: 0 0 6px; font-size: 34px; line-height: 1.1; text-wrap: balance; color: var(--lemon); text-shadow: 0 3px 0 var(--pink-d), 0 8px 18px rgba(0, 0, 0, .35); }
.bonusmodal__text { margin: 0 auto 16px; max-width: 330px; font-size: 16px; line-height: 1.4; }

/* ---------- full-page effects canvas ---------- */
.fx { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100%; pointer-events: none; }

/* ---------- keyframes ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { to { transform: translate(60px, -50px) scale(1.15); } }
@keyframes hover { from { transform: translateY(-2px) rotate(-5deg); } to { transform: translateY(3px) rotate(-9deg); } }
@keyframes stripes { to { background-position: 39.598px 0; } }
@keyframes stripesSm { to { background-position: 25.456px 0; } }
@keyframes popIn { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes bump { 40% { transform: scale(1.12); } }
@keyframes wiggle { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg) scale(1.05); } }
@keyframes pillIn { from { transform: scale(0) translateX(-20px); } to { transform: none; } }
@keyframes multBump { 35% { transform: scale(1.16) rotate(-2deg); } }
@keyframes cashPulse { from { transform: scale(1); } to { transform: scale(1.035); filter: brightness(1.1); } }
@keyframes shakeX { 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes stageShake { 15% { transform: translate(-7px, 4px) rotate(-.5deg); } 30% { transform: translate(6px, -4px) rotate(.4deg); } 45% { transform: translate(-5px, 2px); } 60% { transform: translate(4px, -2px); } 80% { transform: translate(-2px, 1px); } }
@keyframes flash { from { opacity: .5; } to { opacity: 0; } }
@keyframes boomFlash { from { opacity: .36; } to { opacity: 0; } }
@keyframes zonePop { 0% { transform: scale(.5); } 45% { transform: scale(1.28); } 100% { transform: none; } }
@keyframes slam { from { transform: scale(2.4) rotate(-7deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes wonGlow {
  0% { box-shadow: 0 6px 0 rgba(20, 6, 50, .6), 0 0 0 0 rgba(255, 217, 59, .9), inset 0 2px 0 rgba(255, 255, 255, .2); transform: scale(1.02); }
  100% { box-shadow: 0 6px 0 rgba(20, 6, 50, .6), 0 0 0 26px rgba(255, 217, 59, 0), inset 0 2px 0 rgba(255, 255, 255, .2); }
}
@keyframes bannerPop {
  0% { opacity: 0; transform: scale(.2) rotate(-14deg); }
  18% { opacity: 1; transform: scale(1.18) rotate(-5deg); }
  30% { transform: scale(1) rotate(-4deg); }
  75% { opacity: 1; transform: scale(1) rotate(-4deg); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.05) rotate(-4deg); }
}
@keyframes winsSlide { to { transform: translateX(-50%); } }
@keyframes shine { 0%, 55% { transform: translateX(-140%) skewX(-20deg); } 100% { transform: translateX(330%) skewX(-20deg); } }
@keyframes giftShake { 0%, 62%, 100% { transform: none; } 68% { transform: rotate(-14deg) scale(1.12); } 74% { transform: rotate(12deg) scale(1.12); } 80% { transform: rotate(-8deg) scale(1.06); } 86% { transform: rotate(4deg); } }
@keyframes giftPop { from { transform: scale(.2) rotate(-25deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes giftBob { from { transform: translateY(2px) rotate(-3deg); } to { transform: translateY(-6px) rotate(3deg); } }
@keyframes toastIn {
  0% { opacity: 0; transform: translateY(-16px) scale(.8); }
  10%, 82% { opacity: 1; transform: none; }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* ---------- responsive ---------- */
/* Between the widths where the offers get their own row and where everything fits, the sign-up offer
   takes the room of the test-mode / 18+ chip (which narrower screens never show either). */
@media (min-width: 1081px) and (max-width: 1279px) {
  .topbar.has-welcome .fun-chip { display: none; }
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: 290px minmax(0, 1fr); }
  .fun-chip { display: none; }
  /* With the sign-up offer showing there is no room for the offers beside the header buttons: they get a
     row of their own under them. One offer fills it on one line; a pair shares it, each with its small
     words on a second line. (Without it, "Refer to earn" stays in the header, as on a wide screen.) */
  .topbar.has-welcome { flex-wrap: wrap; row-gap: 10px; }
  .has-welcome .promos { order: 5; flex: 1 0 100%; gap: 10px; margin-left: 0; }
  .has-welcome .promos + .topbar__right { margin-left: auto; }
  .has-welcome .promos > button { flex: 1 1 0; min-width: 0; }
  .has-welcome .welcome-btn { display: block; padding: 7px 14px 8px; }
  .has-welcome .refer-btn small { display: inline; }
  .welcome-btn small, .refer-btn small { font-size: 13px; }
  .welcome-btn small::before, .refer-btn small::before { content: ' · '; }
  .promos.is-pair { align-items: stretch; }
  .promos.is-pair > button { display: grid; justify-items: center; align-content: center; padding: 5px 10px 7px; line-height: 1.12; white-space: normal; text-align: center; text-wrap: balance; }
  .promos.is-pair small { display: block; line-height: 1.2; }
  .promos.is-pair small::before { content: none; }
}

@media (max-width: 900px) {
  .app { height: auto; min-height: 100vh; min-height: 100dvh; padding: 10px 12px 18px; gap: 10px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .center { grid-template-rows: auto auto auto; }
  .stage-frame { height: clamp(290px, 62vw, 460px); }
  .side { order: 2; height: 440px; }
  /* From here down the offers always have their own row, "Refer to earn" alone included: beside the
     header buttons it would squeeze the name of the game. */
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .promos { order: 5; flex: 1 0 100%; gap: 10px; margin-left: 0; }
  .promos:not([hidden]) + .topbar__right { margin-left: auto; }
  .promos > button { flex: 1 1 0; min-width: 0; }
  .refer-btn small { display: inline; }
}

@media (max-width: 620px) {
  .bets { grid-template-columns: minmax(0, 1fr); }
  .brand { gap: 8px; }
  .brand__plane { width: 48px; height: 34px; }
  .brand__name { display: grid; font-size: 19px; line-height: .98; }
  .brand__name b { margin-left: 0; }
  .brand__tag { display: none; }
  .cta { min-height: 84px; }
  .topbar { gap: 8px; flex-wrap: wrap; }
  .topbar__right { gap: 6px; }
  .promos { gap: 8px; }
  .refer-btn, .welcome-btn { padding: 6px 12px 7px; font-size: 15px; }
  /* The sign-up offer keeps its two lines even alone: on one line its words would not fit a phone. */
  .welcome-btn { display: grid; justify-items: center; align-content: center; white-space: normal; text-wrap: balance; text-align: center; }
  .welcome-btn small::before { content: none; }
  .promos.is-pair > button { padding: 5px 8px 7px; font-size: 14px; }
  .promos.is-pair small { font-size: 11.5px; }
  .icon-btn { width: 36px; height: 36px; }
  .icon-btn svg { width: 19px; height: 19px; }
  .balance { font-size: 17px; padding-right: 12px; }
  .balance__cur { display: none; }
  .pill-btn { padding: 7px 12px 8px; font-size: 14px; }
  .guest { gap: 5px; }
  .balance__coin { width: 26px; height: 26px; }
  .history__label { display: none; }
  .history, .wins { padding-left: 9px; }
  .stage-frame { padding: 6px; border-radius: 26px; }
  .stage { border-radius: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .blobs i, .brand__plane, .stage-frame, .stage.is-shake, .cta--cash, .spinner, .wins__track { animation: none !important; }
  .welcome-btn::after, .welcome-btn i, .bonus-ribbon::after, .bonus-ribbon__gift, .bonusmodal__gift::before, .bonusmodal__gift span { animation: none !important; }
  .welcome-btn::after, .bonus-ribbon::after { display: none; }
  .wins__view { overflow-x: auto; }
}

/* ---------- add to home screen ---------- */
.installsheet {
  position: fixed; z-index: 55; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  width: min(520px, calc(100% - 24px));
  display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: start;
  padding: 16px 18px 14px;
  background: linear-gradient(180deg, #5b2bc2, #3a1683); /* solid: the game must not show through */
  box-shadow: 0 6px 0 rgba(20, 6, 50, .6), 0 22px 50px rgba(0, 0, 0, .55), inset 0 2px 0 rgba(255, 255, 255, .2);
  transform: translateX(-50%);
  animation: sheetUp .45s cubic-bezier(.2, 1.3, .4, 1);
}
.installsheet[hidden] { display: none; }
.installsheet__icon { width: 56px; height: 56px; border-radius: 14px; box-shadow: 0 3px 0 rgba(20, 6, 50, .6); }
.installsheet h3 { margin: 2px 0 4px; font-family: var(--font-display); font-weight: 400; font-size: 21px; line-height: 1.15; text-shadow: 0 2px 0 var(--pink-d); }
.installsheet p { margin: 0; font-size: 14px; color: var(--ink-dim); }
.installsheet__steps { margin: 8px 0 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }
.installsheet__steps b { color: var(--lemon); }
.installsheet__actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: flex-end; gap: 16px; }
.installsheet__actions .pill-btn { padding-inline: 20px; }
.account__install { display: block; width: 100%; margin-top: 14px; }
.account__install[hidden] { display: none; }
@keyframes sheetUp { from { transform: translate(-50%, 140%); } to { transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .installsheet { animation: none; } }
.account__install.pill-btn { white-space: normal; }
