/* ═══════════════════════════════════════════════════════════════════
   Wheel-Spin Lander — master stylesheet
   Geo theming: override the CSS variables below (set by js/app.js
   from the campaign config, or ship a per-geo theme.css).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Palette (geo-themeable) */
  --gold:        #FFD700;
  --gold-soft:   #FFE066;
  --gold-deep:   #B8860B;
  --gold-dim:    #C9A200;
  --amber:       #F59E0B;
  --amber-hi:    #FCD34D;
  --amber-pale:  #FDE68A;
  --amber-deep:  #92400E;

  --bg-grad-1:   #2A0005;      /* page gradient stops */
  --bg-grad-2:   #180003;
  --bg-grad-3:   #0A0002;
  --bg-glow:     rgba(180, 0, 20, 0.17);   /* top ambient bloom */

  --live:        #00FF88;
  --danger:      #EF4444;

  --card-bg:     #0F0B18;      /* modal card */
  --stage-bg:    #161026;      /* chip stage */

  --font-display: 'Cinzel', serif;
  --font-ui:      'Inter', sans-serif;
  --font-btn:     'Anton', Impact, 'Arial Narrow', sans-serif;
}

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

/* the hidden attribute must always win over display:flex/block rules */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  color: #fff;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  background: var(--bg-grad-3);
}
body { overflow-x: hidden; }

img { user-select: none; }
button { -webkit-appearance: none; appearance: none; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-grad-3); }
::-webkit-scrollbar-thumb { background: var(--gold-dim); border-radius: 2px; }

/* ── Page shell ── */
.page {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(170deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 40%, var(--bg-grad-3) 100%);
  position: relative;
}

/* Optional full-page photo. The palette gradient is painted over it at
   --bg-dim opacity so the geo colours still tint the picture and copy stays
   readable; the page's own gradient goes transparent while a photo is set. */
.page__bg {
  position: fixed; inset: 0;
  z-index: 0;
  pointer-events: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.page__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(170deg, var(--bg-grad-1) 0%, var(--bg-grad-2) 40%, var(--bg-grad-3) 100%);
  opacity: var(--bg-dim, 0.6);
}
.page--has-bg { background: transparent; }

.page__glows { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.page__glow { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%; }
.page__glow--top {
  top: -8%; width: 480px; height: 480px;
  background: radial-gradient(circle, var(--bg-glow) 0%, transparent 70%);
}
.page__glow--bottom {
  bottom: 15%; width: 400px; height: 300px;
  background: radial-gradient(circle, rgba(255,215,0,0.05) 0%, transparent 70%);
}

/* ── Countdown banner ── */
.banner {
  width: 100%;
  height: 36px;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(90deg, #140A00, #221200, #140A00);
  border-bottom: 1px solid rgba(255,215,0,0.22);
}
.banner__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  flex-shrink: 0;
  animation: countdownPulse 1.2s ease-in-out infinite;
}
.banner__text {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.13em;
  color: rgba(255,215,0,0.88);
  text-transform: uppercase;
}
.banner__timer { color: var(--gold); font-variant-numeric: tabular-nums; }

/* ── Live ticker ── */
.ticker {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 10px;
  overflow: hidden;
  background: linear-gradient(90deg, rgba(8,3,2,0.97), rgba(18,8,4,0.97));
  border-bottom: 1px solid rgba(255,215,0,0.14);
  position: relative;
  z-index: 10;
}
.ticker__badge {
  display: flex; align-items: center; gap: 5px;
  flex-shrink: 0;
  padding-right: 8px;
  border-right: 1px solid rgba(255,215,0,0.18);
}
.ticker__live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  animation: livePulse 1.5s ease-in-out infinite;
}
.ticker__live-label {
  font-size: 9px; font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--live);
}
.ticker__viewport { flex: 1; overflow: hidden; position: relative; }
.ticker__viewport::before,
.ticker__viewport::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 24px; z-index: 2;
}
.ticker__viewport::before { left: 0;  background: linear-gradient(90deg,  rgba(8,3,2,0.97), transparent); }
.ticker__viewport::after  { right: 0; background: linear-gradient(270deg, rgba(8,3,2,0.97), transparent); }
.ticker__scroll {
  display: inline-block;
  white-space: nowrap;
  font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,0.72);
  letter-spacing: 0.02em;
  animation: tickerScroll 22s linear infinite;
}

/* ── Header ── */
.header {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 12px;
  border-bottom: 1px solid rgba(255,215,0,0.1);
}
.header__logo {
  display: flex; align-items: center; justify-content: center;
  min-width: 180px; height: 44px;
}
.header__logo img { max-height: 44px; max-width: 220px; display: block; }
.header__logo--placeholder {
  border-radius: 10px;
  background: rgba(255,215,0,0.06);
  border: 1.5px dashed rgba(255,215,0,0.35);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255,215,0,0.5);
}
.header__license {
  margin-top: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(255,215,0,0.07);
  border: 1px solid rgba(255,215,0,0.24);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255,215,0,0.7);
}

