

/* =========================================================================
   FHM Lucky Draw — style.css
   Premium emerald / gold / black-green theme, realistic 3D accents.
   ========================================================================= */

/* ---------- Design tokens ---------- */
:root {
  /* warm gold + red theme (var names kept from the earlier green theme) */
  --emerald-100: #6e1a10;   /* deep crimson */
  --emerald-300: #4a1408;   /* burgundy */
  --emerald-500: #2b0d08;   /* dark maroon */
  --emerald-800: #170704;   /* warm near-black */
  --ink:         #0b0403;

  --gold-100: #f6e29a;
  --gold-200: #eccf6b;
  --gold-300: #d4af37;
  --gold-400: #a8841f;
  --gold-500: #7a5c13;

  --red:        #c62828;
  --red-dark:   #8e1c1c;

  --cream: #f7f1dc;

  --font-display: "Cinzel", "Noto Serif Myanmar", serif;
  --font-ui:      "Poppins", "Noto Sans Myanmar", sans-serif;
  --font-my:      "Noto Sans Myanmar", "Poppins", sans-serif;

  /* Wheel sizing (responsive) */
  --wheel: min(80vw, 560px);
  --r-cap: 0.30;   /* radial position (fraction of wheel) of segment content center */

  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-ui);
  color: var(--cream);
  background: radial-gradient(120% 120% at 50% 0%, var(--emerald-300) 0%, var(--emerald-800) 55%, var(--ink) 100%);
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* ---------- Ambient stage ---------- */
.stage {
  position: fixed; inset: 0;
  overflow: hidden; z-index: 0; pointer-events: none;
}
.glow {
  position: absolute; border-radius: 50%;
  filter: blur(90px); opacity: .55;
  mix-blend-mode: screen;
}
.glow--a { width: 60vw; height: 60vw; top: -22vw; left: 50%; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(212,175,55,.55), transparent 65%); }
.glow--b { width: 42vw; height: 42vw; bottom: -16vw; right: -12vw;
  background: radial-gradient(circle, rgba(150,48,22,.8), transparent 65%); }
.glow--c { width: 34vw; height: 34vw; bottom: -10vw; left: -10vw;
  background: radial-gradient(circle, rgba(212,175,55,.35), transparent 65%); }

