
/* ══════════════════════════════════════════
   LUCKY WHEEL PAGE — matches BK8 structure
   (inspected from bk8thaifan.win DOM)
   ══════════════════════════════════════════ */

/* Page background */
.lw-page {
  position: relative;
  background-image: url(https://baryon.million-edge.online/public/html/default_whitelabel/shared-image/lucky_wheel/beta-cny/background.jpg);
  background-color: rgba(60, 0, 0, 0.55);
  background-blend-mode: multiply;
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  overflow-x: clip;
  font-family: 'Noto Sans Thai', sans-serif;
  color: #fff;
  padding-top: 80px;
  padding-bottom: 50px;
}
.lw-content { position: relative; overflow-x: clip; }

/* ── Top bar ── */
.lw-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px 0;
  max-width: 960px;
  margin: 0 auto;
}
.lw-back-btn {
  background: none; border: none; color: #ffd700;
  font-size: 22px; cursor: pointer; padding: 4px 8px;
  line-height: 1; border-radius: 6px;
}
.lw-title {
  font-size: 16px; font-weight: 800; color: #ffd700;
  letter-spacing: 1px; text-shadow: 0 0 10px rgba(255,180,0,0.8);
}
.lw-history-btn {
  background: none; border: 1px solid rgba(255,215,0,0.4);
  border-radius: 6px; color: #ffd700; font-size: 11px;
  padding: 4px 12px; cursor: pointer;
  font-family: 'Noto Sans Thai', sans-serif;
}

/* ── Main two-column layout ── */
.lucky-wheel-landing-container {
  padding: 10px 10px 0;
}
.container-row-1 {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  width: 100%;
  max-width: 960px;
  margin: 20px auto 0;
}

/* ══ Wheel wrapper — BK8 exact ══
   Force width = 457px to match frame GIF exactly,
   override external CSS width:75% that caused 431px mismatch */
.lucky-wheel-wrapper {
  position: relative;
  height: fit-content;
  width: 457px !important;
  flex-shrink: 0;
  overflow: visible;
}

/* ── Flags (icon-1 = RIGHT, icon-2 = LEFT) ──
   All position props need !important to beat external 4-class specificity selector.
   bottom:30% → flag bottom at 337px from wrapper top → flag starts at ~105px (midring) */
.icon-1 {
  position: absolute !important;
  width: 153px !important;
  bottom: 20% !important;
  left: 86% !important;
  z-index: 10 !important;
  pointer-events: none;
}
.icon-2 {
  position: absolute !important;
  width: 153px !important;
  bottom: 20% !important;
  right: 86% !important;
  pointer-events: none;
}

/* ── Crystals / Lanterns (icon-3 to icon-6) ──
   BK8 CSS: icon-3 bottom:-6% right:-19%, icon-4 left:-42% top:40%
            icon-5 left:-42% top:8%, icon-6 right:-60% top:-4%
   All: width:48%(icon-3,4,6) or 30%(icon-5), z-index:5, float animation */
@keyframes iconFloater3 {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(0.3rem); }
  100% { transform: translateY(0); }
}
@keyframes iconFloater4 {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(0.3rem); }
  100% { transform: translateY(0); }
}
@keyframes iconFloater5 {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(0.25rem); }
  100% { transform: translateY(0); }
}
@keyframes iconFloater6 {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(0.3rem); }
  100% { transform: translateY(0); }
}
/* Crystal/lanterns — ALL props need !important to beat external 4-class specificity
   icon-4,5 = LEFT side, icon-3,6 = RIGHT side
   Fixed pixel sizes so they don't overflow into winner panel */
