/* Lucky Wheel — M1 */
html.lw-embed,
html.lw-embed body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
html.lw-embed body {
  padding: 0 !important;
  background: #05070c;
}
html.lw-embed #top,
html.lw-embed #bottom,
html.lw-embed .bottom-nav,
html.lw-embed .desk-side {
  display: none !important;
}

.lw {
  min-height: calc(100vh - var(--header-h, 64px) - var(--bottom-h, 0px));
  display: grid;
  place-items: center;
  padding: 18px 16px 28px;
  background:
    radial-gradient(900px 420px at 50% 18%, rgba(246, 211, 106, 0.16), transparent 60%),
    radial-gradient(700px 480px at 50% 80%, rgba(0, 229, 255, 0.08), transparent 55%),
    #05070c;
}
html.lw-embed .lw {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
html.lw-embed .lw-layout {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}
html.lw-embed .lw-stage {
  min-height: 0;
  height: 100%;
  padding: 0;
  overflow: hidden;
}

.lw-layout {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) 320px;
  gap: 12px 22px;
  align-items: center;
}

.lw-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(780px, calc(100dvh - 120px));
  padding: 4px 0 20px;
}

.lw-floor {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: min(520px, 70%);
  height: 28px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 70%);
  filter: blur(2px);
  pointer-events: none;
}

.lw-world {
  width: min(760px, 84vh, 100%);
  height: auto;
  aspect-ratio: 1;
  container-type: size;
  position: relative;
  z-index: 1;
}
html.lw-embed .lw-world {
  width: min(860px, 100%);
  max-height: 100%;
}

.lw-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle closest-side at 50% 50%,
      transparent 0 63.2%,
      #120e08 63.2% 64.4%,
      #fff1c2 64.4% 66.2%,
      #e6c36a 66.2% 69%,
      #6d5218 69% 84%,
      #f6d36a 84% 87.4%,
      #8a6416 87.4% 93%,
      #241c0c 93% 100%);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 244, 210, 0.28);
  pointer-events: none;
}

.lw-rotor {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  overflow: hidden;
  will-change: transform;
}

.lw-face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
}

.lw-glass {
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.02) 34%, transparent 50%, rgba(255, 255, 255, 0.06) 78%);
  pointer-events: none;
  z-index: 2;
}

.lw-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20%;
  height: 20%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: none;
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.45);
  transform: translate(-50%, -50%);
  z-index: 4;
}
.lw-hub img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.lw-pointer {
  position: absolute;
  left: 50%;
  top: 5.5%;
  width: 42px;
  height: 14%;
  z-index: 6;
  transform: translateX(-50%);
  transform-origin: 50% 12px;
  transition: transform 0.14s ease-out;
  filter: drop-shadow(0 8px 6px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}
.lw-pointer.is-tick { transform: translateX(-50%) rotate(18deg); }
.lw-pointer span {
  display: block;
  width: 0;
  height: 0;
  margin: 0.6cqh auto 0;
  border-left: 2.2cqh solid transparent;
  border-right: 2.2cqh solid transparent;
  border-top: 9.2cqh solid #f6d36a;
}
.lw-pointer i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 16px;
  height: 16px;
  margin-left: -8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #f6d36a 45%, #8a6416);
  box-shadow: 0 0 12px rgba(246, 211, 106, 0.8);
}

.lw-bulbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lw-bulbs b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.1cqh;
  height: 2.1cqh;
  margin: -1.05cqh 0 0 -1.05cqh;
  border-radius: 50%;
  background: #1a2433;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.16);
}
.lw-bulbs b.is-on {
  background: #fff6d2;
  box-shadow: 0 0 10px 3px rgba(246, 211, 106, 0.85);
}
.lw-bulbs b.is-cyan.is-on {
  background: #e8fdff;
  box-shadow: 0 0 10px 3px rgba(0, 229, 255, 0.8);
}