/* subtle gold filigree (diagonal pattern) */
.filigree {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(45deg, rgba(212,175,55,.05) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(-45deg, rgba(212,175,55,.04) 0 1px, transparent 1px 34px);
  mask-image: radial-gradient(130% 130% at 50% 40%, #000 40%, transparent 78%);
  -webkit-mask-image: radial-gradient(130% 130% at 50% 40%, #000 40%, transparent 78%);
}

/* floating gold dust */
.dust { position: absolute; inset: 0; }
.dust i {
  position: absolute; left: var(--x); top: var(--y);
  width: var(--s); height: var(--s); border-radius: 50%;
  background: radial-gradient(circle, #f6e29a, rgba(212,175,55,0) 70%);
  opacity: 0; filter: blur(1px);
  animation: dustFloat var(--t) linear infinite;
  animation-delay: var(--d);
}
@keyframes dustFloat {
  0%   { transform: translateY(20vh) translateX(0) scale(.6); opacity: 0; }
  10%  { opacity: var(--o); }
  90%  { opacity: var(--o); }
  100% { transform: translateY(-90vh) translateX(6vw) scale(1.1); opacity: 0; }
}

/* ---------- App layout ---------- */
.app { position: relative; z-index: 2; }

.screen { min-height: 100vh; }
.screen[hidden] { display: none; }
.screen.is-active { display: block; }

.screen-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 40px) 40px;
  display: flex; flex-direction: column; align-items: center;
}

/* ---------- Entrance animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  0%   { opacity: 0; transform: scale(.5); }
  60%  { transform: scale(1.08); }
  100% { opacity: 1; transform: scale(1); }
}
.fade-up { animation: fadeUp .8s var(--ease) both; }
.d-2 { animation-delay: .12s; }
.d-3 { animation-delay: .24s; }
.d-4 { animation-delay: .36s; }
.d-5 { animation-delay: .48s; }
.pop-in { animation: popIn .55s var(--ease) both; animation-delay: .2s; }

/* ---------- Brand / logo ---------- */
.brand { text-align: center; }

/* gold crown (shared inline SVG symbol) */
.crown {
  display: block; width: 56px; height: 42px; margin: 0 auto 6px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5));
}
.crown--brand  { width: 76px; height: 56px; margin-bottom: 8px; }
.crown--mini   { width: 46px; height: 34px; margin-bottom: 2px; }
.crown--result { width: 60px; height: 46px; margin-bottom: 4px; }
.brand-name {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(46px, 11vw, 84px);
  line-height: .95; letter-spacing: .08em;
  background: linear-gradient(180deg, #fff3c2 0%, var(--gold-200) 38%, var(--gold-400) 72%, var(--gold-300) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.45)) drop-shadow(0 6px 18px rgba(0,0,0,.5));
}
.brand-sub {
  margin-top: 4px;
  font-family: var(--font-display); font-weight: 600;
  letter-spacing: .55em; text-indent: .55em;
  font-size: clamp(11px, 2.4vw, 15px);
  color: var(--gold-100);
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
}

/* ---------- 3D gift box ---------- */
.gift-wrap {
  position: relative; margin: clamp(22px, 4vh, 44px) 0 8px;
  /* attention nudge: a small 3D shake every few seconds */
  animation: giftNudge 3.2s ease-in-out infinite;
}
@keyframes giftNudge {
  0%, 86%, 100% { transform: translateX(0) rotate(0deg); }
  88%  { transform: translateX(-7px) rotate(-2.5deg); }
  90%  { transform: translateX(6px)  rotate(2deg); }
  92%  { transform: translateX(-5px) rotate(-1.5deg); }
  94%  { transform: translateX(4px)  rotate(1.2deg); }
  96%  { transform: translateX(-2px) rotate(-.6deg); }
}
.gift-scene { perspective: 900px; }
.gift {
  position: relative; width: clamp(150px, 38vw, 230px);
  height: clamp(150px, 38vw, 230px);
  transform-style: preserve-3d;
  transform: rotateX(14deg) rotateY(-16deg);
  animation: giftFloat 4.5s ease-in-out infinite;
}
@keyframes giftFloat {
  0%, 100% { transform: rotateX(14deg) rotateY(-16deg) translateY(0); }
  50%      { transform: rotateX(10deg) rotateY(-10deg) translateY(-12px); }
}

.gift-body {
  position: absolute; left: 8%; right: 8%; top: 16%; bottom: 4%;
  border-radius: 10px 10px 14px 14px;
  background: linear-gradient(180deg, #b23a24 0%, #7a2012 55%, #4a120a 100%);
  box-shadow:
    inset 0 2px 8px rgba(255,255,255,.25),
    inset 0 -14px 30px rgba(0,0,0,.55),
    0 20px 40px rgba(0,0,0,.55);
}
.gift-lid {
  position: absolute; left: 3%; right: 3%; top: 2%; height: 20%;
  border-radius: 10px;
  background: linear-gradient(180deg, #d4553a 0%, #a03020 60%, #6e1a10 100%);
  box-shadow:
    inset 0 2px 8px rgba(255,255,255,.35),
    inset 0 -8px 18px rgba(0,0,0,.5),
    0 10px 20px rgba(0,0,0,.45);
}
/* ribbons */
.gift-ribbon { position: absolute; background: linear-gradient(180deg, #fff0b0, #e7c65a 45%, #c19a2e 100%); box-shadow: inset 0 1px 3px rgba(255,255,255,.6), 0 3px 8px rgba(0,0,0,.4); }
.gift-ribbon--v { left: 44%; right: 44%; top: 0; bottom: 0; }
.gift-ribbon--h { top: 3%; height: 24%; left: 0; right: 0; border-radius: 6px; }
/* bow */
.gift-bow { position: absolute; left: 0; right: 0; top: -8%; height: 22%; }
.bow-loop {
  position: absolute; top: 0; width: 34%; height: 100%;
  border: 6px solid var(--gold-200);
  background: linear-gradient(180deg, #ffe894, #d4af37);
  box-shadow: inset 0 0 8px rgba(255,255,255,.5), 0 6px 14px rgba(0,0,0,.35);
}
.bow-loop--l { left: 16%; border-radius: 50% 50% 24% 50%; transform: rotate(-18deg); }
.bow-loop--r { right: 16%; border-radius: 50% 50% 50% 24%; transform: rotate(18deg); }
.bow-knot {
  position: absolute; left: 50%; top: 12%; width: 24%; height: 34%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 40% 30%, #fff3be, var(--gold-300) 60%, var(--gold-500));
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.gift-shadow {
  width: 70%; height: 26px; margin: 18px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0,0,0,.55), transparent 70%);
  filter: blur(2px);
}

/* sparkling highlights */
.spark {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, #fff, rgba(246,226,154,0) 70%);
  animation: sparkle 2.4s ease-in-out infinite;
  pointer-events: none;
}
.spark--1 { width: 18px; height: 18px; top: -6px; right: -10px; }
.spark--2 { width: 10px; height: 10px; bottom: 18%; left: -14px; animation-delay: .8s; }
.spark--3 { width: 14px; height: 14px; top: 34%; right: -20px; animation-delay: 1.5s; }
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(.3); }
  50%      { opacity: 1; transform: scale(1.15); }
}

/* ---------- Welcome text ---------- */
.welcome-text { text-align: center; max-width: 680px; }
.welcome-title {
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(24px, 5.4vw, 40px);
  line-height: 1.5;
  color: #fff;
  text-shadow: 0 3px 12px rgba(0,0,0,.55), 0 0 30px rgba(212,175,55,.25);
}
.welcome-sub {
  margin-top: 12px;
  font-family: var(--font-my); font-weight: 400;
  font-size: clamp(14px, 3vw, 18px); line-height: 1.75;
  color: var(--gold-100);
  opacity: .92;
}

/* ---------- Buttons ---------- */
.cta-wrap { margin-top: clamp(24px, 4vh, 40px); }
.btn {
  --btn-bg: linear-gradient(180deg, #ffe9a3, #eccf6b 35%, #d4af37 60%, #a8841f);
  position: relative;
  text-decoration: none;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 40px;
  border: none; border-radius: 999px;
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(18px, 3.4vw, 24px); letter-spacing: .01em;
  color: var(--ink);
  background: var(--btn-bg);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.75),
    inset 0 -5px 10px rgba(122,92,19,.55),
    0 10px 26px rgba(0,0,0,.5),
    0 0 0 3px rgba(246,226,154,.16),
    0 0 34px rgba(212,175,55,.35);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s ease;
  overflow: hidden;
}
.btn::after { /* glossy top highlight */
  content: ""; position: absolute; left: 8%; right: 8%; top: 5%; height: 40%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.65), rgba(255,255,255,0));
  pointer-events: none;
}
.btn:hover { transform: translateY(-3px); filter: brightness(1.05);
  box-shadow:
    inset 0 2px 3px rgba(255,255,255,.75),
    inset 0 -5px 10px rgba(122,92,19,.55),
    0 16px 34px rgba(0,0,0,.55),
    0 0 0 3px rgba(246,226,154,.28),
    0 0 50px rgba(212,175,55,.55); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { cursor: not-allowed; filter: grayscale(.5) brightness(.8); transform: none; }
.btn-icon { font-size: 1.1em; line-height: 1; }

/* red-accent variant used on the welcome CTA */
#btnStart {
  background: linear-gradient(180deg, #ffd27a, #e6a23c 28%, #c62828 58%, #8e1c1c);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
  /* attention pulse: gentle scale + glow so customers notice the button */
  animation: ctaPulse 1.8s ease-in-out infinite;
}
@keyframes ctaPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow:
      inset 0 2px 3px rgba(255,255,255,.75),
      inset 0 -5px 10px rgba(122,92,19,.55),
      0 10px 26px rgba(0,0,0,.5),
      0 0 0 3px rgba(246,226,154,.18),
      0 0 34px rgba(212,175,55,.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow:
      inset 0 2px 3px rgba(255,255,255,.75),
      inset 0 -5px 10px rgba(122,92,19,.55),
      0 14px 30px rgba(0,0,0,.55),
      0 0 0 4px rgba(246,226,154,.35),
      0 0 56px rgba(255,214,110,.75);
  }
}

/* big glossy red SPIN button (wheel screen) */
.btn--spin {
  background: linear-gradient(180deg, #ff7a6a 0%, #e03528 35%, #b71c1c 70%, #7f1212 100%);
  color: var(--gold-100);
  text-shadow: 0 2px 0 rgba(0,0,0,.4);
  padding: 20px 52px;
  font-size: clamp(20px, 4.6vw, 30px);
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.45),
    inset 0 -8px 14px rgba(0,0,0,.35),
    0 12px 28px rgba(0,0,0,.55),
    0 0 0 4px rgba(212,175,55,.55),
    0 0 40px rgba(198,40,40,.4);
}
.btn--spin:hover {
  box-shadow:
    inset 0 2px 4px rgba(255,255,255,.45),
    inset 0 -8px 14px rgba(0,0,0,.35),
    0 16px 34px rgba(0,0,0,.6),
    0 0 0 4px rgba(246,226,154,.7),
    0 0 54px rgba(224,53,40,.55);
}

/* gift icon inside the welcome button */
.btn-gift { display: inline-flex; }
.btn-gift svg { width: 24px; height: 24px; display: block; }

/* gold curved arrows flanking the SPIN button */
.spin-row { display: flex; align-items: center; justify-content: center; gap: 14px; }
.spin-arrow {
  width: 40px; height: 40px; flex: none;
  filter: drop-shadow(0 3px 6px rgba(0,0,0,.5));
}
.spin-arrow--l { transform: scaleX(-1) rotate(10deg); }
.spin-arrow--r { transform: rotate(10deg); }
@media (max-width: 420px) {
  .spin-arrow { width: 28px; height: 28px; }
  .btn--spin { padding: 18px 38px; }
}

.btn--ghost {
  background: transparent;
  color: var(--gold-100);
  padding: 14px 30px;
  font-size: clamp(16px, 3vw, 20px);
  box-shadow: inset 0 0 0 2px rgba(212,175,55,.6);
  border: none; border-radius: 999px;
  transition: background .18s ease, transform .18s ease;
}
.btn--ghost:hover { background: rgba(212,175,55,.16); transform: translateY(-2px); }
.btn--ghost::after { display: none; }

/* ---------- Wheel screen ---------- */
.mini-brand {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  margin-bottom: 10px;
}
.mini-brand-name {
  font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 6vw, 36px);
  background: linear-gradient(180deg, #fff3c2, var(--gold-300) 60%, var(--gold-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.5));
}

/* red marquee plaque / ribbon (gold trim + bulb lights + folded ends) */
.banner, .ribbon {
  position: relative;
  display: inline-block;
  padding: 13px 44px;
  background:
    radial-gradient(circle, rgba(255,243,194,.95) 2.2px, rgba(255,243,194,0) 3px) 0 6px / 20px 10px repeat-x,
    linear-gradient(180deg, #e05548 0%, #c62828 45%, #8e1c1c 100%);
  border: 3px solid #d4af37;
  border-radius: 14px;
  box-shadow:
    0 10px 24px rgba(0,0,0,.5),
    inset 0 2px 6px rgba(255,255,255,.22),
    0 0 30px rgba(198,40,40,.3);
}
.banner { margin-bottom: clamp(10px, 2vh, 18px); }
.banner::before, .banner::after,
.ribbon::before, .ribbon::after {
  content: ""; position: absolute; top: 50%; width: 22px; height: 22px;
  background: #7f1212; border: 3px solid #d4af37;
  transform: translateY(-50%) rotate(45deg);
  z-index: -1;
}
.banner::before, .ribbon::before { left: -12px; }
.banner::after,  .ribbon::after  { right: -12px; }
.banner-text {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(20px, 4.6vw, 30px); letter-spacing: .14em; text-indent: .14em;
  color: var(--gold-100);
  text-shadow: 0 2px 0 #7a1010, 0 4px 12px rgba(0,0,0,.5);
}
.ribbon { padding: 12px 34px; border-radius: 12px; }
.ribbon-text {
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(20px, 4.8vw, 32px);
  color: var(--gold-100);
  text-shadow: 0 2px 0 #7a1010, 0 4px 12px rgba(0,0,0,.5);
}
.ribbon-wrap { text-align: center; }

.wheel-zone { position: relative; margin: 6px 0; }
.wheel-frame {
  width: calc(var(--wheel) + 28px);
  height: calc(var(--wheel) + 28px);
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, #d4af37, #f6e29a, #a8841f, #eccf6b, #8a6c15, #d4af37);
  padding: 6px;
  box-shadow:
    0 24px 60px rgba(0,0,0,.6),
    0 0 60px rgba(212,175,55,.35),
    inset 0 0 14px rgba(0,0,0,.4);
}

.wheel {
  position: relative;
  width: var(--wheel); height: var(--wheel);
  border-radius: 50%;
  background: var(--emerald-500);
  box-shadow:
    inset 0 0 40px rgba(0,0,0,.65),
    0 0 0 3px var(--gold-400);
  will-change: transform;
  transition: transform 5.4s cubic-bezier(.12, .76, .08, 1);
}

/* Segmented face (conic gradient is injected from JS) */
.wheel-face { position: absolute; inset: 0; border-radius: 50%; }

/* segment content holders */
.wheel-segs { position: absolute; inset: 0; border-radius: 50%; }
.seg-body {
  position: absolute; left: 50%; top: 50%;
  width: 30%;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-align: center;
  transform: translate(-50%, -50%)
             rotate(var(--ang))
             translateY(calc(var(--wheel) * var(--r-cap) * -1))
             rotate(calc(var(--ang) * -1));
}
/* frameless product photo (reference style) — image floats on the wedge,
   no cream tile / border; shaped exactly to the photo's aspect ratio */
.seg-photo {
  border-radius: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(0,0,0,.55);
}
.seg-photo img {
  width: 100%; height: 100%; object-fit: contain; object-position: center;
}
.seg-photo .seg-fallback { display: none; }
.seg-photo.has-fallback img { display: none; }
.seg-photo.has-fallback .seg-fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.seg-photo svg { width: 62%; height: 62%; }

.seg-name {
  font-family: var(--font-my); font-weight: 700;
  font-size: clamp(10px, 2.1vw, 14px);
  line-height: 1.2;
  color: #fff;
  max-width: 132px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(11, 4, 3, .62);
  border: 1px solid rgba(246,226,154,.4);
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
  text-shadow: 0 1px 2px rgba(0,0,0,.7);
}

/* gold dividers between wedges */
.wheel-divs { position: absolute; inset: 0; border-radius: 50%; }
.divider {
  position: absolute; top: 0; left: 50%;
  width: 3px; height: 50%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(calc(var(--ang) * 1deg));
  background: linear-gradient(180deg, #f6e29a, var(--gold-400) 62%, rgba(212,175,55,.15));
  border-radius: 2px;
  box-shadow: 0 0 5px rgba(0,0,0,.5);
  pointer-events: none;
}

/* rim bulbs */
.wheel-bulbs { position: absolute; inset: 0; border-radius: 50%; }
.bulb {
  position: absolute; left: 50%; top: 50%;
  width: 11px; height: 11px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #f6e29a 45%, #d4af37 75%, #8a6c15);
  box-shadow: 0 2px 6px rgba(0,0,0,.5), 0 0 12px rgba(246,226,154,.7);
  transform: translate(-50%, -50%) rotate(var(--a)) translateY(calc(var(--wheel) * -0.5));
  animation: bulbGlow 2s ease-in-out infinite;
  animation-delay: var(--d);
}
@keyframes bulbGlow {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.5); box-shadow: 0 0 16px rgba(255,240,170,1); }
}

/* glass gloss overlay */
.wheel-glass {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.22), rgba(255,255,255,0) 42%);
  pointer-events: none;
}

