/* Lucky wheel phone polish loaded after the main stylesheet. */
.wheel-section {
  background:
    linear-gradient(135deg, rgba(245, 251, 247, .90), rgba(255, 247, 215, .78)),
    url("../images/luxury-hero-horses.png") center / cover no-repeat !important;
  color: #17251d !important;
}

.wheel-section::before {
  background:
    radial-gradient(circle at 50% 34%, rgba(232, 200, 91, .30), transparent 42%),
    linear-gradient(180deg, rgba(245, 251, 247, .66), rgba(255, 247, 215, .58)) !important;
  backdrop-filter: blur(8px) saturate(1.06) !important;
}

.wheel-section::after {
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(233, 245, 238, .58)),
    rgba(255, 247, 215, .38) !important;
  border: 1px solid rgba(15, 52, 38, .14) !important;
  box-shadow: 0 26px 76px rgba(15, 52, 38, .16), inset 0 1px 0 rgba(255,255,255,.84) !important;
}

.wheel-hero-mark {
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(233, 245, 238, .88)) !important;
  border: 1px solid rgba(15, 52, 38, .12) !important;
  box-shadow: 0 14px 34px rgba(15, 52, 38, .10) !important;
}

.wheel-hero-mark strong {
  color: #0f3426 !important;
  text-shadow: 0 2px 0 rgba(232, 200, 91, .30) !important;
}

.wheel-hero-mark span {
  color: #3f4f46 !important;
}