/* ── Main ── */
.main {
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 28px 20px 32px;
}

/* ── Hero ── */
.hero { text-align: center; }
.hero__badge {
  display: block;
  margin: 0 auto 14px;
  max-height: 110px;
  max-width: 200px;
  /* geo art comes on a black background — screen blend melts it into the page */
  mix-blend-mode: screen;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,0.5));
  animation: float 4s ease-in-out infinite;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 5.8vw, 28px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 1.2;
  margin: 0 0 12px;
  filter: drop-shadow(0 2px 12px rgba(0,0,0,0.85));
}
.hero__subtitle {
  margin: 0 auto;
  font-size: 14px;
  color: rgba(255,255,255,0.58);
  line-height: 1.55;
  max-width: 300px;
}
.hero__subtitle strong { color: rgba(255,215,0,0.75); font-weight: 600; }

/* ── Wheel ── */
.wheel-area { display: flex; justify-content: center; position: relative; }
.wheel-side {
  position: absolute;
  top: 50%;
  width: 110px;
  max-height: 170px;
  object-fit: contain;
  mix-blend-mode: screen;  /* black-background geo art blends into the page */
  opacity: 0.9;
  pointer-events: none;
  z-index: 1;
}
.wheel-side--left  { left: -34px;  transform: translateY(-50%) rotate(-8deg); }
.wheel-side--right { right: -34px; transform: translateY(-50%) rotate(8deg) scaleX(-1); }
.wheel {
  width: 300px; height: 300px;
  border-radius: 50%;
  border: 4px solid var(--gold-dim);
  background: radial-gradient(circle, rgba(255,215,0,0.06) 0%, transparent 70%);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  cursor: pointer;                 /* the wheel is tappable, same as the button */
  -webkit-tap-highlight-color: transparent;
}
.wheel:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.wheel--busy { cursor: default; }
.wheel__dots { position: absolute; inset: 0; }
.wheel__dot {
  position: absolute;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 6px var(--gold);
  transform: translate(-50%, -50%);   /* JS supplies the centre point */
}
.wheel__rotor {
  width: 280px; height: 280px;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  will-change: transform;
}
.wheel__rotor--spinning { transition: transform 4.6s cubic-bezier(0.17, 0.67, 0.10, 1); }
.wheel__img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
  mix-blend-mode: screen;
}
.wheel__labels {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.wheel__hub {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 96px;
  z-index: 3;
  pointer-events: none;
}
.wheel__hub-label {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  font-family: var(--font-btn);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  pointer-events: none;
}
.wheel__pointer {
  position: absolute;
  left: 50%; top: -22px;
  transform: translateX(-50%);
  width: 48px;
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}

/* ── CTA ── */
.cta { position: relative; display: flex; flex-direction: column; gap: 14px; }
.cta__bloom {
  position: absolute; bottom: 24px; left: 10%; right: 10%; height: 22px;
  border-radius: 50%;
  background: rgba(255,180,0,0.35);
  filter: blur(18px);
  pointer-events: none;
}
.cta__note {
  margin: 0;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.05em;
  text-align: center;
}

/* 3D gold casino button */
.spin-btn {
  background: linear-gradient(180deg, #FFF5A0 0%, #FFD700 28%, #FFA800 62%, #A06800 100%);
  color: #1A0800;
  font-family: var(--font-btn);
  font-weight: 400;
  font-style: italic;
  font-size: 26px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 rgba(255,255,255,0.4), 0 -1px 0 rgba(0,0,0,0.15);
  border: 2.5px solid #6A3800;
  border-radius: 16px;
  width: 100%;
  height: 66px;
  cursor: pointer;
  position: relative;
  z-index: 1;
  box-shadow:
    0 8px 0 #5A2E00,
    0 12px 28px rgba(0,0,0,0.7),
    inset 0 2px 0 rgba(255,255,255,0.65),
    inset 0 -3px 0 rgba(0,0,0,0.25);
  transition: top 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
  top: 0;
}
.spin-btn:hover:not(:disabled) { filter: brightness(1.07); }
.spin-btn:active:not(:disabled) {
  top: 6px;
  box-shadow:
    0 2px 0 #5A2E00,
    0 4px 14px rgba(0,0,0,0.6),
    inset 0 2px 0 rgba(255,255,255,0.5),
    inset 0 -2px 0 rgba(0,0,0,0.2);
}
.spin-btn:disabled { opacity: 0.5; cursor: not-allowed; top: 0; }
.spin-btn--compact { font-size: 18px; }
.spin-btn-pulse { animation: goldBtnPulse 2.4s ease-in-out infinite; }

/* ── Payments ──
   One bordered panel split into cells: a logo row on top, caption below. */
.payments {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 15px 4px 13px;
  border-radius: 16px;
  border: 1px solid rgba(255,215,0,0.34);
  background: linear-gradient(180deg,
    rgba(38,27,12,0.95) 0%, rgba(16,10,5,0.97) 55%, rgba(9,5,3,0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 10px 30px rgba(0,0,0,0.55);
  overflow: hidden;
}
/* hairline of light along the top edge */
.payments::before {
  content: '';
  position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,215,0,0.6), transparent);
}

.payments__group {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;   /* a cell holds either logos or a caption, centred */
  gap: 9px;
}
.payments__group + .payments__group {
  border-left: 1px solid rgba(255,215,0,0.15);
}

.payments__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 50px;   /* keeps captions aligned across cells */
  width: 100%;
}
.payments__logos img {
  height: 50px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
  padding: 0;
  margin: 0;
}
/* Two or more logos share one cell: width is the limit, so let the height
   follow the aspect ratio instead of leaving dead space inside a 50px box. */
.payments__logos--multi img {
  height: auto;
  max-height: 50px;
  max-width: 48%;
}

/* Shown only for methods that have no logo yet — it is the cell's content,
   not a label under artwork, so it can carry a little more weight. */
.payments__caption {
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  text-align: center;
  /* break long words only when they genuinely cannot fit the cell */
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ── Footer ── */
.footer { padding-top: 4px; border-top: 1px solid rgba(255,215,0,0.07); }
.footer__badges {
  display: flex; justify-content: center; gap: 20px;
  margin-bottom: 14px;
}
.footer__badge { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer__badge-circle {
  width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,215,0,0.16), rgba(255,215,0,0.04) 70%);
  border: 1.5px solid rgba(255,215,0,0.32);
  box-shadow: 0 2px 10px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.footer__badge-circle svg { width: 26px; height: 26px; display: block; }

/* Uploaded icon art: fills its tile edge to edge, the drawn frame steps aside */
.icon-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.icon-tile--custom { background: none !important; border-color: transparent !important; box-shadow: none !important; }
/* medallion art reads larger than a drawn glyph: give the custom tiles the room of the reference design */
/* one size for all six, footer coins and trust tiles alike (owner, 2026-09-16) */
.footer__badge-circle.icon-tile--custom, .trust__icon.icon-tile--custom { width: 50px; height: 50px; }
/* desktop (owner, 2026-09-17): equal 60px looked odd side by side - footer coins
   smaller, trust tiles larger, and both icon rows on ONE horizontal line. The
   74px = trust padding 26 + title block 36 + half tile 36 - half coin 24; both
   blocks top-aligned so the sum holds whatever the disclaimer length.
   `section.` prefix outranks the later desktop `.footer { padding-top: 0 }`. */
@media (min-width: 1024px) {
  .footer__badge-circle.icon-tile--custom { width: 48px; height: 48px; }
  .trust__icon.icon-tile--custom { width: 72px; height: 72px; }
  section.footer { align-self: start; }
  /* pad only while the trust card is actually shown - TZ, ZA v1 and native1 hide it */
  section.footer:has(~ section.trust:not([hidden])) { padding-top: 74px; }
  section.trust { align-self: start; }
}
.footer__badge-label { font-size: 8px; color: rgba(255,255,255,0.25); letter-spacing: 0.04em; }
.footer__disclaimer {
  margin: 0 auto;
  text-align: center;
  font-size: 10px;
  color: rgba(255,255,255,0.18);
  line-height: 1.7;
  max-width: 320px;
}
.footer__disclaimer a,
.footer__disclaimer .footer__link { color: rgba(255,215,0,0.45); text-decoration: none; }

/* ── Trust card ── */
.trust {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(12,3,5,0.92), rgba(22,6,10,0.92));
  border: 1px solid rgba(255,215,0,0.18);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.trust__title {
  margin: 0 0 14px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em;
  color: rgba(201,162,0,0.7);
  text-transform: uppercase;
}
.trust__row { display: flex; justify-content: space-around; gap: 8px; }
.trust__item { display: flex; flex-direction: column; align-items: center; gap: 7px; flex: 1; }
.trust__icon {
  width: 50px; height: 50px; border-radius: 12px;
  background: linear-gradient(145deg, rgba(255,215,0,0.14), rgba(255,215,0,0.03));
  border: 1px solid rgba(255,215,0,0.32);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
  overflow: hidden;
}
.trust__icon svg { width: 32px; height: 32px; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); }
.trust__label {
  font-size: 10px; font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-align: center;
  line-height: 1.3;
  letter-spacing: 0.02em;
}
.trust__divider { width: 1px; background: rgba(255,215,0,0.12); align-self: stretch; margin: 4px 0; }

/* ═══ Modals ═══ */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(3, 1, 10, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 0 16px;
  overflow-y: auto;
}
.modal--step2 { z-index: 210; background: rgba(3, 1, 10, 0.95); }

.modal__card {
  position: relative;
  width: 100%;
  max-width: 370px;
  margin: 16px 0;
  border-radius: 20px;
  background: var(--card-bg);
  border: 1.5px solid rgba(212,175,55,0.5);
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.08),
    0 0 60px rgba(212,175,55,0.12),
    0 40px 80px rgba(0,0,0,0.9);
  overflow: hidden;
}
.modal--step2 .modal__card {
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.08),
    0 0 50px rgba(139,92,246,0.18),
    0 0 80px rgba(212,175,55,0.1),
    0 40px 80px rgba(0,0,0,0.92);
}