/* center hub */
.wheel-hub {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--wheel) * 0.2); height: calc(var(--wheel) * 0.2);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px;
  background: radial-gradient(circle at 38% 30%, #fff2bd, var(--gold-200) 40%, var(--gold-400) 80%);
  box-shadow:
    inset 0 2px 5px rgba(255,255,255,.8),
    inset 0 -5px 10px rgba(122,92,19,.6),
    0 8px 22px rgba(0,0,0,.55),
    0 0 0 5px var(--gold-500),
    0 0 0 7px rgba(0,0,0,.5);
}
.hub-star { color: var(--red-dark); font-size: calc(var(--wheel) * 0.045); line-height: 1; text-shadow: 0 1px 2px rgba(255,255,255,.6); }
.hub-text { font-family: var(--font-display); font-weight: 800; font-size: calc(var(--wheel) * 0.05); color: var(--ink); letter-spacing: .04em; }

/* pointer (red core + gold rim, reference style) */
.pointer {
  position: absolute; left: 50%; top: -10px;
  transform: translateX(-50%);
  z-index: 5;
  width: 56px; height: 62px;
  filter: drop-shadow(0 8px 12px rgba(0,0,0,.55));
}
.pointer-pin {
  position: absolute; left: 50%; top: -8px; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, #e7c65a 55%, #8a6c15);
  box-shadow: 0 2px 8px rgba(0,0,0,.5), 0 0 14px rgba(246,226,154,.7);
  z-index: 3;
}
.pointer-tip {
  position: absolute; left: 50%; top: 0;
  transform: translateX(-50%);
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}
.pointer-tip--rim {
  width: 56px; height: 62px;
  background: linear-gradient(180deg, #f6e29a 0%, #d4af37 55%, #8a6c15 100%);
}
.pointer-tip--core {
  width: 44px; height: 50px;
  background: linear-gradient(180deg, #ff7a6a 0%, #d32f2f 45%, #8e1c1c 100%);
}

/* wheel CTA */
.wheel-cta { text-align: center; margin-top: clamp(26px, 5vh, 40px); }
.spin-hint {
  margin-top: 14px;
  font-family: var(--font-my); font-weight: 500;
  font-size: clamp(13px, 2.6vw, 16px);
  color: var(--gold-100); opacity: .85;
}

/* ---------- Prize list ---------- */
.prizes { margin-top: clamp(30px, 6vh, 54px); width: 100%; }
.prizes-title {
  text-align: center;
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(20px, 4vw, 28px);
  color: #fff;
  margin-bottom: 20px;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.prize-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.prize-card {
  position: relative;
  border-radius: 18px;
  padding: 18px 12px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(74,22,12,.92), rgba(23,7,4,.95));
  border: 1px solid rgba(212,175,55,.5);
  box-shadow: 0 12px 26px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .2s var(--ease), border-color .2s ease, box-shadow .2s ease;
}
.prize-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold-200);
  box-shadow: 0 18px 34px rgba(0,0,0,.55), 0 0 24px rgba(212,175,55,.25);
}
.prize-card.winner { border-color: var(--gold-100); box-shadow: 0 0 30px rgba(246,226,154,.6); }
.prize-card .thumb {
  display: inline-flex; align-items: center; justify-content: center;
  width: auto; height: clamp(96px, 22vw, 132px); max-width: 100%;
  margin: 0 0 12px;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 6px 14px rgba(0,0,0,.45);
}
.prize-card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.prize-card .thumb .ph-fallback { display: none; }
.prize-card .thumb.has-fallback img { display: none; }
.prize-card .thumb.has-fallback .ph-fallback { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; }
.prize-card .thumb svg { width: 62%; height: 62%; }