.icon-3 {
  position: absolute !important;
  width: 110px !important;
  height: auto !important;
  bottom: 5% !important;
  right: -10% !important;
  left: auto !important;
  top: auto !important;
  z-index: 5 !important;
  pointer-events: none;
  animation: iconFloater3 15s ease infinite;
}
.icon-4 {
  position: absolute !important;
  width: 110px !important;
  height: auto !important;
  left: -18% !important;
  top: 45% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5 !important;
  pointer-events: none;
  animation: iconFloater4 15s ease infinite;
}
.icon-5 {
  position: absolute !important;
  width: 85px !important;
  height: auto !important;
  left: -15% !important;
  top: 15% !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 5 !important;
  pointer-events: none;
  animation: iconFloater5 15s ease infinite;
}
.icon-6 {
  position: absolute !important;
  width: 110px !important;
  height: auto !important;
  right: -10% !important;
  top: -2% !important;
  left: auto !important;
  bottom: auto !important;
  z-index: 5 !important;
  pointer-events: none;
  animation: iconFloater6 15s ease infinite;
}

/* ── Fireworks ──
   BK8: firework-top (big, screen, scale0.8, top:-80px, left:120px)
        firework-left (small, color-dodge, scale0.5, top:242px, left:-300px)
        firework-right (big, screen, scale0.8, top:192px, left:500px)
        firework-bottom (small, color-dodge, scale0.8, top:392px, left:300px)
   At 75% scale: multiply positions by 0.75 */
.firework-top {
  position: absolute;
  width: 457px;
  top: -60px;
  left: 90px;
  transform: scale(0.8);
  transform-origin: top left;
  mix-blend-mode: screen;
  z-index: 1;
  pointer-events: none;
}
.firework-left {
  position: absolute;
  width: 457px;
  top: 181px;
  left: -225px;
  transform: scale(0.5);
  transform-origin: top left;
  mix-blend-mode: color-dodge;
  z-index: 1;
  pointer-events: none;
}
.firework-right {
  position: absolute;
  width: 457px;
  top: 144px;
  left: 375px;
  transform: scale(0.8);
  transform-origin: top left;
  mix-blend-mode: screen;
  z-index: 0;
  pointer-events: none;
}
.firework-bottom {
  position: absolute;
  width: 457px;
  top: 294px;
  left: 225px;
  transform: scale(0.8);
  transform-origin: top left;
  mix-blend-mode: color-dodge;
  z-index: 0;
  pointer-events: none;
}

/* ══ THE WHEEL ══
   BK8 structure (direct children of .lucky-wheel-wrapper):
   ① #spin (absolute, top:~10px, same width as frame)
   ② .lucky-wheel-frame (relative, z:3 — sets wrapper height)
   ③ .spin-icon button (absolute, z:4)
   ④ .spin-content (absolute at bottom of frame)

   The frame GIF has a transparent center circle in its ring phase.
   inner-wheel (z:1) shows through the GIF's transparent center.
   NO CSS mask needed — BK8 doesn't use any. */

/* #lw-wheelSpinner = BK8's #spin */
#lw-wheelSpinner {
  position: absolute;
  top: 10px;
  left: 0;
  width: 457px;
  height: 481px;
  z-index: 2;
  will-change: transform;
  transform-origin: 228px 240px;
}

/* Frame GIF — position:relative (sets wrapper height), z:5, NO mask */
.lucky-wheel-frame {
  position: relative !important;
  display: block !important;
  width: 457px !important;
  height: auto !important;
  z-index: 5 !important;
  pointer-events: none;
  object-fit: contain !important;
}
/* Inner wheel uses same geometry as the BK8 frame */
.inner-wheel {
  position: absolute !important;
  width: 77% !important;
  height: auto !important;
  z-index: 1 !important;
  inset: 0 !important;
  margin: auto !important;
  object-fit: contain !important;
}