.modal__edge {
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent 0%, #D97706 20%, #FCD34D 50%, #D97706 80%, transparent 100%);
}
.modal__edge--violet {
  background: linear-gradient(90deg, transparent 0%, #7C3AED 15%, #D97706 35%, #FCD34D 50%, #D97706 65%, #7C3AED 85%, transparent 100%);
}
.modal__glow {
  position: absolute; top: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  pointer-events: none;
}
.modal__glow--left  { left: -40px;  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 70%); }
.modal__glow--right { right: -40px; background: radial-gradient(circle, rgba(245,158,11,0.1)  0%, transparent 70%); }

.modal__body {
  padding: 26px 20px 22px;
  display: flex; flex-direction: column; align-items: center;
}

.modal__title {
  margin: 0 0 6px;
  text-align: center;
  font-size: 26px; font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.1;
  /* background-image longhand: the `background` shorthand would reset
     background-clip and turn the title into a solid gold rectangle */
  background-image: linear-gradient(180deg, #FFFBEB 0%, #FCD34D 30%, #F59E0B 60%, #92400E 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 2px 10px rgba(245,158,11,0.4));
}
/* heading with no sentence under it — keep it off the artwork */
.modal__title--solo { margin-bottom: 18px; }
.modal__title--xl {
  font-size: 30px;
  background-image: linear-gradient(180deg, #FFFBEB 0%, #FCD34D 28%, #F59E0B 58%, #92400E 100%);
  filter: drop-shadow(0 2px 14px rgba(245,158,11,0.5));
}
.modal__sub {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.38);
  line-height: 1.5;
}
.modal__sub strong { color: rgba(253,230,138,0.9); font-weight: 700; }
.modal__sub .modal__sub-alt { color: rgba(255,255,255,0.72); font-weight: 700; }

/* Stage (chip / chest container) */
.modal__stage {
  width: 100%;
  border-radius: 16px;
  background: var(--stage-bg);
  border: 1px solid rgba(212,175,55,0.2);
  box-shadow: 0 0 28px rgba(212,175,55,0.1), inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 20px 16px 14px;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
}
.modal__stage--chest {
  background: linear-gradient(160deg, #120D22 0%, #0D0918 100%);
  border-color: rgba(212,175,55,0.22);
  box-shadow:
    0 0 30px rgba(139,92,246,0.12),
    0 0 20px rgba(212,175,55,0.08),
    inset 0 1px 0 rgba(255,255,255,0.04);
  padding: 14px 14px 10px;
  gap: 10px;
}
.modal__stage-bloom {
  position: absolute; top: 40%; left: 50%;
  transform: translate(-50%, -50%);
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.18) 0%, transparent 68%);
  pointer-events: none;
}
.modal__stage-bloom--violet {
  top: 55%;
  width: 280px; height: 240px;
  background: radial-gradient(ellipse, rgba(245,158,11,0.16) 0%, rgba(139,92,246,0.1) 45%, transparent 72%);
}