.lw-panel {
  position: relative;
  z-index: 2;
  background: linear-gradient(180deg, rgba(16, 32, 58, 0.92), rgba(6, 12, 22, 0.92));
  border: 1px solid rgba(246, 211, 106, 0.28);
  border-radius: 22px;
  padding: 22px 20px 18px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.lw-kicker {
  margin: 0;
  color: #f6d36a;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 800;
}
.lw-panel h1 {
  margin: 6px 0 8px;
  font-size: 2rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.lw-brand {
  margin: 8px 0 12px;
  line-height: 0;
}
.lw-brand img {
  display: block;
  width: min(100%, 340px);
  height: auto;
}
.lw-lead {
  margin: 0 0 14px;
  color: #c5d4ea;
  font-size: 0.92rem;
  line-height: 1.45;
}
.lw-bal {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  color: #9eb2ce;
  font-size: 0.88rem;
}
.lw-bal b { color: #fff; font-size: 1rem; }
.lw-stake {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.lw-stake button {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(246, 211, 106, 0.4);
  background: rgba(0, 0, 0, 0.28);
  color: #f6d36a;
  font: 800 1.35rem/1 inherit;
  cursor: pointer;
}
.lw-stake button:disabled { opacity: 0.35; cursor: default; }
.lw-stake b {
  flex: 1;
  text-align: center;
  font-size: 1.45rem;
  letter-spacing: -0.03em;
}
.lw-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.lw-chips button {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #d5e2f2;
  border-radius: 999px;
  padding: 7px 11px;
  font: 700 0.82rem/1 inherit;
  cursor: pointer;
}
.lw-chips button.is-on {
  color: #041018;
  background: linear-gradient(135deg, #00f2ff, #007bff);
  border-color: transparent;
}
.lw-chips button:disabled { opacity: 0.45; cursor: default; }
.lw-spin {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  color: #041018;
  font: 800 1.05rem/1 inherit;
  background: linear-gradient(135deg, #00f2ff 0%, #007bff 100%);
  box-shadow: 0 0 28px rgba(0, 229, 255, 0.28);
}
.lw-spin:hover { filter: brightness(1.06); }
.lw-spin:disabled {
  cursor: default;
  filter: none;
  color: rgba(214, 226, 245, 0.55);
  background: rgba(4, 10, 20, 0.55);
  box-shadow: none;
}
.lw-mute {
  margin-top: 10px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #d5e2f2;
  border-radius: 12px;
  padding: 10px 12px;
  font: 700 0.88rem/1 inherit;
  cursor: pointer;
}
.lw-win {
  margin-top: 14px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: rgba(246, 211, 106, 0.1);
  border: 1px solid rgba(246, 211, 106, 0.35);
  text-align: center;
}
.lw-win[hidden] { display: none; }
.lw-win small { display: block; color: #f6d36a; letter-spacing: 0.14em; font-size: 0.68rem; font-weight: 800; }
.lw-win strong { display: block; margin-top: 4px; font-size: 1.55rem; }
.lw-win.is-big {
  background: rgba(246, 211, 106, 0.18);
  box-shadow: 0 0 24px rgba(246, 211, 106, 0.25);
}
.lw-log {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.lw-log li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #9eb2ce;
  font-size: 0.82rem;
}
.lw-log b { color: #fff; font-weight: 700; }
.lw-toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bottom-h, 0px) + 18px);
  transform: translateX(-50%);
  background: #101820;
  color: #fff;
  border: 1px solid rgba(0, 229, 255, 0.35);
  border-radius: 12px;
  padding: 10px 14px;
  z-index: 20;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* m411: phone fits the game window, not the outer screen */
@media (max-width: 860px) {
  html:has(body[data-page="wheel"]),
  body[data-page="wheel"] {
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }
  body[data-page="wheel"] .lw {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h, 0px);
    bottom: calc(var(--bottom-h, 0px) + env(safe-area-inset-bottom));
    height: auto;
    min-height: 0;
    max-height: none;
    margin: 0;
    padding: 6px 8px;
    overflow: hidden;
    display: block;
    box-sizing: border-box;
  }
  html.lw-embed body[data-page="wheel"] .lw {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .lw-layout {
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: stretch;
  }
  .lw-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    height: 100%;
    padding: 0;
    overflow: hidden;
  }
  .lw-floor { display: none; }
  .lw-world,
  html.lw-embed .lw-world {
    width: auto;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    flex: 0 1 auto;
  }
  .lw-panel {
    padding: 8px 10px;
    border-radius: 16px;
  }
  .lw-kicker { font-size: 0.62rem; letter-spacing: 0.16em; }
  .lw-lead, .lw-log { display: none; }
  .lw-brand { margin: 2px 0 6px; }
  .lw-brand img { width: min(100%, 170px); }
  .lw-bal { margin-bottom: 6px; font-size: 0.8rem; }
  .lw-stake { margin-bottom: 6px; }
  .lw-stake button { width: 36px; height: 36px; border-radius: 10px; }
  .lw-stake b { font-size: 1.15rem; }
  .lw-chips { gap: 4px; margin-bottom: 6px; }
  .lw-chips button { padding: 6px 9px; font-size: 0.78rem; }
  .lw-spin { padding: 11px 12px; border-radius: 12px; }
  .lw-mute { margin-top: 6px; padding: 8px 10px; }
  .lw-win { margin-top: 6px; padding: 8px; }
  .lw-win strong { font-size: 1.25rem; }
  .lw-panel.is-tight { padding: 6px 8px; }
  .lw-panel.is-tight .lw-kicker,
  .lw-panel.is-tight .lw-mute { display: none; }
  .lw-panel.is-tight .lw-brand { margin: 0 0 4px; }
  .lw-panel.is-tight .lw-brand img { width: min(100%, 132px); }
  .lw-panel.is-tight .lw-bal,
  .lw-panel.is-tight .lw-stake,
  .lw-panel.is-tight .lw-chips { margin-bottom: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .lw-pointer { transition: none; }
}


/* m463 red wheel */
html.lw-embed body,
.lw {
  background:
    radial-gradient(900px 420px at 50% 18%, rgba(225, 6, 0, 0.32), transparent 60%),
    radial-gradient(700px 480px at 50% 80%, rgba(225, 6, 0, 0.14), transparent 55%),
    #050505 !important;
}
.lw-ring {
  background:
    radial-gradient(circle closest-side at 50% 50%,
      transparent 0 63.2%,
      #1a0505 63.2% 64.4%,
      #ffffff 64.4% 66.2%,
      #e10600 66.2% 69%,
      #3a0808 69% 84%,
      #ff2a2a 84% 87.4%,
      #6d1010 87.4% 93%,
      #120404 93% 100%) !important;
  box-shadow: 0 18px 32px rgba(0,0,0,.42), inset 0 0 0 1px rgba(255,255,255,.2) !important;
}
.lw-pointer span { border-top-color: #ffffff !important; }
.lw-pointer i {
  background: radial-gradient(circle at 35% 35%, #fff, #ffd0d0 45%, #e10600) !important;
  box-shadow: 0 0 12px rgba(225, 6, 0, 0.75) !important;
}
.lw-bulbs b { background: #2a0a0a !important; }
.lw-bulbs b.is-on {
  background: #e10600 !important;
  box-shadow: 0 0 10px 3px rgba(225, 6, 0, 0.85) !important;
}
.lw-bulbs b.is-cyan.is-on {
  background: #ffffff !important;
  box-shadow: 0 0 10px 3px rgba(255, 255, 255, 0.8) !important;
}
.lw-panel {
  background: linear-gradient(180deg, rgba(28, 6, 6, 0.94), rgba(8, 4, 4, 0.94)) !important;
  border-color: rgba(225, 6, 0, 0.45) !important;
}
.lw-kicker,
.lw-stake b,
.lw-win small { color: #ffb4b4 !important; }
.lw-chips button.is-on {
  color: #fff !important;
  background: #e10600 !important;
  border-color: #e10600 !important;
}
.lw-spin {
  color: #fff !important;
  background: linear-gradient(135deg, #ff3b3b 0%, #9d1010 100%) !important;
  box-shadow: 0 0 28px rgba(225, 6, 0, 0.35) !important;
}
.lw-win {
  background: rgba(225, 6, 0, 0.12) !important;
  border-color: rgba(225, 6, 0, 0.45) !important;
}
.lw-win.is-big {
  background: rgba(225, 6, 0, 0.2) !important;
  box-shadow: 0 0 24px rgba(225, 6, 0, 0.28) !important;
}