/* Prize labels ul — same size as #spin, absolute */
.prize-name-list {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  list-style: none;
  margin: 0; padding: 0;
  z-index: 2;
  pointer-events: none;
}
.prize-name-list li {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.prize-label-text {
  font-size: 10.5px;
  font-weight: 900;
  color: #ffe97a;
  text-shadow:
    0 0 2px #000,
    0 0 5px #000,
    1px 0 0 #000,
    -1px 0 0 #000,
    0 1px 0 #000,
    0 -1px 0 #000;
  max-width: 58px;
  text-align: center;
  line-height: 1.25;
  word-break: break-word;
  letter-spacing: 0.2px;
  background: rgba(0,0,0,0.45);
  border-radius: 4px;
  padding: 2px 3px;
}

/* Spin button — fixed to the original BK8 coordinate system */
.spin-icon {
  position: absolute;
  top: 125px;
  left: 155px;
  width: 146px;
  height: 199px;
  background: none; border: none;
  cursor: pointer; z-index: 6; padding: 0;
  display: flex; align-items: center; justify-content: center;
}
.spin-icon img {
  width: 100%; height: 100%; object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(255,200,0,0.9)) drop-shadow(0 0 6px rgba(255,120,0,0.7));
}
.spin-icon.disabled { cursor: not-allowed; opacity: 0.6; }