/* Chip orbit */
.chip-orbit {
  position: relative;
  width: 230px; height: 230px;
  display: flex; align-items: center; justify-content: center;
}
.chip-orbit__ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.chip-orbit__ring--1 {
  inset: -10px;
  border: 1.5px solid transparent;
  background:
    linear-gradient(var(--stage-bg), var(--stage-bg)) padding-box,
    linear-gradient(90deg, rgba(245,158,11,0.6) 0%, transparent 35%, rgba(245,158,11,0.1) 60%, rgba(245,158,11,0.7) 100%) border-box;
  transform: rotateX(72deg);
  animation: orbitalSpin 3.2s linear infinite;
}
.chip-orbit__ring--2 {
  inset: -18px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--stage-bg), var(--stage-bg)) padding-box,
    linear-gradient(270deg, rgba(245,158,11,0.45) 0%, transparent 40%, rgba(245,158,11,0.08) 65%, rgba(245,158,11,0.5) 100%) border-box;
  transform: rotateX(68deg) rotateZ(40deg);
  animation: orbitalSpinRev 4.8s linear infinite;
}
.chip-orbit__chip { animation: chipFloat 3.4s ease-in-out infinite; z-index: 1; }

/* Custom chip artwork replaces the drawn SVG — the orbit rings would fight
   with a photo, so drop the fixed square and hide them. */