.prize-card h4 {
  font-family: var(--font-my); font-weight: 700;
  font-size: 15px; line-height: 1.35; color: #fff;
}
.prize-card .tag {
  display: inline-block; margin-top: 8px;
  font-size: 11px; letter-spacing: .12em; font-weight: 600;
  color: var(--gold-100);
  border: 1px solid rgba(212,175,55,.5); border-radius: 999px;
  padding: 2px 9px;
}

/* compact strip on the result screen */
.prizes--result { margin-top: clamp(24px, 4vh, 40px); }
.prize-grid--compact .prize-card { padding: 14px 10px; }
.prize-grid--compact .thumb { height: clamp(66px, 16vw, 96px); margin: 0 0 8px; }
.prize-grid--compact .prize-card h4 { font-size: 12px; }
.prize-grid--compact .prize-card .tag { display: none; }

/* ---------- Result screen ---------- */
.screen--result .screen-inner { justify-content: flex-start; }
.result-visual { position: relative; margin: clamp(10px, 3vh, 26px) 0 4px; }
/* wide gold frame — prize image shown large, not in a circle */
.result-frame {
  width: min(88vw, 560px);
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f5efe4 100%);
  padding: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,.55), 0 0 50px rgba(255,255,255,.28);
}
.result-figure {
  border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 40% 30%, #c05535, #2b0d08 80%);
  box-shadow: inset 0 0 34px rgba(0,0,0,.55);
  aspect-ratio: 16 / 10;
  min-height: 200px;
  padding: 12px;
}
.result-figure img { width: 100%; height: 100%; object-fit: contain; }
.result-figure .r-fallback { display: none; }
.result-figure.has-fallback img { display: none; }
.result-figure.has-fallback .r-fallback { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.result-figure.has-fallback .r-fallback svg { width: 54%; height: 54%; }

/* result headline — plain gold text, no frame */
.result-congrats {
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(30px, 7vw, 52px);
  text-align: center;
  background: linear-gradient(180deg, #fff3c2, var(--gold-200) 45%, var(--gold-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)) drop-shadow(0 8px 24px rgba(0,0,0,.5));
}
.result-prize-label {
  margin-top: 10px;
  font-family: var(--font-my); font-weight: 500;
  font-size: clamp(14px, 3vw, 17px); color: var(--gold-100); opacity: .9;
}
.result-prize-name {
  margin-top: 8px; text-align: center;
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(22px, 5.2vw, 38px); line-height: 1.4;
  background: linear-gradient(180deg, #fff3c2, var(--gold-200) 45%, var(--gold-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 0 rgba(0,0,0,.4));
}
.result-prize-sub {
  margin-top: 6px;
  font-family: var(--font-my); font-weight: 400;
  font-size: clamp(13px, 2.8vw, 16px); color: var(--cream); opacity: .85;
}
.result-actions { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: clamp(22px, 4vh, 34px); }

/* ---------- Confetti canvas ---------- */
#confetti {
  position: fixed; inset: 0; z-index: 50;
  pointer-events: none;
}

/* anchor styled as a button (result "continue") */
a.btn { text-decoration: none; }

/* ---------- Contact screen ---------- */
.contact-head { text-align: center; margin: 4px 0 6px; }
.contact-title {
  font-family: var(--font-my); font-weight: 800;
  font-size: clamp(26px, 6vw, 40px);
  background: linear-gradient(180deg, #fff3c2, var(--gold-200) 45%, var(--gold-400));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)) drop-shadow(0 8px 24px rgba(0,0,0,.5));
}
.contact-sub {
  margin-top: 8px;
  font-family: var(--font-my); font-weight: 500;
  font-size: clamp(13px, 2.8vw, 16px);
  color: var(--gold-100); opacity: .9;
}
.contact-list {
  width: 100%; max-width: 460px;
  display: flex; flex-direction: column; gap: 16px;
  margin-top: clamp(18px, 4vh, 32px);
}
.contact-btn {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(74,22,12,.92), rgba(23,7,4,.95));
  border: 1px solid var(--cb);
  box-shadow: 0 12px 26px rgba(0,0,0,.45), 0 0 24px var(--cg);
  transition: transform .18s var(--ease), box-shadow .18s ease, border-color .18s ease;
}
.contact-btn:hover {
  transform: translateY(-3px);
  border-color: var(--cb);
  box-shadow: 0 16px 32px rgba(0,0,0,.55), 0 0 36px var(--cg);
}
.contact-logo {
  flex: none; width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cb);
  box-shadow: inset 0 2px 4px rgba(255,255,255,.4), 0 4px 10px rgba(0,0,0,.4);
}
.contact-logo svg { width: 30px; height: 30px; display: block; }
.contact-text { flex: 1; text-align: left; }
.contact-name {
  display: block;
  font-family: var(--font-ui); font-weight: 700;
  font-size: 19px; letter-spacing: .02em; color: #fff;
}
.contact-hint {
  display: block; margin-top: 2px;
  font-family: var(--font-my); font-weight: 500;
  font-size: 12.5px; color: var(--gold-100); opacity: .85;
}
.contact-arrow { color: var(--gold-100); font-size: 20px; }

.contact-btn--viber     { --cb: #7360f2; --cg: rgba(115,96,242,.35); }
.contact-btn--telegram  { --cb: #2aabee; --cg: rgba(42,171,238,.35); }
.contact-btn--messenger { --cb: #0084ff; --cg: rgba(0,132,255,.35); }
.contact-btn--messenger .contact-logo { background: linear-gradient(180deg, #00b2ff, #006aff); }

@media (max-width: 420px) {
  .contact-btn { padding: 12px 14px; gap: 12px; }
  .contact-logo { width: 46px; height: 46px; }
  .contact-logo svg { width: 26px; height: 26px; }
  .contact-name { font-size: 17px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .prize-grid { grid-template-columns: repeat(2, 1fr); }
  .seg-name { max-width: 86px; }
}
@media (max-width: 420px) {
  .prize-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .prize-card { padding: 14px 8px; }
  .prize-card h4 { font-size: 13px; }
  .btn { padding: 16px 30px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

  
/* ---------- Prize PNG on wheel: transparent image + brown caption ---------- */
.seg-photo { overflow: visible; box-shadow: none; border-radius: 0; }
.seg-photo img { filter: drop-shadow(0 6px 8px rgba(0,0,0,.55)); }
.seg-name {
  color: #5a2a0c;
  font-weight: 800;
  white-space: pre-line;
  width: max-content;
  max-width: calc(var(--wheel) * 0.34);
  padding: 4px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff3c2, #f1d98a);
  border: 1px solid #a8841f;
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* ===== v4 tweaks ===== */

/* (4) remove the gold "stick" lines across the wheel */
.wheel-divs, .divider { display: none !important; }

/* (1) gift pair + entrance animation */
.gift-pair { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; gap: 0; }
.gift-pop--small { margin-left: calc(-1 * clamp(14px, 4.5vw, 30px)); }
.gift-pop { opacity: 0; animation: giftBounceIn .9s cubic-bezier(.34,1.56,.64,1) both; }
.gift-pop--big   { animation-delay: .15s; }
.gift-pop--small { animation-delay: .38s; }
@keyframes giftBounceIn {
  0%   { opacity: 0; transform: translateY(160px) scale(.2); }
  45%  { opacity: 1; transform: translateY(-34px) scale(1.1); }
  68%  { transform: translateY(8px) scale(.96); }
  84%  { transform: translateY(-5px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.gift-pop--small .gift { width: clamp(84px, 21vw, 124px); height: clamp(84px, 21vw, 124px);
  transform: rotateX(14deg) rotateY(16deg); animation: giftFloatS 4.5s ease-in-out -1.6s infinite; }
@keyframes giftFloatS {
  0%, 100% { transform: rotateX(14deg) rotateY(16deg) translateY(0); }
  50%      { transform: rotateX(10deg) rotateY(10deg) translateY(-9px); }
}
.gift-pop--small .bow-loop { border-width: 3px; }
.gift-pop--small .gift-shadow { height: 16px; margin-top: 12px; }

/* party poppers hidden behind the gifts, tilted 45deg */
.popper { position: absolute; z-index: 0; width: clamp(34px, 8vw, 50px); height: clamp(52px, 12vw, 74px);
  bottom: 30%; transform-origin: 50% 100%; opacity: 0;
  animation: popperIn .4s cubic-bezier(.34,1.56,.64,1) .72s both; }
.popper--l { left: 6%;  --rot: -45deg; }
.popper--r { right: 4%; --rot: 45deg; }
.popper i { position: absolute; inset: 0;
  clip-path: polygon(0 0, 100% 0, 64% 100%, 36% 100%);
  background: repeating-linear-gradient(135deg, #ffd45e 0 7px, #e0352b 7px 14px);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.popper-mouth { position: absolute; left: 50%; top: 0; width: 2px; height: 2px; }
@keyframes popperIn {
  from { opacity: 0; transform: rotate(var(--rot)) scale(0); }
  70%  { opacity: 1; transform: rotate(var(--rot)) scale(1.15); }
  to   { opacity: 1; transform: rotate(var(--rot)) scale(1); }
}

/* (2) titles: white fill w/ inner glow + emboss, thin dark stroke, 4px #BD8C3D outer stroke */
.welcome-title, .result-congrats, .result-prize-name, .prizes-title, .contact-title {
  position: relative;
  background: none !important;
  color: #fff !important; -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 6px #0d0805; paint-order: stroke fill;
  text-shadow: none;
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.55))
    drop-shadow(2px 0 0 #BD8C3D) drop-shadow(-2px 0 0 #BD8C3D)
    drop-shadow(0 2px 0 #BD8C3D) drop-shadow(0 -2px 0 #BD8C3D)
    drop-shadow(0 6px 6px rgba(0,0,0,.5)) !important;
  letter-spacing: .01em;
  font-family: "Noto Sans Myanmar", var(--font-my); font-weight: 900 !important;
}
.welcome-title::after, .result-congrats::after, .result-prize-name::after, .prizes-title::after, .contact-title::after {
  content: attr(data-text); position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, #ffffff 0%, #ffffff 40%, #e9e9ee 75%, #c9c9d2 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent; -webkit-text-stroke: .6px #f2f2f6;
  filter: drop-shadow(0 -1px 0 rgba(255,255,255,.95)) drop-shadow(0 1px 1px rgba(90,90,110,.6));
}
/* titles a bit smaller, body text bigger -> sizes closer together */
.welcome-title { font-size: clamp(22px, 4.6vw, 34px); }
.result-congrats { font-size: clamp(26px, 6vw, 42px); }
.result-prize-name { font-size: clamp(22px, 4.6vw, 32px); }
.prizes-title { font-size: clamp(20px, 3.8vw, 26px); }
.contact-title { font-size: clamp(24px, 5vw, 34px); }

/* (3) body text: bigger + bolder (spacing tightened by JS so line count stays) */
.welcome-sub, .result-prize-label, .result-prize-sub, .contact-sub, .spin-hint { font-weight: 700 !important; opacity: 1 !important; }
.welcome-sub       { font-size: calc(clamp(14px, 3vw, 18px) + 5px) !important; }
.result-prize-label{ font-size: calc(clamp(14px, 3vw, 17px) + 5px) !important; }
.result-prize-sub  { font-size: calc(clamp(13px, 2.8vw, 16px) + 5px) !important; }
.contact-sub       { font-size: calc(clamp(13px, 2.8vw, 16px) + 5px) !important; }
.spin-hint         { font-size: calc(clamp(13px, 2.6vw, 16px) + 5px) !important; }

/* ===== v7: flat white lettering, bold black outline, subtle gold edge ===== */
.welcome-title, .result-congrats, .result-prize-name, .prizes-title, .contact-title {
  position: relative;
  background: none !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  -webkit-text-stroke: 7px #080706 !important;
  paint-order: stroke fill;
  text-shadow: none !important;
  filter: drop-shadow(2px 0 0 #BD8C3D)
          drop-shadow(-2px 0 0 #BD8C3D)
          drop-shadow(0 2px 0 #BD8C3D)
          drop-shadow(0 -2px 0 #BD8C3D) !important;
  font-family: "Noto Sans Myanmar", sans-serif !important;
  font-weight: 900 !important;
  line-height: 1.65;
  overflow: visible;
}
.welcome-title::after, .result-congrats::after, .result-prize-name::after,
.prizes-title::after, .contact-title::after { content: none !important; }
@media (max-width: 480px) {
  .welcome-title, .result-congrats, .result-prize-name, .prizes-title, .contact-title {
    -webkit-text-stroke-width: 6px !important;
  }
}


/* v8 — result screen: gold frame and contained golden radiance */
.screen--result .result-frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 9px;
  background: linear-gradient(135deg,#fff2b2 0%,#d49a20 22%,#fff1a0 48%,#a86d0a 72%,#ffdb63 100%);
  box-shadow: 0 16px 42px rgba(0,0,0,.55), 0 0 20px rgba(236,183,52,.4),
              inset 0 2px 3px rgba(255,255,255,.7);
}
.screen--result .result-figure {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: radial-gradient(ellipse at center,#a76b1c 0%,#64300e 48%,#271006 100%);
}
.screen--result .result-figure::before {
  content:""; position:absolute; inset:-45%; z-index:-1; pointer-events:none;
  background: repeating-conic-gradient(from 0deg at 50% 50%,
    rgba(255,226,104,.55) 0deg,rgba(255,195,38,.12) 7deg,
    transparent 15deg,transparent 23deg);
  animation: resultRays 20s linear infinite;
}
.screen--result .result-figure::after {
  content:""; position:absolute; inset:0; z-index:-1; pointer-events:none;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255,241,164,.82) 0%,rgba(255,199,52,.45) 27%,
    rgba(255,178,22,.12) 51%,transparent 73%);
}
.screen--result .result-figure img {
  position:relative; z-index:1;
  filter:drop-shadow(0 12px 14px rgba(35,13,0,.65));
  animation: resultMoneyPop .65s cubic-bezier(.2,1.35,.35,1) both;
}
@keyframes resultRays {to{transform:rotate(360deg)}}
@keyframes resultMoneyPop {
  from {opacity:0;transform:scale(.55) translateY(24px)}
  to {opacity:1;transform:scale(1) translateY(0)}
}
@media (prefers-reduced-motion:reduce) {
  .screen--result .result-figure::before,
  .screen--result .result-figure img {animation:none}
}

  /* Fireworks stay behind the prize image and gold frame, but spread outward. */
  .screen--result .result-visual { isolation:isolate; }
  .screen--result .result-frame { position:relative; z-index:2; }
  /* Let confetti fall across the title and bottom CTA while remaining behind them. */
  .screen--result .screen-inner { isolation:isolate; }
  .screen--result .result-visual { z-index:0; }
  .screen--result .result-visual ~ * { position:relative; z-index:2; }
  .result-firework-canvas {
    position:absolute; width:calc(100% + 340px); height:calc(100vh + 400px);
    left:-170px; top:-140px; z-index:1; pointer-events:none;
  }
  @media (max-width:600px) {
    .result-firework-canvas { width:calc(100% + 140px); height:calc(100vh + 300px); left:-70px; top:-90px; }
  }
  
/* v11 mobile layout and iOS Telegram WebView stability */
html { overflow-x: clip; }
body { overflow-x: clip; }
.screen { min-height: 100svh; }
.screen[hidden] { display: none !important; }
/* Avoid two animations competing for the gift wrapper transform. */
.gift-wrap.fade-up { animation: giftNudge 3.2s ease-in-out infinite; opacity: 1; }
/* Prize images are transparent PNGs: no rectangular tile or cast shadow. */
.seg-photo { overflow: visible; border-radius: 0; box-shadow: none !important; background: transparent !important; }
.seg-photo img { display: block; filter: none !important; box-shadow: none !important; }
.wheel-glass { background: none !important; }
.wheel-divs, .wheel-divs .divider { display: none !important; }
/* Keep the final result in normal flow, not in a moving/fading layer. */
.screen--result .result-visual.fade-up,
.screen--result .result-actions.fade-up,
.screen--result .prizes.fade-up,
.screen--result .ribbon-wrap.pop-in {
  animation: none !important; opacity: 1 !important; transform: none !important;
}
@media (max-width: 600px) {
  :root { --wheel: min(82vw, 410px); }
  .screen-inner { width: 100%; box-sizing: border-box; padding: 20px 14px 40px; }
  .screen--welcome .gift-wrap { width: min(92vw, 380px); margin: 24px auto 18px; }
  .screen--welcome .gift-pair { display: flex !important; flex-flow: row nowrap !important; align-items: flex-end; justify-content: center; width: 100%; gap: 4px; }
  .screen--welcome .gift-pop { flex: 0 0 auto; }
  .screen--welcome .gift-pop--big .gift { width: min(45vw, 180px); height: min(45vw, 180px); }
  .screen--welcome .gift-pop--small { margin-left: -12px; }
  .screen--welcome .gift-pop--small .gift { width: min(33vw, 128px); height: min(33vw, 128px); }
  .screen--welcome .popper--l { left: 0; bottom: 18%; }
  .screen--welcome .popper--r { right: 0; bottom: 18%; }
  .wheel-frame { width: calc(var(--wheel) + 20px); height: calc(var(--wheel) + 20px); box-sizing: border-box; padding: 5px; box-shadow: 0 10px 25px rgba(0,0,0,.3); }
  .wheel { box-shadow: 0 0 0 2px var(--gold-400); }
  .result-frame { width: min(90vw, 480px); box-sizing: border-box; }
  .screen--result .result-visual { width: 100%; display: flex; justify-content: center; }
  .screen--result .result-figure { min-height: 160px; }
  .result-firework-canvas { height: calc(100% + 220px); }
}


/* ===== v12 ===== */

/* (result, PC + mobile) remove gold frame; glittering golden radiance */
.screen--result .result-frame {
  background: none !important; box-shadow: none !important;
  padding: 0 !important; border-radius: 0 !important;
  overflow: visible !important; isolation: isolate;
}
.screen--result .result-figure {
  overflow: visible !important; border-radius: 0 !important;
  background: radial-gradient(ellipse at 50% 50%, rgba(255,205,80,.46) 0%, rgba(190,110,25,.22) 38%, rgba(0,0,0,0) 70%) !important;
  box-shadow: none !important;
}
/* slow clockwise fan of fine rays, feathered into the page */
.screen--result .result-figure::before {
  inset: auto !important; left: 50%; top: 50%;
  width: 190%; aspect-ratio: 1; height: auto;
  z-index: -1;
  background:
    repeating-conic-gradient(from 0deg at 50% 50%,
      rgba(255,244,190,.80) 0deg, rgba(255,214,90,.34) 3deg, rgba(255,190,40,0) 8deg, rgba(255,190,40,0) 15deg);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 18%, rgba(0,0,0,.55) 48%, transparent 100%);
          mask-image: radial-gradient(circle closest-side, #000 18%, rgba(0,0,0,.55) 48%, transparent 100%);
  transform: translate(-50%,-50%) rotate(0deg);
  animation: resultRays2 26s linear infinite !important;
}
/* hot white-gold core that gently breathes */
.screen--result .result-figure::after {
  z-index: -1;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(255,252,225,.95) 0%, rgba(255,226,120,.62) 20%, rgba(255,184,40,.24) 44%, transparent 70%) !important;
  animation: resultCore 3.2s ease-in-out infinite;
}
/* counter-rotating second fan = shimmer */
.screen--result .result-frame::before {
  content: ""; position: absolute; left: 50%; top: 50%; z-index: -1; pointer-events: none;
  width: 150%; aspect-ratio: 1;
  background: repeating-conic-gradient(from 7deg at 50% 50%,
      rgba(255,255,255,.55) 0deg, rgba(255,230,140,.18) 2deg, rgba(255,230,140,0) 5deg, rgba(255,230,140,0) 11deg);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 10%, rgba(0,0,0,.4) 50%, transparent 100%);
          mask-image: radial-gradient(circle closest-side, #000 10%, rgba(0,0,0,.4) 50%, transparent 100%);
  mix-blend-mode: screen;
  transform: translate(-50%,-50%) rotate(0deg);
  animation: resultRays2r 38s linear infinite;
}
@keyframes resultRays2  { to { transform: translate(-50%,-50%) rotate(360deg); } }
@keyframes resultRays2r { to { transform: translate(-50%,-50%) rotate(-360deg); } }
@keyframes resultCore { 0%,100% { opacity: .78; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.screen--result .result-figure img {
  filter: drop-shadow(0 0 14px rgba(255,214,90,.55)) drop-shadow(0 12px 14px rgba(35,13,0,.6));
}
/* twinkling 4-point stars + glints over and around the prize */
.result-glitter { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.result-glitter .gl {
  position: absolute; display: block; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: radial-gradient(circle, #fff 0%, #fff6c8 38%, #ffd75e 70%, rgba(255,200,60,0) 100%);
  clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%);
  filter: drop-shadow(0 0 4px rgba(255,236,150,.9));
  opacity: 0; transform: scale(.2) rotate(0deg);
  animation: glTwinkle 2.4s ease-in-out infinite;
}
.result-glitter .gl-dot { clip-path: circle(50%); border-radius: 50%; filter: drop-shadow(0 0 5px rgba(255,236,150,1)); }
@keyframes glTwinkle {
  0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
  45%      { opacity: 1; transform: scale(1) rotate(45deg); }
  60%      { opacity: .9; transform: scale(.8) rotate(70deg); }
}
@media (prefers-reduced-motion: reduce) {
  .screen--result .result-figure::before, .screen--result .result-frame::before,
  .screen--result .result-figure::after, .result-glitter .gl { animation: none !important; }
  .result-glitter .gl { opacity: .8; transform: scale(.8); }
}
/* let the confetti reach the bottom of the content but never add page height */
.screen--result .screen-inner { overflow: clip; }

/* ===== mobile only (<= 600px) ===== */
@media (max-width: 600px) {
  /* 1) welcome: gifts + poppers + paper burst fit inside the phone screen */
  .screen--welcome .gift-wrap { width: min(78vw, 300px); margin: 18px auto 12px; }
  .screen--welcome .gift-pair { gap: 0; }
  .screen--welcome .gift-pop--big .gift   { width: min(34vw, 130px); height: min(34vw, 130px); }
  .screen--welcome .gift-pop--small .gift { width: min(25vw, 96px);  height: min(25vw, 96px); }
  .screen--welcome .gift-pop--small { margin-left: -8px; }
  .screen--welcome .popper { width: 26px; height: 40px; bottom: 34%; }
  .screen--welcome .popper--l { left: 9%; }
  .screen--welcome .popper--r { right: 9%; }
  /* 2) titles: thinner golden outer stroke */
  .welcome-title, .result-congrats, .result-prize-name, .prizes-title, .contact-title {
    filter: drop-shadow(1px 0 0 #BD8C3D) drop-shadow(-1px 0 0 #BD8C3D)
            drop-shadow(0 1px 0 #BD8C3D) drop-shadow(0 -1px 0 #BD8C3D) !important;
  }
  /* 4) paper bursts on the result page can fall all the way down */
  .result-firework-canvas { width: calc(100% + 140px) !important; height: calc(100vh + 420px) !important; left: -70px; top: -90px; }
}

/* ===== v13 ===== */
:root { --burst: url("assets/burst.webp"); }
.screen--result .result-frame::before { content: none !important; }
.screen--result .result-figure::before {
  inset: auto !important; left: 50%; top: 50%;
  width: 205%; aspect-ratio: 1; height: auto;
  background: var(--burst) center / contain no-repeat !important;
  -webkit-mask-image: none !important; mask-image: none !important;
  mix-blend-mode: screen;
  transform: none !important; translate: none !important;
  animation: burstSpin 80s linear infinite, burstPulse 3.6s ease-in-out infinite !important;
  z-index: -1;
}
@keyframes burstSpin  { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes burstPulse { 0%,100% { opacity: .82; scale: .96; } 50% { opacity: 1; scale: 1.05; } }
.screen--result .result-figure::after {
  background: radial-gradient(ellipse at 50% 50%, rgba(255,246,200,.55) 0%, rgba(255,205,80,.22) 28%, transparent 58%) !important;
}
.screen--result .result-figure { background: none !important; }
/* remove the small line above the prize name */
.result-prize-label { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .screen--result .result-figure::before { animation: none !important; }
}

/* ===== v14 performance ===== */
/* big blurred blend-mode glows were very expensive on Android GPUs: use plain gradients */
.glow { filter: none !important; mix-blend-mode: normal !important; opacity: .5; }
.dust i { filter: none; will-change: transform, opacity; }
/* wheel bulbs: animate opacity only (compositor-friendly) instead of filter + box-shadow */
@keyframes bulbGlow { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
/* golden starburst: no blend mode, rotate only (cheap), glow pulse lives on the small core layer */
.screen--result .result-figure::before {
  mix-blend-mode: normal !important;
  will-change: transform;
  animation: burstSpin 90s linear infinite !important;
}
.result-glitter .gl { filter: none !important; will-change: transform, opacity; }
/* quality tiers (set automatically by script.js) */
html[data-perf="1"] .result-glitter .gl:nth-child(n+15) { display: none; }
html[data-perf="2"] .result-glitter .gl:nth-child(n+9) { display: none; }
html[data-perf="2"] .screen--result .result-figure::after { animation: none !important; }
html[data-perf="2"] .dust { display: none; }