/* Spin content — absolute at bottom of frame area */
.spin-content {
  position: absolute;
  top: 433px;
  left: 0;
  width: 100%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.spin-content-btn {
  background: linear-gradient(180deg, #ffcc00 0%, #ffb300 40%, #ff7c00 100%) !important;
  border: 2px solid rgba(255,220,100,0.6) !important;
  border-radius: 30px !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  padding: 12px 56px !important;
  cursor: pointer !important;
  font-family: 'Noto Sans Thai', sans-serif !important;
  box-shadow: 0 4px 20px rgba(255,120,0,0.8), 0 0 0 3px rgba(255,200,0,0.25), inset 0 1px 0 rgba(255,255,200,0.4) !important;
  letter-spacing: 1px !important;
  text-shadow: 0 1px 3px rgba(80,20,0,0.6) !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}
.spin-content-btn:disabled {
  opacity: 0.65 !important;
  cursor: not-allowed !important;
  background: linear-gradient(180deg, #ffcc00 0%, #ffb300 40%, #ff7c00 100%) !important;
}
.spin-content-reminder-title {
  color: #ffffff !important;
  font-size:18px !important;
  font-weight: 900 !important;
  margin: 20px 0 0 !important;
  text-shadow: 0 0 10px rgba(255,220,0,0.9), 0 1px 3px rgba(0,0,0,0.7) !important;
}
.lucky-wheel-btm-img {
  width: 457px; margin-top: -10px; position: relative; z-index: -1;
}
.lucky-wheel-btm-img img { width: 100%; display: block; }

/* ── Right: Winner panel ──
   Width 340px → total with wheel: 457+50+340=847px (fits 860px viewport).
   Side-padding 40px aligns content with pagoda gate opening:
     - gate starts ~120px from image-left at our 500px image-width
     - image-left is at box-left - 80px
     - content-left is at box-left + 40px = image-left + 120px ✓ */
.winner-content {
  flex-shrink: 0;
  width: 340px;
  margin-top: 0;
  overflow: visible;
}
.winner-detail-with-bg {
  position: relative;
  isolation: isolate;
  padding: 80px 40px 30px;
  overflow: visible;
}
/* winner-bg-img: real <img> tag — CDN url loads correctly (CSS url() gets proxied to localhost) */
.winner-bg-img {
  position: absolute;
  top: -100px;
  left: -80px;
  width: calc(100% + 160px);
  height: calc(100% + 230px);
  z-index: -1;
  pointer-events: none;
  object-fit: fill;
  display: block;
}
.winner-header {
  text-align: center; font-size: 16px; font-weight: 800;
  color: #ffd700; margin: 0 0 10px;
  text-shadow: 0 0 8px rgba(255,200,0,0.5);
}
.detail-type { display: flex; gap: 6px; margin-bottom: 10px; }
.detail-type button {
  flex: 1; padding: 7px 4px; border-radius: 8px;
  border: 1px solid rgba(255,215,0,0.5); font-size: 12px;
  cursor: pointer; font-family: 'Noto Sans Thai', sans-serif;
  font-weight: 700; transition: all 0.2s;
  background: rgba(255,255,255,0.08); color: #e0d0c0;
}
.detail-type button.active {
  background: linear-gradient(180deg, #ffb300 0%, #ff7c00 100%);
  color: #fff; border-color: #ff8800;
}
/* Winner table — max-height 260px keeps content above pagoda cloud decoration */
.winner-table { width: 100%; border-collapse: separate; border-spacing: 0 4px; }
.winner-table tbody {
  display: block;
  max-height: 260px;
  overflow-y: hidden;
  scroll-behavior: smooth;
}
.winner-table tr { display: table; width: 100%; table-layout: fixed; }
.winner-table td {
  padding: 6px 4px; font-size: 11px;
  border-bottom: 1px solid rgba(255,200,0,0.12);
  color: #e0d0c0; vertical-align: middle;
}
.winner-table td:first-child { color: #a89080; white-space: nowrap; font-size: 10px; }
.winner-name { color: #fff; font-weight: 600; display: block; }
.winner-amt { color: #ffd700; font-weight: 700; font-size: 12px; display: block; }

/* ── Prize cards row (bottom) ── */
.tnc-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 10px;
}
.prize-cards-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,200,0,0.3) transparent;
}
.prize-card {
  flex-shrink: 0;
  width: 110px;
  background: linear-gradient(180deg, rgba(80,20,0,0.9), rgba(40,5,0,0.95));
  border: 1px solid rgba(255,200,0,0.5);
  border-top: 3px solid #ffb300;
  border-radius: 10px;
  padding: 10px 6px 12px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,200,100,0.15);
}
.prize-card-num {
  font-size: 11px; color: #ffd700; font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 0 6px rgba(255,200,0,0.6);
}
.prize-card-img {
  width: 65px; height: 65px; object-fit: contain;
  display: block; margin: 0 auto 6px;
}
.prize-card-img-placeholder {
  width: 65px; height: 65px;
  background: rgba(255,200,0,0.08);
  border-radius: 8px; margin: 0 auto 6px;
  display: flex; align-items: center;
  justify-content: center; font-size: 28px;
}
.prize-card-name {
  font-size: 10px; color: #e0d0c0;
  line-height: 1.4; font-weight: 600;
}

/* ── Terms & Conditions ── */
.lw-terms {
  margin-top: 20px;
  background: linear-gradient(180deg, rgba(80,10,0,0.85), rgba(30,5,0,0.9));
  border-radius: 12px;
  padding: 0;
  border: 1px solid rgba(255,180,0,0.3);
  overflow: hidden;
}
.lw-terms-header {
  background: linear-gradient(90deg, rgba(180,60,0,0.8), rgba(120,30,0,0.8));
  border-bottom: 2px solid rgba(255,180,0,0.4);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.lw-terms-header h3 {
  font-size: 15px; font-weight: 800; color: #ffd700;
  margin: 0; text-shadow: 0 0 8px rgba(255,180,0,0.5);
}
.lw-terms-body {
  padding: 16px 24px 24px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.lw-terms-text { flex: 1; }
.lw-terms-char {
  width: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  font-size: 60px;
  line-height: 1;
}
.lw-terms-subtitle {
  font-size: 12px; color: #ffd700; font-weight: 700;
  margin: 0 0 6px; padding: 0;
}
.lw-terms ol, .lw-terms ul {
  margin: 0 0 12px; padding-left: 18px;
}
.lw-terms li {
  font-size: 11px; color: #c8b090; line-height: 1.9;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Stack columns */
  .container-row-1 {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px auto 0;
  }

  /* Wheel wrapper — full width, max 340px */
  .lucky-wheel-wrapper {
    width: 100% !important;
    max-width: 340px !important;
  }

  /* Frame GIF scales to wrapper */
  .lucky-wheel-frame {
    width: 100% !important;
    height: auto !important;
  }

  /* Flags — scale down, keep !important to beat external CSS
     wrapper 340px → scale factor 340/457 = 0.744
     bottom: 20% stays same, just shrink width */
  .icon-1 {
    width: 110px !important;
    bottom: 20% !important;
    left: 84% !important;
  }
  .icon-2 {
    width: 110px !important;
    bottom: 20% !important;
    right: 84% !important;
  }

  /* Crystals/lanterns — smaller on mobile */
  .icon-3 { width: 75px !important; right: -8% !important; }
  .icon-4 { width: 75px !important; left: -14% !important; }
  .icon-5 { display: none !important; }
  .icon-6 { display: none !important; }

  /* Fireworks — scale down */
  .firework-top  { width: 280px; top: -40px; left: 30px; }
  .firework-left { width: 180px; top: 100px; left: -80px; }
  .firework-right { width: 180px; top: 80px; left: 220px; }
  .firework-bottom { display: none; }

  /* Spinner geometry scales with frame */
  #lw-wheelSpinner {
    top: 7px !important;
    left: 0 !important;
    width: 340px !important;
    height: 358px !important;
    transform-origin: 170px 179px !important;
  }

  /* Spin button — scale to 74% of desktop (340/457) */
  .spin-icon {
    top: 85px !important;
    left: 115px !important;
    width: 109px !important;
    height: 148px !important;
    transform: none !important;
    z-index: 7 !important;
  }

  /* Spin content — scale top proportionally (433 × 340/457 ≈ 322px) */
  .spin-content {
    top: 322px !important;
    width: 340px !important;
    z-index: 8 !important;
  }

  /* Prize labels — smaller text but still readable */
  .prize-label-text { font-size: 8px !important; max-width: 44px !important; }

  /* Winner panel */
  .winner-content { width: 100%; max-width: 340px; overflow: visible; }
  .winner-detail-with-bg { padding: 72px 28px 20px !important; }
  .winner-bg-img { top: -80px !important; left: -60px !important; width: calc(100% + 120px) !important; height: calc(100% + 180px) !important; }
  .winner-table tbody { max-height: 190px !important; }

  /* Spin button mobile */
  .spin-content-btn { padding: 10px 40px !important; font-size: 14px !important; }

  /* Prize cards */
  .prize-card { width: 90px; }
  .prize-card-img-placeholder { width: 50px; height: 50px; font-size: 22px; }
  .prize-card-name { font-size: 9px; }

  /* Bottom image */
  .lucky-wheel-btm-img { width: 340px !important; }

  /* Spin button text */
  .spin-content-btn { padding: 9px 36px; font-size: 13px; }
}


/* ===== FIXED ALIGNMENT OVERRIDES ===== */
.container-row-1 {
  gap: 42px !important;
  max-width: 1010px !important;
}

#lw-wheelSpinner {
  top: -2px !important;
  left: 0 !important;
  width: 457px !important;
  height: 481px !important;
  transform-origin: 228px 240px !important;
}

.inner-wheel {
  width: 77% !important;
  height: auto !important;
  inset: 0 !important;
  margin: auto !important;
  transform: none !important;
}

.spin-icon {
  top: 125px !important;
  left: 155px !important;
  transform: none !important;
  z-index: 7 !important;
}

.winner-content {
  flex-shrink: 0 !important;
  width: 360px !important;
  margin-top: 0 !important;
  overflow: visible !important;
}

.winner-detail-with-bg {
  position: relative !important;
  isolation: isolate !important;
  width: 360px !important;
  min-height: 488px !important;
  padding: 86px 70px 72px 82px !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.winner-bg-img {
  position: absolute !important;
  top: -102px !important;
  left: -66px !important;
  width: 492px !important;
  height: 620px !important;
  z-index: -1 !important;
  pointer-events: none !important;
  object-fit: fill !important;
  display: block !important;
}

.winner-header {
  text-align: center !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  color: #fff !important;
  margin: 0 0 34px !important;
  text-shadow: 0 0 8px rgba(255,60,0,0.9), 0 0 12px rgba(255,200,0,0.75) !important;
  white-space: nowrap !important;
}

.detail-type {
  display: flex !important;
  gap: 8px !important;
  /* margin-bottom: 38px !important; */
  justify-content: center !important;
}

.detail-type button {
  flex: 0 0 auto !important;
  min-width: 82px !important;
  padding: 9px 10px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255,215,0,0.5) !important;
  font-size: 12px !important;
  cursor: pointer !important;
  font-family: 'Noto Sans Thai', sans-serif !important;
  font-weight: 800 !important;
  transition: all 0.2s !important;
  background: rgba(255,255,255,0.92) !important;
  color: #3b1200 !important;
  white-space: nowrap !important;
}

.detail-type button.active {
  background: linear-gradient(180deg, #ffb300 0%, #ff7c00 100%) !important;
  color: #fff !important;
  border-color: #ff8800 !important;
}

.winner-table {
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  table-layout: fixed !important;
}

.winner-table tbody {
  display: block !important;
  max-height: 252px !important;
  overflow-y: hidden !important;
  scroll-behavior: smooth !important;
}

.winner-table tr {
  display: table !important;
  width: 100% !important;
  table-layout: fixed !important;
}

.winner-table td {
  padding: 9px 2px !important;
  font-size: 13px !important;
  border-bottom: 1px solid rgba(255,200,0,0.16) !important;
  color: #fff !important;
  vertical-align: middle !important;
}

.winner-table td:first-child {
  width: 54px !important;
  color: #fff !important;
  white-space: nowrap !important;
  font-size: 13px !important;
  font-weight: 600 !important;
}

.winner-name {
  color: #ffb300 !important;
  font-weight: 900 !important;
  display: block !important;
  text-align: right !important;
  line-height: 1.1 !important;
}

.winner-amt {
  color: #ffb300 !important;
  font-weight: 900 !important;
  font-size: 11px !important;
  display: block !important;
  text-align: right !important;
  line-height: 1.1 !important;
}

@media (max-width: 768px) {
  #lw-wheelSpinner {
    top: -1px !important;
    left: 0 !important;
    width: 340px !important;
    height: 358px !important;
    transform-origin: 170px 179px !important;
  }

  .winner-content {
    width: 100% !important;
    max-width: 340px !important;
    overflow: visible !important;
  }

  .winner-detail-with-bg {
    width: 340px !important;
    min-height: 456px !important;
    padding: 76px 62px 62px 74px !important;
  }

  .winner-bg-img {
    top: -82px !important;
    left: -58px !important;
    width: 456px !important;
    height: 570px !important;
  }

  .winner-header {
    margin-bottom: 28px !important;
    font-size: 15px !important;
  }

  .detail-type {
    margin-bottom: 30px !important;
    gap: 6px !important;
  }

  .detail-type button {
    min-width: 74px !important;
    padding: 8px 8px !important;
    font-size: 11px !important;
  }

  .winner-table tbody {
    max-height: 220px !important;
  }
}

/* =========================================================
   FINAL CLEAN PATCH
   - ไม่มี patch ซ้อน
   - ไม่ขยับฐานกงล้อ
   - label บนกงล้อ = ตัวอักษรสีขาว ไม่มีพื้นหลัง
   - prize card ด้านล่างใช้รูปพื้นหลัง prize-level
   ========================================================= */

/* Keep layout clean */
.lucky-wheel-landing-container {
  padding-bottom: 80px !important;
}

.container-row-1 {
  margin-bottom: 0 !important;
}

/* Keep wheel/base original */
.lucky-wheel-wrapper {
  width: 457px !important;
  min-height: auto !important;
  height: fit-content !important;
  overflow: visible !important;
}

#lw-wheelSpinner {
  top: -2px !important;
  left: 0 !important;
  width: 457px !important;
  height: 481px !important;
  transform-origin: 228px 240px !important;
  z-index: 12 !important;
}

.inner-wheel {
  width: 77% !important;
  height: auto !important;
  inset: 0 !important;
  margin: auto !important;
  transform: none !important;
}

.lucky-wheel-frame {
  position: relative !important;
  display: block !important;
  width: 457px !important;
  height: auto !important;
  z-index: 15 !important;
  pointer-events: none !important;
  object-fit: contain !important;
}

.spin-icon {
 top: 115px !important;
    left: 155px !important;
    transform: none !important;
    z-index: 17 !important;
}
@media(max-width: 768px) {

.spin-icon {
    top: 92px !important;
    left: 115px !important;
    transform: none !important;
    z-index: 17 !important;
}
}


.spin-content {
  top: 433px !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 8 !important;
}

.lucky-wheel-btm-img {
  width: 457px !important;
  margin-top: -10px !important;
  position: relative !important;
  z-index: -1 !important;
}

/* =========================================================
   WHEEL LABELS ONLY
   ตัวอักษรสีขาว ไม่มีกล่องดำ/พื้นหลัง
   ========================================================= */

.prize-name-list {
  position: absolute !important;
  inset: 0 !important;
  width: 457px !important;
  height: 481px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  z-index: 4 !important;
  overflow: visible !important;
  pointer-events: none !important;
}

.prize-name-list > li.wheel-prize-label,
.wheel-prize-label {
  position: absolute !important;
  width: 68px !important;
  height: 28px !important;
  min-height: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  pointer-events: none !important;
  transform-origin: center center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.prize-label-text {
  display: block !important;
  width: 66px !important;
  max-width: 66px !important;
  min-height: 0 !important;

  margin: 0 !important;
  padding: 0 !important;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 0 !important;

  color: #ffffff !important;

  font-size: 7px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  text-align: center !important;

  white-space: normal !important;
  word-break: break-word !important;

  text-shadow:
    0 0 2px #000,
    0 0 4px #000,
    1px 1px 2px #000 !important;
}

/* =========================================================
   BOTTOM PRIZE ROW
   ใช้ DOM แบบ prize-level background + prize image
   ไม่ยุ่งกับฐานกงล้อ
   ========================================================= */

.tnc-container {
  position: relative !important;
  z-index: 20 !important;
  max-width: 1120px !important;
  margin: 95px auto 0 !important;
  padding: 0 10px !important;
  clear: both !important;
}

.prize-cards-row {
  position: relative !important;
  z-index: 20 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 10px 18px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(255, 200, 0, 0.35) transparent !important;
}

.prize-cards-row > div {
  position: relative !important;
  flex: 0 0 132px !important;
  width: 132px !important;
  height: 164px !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.prize-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
}

.prize-level {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  display: block !important;
  z-index: 1 !important;
}

.prize {
  position: absolute !important;
  left: 50% !important;
  top: 55% !important;
  width: 68px !important;
  height: 68px !important;
  object-fit: contain !important;
  transform: translate(-50%, -50%) !important;
  z-index: 2 !important;
}

.prize-empty {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 32px !important;
  line-height: 1 !important;
}

.prize-container p {
  position: absolute !important;
  left: 8px !important;
  right: 8px !important;
  bottom: 9px !important;
  z-index: 3 !important;
  margin: 0 !important;
  color: #fff6c8 !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  text-align: center !important;
  line-height: 1.2 !important;
  text-shadow: 0 1px 4px #000, 0 0 8px rgba(255, 180, 0, 0.45) !important;
}

/* Disable old custom prize-card styles if old classes still exist */
.prize-card,
.prize-card-num,
.prize-card-img,
.prize-card-img-placeholder,
.prize-card-name {
  all: unset;
}

/* Mobile */
@media (max-width: 768px) {
  /* ── กัน overflow ซ้าย-ขวา ── */
  .lw-page {
    overflow-x: hidden !important;
  }
  .lw-content {
    overflow-x: hidden !important;
  }

  .container-row-1 {
    margin-bottom: 0 !important;
    width: 100% !important;
    padding: 0 !important;
  }

  .lucky-wheel-landing-container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .lucky-wheel-wrapper {
    width: 100% !important;
    max-width: 340px !important;
    min-height: auto !important;
    height: fit-content !important;
  }

  /* ธงซ้าย-ขวา — ยื่นออกนอก wrapper, overflow-x:hidden clip ขอบนอก */
  .icon-1 {
    display: block !important;
    width: 105px !important;
    bottom: 24% !important;
    left: auto !important;
    right: -58px !important;
    z-index: 10 !important;
  }
  .icon-2 {
    display: block !important;
    width: 105px !important;
    bottom: 24% !important;
    right: auto !important;
    left: -58px !important;
    z-index: 10 !important;
  }

  /* fireworks ขนาดเล็กลง */
  .firework-top  { width: 240px !important; top: -30px !important; left: 20px !important; }
  .firework-left { display: none !important; }
  .firework-right { width: 160px !important; top: 60px !important; left: 180px !important; }
  .firework-bottom { display: none !important; }

  /* frame + spinner ต้องเท่ากันทุก element */
  .lucky-wheel-frame {
    width: 340px !important;
    height: auto !important;
  }

  .lucky-wheel-wrapper {
    width: 340px !important;
    max-width: 340px !important;
  }

  #lw-wheelSpinner {
    top: 6px !important;
    left: 0 !important;
    width: 340px !important;
    height: 358px !important;
    transform-origin: 170px 179px !important;
  }

  .spin-content {
    top: 355px !important;
    width: 340px !important;
    z-index: 6 !important;
  }

  .lucky-wheel-btm-img {
    position: absolute !important;
    top: -60px !important;
    left: 0 !important;
    width: 340px !important;
    margin: 0 !important;
    z-index: -5 !important;
  }

  /* prize-name-list: คง coordinate desktop (457×481) ไว้
     แล้ว scale ลง 0.744 (340/457) — ทำให้ label ตรงกับ spinner */
  .prize-name-list {
    width: 457px !important;
    height: 481px !important;
    transform: scale(0.744) !important;
    transform-origin: top left !important;
  }

  /* winner panel — เลื่อนลงให้พ้นฐานกงล้อ */
  .lw-page .container-row-1 .winner-content {
    margin-top: 120px !important;
  }

  .prize-name-list > li.wheel-prize-label,
  .wheel-prize-label {
    width: 68px !important;
    height: 28px !important;
  }

  .prize-label-text {
    width: 66px !important;
    max-width: 66px !important;
    font-size: 8px !important;
    line-height: 1.1 !important;
  }

  .tnc-container {
    max-width: 100% !important;
    margin: 78px auto 0 !important;
    padding: 0 !important;
  }

  .prize-cards-row {
    justify-content: flex-start !important;
    gap: 8px !important;
    padding: 0 12px 16px !important;
  }

  .prize-cards-row > div {
    flex-basis: 108px !important;
    width: 108px !important;
    height: 136px !important;
  }

  .prize {
    width: 54px !important;
    height: 54px !important;
  }

  .prize-container p {
    font-size: 9px !important;
    bottom: 8px !important;
  }
}

.prize-label-text {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  width: 74px !important;
  max-width: 74px !important;

  padding: 0 !important;
  margin: 0 !important;

  color: #ffffff !important;

  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.08 !important;
  text-align: center !important;

  white-space: normal !important;
  word-break: break-word !important;

  text-shadow:
    0 0 2px #000,
    0 0 4px #000,
    1px 1px 2px #000 !important;
}

.spin-content-btn {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: 42px !important;
  min-height: 42px !important;
  line-height: 1 !important;

  padding: 0 56px !important;
  margin: 0 !important;

  white-space: nowrap !important;
  overflow: hidden !important;
}

.spin-content {
  gap: 2px !important;
}