.chip-orbit--custom { width: 100%; height: auto; }
.chip-orbit--custom .chip-orbit__ring { display: none; }
.chip-orbit--custom .chip-orbit__chip { width: 100%; display: flex; justify-content: center; }
.chip-custom {
  width: 100%;
  max-width: 280px;
  height: 190px;
  object-fit: contain;
  display: block;
  border-radius: 12px;
  filter: saturate(1.1) drop-shadow(0 8px 24px rgba(0,0,0,0.55))
          drop-shadow(0 4px 14px rgba(245,158,11,0.3));
}

/* Lock / reserved badge */
.modal__lock-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, #0D0C1E, #100F22);
  border: 1px solid rgba(212,175,55,0.4);
  box-shadow: 0 0 12px rgba(212,175,55,0.15), inset 0 1px 0 rgba(255,255,255,0.04);
  margin-top: 4px;
  position: relative;
  z-index: 2;
}
.modal__lock-badge span {
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--amber);
  text-transform: uppercase;
}
.modal__stage--chest .modal__lock-badge { padding: 7px 16px; margin-top: 0; }
.modal__stage--chest .modal__lock-badge span { font-size: 10px; letter-spacing: 0.16em; }

/* Pill badge above chest */
.modal__pill-badge {
  display: inline-flex; align-items: center;
  padding: 5px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245,158,11,0.16), rgba(245,158,11,0.05));
  border: 1px solid rgba(245,158,11,0.42);
  position: relative;
  z-index: 2;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--amber-hi);
  text-transform: uppercase;
}

/* Chest */
.chest {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  justify-content: center;
}
.chest__glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(139,92,246,0.25) 0%, transparent 65%);
  border-radius: 12px;
  pointer-events: none;
}
.chest__img {
  width: 100%;
  max-width: 280px;
  height: 170px;
  object-fit: cover;
  object-position: center 30%;
  border-radius: 12px;
  display: block;
  filter: saturate(1.2) brightness(1.05)
          drop-shadow(0 8px 24px rgba(139,92,246,0.4))
          drop-shadow(0 4px 12px rgba(245,158,11,0.35));
}
.chest__gloss {
  position: absolute; top: 0; left: 0; right: 0; height: 45%;
  border-radius: 12px 12px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 100%);
  pointer-events: none;
}

/* Perks */
.modal__perks {
  display: flex; justify-content: center; gap: 8px;
  margin-bottom: 16px;
  width: 100%;
}
.modal__perk {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(245,158,11,0.07);
  border: 1px solid rgba(245,158,11,0.25);
  font-size: 11px; font-weight: 700;
  color: rgba(253,230,138,0.85);
  letter-spacing: 0.02em;
  text-align: center;
}
.modal__perk--diamond {
  padding: 8px 10px;
  font-size: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.04));
  border-color: rgba(245,158,11,0.3);
  color: rgba(253,230,138,0.9);
}
.modal__perk--diamond::before {
  content: '◆';
  color: var(--amber);
  font-size: 11px;
}

/* Modal CTA */
.modal__cta { position: relative; width: 100%; margin-bottom: 24px; }
/* sits clear of the button's hard bottom edge so the two don't smear together */
.modal__cta-bloom {
  position: absolute; bottom: -18px; left: 12%; right: 12%; height: 20px;
  border-radius: 50%;
  background: rgba(245,158,11,0.32);
  filter: blur(20px);
  pointer-events: none;
}
/* Same 3D gold treatment as the main SPIN button, just a size down. */
.modal__btn {
  display: block;
  width: 100%;
  height: 58px;
  padding: 0 12px;
  border-radius: 14px;
  border: 2.5px solid #6A3800;
  cursor: pointer;
  font-family: var(--font-btn);
  font-weight: 400;
  font-style: italic;
  font-size: 19px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1A0800;
  background: linear-gradient(180deg, #FFF5A0 0%, #FFD700 28%, #FFA800 62%, #A06800 100%);
  text-shadow: 0 2px 0 rgba(255,255,255,0.4), 0 -1px 0 rgba(0,0,0,0.15);
  box-shadow:
    0 6px 0 #5A2E00,
    0 10px 22px rgba(0,0,0,0.65),
    inset 0 2px 0 rgba(255,255,255,0.6),
    inset 0 -3px 0 rgba(0,0,0,0.22);
  position: relative;
  z-index: 1;
  top: 0;
  transition: top 0.08s ease, box-shadow 0.08s ease, filter 0.15s ease;
}
.modal__btn:hover { filter: brightness(1.07); }
.modal__btn:active {
  top: 5px;
  box-shadow:
    0 1px 0 #5A2E00,
    0 3px 10px rgba(0,0,0,0.55),
    inset 0 2px 0 rgba(255,255,255,0.5),
    inset 0 -2px 0 rgba(0,0,0,0.2);
}
/* long labels must not overflow a 370px modal */
@media (max-width: 400px) {
  .modal__btn { font-size: 17px; }
}

/* Timer widget */
.timer {
  width: 100%;
  border-radius: 14px;
  background: linear-gradient(145deg, #0C0A1C, #09071A);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 12px 16px 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.timer__label-row { display: flex; align-items: center; gap: 7px; }
.timer__red-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  animation: redBlink 1s ease-in-out infinite;
  flex-shrink: 0;
}
.timer__label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
}
.timer__digits { display: flex; align-items: center; gap: 10px; }
.timer__col { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.timer__card {
  width: 88px; height: 68px;
  border-radius: 10px;
  background: linear-gradient(160deg, #0E0C20 0%, #080616 100%);
  border: 1px solid rgba(245,158,11,0.2);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.5), 0 0 14px rgba(245,158,11,0.08);
  display: flex; align-items: center; justify-content: center;
}
.timer__value {
  font-family: 'Courier New', monospace;
  font-size: 38px; font-weight: 900; line-height: 1;
  color: var(--amber);
  text-shadow: 0 0 8px rgba(245,158,11,0.7), 0 0 20px rgba(245,158,11,0.3);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}
.timer__unit {
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.3);
  text-transform: uppercase;
}
.timer__colon {
  display: flex; flex-direction: column; gap: 10px;
  padding-bottom: 20px;
}
.timer__colon i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(245,158,11,0.7);
  animation: countdownPulse 1s ease-in-out infinite;
}
.timer__colon i:nth-child(2) { animation-delay: 0.15s; }