.fortune-wheel {
  background:
    radial-gradient(circle at 50% 50%, transparent 0 18%, rgba(15, 52, 38, .22) 18.4% 22%, transparent 22.5%),
    conic-gradient(from -36deg,
      #e8c85b 0deg 72deg,
      #f7f0cb 72deg 144deg,
      #8fa45a 144deg 216deg,
      #d9b76a 216deg 288deg,
      #2f6b4d 288deg 360deg) !important;
  border-color: #0f3426 !important;
  box-shadow:
    0 0 0 clamp(5px, 1vw, 8px) #e8c85b,
    0 0 0 clamp(12px, 1.8vw, 17px) #fff7d7,
    0 24px 46px rgba(15, 52, 38, .20),
    0 0 34px rgba(232, 200, 91, .24),
    inset 0 0 0 clamp(10px, 2vw, 17px) #fffdf3,
    inset 0 0 30px rgba(15, 52, 38, .10) !important;
}

.fortune-wheel.is-spinning {
  filter: drop-shadow(0 0 28px rgba(232, 200, 91, .54)) saturate(1.04) !important;
}

.wheel-pointer {
  border-bottom-color: #e8c85b !important;
  filter: drop-shadow(0 7px 0 #fff7d7) drop-shadow(0 12px 14px rgba(15, 52, 38, .24)) !important;
}

.wheel-prize {
  background: rgba(255, 255, 255, .28) !important;
  color: #17251d !important;
  text-shadow: 0 1px 0 rgba(255,255,255,.46) !important;
  border: 1px solid rgba(255,255,255,.24) !important;
}

.wheel-prize strong {
  color: #142b21 !important;
}

.wheel-prize em {
  color: #34463d !important;
}

.wheel-center {
  background: radial-gradient(circle at 35% 24%, #fff7d7, #e8c85b 58%, #b98f35) !important;
  color: #0f3426 !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 7px rgba(15, 52, 38, .18), 0 16px 28px rgba(15, 52, 38, .18) !important;
}

.wheel-center small {
  color: #0f3426 !important;
}

.wheel-spin-btn,
.wheel-result-actions [data-wheel-claim-open],
.wheel-claim-form button {
  background: linear-gradient(180deg, #287452, #0f3426) !important;
  color: #fff7d7 !important;
  border-color: rgba(232, 200, 91, .54) !important;
  box-shadow: 0 8px 0 #09251a, 0 18px 32px rgba(15, 52, 38, .24), inset 0 1px 0 rgba(255,255,255,.18) !important;
}

.wheel-live-counter span,
.wheel-prize-card,
.wheel-prize-card:nth-of-type(1),
.wheel-prize-card:nth-of-type(2),
.wheel-prize-card:nth-of-type(3),
.wheel-prize-card:nth-of-type(4),
.wheel-prize-card:nth-of-type(5) {
  background: linear-gradient(180deg, #ffffff, #e9f5ee) !important;
  color: #17251d !important;
  border-color: rgba(15, 52, 38, .12) !important;
  box-shadow: 0 10px 22px rgba(15, 52, 38, .08), inset 0 1px 0 rgba(255,255,255,.74) !important;
}

.wheel-live-counter b,
.wheel-prize-card b {
  color: #0f3426 !important;
}

.wheel-result-modal {
  background: rgba(15, 52, 38, .28) !important;
}

.wheel-result-card {
  color: #17251d !important;
  background: linear-gradient(180deg, #ffffff, #f5fbf7 64%, #fff7d7) !important;
  border-color: rgba(232, 200, 91, .72) !important;
  box-shadow: 0 28px 80px rgba(15, 52, 38, .22), inset 0 1px 0 rgba(255,255,255,.84) !important;
}

.wheel-result-card strong {
  color: #0f3426 !important;
}

.wheel-result-card span,
.wheel-result-card p,
.wheel-claim-form label {
  color: #34463d !important;
}

.wheel-result-card li {
  color: #0f3426 !important;
  background: linear-gradient(180deg, #fff7d7, #e8c85b) !important;
  border-color: rgba(15, 52, 38, .12) !important;
}

.wheel-claim-form input {
  background: #ffffff !important;
  color: #17251d !important;
  border-color: rgba(15, 52, 38, .16) !important;
}

.wheel-popup-close {
  background: #ffffff !important;
  border-color: rgba(232, 200, 91, .65) !important;
  color: #0f3426 !important;
  box-shadow: 0 10px 24px rgba(15, 52, 38, .14) !important;
}

.wheel-live-counter {
  width: min(86vw, 360px);
  margin: 10px auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.wheel-live-counter span {
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 7px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fffdf4, #ffe397);
  border: 1px solid rgba(170, 105, 19, .22);
  box-shadow: 0 10px 22px rgba(126, 78, 15, .12), inset 0 1px 0 rgba(255,255,255,.72);
  color: #4a2b13;
}

.wheel-live-counter b {
  font-size: 22px;
  line-height: 1;
  font-weight: 950;
}

.wheel-live-counter small {
  font-size: 12px;
  line-height: 1.15;
  font-weight: 900;
}

.wheel-result-modal {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  display: grid !important;
  place-items: center !important;
  padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)) !important;
  overflow: auto !important;
  background: rgba(71, 43, 12, .32) !important;
  backdrop-filter: blur(10px) saturate(1.08) !important;
}

.wheel-result-card {
  width: min(92vw, 460px) !important;
  max-height: calc(100dvh - 28px) !important;
  overflow: auto !important;
  display: grid !important;
  gap: 11px !important;
  place-items: center !important;
  padding: clamp(16px, 4.5vw, 28px) !important;
  border-radius: 26px !important;
  text-align: center !important;
  color: #422711 !important;
  background: linear-gradient(180deg, #fffdf7, #ffefbd) !important;
  border: 2px solid #e2ad39 !important;
  box-shadow: 0 28px 80px rgba(112, 72, 17, .30), inset 0 1px 0 rgba(255,255,255,.8) !important;
}

.wheel-result-card strong {
  color: #9a6515 !important;
  font-size: clamp(25px, 7vw, 38px) !important;
  line-height: 1.1 !important;
  font-weight: 950 !important;
}

.wheel-result-card span,
.wheel-result-card p {
  max-width: 100% !important;
  margin: 0 !important;
  color: #51331a !important;
  font-size: clamp(14px, 3.8vw, 18px) !important;
  line-height: 1.5 !important;
  font-weight: 850 !important;
  overflow-wrap: anywhere !important;
}

.wheel-result-card ul {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  gap: 8px !important;
  list-style: none !important;
}

.wheel-result-card li {
  width: 100% !important;
  padding: 12px 14px !important;
  border-radius: 18px !important;
  color: #3f2713 !important;
  background: linear-gradient(180deg, #fff7dc, #f4c85e) !important;
  border: 1px solid rgba(157, 99, 20, .20) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.65) !important;
  font-size: clamp(17px, 4.8vw, 23px) !important;
  font-weight: 950 !important;
  line-height: 1.25 !important;
  overflow-wrap: anywhere !important;
}

.wheel-result-actions {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

.wheel-result-actions .btn,
.wheel-claim-form button {
  min-height: 48px !important;
  border-radius: 16px !important;
  white-space: normal !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

.wheel-result-actions [data-wheel-claim-open],
.wheel-claim-form button {
  background: linear-gradient(180deg, #ffd96a, #efaf24) !important;
  color: #442914 !important;
  border: 1px solid #fff2b7 !important;
}

.wheel-claim-form {
  width: 100% !important;
  display: grid !important;
  gap: 9px !important;
}

.wheel-claim-form.hidden {
  display: none !important;
}

.wheel-claim-form label {
  width: 100% !important;
  display: grid !important;
  gap: 6px !important;
  text-align: right !important;
  color: #51331a !important;
  font-weight: 900 !important;
}

.wheel-claim-form input {
  width: 100% !important;
  min-height: 46px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(157, 99, 20, .25) !important;
  background: #fffdf7 !important;
  color: #3f2713 !important;
  padding: 10px 12px !important;
  font-size: 16px !important;
}

@media (max-width: 700px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  .wheel-popup-close {
    top: max(10px, env(safe-area-inset-top)) !important;
    left: 10px !important;
    width: 38px !important;
    height: 38px !important;
    font-size: 24px !important;
    z-index: 2147482000 !important;
  }

  .wheel-section.wheel-popup-open {
    align-content: start !important;
    justify-items: center !important;
    gap: 8px !important;
    width: 100vw !important;
    min-height: 100dvh !important;
    padding: 52px 10px 14px !important;
    overflow-x: hidden !important;
    grid-template-rows: auto auto auto !important;
  }

  .wheel-section::after {
    width: calc(100vw - 14px) !important;
    min-height: calc(100dvh - 14px) !important;
    height: auto !important;
    max-width: none !important;
    border-radius: 22px !important;
  }

  .wheel-hero-mark {
    width: calc(100vw - 28px) !important;
    padding: 9px 11px !important;
    border-radius: 18px !important;
  }

  .wheel-hero-mark strong {
    font-size: clamp(20px, 6.2vw, 27px) !important;
    line-height: 1.15 !important;
  }

  .wheel-hero-mark span {
    font-size: clamp(12px, 3.3vw, 15px) !important;
    line-height: 1.35 !important;
    display: none !important;
  }

  .wheel-main,
  .wheel-stage {
    width: min(88vw, 330px) !important;
    max-width: calc(100vw - 34px) !important;
  }

  .fortune-wheel {
    border-width: 8px !important;
    box-shadow:
      0 0 0 5px #f2bd45,
      0 0 0 10px #fff8df,
      0 18px 30px rgba(130, 84, 23, .24),
      inset 0 0 0 10px #fffdf3,
      inset 0 0 24px rgba(105, 68, 20, .12) !important;
  }

  .wheel-pointer {
    top: -2px !important;
    border-left-width: 18px !important;
    border-right-width: 18px !important;
    border-bottom-width: 48px !important;
  }

  .wheel-prize {
    width: clamp(66px, 19.5vw, 78px) !important;
    min-height: 50px !important;
    padding: 4px !important;
    border-radius: 12px !important;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * min(23vw, 86px))) rotate(calc(-1 * var(--angle))) rotate(var(--wheel-label-upright, 0deg)) !important;
    transition: transform var(--wheel-spin-duration, 5600ms) cubic-bezier(.10, .74, .06, 1) !important;
  }

  .wheel-prize b {
    font-size: clamp(15px, 4.4vw, 20px) !important;
  }

  .wheel-prize strong {
    font-size: clamp(9px, 2.75vw, 12px) !important;
    line-height: 1.12 !important;
  }

  .wheel-prize em {
    font-size: clamp(8px, 2.35vw, 10px) !important;
    line-height: 1.12 !important;
  }

  .wheel-center {
    width: 70px !important;
    height: 70px !important;
    font-size: 9px !important;
    border-width: 6px !important;
  }

  .wheel-center img {
    width: 32px !important;
    height: 32px !important;
  }

  .wheel-login-card {
    width: min(88vw, 320px) !important;
    margin-top: 4px !important;
  }

  .wheel-spin-btn {
    width: min(82vw, 300px) !important;
    min-height: 48px !important;
    border-radius: 16px !important;
    font-size: 20px !important;
  }

  .wheel-live-counter {
    width: min(82vw, 300px) !important;
    margin-top: 8px !important;
  }

  .wheel-live-counter span {
    min-height: 42px !important;
  }

  .wheel-prizes-panel {
    display: none !important;
  }

  .wheel-result-modal {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100dvh !important;
    display: grid !important;
    place-items: center !important;
    align-items: center !important;
    justify-items: center !important;
    padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)) !important;
    overflow: auto !important;
    overscroll-behavior: contain !important;
  }

  .wheel-result-card {
    width: min(92vw, 360px) !important;
    max-height: calc(100dvh - 24px) !important;
    margin: auto !important;
    padding: 16px 14px !important;
    border-radius: 20px !important;
    gap: 8px !important;
    transform: none !important;
  }

  .wheel-result-card strong {
    font-size: clamp(22px, 6vw, 30px) !important;
  }

  .wheel-result-card li {
    font-size: clamp(15px, 4.3vw, 19px) !important;
    padding: 10px 12px !important;
  }

  .wheel-result-card p {
    font-size: clamp(12px, 3.5vw, 15px) !important;
    line-height: 1.42 !important;
  }

  .wheel-result-actions {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .wheel-result-actions .btn,
  .wheel-claim-form button,
  .wheel-claim-form input {
    min-height: 44px !important;
  }

  .wheel-claim-form {
    gap: 7px !important;
  }
}

/* Last-mile clipping fix: keep every prize label safely inside the wheel rim. */
.wheel-prize {
  z-index: 2 !important;
  max-width: 25% !important;
  overflow: visible !important;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * min(24vw, 152px))) rotate(calc(-1 * var(--angle))) rotate(var(--wheel-label-upright, 0deg)) !important;
}

.wheel-prize strong,
.wheel-prize em {
  display: block !important;
  width: 100% !important;
  overflow-wrap: anywhere !important;
}

@media (max-width: 700px) {
  .wheel-section.wheel-popup-open {
    padding: 50px 8px 12px !important;
  }

  .wheel-main,
  .wheel-stage {
    width: min(90vw, 348px) !important;
    max-width: calc(100vw - 26px) !important;
  }

  .fortune-wheel {
    border-width: 7px !important;
    box-shadow:
      0 0 0 4px #e8c85b,
      0 0 0 9px #fff8df,
      0 16px 28px rgba(15, 52, 38, .18),
      inset 0 0 0 8px #fffdf3,
      inset 0 0 18px rgba(15, 52, 38, .10) !important;
  }

  .fortune-wheel::after {
    inset: 16px !important;
    border-width: 2px !important;
  }

  .wheel-pointer {
    top: -1px !important;
    border-left-width: 17px !important;
    border-right-width: 17px !important;
    border-bottom-width: 44px !important;
  }

  .wheel-prize {
    width: clamp(58px, 17vw, 72px) !important;
    max-width: 72px !important;
    min-height: clamp(42px, 12.5vw, 54px) !important;
    padding: 3px 4px !important;
    gap: 0 !important;
    border-radius: 11px !important;
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc(-1 * min(18.5vw, 68px))) rotate(calc(-1 * var(--angle))) rotate(var(--wheel-label-upright, 0deg)) !important;
  }

  .wheel-prize b {
    font-size: clamp(13px, 3.8vw, 17px) !important;
    line-height: 1 !important;
  }

  .wheel-prize strong {
    font-size: clamp(8.5px, 2.65vw, 11px) !important;
    line-height: 1.05 !important;
  }

  .wheel-prize em {
    font-size: clamp(7.5px, 2.25vw, 9.5px) !important;
    line-height: 1.05 !important;
  }

  .wheel-center {
    width: 62px !important;
    height: 62px !important;
    border-width: 5px !important;
    font-size: 8px !important;
  }

  .wheel-center img {
    width: 28px !important;
    height: 28px !important;
  }
}