/* ── Shared FX classes ── */
.gold-shimmer {
  background: linear-gradient(90deg, var(--gold-deep) 0%, var(--gold-soft) 25%, #FFF8C0 50%, var(--gold-soft) 75%, var(--gold-deep) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerGold 3.5s linear infinite;
}
.rim-glow { animation: rimGlow 2.8s ease-in-out infinite; }
.float { animation: float 4s ease-in-out infinite; }
.winner-pop { animation: winnerPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

/* ── Keyframes ── */
@keyframes countdownPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.65; } }
@keyframes tickerScroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes livePulse {
  0%, 100% { opacity: 1;    box-shadow: 0 0 5px var(--live); }
  50%      { opacity: 0.35; box-shadow: 0 0 12px var(--live); }
}
@keyframes shimmerGold { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes rimGlow {
  0%, 100% { box-shadow: 0 0 20px 4px rgba(255,215,0,0.35), 0 0 60px 10px rgba(255,215,0,0.12), inset 0 0 20px rgba(255,215,0,0.08); }
  50%      { box-shadow: 0 0 32px 8px rgba(255,215,0,0.6),  0 0 80px 20px rgba(255,215,0,0.22), inset 0 0 30px rgba(255,215,0,0.14); }
}
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes winnerPop {
  0%   { transform: scale(0.9)  translateY(8px);  opacity: 0; }
  60%  { transform: scale(1.03) translateY(-2px); opacity: 1; }
  100% { transform: scale(1)    translateY(0);    opacity: 1; }
}
@keyframes orbitalSpin    { from { transform: rotateX(72deg) rotateZ(0deg); }  to { transform: rotateX(72deg) rotateZ(360deg); } }
@keyframes orbitalSpinRev { from { transform: rotateX(68deg) rotateZ(40deg); } to { transform: rotateX(68deg) rotateZ(-320deg); } }
@keyframes redBlink {
  0%, 100% { opacity: 1;    box-shadow: 0 0 5px rgba(239,68,68,0.9); }
  50%      { opacity: 0.35; box-shadow: 0 0 10px rgba(239,68,68,0.4); }
}
@keyframes chipFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes goldBtnPulse {
  0%, 100% {
    box-shadow: 0 8px 0 #5A2E00, 0 12px 28px rgba(0,0,0,0.7),
                0 0 0 0 rgba(255,215,0,0),
                inset 0 2px 0 rgba(255,255,255,0.65), inset 0 -3px 0 rgba(0,0,0,0.25);
  }
  50% {
    box-shadow: 0 8px 0 #5A2E00, 0 12px 28px rgba(0,0,0,0.7),
                0 0 30px 8px rgba(255,200,0,0.28),
                inset 0 2px 0 rgba(255,255,255,0.65), inset 0 -3px 0 rgba(0,0,0,0.25);
  }
}

/* ── Short screens ──
   The SPIN button must stay above the fold on a phone. Mobile browsers also
   eat 60–90px of the viewport for the address bar, so this kicks in well
   before the nominal device height. */
@media (max-height: 860px) {
  .header { padding: 10px 20px 8px; }
  .header__logo { height: 38px; min-width: 160px; }
  .header__logo img { max-height: 38px; }
  .header__license { margin-top: 7px; padding: 3px 12px; font-size: 8.5px; }

  .main { padding: 16px 20px 28px; gap: 14px; }

  .hero__title { font-size: clamp(18px, 5.2vw, 24px); margin-bottom: 8px; }
  .hero__subtitle { font-size: 13px; line-height: 1.45; }
  .hero__badge { max-height: 78px; margin-bottom: 10px; }

  .wheel { width: 258px; height: 258px; border-width: 3px; }
  .wheel__rotor { width: 240px; height: 240px; }
  .wheel__hub { width: 82px; height: 82px; }
  .wheel__hub-label { font-size: 19px; }
  .wheel__pointer { width: 48px; top: -22px; }

  .spin-btn { height: 60px; font-size: 23px; }
}

/* ── Narrow screens ── */
@media (max-width: 360px) {
  .wheel { width: 244px; height: 244px; }
  .wheel__rotor { width: 228px; height: 228px; }
  .timer__card { width: 76px; height: 60px; }
  .timer__value { font-size: 32px; }
}

/* ═══════════════════════════════════════════════════════════════════
   TABLET — still one column, just roomier than a phone.
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1023px) {
  .header, .main { max-width: 620px; }
  .main { gap: 24px; padding: 32px 24px 40px; }

  .hero__title { font-size: 34px; }
  .hero__subtitle { font-size: 16px; max-width: 420px; }

  .wheel { width: 380px; height: 380px; border-width: 5px; }
  .wheel__rotor { width: 356px; height: 356px; }
  .wheel__hub { width: 120px; height: 120px; }
  .wheel__hub-label { font-size: 27px; }
  .wheel__pointer { width: 70px; top: -32px; }

  .spin-btn { height: 72px; font-size: 29px; }
  .cta__note { font-size: 13px; }

  .payments__logos img { height: 62px; }
  .payments__logos { min-height: 62px; }
  .payments__caption { font-size: 11px; }

  .modal__card { max-width: 460px; }
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP — two columns above the fold: copy and CTA on the left,
   the wheel on the right. Laid out with grid areas over the existing
   markup, so the mobile version is untouched.

   Placed last on purpose: a 1366×768 laptop also matches the
   short-screen query above, and the desktop rules must win.
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 1024px) {

  /* ── header: logo and licence side by side, aligned with the copy ── */
  .header {
    max-width: 1320px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    padding: 24px 28px 18px;
  }
  .header__logo { height: 64px; min-width: 0; }
  .header__logo img { max-height: 64px; max-width: 320px; }
  .header__license { margin-top: 0; font-size: 11.5px; padding: 7px 20px; }

  /* ── the two-column grid ── */
  .main {
    max-width: 1320px;
    padding: 48px 28px 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "hero    wheel"
      "cta     wheel"
      "pay     pay"
      "footer  trust";
    column-gap: 56px;
    row-gap: 32px;
    align-content: start;
  }
  .hero        { grid-area: hero;   align-self: end; text-align: left; }
  .wheel-area  { grid-area: wheel;  align-self: center; }
  .cta         { grid-area: cta;    align-self: start; }
  #payments    { grid-area: pay; }
  .footer      { grid-area: footer; }
  .trust       { grid-area: trust;  align-self: center; }

  /* ── hero copy, left aligned in its column ── */
  .hero__badge { margin: 0 0 20px; max-height: 150px; max-width: 260px; }
  .hero__title {
    /* fluid: the amount is campaign data, so the line length varies */
    font-size: clamp(34px, 3.4vw, 56px);
    line-height: 1.12;
    margin-bottom: 20px;
    text-wrap: balance;
  }
  .hero__subtitle { font-size: 20px; line-height: 1.55; max-width: 540px; margin: 0; }

  /* ── the wheel is the hero object ──
     Sized against the viewport, not fixed px: the column is only half the
     container, so a hard 560px would overflow it on a 1024px screen. */
  .wheel {
    width: clamp(400px, 40vw, 580px);
    height: clamp(400px, 40vw, 580px);
    border-width: 7px;
  }
  /* children follow the wheel proportionally */
  .wheel__rotor { width: 93%; height: 93%; }
  .wheel__hub { width: 32%; height: 32%; }
  .wheel__hub-label { font-size: clamp(28px, 2.6vw, 40px); }
  .wheel__pointer { width: 18%; top: -8%; }
  .wheel__dot { width: 11px; height: 11px; }

  /* side artwork finally has room to breathe */
  .wheel-side { width: 175px; max-height: 280px; }
  .wheel-side--left  { left: -70px; }
  .wheel-side--right { right: -70px; }

  /* ── CTA ── */
  .cta { align-items: flex-start; }
  .spin-btn { max-width: 520px; height: 92px; font-size: 40px; border-radius: 20px; }
  .cta__bloom { left: 4%; right: 40%; }
  .cta__note { font-size: 14.5px; text-align: left; }

  /* ── payments: full width, so the logos can be big ── */
  .payments { padding: 26px 14px 22px; border-radius: 22px; }
  .payments__group { padding: 0 18px; gap: 14px; }
  .payments__logos { min-height: 84px; gap: 12px; }
  .payments__logos img { height: 84px; }
  .payments__logos--multi img { max-height: 76px; }
  .payments__caption { font-size: 13.5px; letter-spacing: 0.04em; }

  /* ── footer and trust share the last row ── */
  .footer { border-top: 0; padding-top: 0; }
  .footer__badges { justify-content: flex-start; gap: 30px; margin-bottom: 18px; }
  .footer__badge-circle { width: 52px; height: 52px; }
  .footer__badge-circle svg { width: 34px; height: 34px; }
  .footer__badge-label { font-size: 10px; }
  .footer__disclaimer { margin: 0; text-align: left; font-size: 12.5px; max-width: 520px; }
  .trust { padding: 26px 28px; }
  .trust__title { font-size: 12.5px; margin-bottom: 18px; }
  .trust__label { font-size: 12.5px; }
  .trust__icon { width: 70px; height: 70px; }
  .trust__icon svg { width: 44px; height: 44px; }

  /* ── banner and ticker keep full width, just larger type ── */
  .banner { height: 48px; }
  .banner__text { font-size: 14px; }
  .banner__dot { width: 8px; height: 8px; }
  .ticker { height: 44px; }
  .ticker__scroll { font-size: 14px; }
  .ticker__live-label { font-size: 11px; }
  .ticker__live-dot { width: 9px; height: 9px; }

  /* ── modals: a 370px card looks like a phone popup on a monitor ── */
  .modal__card { max-width: 600px; }
  .modal__body { padding: 40px 36px 34px; }
  .modal__title { font-size: 42px; }
  .modal__title--xl { font-size: 48px; }
  .modal__sub { font-size: 17px; margin-bottom: 26px; }
  .modal__stage { padding: 28px 24px 22px; }
  .chip-orbit { width: 340px; height: 340px; }
  .chip-custom { max-width: 440px; height: 280px; }
  .chest__img { max-width: 460px; height: 260px; }
  .modal__perk { font-size: 15px; padding: 12px 14px; }
  .modal__perk--diamond { font-size: 16px; }
  .modal__btn { height: 78px; font-size: 28px; }
  .modal__lock-badge span { font-size: 13px; }
  .modal__lock-badge { padding: 10px 22px; }
  .modal__pill-badge { font-size: 13px; padding: 7px 18px; }
  .timer__card { width: 120px; height: 90px; }
  .timer__value { font-size: 52px; }
  .timer__label { font-size: 12px; }
  .timer__unit { font-size: 11px; }
}

/* Very wide screens: container stops growing, the wheel keeps its cap. */
@media (min-width: 1600px) {
  .header, .main { max-width: 1440px; }
}

/* ── TZ: ticker faces + happy players strip ── */
.ticker__item { display: inline-flex; align-items: center; gap: 6px; margin-right: 22px; vertical-align: middle; }
.ticker__avatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid var(--gold-dim); flex-shrink: 0; }
.people { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 4px 0 2px; }
.people[hidden] { display: none; }
.people__row { display: flex; justify-content: center; }
.people__photo {
  width: 68px; height: 68px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--gold); margin-left: -12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45), 0 0 12px rgba(255,215,0,0.25);
}
.people__photo:first-child { margin-left: 0; }
.people__caption { font-size: 13px; font-weight: 700; color: #fff; text-align: center; letter-spacing: 0.02em; }
@media (min-width: 1024px) {
  .ticker__avatar { width: 30px; height: 30px; }
  .people__photo { width: 96px; height: 96px; margin-left: -16px; }
  .people__caption { font-size: 16px; }
}

/* sky v2 (make_sky_landers.py): the geo's night skyline, pinned to the bottom
   of the viewport; the image is dark by design, the gradient keeps the top readable */
.page__sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,0,2,0.55) 0%, rgba(10,0,2,0) 50%),
              url(../img/bg_skyline.jpg) center bottom / cover no-repeat;
  filter: brightness(1.35) saturate(1.15);
}
/* ...and on the win screens: behind the overlay and in the lower part of the card */
.modal, .modal--step2 {
  background: linear-gradient(180deg, rgba(3,1,10,0.85) 0%, rgba(3,1,10,0.35) 100%),
              url(../img/bg_skyline.jpg) center bottom / cover no-repeat;
}
.modal__card {
  background: linear-gradient(180deg, var(--card-bg) 30%, rgba(15,11,24,0.55) 100%),
              url(../img/bg_skyline.jpg) center bottom / cover no-repeat, var(--card-bg);
}
