* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: #090302; color: #fff; font-family: Arial, Helvetica, sans-serif; }
body.magic-wheel-page {
  min-height: 100vh;
  background:
    repeating-linear-gradient(115deg, rgba(251, 191, 36, .055) 0 1px, transparent 1px 22px),
    radial-gradient(circle at 52% 8%, rgba(239, 68, 68, .28), transparent 30%),
    radial-gradient(circle at 86% 34%, rgba(250, 204, 21, .18), transparent 28%),
    radial-gradient(circle at 15% 76%, rgba(34, 197, 94, .16), transparent 26%),
    linear-gradient(180deg, #1b0504 0%, #090302 54%, #030100 100%);
}
.mw-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 40px;
  align-items: center;
  gap: 10px;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 14px 8px;
  background: rgba(18, 5, 4, .92);
  border-bottom: 1px solid rgba(251, 191, 36, .28);
  backdrop-filter: blur(12px);
}
.mw-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fde68a;
  background: rgba(127, 29, 29, .42);
  border: 1px solid rgba(251, 191, 36, .28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 18px rgba(251,191,36,.1);
}
.mw-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.mw-menu-btn {
  font-size: 1.18rem;
  line-height: 1;
}
.mw-brand {
  min-width: 0;
  color: #fef3c7;
  font-weight: 900;
  letter-spacing: .02em;
  font-size: 1.08rem;
  text-transform: uppercase;
}
.mw-balance {
  display: grid;
  gap: 1px;
  text-align: right;
  font-size: .68rem;
  color: rgba(255,255,255,.58);
}
.mw-balance strong { color: #facc15; font-size: .9rem; }
.mw-shell {
  width: min(960px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 28px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 14px;
}
.mw-stage-card,
.mw-control-card,
.mw-modal-box {
  border: 1px solid rgba(251, 191, 36, .26);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(35, 9, 7, .86), rgba(10, 3, 2, .78));
  box-shadow: 0 18px 44px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07), 0 0 34px rgba(239,68,68,.1);
}
.mw-stage-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
}
.mw-stage-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .6;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(251,191,36,.12) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 0 48%, rgba(239,68,68,.1) 49% 51%, transparent 52%),
    radial-gradient(circle at 18% 18%, rgba(250,204,21,.22) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 72%, rgba(34,197,94,.18) 0 2px, transparent 3px);
  background-size: 100% 100%, 100% 100%, 42px 42px, 54px 54px;
}
.mw-canvas-wrap {
  position: relative;
  z-index: 1;
  width: min(100%, 650px);
  margin: 0 auto;
  aspect-ratio: 1;
  overflow: visible;
}
.mw-canvas-wrap::before,
.mw-canvas-wrap::after {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.mw-canvas-wrap::before {
  z-index: 0;
  background:
    conic-gradient(from 0deg, rgba(239,68,68,.08), rgba(250,204,21,.5), rgba(34,197,94,.1), rgba(59,130,246,.42), rgba(244,63,94,.16), rgba(239,68,68,.08));
  filter: blur(11px);
}
.mw-canvas-wrap::after {
  inset: -5px;
  z-index: 2;
  border: 3px solid transparent;
  background:
    conic-gradient(from 0deg, transparent 0 8%, rgba(250,204,21,.9) 10% 16%, transparent 18% 34%, rgba(34,197,94,.88) 36% 42%, transparent 44% 60%, rgba(59,130,246,.86) 62% 68%, transparent 70% 86%, rgba(239,68,68,.9) 88% 94%, transparent 96% 100%) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.mw-canvas-wrap.is-spinning::before,
.mw-canvas-wrap.is-spinning::after { opacity: 1; }
.mw-canvas-wrap.is-spinning::before { animation: mwOuterPulse .72s linear infinite; }
.mw-canvas-wrap.is-spinning::after { animation: mwOuterOrbit .95s linear infinite; }
@keyframes mwOuterOrbit {
  to { transform: rotate(360deg); }
}
@keyframes mwOuterPulse {
  0%, 100% { transform: scale(.98) rotate(0deg); filter: blur(10px); }
  50% { transform: scale(1.025) rotate(28deg); filter: blur(15px); }
}
#magicWheelCanvas {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 22px 28px rgba(0,0,0,.4));
}
.mw-pointer {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: -18px;
  width: 0;
  height: 0;
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 22px solid #38bdf8;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.55)) drop-shadow(0 0 11px rgba(56,189,248,.72));
}
.mw-center-spin {
  position: absolute;
  z-index: 5;
  left: 50%;
  top: 50%;
  width: 104px;
  height: 104px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-weight: 950;
  font-size: 1rem;
  letter-spacing: .04em;
  cursor: pointer;
  background: radial-gradient(circle at 35% 25%, #fff7ed 0 12%, #facc15 34%, #dc2626 100%);
  box-shadow: inset 0 4px 7px rgba(255,255,255,.42), inset 0 -8px 18px rgba(127,29,29,.42), 0 12px 28px rgba(0,0,0,.45), 0 0 30px rgba(250,204,21,.38);
}
.mw-center-spin:disabled,
.mw-spin-btn:disabled,
.mw-bet-row button:disabled,
.mw-chip-row button:disabled { opacity: .55; cursor: not-allowed; }
.mw-win-overlay {
  position: fixed;
  left: 50%;
  top: 6%;
  z-index: 90;
  width: auto;
  min-width: 190px;
  padding: 9px 20px 11px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 2px solid rgba(250, 204, 21, .84);
  border-radius: 16px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(16, 8, 46, .94), rgba(35, 15, 70, .91));
  box-shadow: 0 0 34px rgba(232, 200, 116, .34);
  backdrop-filter: blur(6px);
  cursor: pointer;
  animation: mwWinOverlayIn .24s cubic-bezier(.2, .8, .2, 1);
}
.mw-win-overlay[hidden] { display: none; }
.mw-win-overlay strong {
  position: relative;
  z-index: 1;
  color: #fef3c7;
  font-size: clamp(1.75rem, 5vw, 2.4rem);
  line-height: 1;
  text-shadow: 0 0 20px rgba(250, 204, 21, .68);
}
.mw-win-kicker,
.mw-win-overlay > span:last-child {
  position: relative;
  z-index: 1;
  font-weight: 950;
  letter-spacing: .13em;
}
.mw-win-kicker { color: #fde68a; font-size: .68rem; letter-spacing: .32em; }
.mw-win-overlay > span:last-child { color: #facc15; font-size: .78rem; }
.mw-win-overlay.is-big-win,
.mw-win-overlay.is-jackpot {
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 255, 255, .28), transparent 28%),
    radial-gradient(circle, rgba(250, 204, 21, .46), transparent 48%),
    linear-gradient(145deg, rgba(73, 38, 2, .96), rgba(180, 83, 9, .94));
}
.mw-win-overlay.is-jackpot { animation: mwWinOverlayIn .24s cubic-bezier(.2, .8, .2, 1), mwJackpotPulse .7s ease-in-out infinite alternate; }
.mw-win-overlay.is-free-spin { border-color: #7fd4ff; box-shadow: 0 0 34px rgba(127,212,255,.45); }
.mw-win-overlay.is-free-spin .mw-win-kicker,
.mw-win-overlay.is-free-spin > span:last-child { color: #7fd4ff; }
.mw-win-rays {
  position: absolute !important;
  inset: -65%;
  z-index: 0 !important;
  background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.17) 0 5deg, transparent 5deg 16deg);
  animation: mwWinRays 4s linear infinite;
}
@keyframes mwWinOverlayIn {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px) scale(.55); }
  70% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.08); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes mwWinRays { to { transform: rotate(360deg); } }
@keyframes mwJackpotPulse {
  to { box-shadow: inset 0 0 70px rgba(255,255,255,.22), 0 0 54px rgba(250,204,21,.7); }
}
.mw-celebration-canvas { position: fixed; inset: 0; z-index: 80; width: 100%; height: 100%; display: none; pointer-events: none; }
.mw-celebration-canvas.active { display: block; }
.mw-celebrating .mw-stage-card { animation: mwWinStageFlash .7s ease-out 2 alternate; }
@keyframes mwWinStageFlash { to { box-shadow: 0 0 70px rgba(232,200,116,.68), inset 0 0 80px rgba(168,85,247,.25); } }
.mw-confetti { position: fixed; inset: 0; z-index: 29; overflow: hidden; pointer-events: none; }
.mw-confetti-piece {
  position: absolute;
  top: 50%;
  opacity: 0;
  border-radius: 2px;
  box-shadow: 0 0 7px currentColor;
  animation-name: mwConfettiBurst;
  animation-timing-function: cubic-bezier(.1,.72,.3,1);
  animation-fill-mode: both;
}
.mw-confetti-piece.from-left { left: 25% !important; top: 60%; }
.mw-confetti-piece.from-right { left: 75% !important; top: 60%; }
.mw-confetti-lane-0 { --mw-confetti-x: -230px; --mw-confetti-r: -420deg; }
.mw-confetti-lane-1 { --mw-confetti-x: -175px; --mw-confetti-r: 330deg; }
.mw-confetti-lane-2 { --mw-confetti-x: -120px; --mw-confetti-r: -300deg; }
.mw-confetti-lane-3 { --mw-confetti-x: -65px; --mw-confetti-r: 390deg; }
.mw-confetti-lane-4 { --mw-confetti-x: 0px; --mw-confetti-r: -360deg; }
.mw-confetti-lane-5 { --mw-confetti-x: 65px; --mw-confetti-r: 420deg; }
.mw-confetti-lane-6 { --mw-confetti-x: 120px; --mw-confetti-r: -330deg; }
.mw-confetti-lane-7 { --mw-confetti-x: 175px; --mw-confetti-r: 360deg; }
.mw-confetti-lane-8 { --mw-confetti-x: 230px; --mw-confetti-r: -390deg; }
@keyframes mwConfettiBurst {
  0% { opacity: 0; transform: translate3d(0,0,0) rotate(0); }
  8% { opacity: 1; }
  42% { opacity: 1; transform: translate3d(var(--mw-confetti-x),-190px,0) rotate(var(--mw-confetti-r)); }
  100% { opacity: 0; transform: translate3d(var(--mw-confetti-x),48vh,0) rotate(var(--mw-confetti-r)); }
}
.mw-control-card,
.mw-modal-box {
  padding: 14px;
}
.mw-award-badge {
  width: 100%;
  min-height: 38px;
  margin: 0 0 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  color: #021014;
  font-weight: 950;
  background: linear-gradient(135deg, #fef3c7, #facc15 45%, #22c55e);
  box-shadow: 0 10px 24px rgba(250,204,21,.24);
  cursor: pointer;
}
.mw-award-badge.active {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #f97316 46%, #facc15);
  box-shadow: 0 0 0 2px rgba(255,255,255,.14), 0 12px 28px rgba(239,68,68,.3);
}
.mw-action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  align-items: center;
  gap: 12px;
}
.mw-bet-controls {
  min-width: 0;
}
.mw-bet-row {
  display: grid;
  grid-template-columns: auto 38px minmax(0, 1fr) 38px auto;
  align-items: center;
  gap: 8px;
}
.mw-bet-row button,
.mw-chip-row button,
.mw-modal-box button {
  border: 1px solid rgba(251,191,36,.18);
  border-radius: 8px;
  background: rgba(127, 29, 29, .28);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  min-height: 38px;
}
.mw-bet-row label {
  display: grid;
  gap: 3px;
  text-align: center;
}
.mw-bet-row label span {
  color: rgba(255,255,255,.52);
  font-size: .65rem;
  font-weight: 900;
  text-transform: uppercase;
}
.mw-bet-row input {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(251,191,36,.32);
  border-radius: 8px;
  background: rgba(0,0,0,.28);
  color: #fff;
  min-height: 42px;
  padding: 0 10px;
  text-align: center;
  font-weight: 950;
  font-size: 1rem;
}
.mw-chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}
.mw-chip-row button.active {
  color: #021014;
  background: linear-gradient(135deg, #ef4444, #facc15 50%, #22c55e);
}
.mw-spin-btn {
  width: 88px;
  height: 88px;
  min-height: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  text-transform: uppercase;
  background:
    radial-gradient(circle at 35% 25%, #fefce8 0 10%, #facc15 34%, #22c55e 72%, #15803d 100%);
  color: #021014;
  cursor: pointer;
  box-shadow: inset 0 4px 8px rgba(255,255,255,.34), inset 0 -10px 18px rgba(6,95,70,.42), 0 14px 28px rgba(22,163,74,.28), 0 0 30px rgba(250,204,21,.28);
}
.mw-message {
  min-height: 38px;
  margin: 10px 0 0;
  color: rgba(255,255,255,.7);
  font-size: .82rem;
  line-height: 1.35;
}
.mw-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,.62);
  backdrop-filter: blur(8px);
}
.mw-modal-box {
  width: min(420px, 100%);
  max-height: min(620px, calc(100vh - 36px));
  overflow: auto;
  background: rgba(19, 5, 4, .96);
}
.mw-modal-close {
  width: 38px;
  height: 38px;
  font-size: 1.25rem;
}
.mw-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.mw-section-head h2 { margin: 0; font-size: .98rem; color: #fef3c7; }
.mw-history-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.mw-history-filters button {
  flex: 1 1 70px;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.78);
  font-weight: 900;
  cursor: pointer;
}
.mw-history-filters button.active {
  color: #021014;
  background: linear-gradient(135deg, #ef4444, #facc15 50%, #22c55e);
}
.mw-history-range {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.mw-history-range input {
  flex: 1 1 130px;
  min-height: 36px;
  border: 1px solid rgba(251,191,36,.24);
  border-radius: 8px;
  background: rgba(0,0,0,.24);
  color: #fff;
  padding: 0 9px;
  font-weight: 800;
}
.mw-history-range span {
  flex: 1 1 100%;
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.mw-history { display: grid; gap: 7px; }
.mw-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 8px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.08);
}
.mw-history-row strong { color: #fff; }
.mw-history-row small { display: block; margin-top: 2px; color: rgba(255,255,255,.5); }
.mw-history-row .won { color: #86efac; }
.mw-history-row .lost { color: #fca5a5; }
.mw-history-empty {
  padding: 16px 10px;
  text-align: center;
  color: rgba(255,255,255,.55);
}
.mw-history-pager {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 70px;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}
.mw-history-pager span {
  text-align: center;
  color: rgba(255,255,255,.68);
  font-size: .78rem;
  font-weight: 800;
}
@media (max-width: 780px) {
  .mw-shell {
    grid-template-columns: 1fr;
    width: min(100% - 16px, 520px);
    padding-top: 10px;
  }
  .mw-stage-card { padding: 10px 8px; }
  .mw-center-spin { width: 86px; height: 86px; font-size: .86rem; }
  .mw-action-grid { grid-template-columns: minmax(0, 1fr) 82px; gap: 9px; }
  .mw-spin-btn { width: 78px; height: 78px; font-size: .88rem; }
  .mw-bet-row { grid-template-columns: 44px 34px minmax(0, 1fr) 34px 44px; gap: 6px; }
  .mw-chip-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Arcane Royale — shared Magic Wheel engine presentation. */
:root {
  --mw-gold: #e8c874;
  --mw-violet: #7c3aed;
  --mw-purple: #4c1d95;
  --mw-cyan: #7fd4ff;
  --mw-panel: rgba(20, 10, 48, .88);
  --mw-border: rgba(232, 200, 116, .32);
}
html, body { background: #100833; }
body.magic-wheel-page {
  min-height: 100vh;
  overflow-x: hidden;
  background: radial-gradient(circle at 50% 38%, #5a2090 0%, #4b1a7d 30%, #2c1268 58%, #1a0f4d 82%, #100833 100%);
}
body.magic-wheel-page::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .54;
  background-image: radial-gradient(circle, rgba(0, 212, 255, .58) 1px, transparent 1.7px);
  background-size: 15px 15px;
  -webkit-mask-image: radial-gradient(circle at 50% 34%, #000 0%, rgba(0,0,0,.65) 34%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 34%, #000 0%, rgba(0,0,0,.65) 34%, transparent 70%);
}
.mw-topbar {
  height: 62px;
  background: rgba(13, 7, 38, .88);
  border-color: rgba(232, 200, 116, .24);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.mw-icon-btn {
  color: #fff3cf;
  background: rgba(76, 29, 149, .42);
  border-color: var(--mw-border);
  border-radius: 12px;
}
.mw-brand { display: grid; text-transform: none; line-height: 1.05; }
.mw-brand strong { color: #fff; font-size: .98rem; }
.mw-brand span { margin-top: 3px; color: rgba(243, 238, 252, .62); font-size: .67rem; font-weight: 700; }
.mw-balance strong { color: var(--mw-gold); }
.mw-shell {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 24px));
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 12px;
}
.mw-stage-card, .mw-control-card, .mw-modal-box {
  border-color: var(--mw-border);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(196,181,253,.08), rgba(26,15,61,.68) 55%, rgba(13,8,40,.84));
  box-shadow: 0 18px 44px rgba(0,0,0,.5), inset 0 1px 0 rgba(196,181,253,.1);
}
.mw-stage-card { padding: 14px 18px 18px; overflow: visible; }
.mw-stage-card::before { display: none; }
.mw-stage-heading { position: relative; z-index: 3; text-align: center; }
.mw-stage-heading h1 {
  margin: 0;
  color: #ffd000;
  font-size: clamp(1.9rem, 4.2vw, 2.8rem);
  line-height: 1;
  text-shadow: 0 3px 0 #8b4f00, 0 0 18px rgba(255, 153, 0, .32);
}
.mw-stage-heading p { margin: 7px 0 0; color: rgba(243,238,252,.72); font-size: .78rem; }
.mw-canvas-wrap { width: min(100%, 610px); margin: 34px auto 0; }
.mw-canvas-wrap::before {
  inset: 4%;
  opacity: .72;
  background: radial-gradient(circle, rgba(199,37,255,.38), rgba(0,212,255,.12) 50%, transparent 69%);
  filter: none;
}
.mw-canvas-wrap::after { display: none; }
.mw-canvas-wrap.is-spinning::before { opacity: 1; animation: mwArcaneGlow .8s ease-in-out infinite alternate; }
@keyframes mwArcaneGlow { to { transform: scale(1.08); opacity: .88; } }
.mw-dot-field {
  position: absolute;
  inset: 2%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(168,85,247,.24), rgba(127,212,255,.08) 54%, transparent 72%),
    radial-gradient(circle, rgba(127,212,255,.28) 1px, transparent 2px);
  background-size: 100% 100%, 18px 18px;
  opacity: .72;
}
.mw-sparks { position: absolute; inset: -2%; z-index: 4; pointer-events: none; }
.mw-spark { position: absolute; width: 5px; height: 5px; border-radius: 50%; opacity: 0; background: #fff; box-shadow: 0 0 12px currentColor; }
.mw-canvas-wrap.is-spinning .mw-spark { animation: mwSpark 1.4s ease-out infinite; }
@keyframes mwSpark { 0%, 66%, 100% { opacity: 0; transform: scale(.4); } 32% { opacity: 1; transform: scale(1.45); } 44% { opacity: .45; transform: scale(1); } }
#magicWheelCanvas { filter: drop-shadow(0 24px 30px rgba(0,0,0,.48)); }
.mw-pointer {
  top: -40px;
  width: 38px;
  height: 38px;
  border: 3px solid #d4ae5f;
  border-radius: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 35% 28%, #ecd5ff, #7c3aed 45%, #2a0b5e 78%);
  box-shadow: inset 0 0 0 4px #160a2c, 0 5px 10px rgba(0,0,0,.5), 0 0 22px rgba(232,200,116,.5);
  filter: none;
}
.mw-pointer::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -17px; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 18px solid #e8c874; }
.mw-pointer.is-landing { animation: mwPointerLand .28s ease-out; }
@keyframes mwPointerLand { 40% { transform: translateX(-50%) scale(.86); filter: brightness(1.5); } }
.mw-center-spin {
  width: 112px;
  height: 112px;
  color: #fff7e6;
  border: 3px solid #d4ae5f;
  background: radial-gradient(circle at 36% 28%, #b794ff, #7c3aed 38%, #4c1d95 72%, #2a0b5e);
  box-shadow: inset 0 0 0 6px #160a2c, inset 0 4px 9px rgba(255,255,255,.28), 0 14px 30px rgba(0,0,0,.5), 0 0 28px rgba(232,200,116,.34);
}
.mw-center-spin:not(:disabled) { animation: mwHubReady 2.4s ease-in-out infinite; }
.mw-center-spin:focus-visible { outline: 3px solid var(--mw-cyan); outline-offset: 5px; }
@keyframes mwHubReady { 50% { box-shadow: inset 0 0 0 6px #160a2c, inset 0 4px 9px rgba(255,255,255,.28), 0 14px 30px rgba(0,0,0,.5), 0 0 42px rgba(232,200,116,.72); } }
.mw-next-banner {
  position: absolute;
  z-index: 14;
  top: 11%;
  left: 50%;
  transform: translateX(-50%);
  padding: 9px 18px;
  border: 1px solid var(--mw-gold);
  border-radius: 999px;
  color: #fff7e6;
  background: linear-gradient(135deg, #4c1d95, #3b1380);
  box-shadow: 0 0 24px rgba(232,200,116,.45);
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .24em;
  animation: mwNextIn .82s ease-out both;
}
.mw-next-banner[hidden] { display: none; }
@keyframes mwNextIn { 0% { opacity: 0; transform: translate(-50%,-8px) scale(.82); } 35% { opacity: 1; transform: translate(-50%,0) scale(1); } 100% { opacity: 0; } }
.mw-control-card { padding: 14px; }
.mw-action-grid { display: block; }
.mw-bet-row button, .mw-chip-row button, .mw-modal-box button, .mw-bet-row input {
  border-color: rgba(232,200,116,.24);
  border-radius: 11px;
  background: rgba(255,255,255,.055);
}
.mw-bet-row input { color: var(--mw-gold); }
.mw-chip-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
.mw-chip-row button.active, .mw-history-filters button.active {
  color: #241405;
  background: linear-gradient(135deg,#f7efcf,#e8c874 52%,#b8893a);
  box-shadow: 0 0 18px rgba(232,200,116,.38);
}
.mw-award-badge { color: #fff; background: linear-gradient(135deg,#7c3aed,#a855f7 55%,#7fd4ff); }
.mw-award-badge.active { background: linear-gradient(135deg,#a855f7,#7c3aed); }
.mw-message { color: rgba(243,238,252,.72); }
.mw-spin-btn { display: none; }
.mw-win-overlay { border-color: var(--mw-gold); background: radial-gradient(circle at 50% 45%,rgba(232,200,116,.25),transparent 38%),linear-gradient(145deg,rgba(42,11,94,.95),rgba(76,29,149,.94)); }
.mw-modal { place-items: stretch end; padding: 0; background: rgba(0,0,0,.62); }
.mw-modal-box { width: min(390px,92vw); height: 100%; max-height: none; border-radius: 20px 0 0 20px; padding: 18px; background: linear-gradient(180deg,#1a1033,#120a26 55%,#0c061c); animation: mwDrawerIn .24s ease-out; }
@keyframes mwDrawerIn { from { transform: translateX(100%); } }
.mw-section-head h2 { color: #fff; }
.mw-history-row { background: rgba(255,255,255,.035); }
.mw-history-row .won { color: #7fd4ff; }

@media (max-width: 780px) {
  .mw-shell { grid-template-columns: 1fr; width: min(100% - 12px,540px); padding: 8px 0 24px; }
  .mw-stage-card { padding: 10px 5px 5px; border-radius: 16px; }
  .mw-stage-heading h1 { font-size: 1.8rem; }
  .mw-stage-heading p { font-size: .68rem; }
  .mw-canvas-wrap { width: min(100%,500px); margin-top: 30px; }
  /* Some older/mobile WebViews fail to composite a scaled canvas when a CSS
     filter is applied. The wheel already draws its own depth and glow. */
  #magicWheelCanvas { filter: none; }
  .mw-center-spin { width: 88px; height: 88px; font-size: .86rem; }
  .mw-pointer { width: 32px; height: 32px; top: -34px; }
  .mw-pointer::after { left: 5px; right: 5px; bottom: -15px; }
  .mw-control-card { position: relative; z-index: 5; left: auto; right: auto; bottom: auto; padding: 10px; border-radius: 16px; }
  .mw-bet-row { grid-template-columns: 40px 36px minmax(0,1fr) 36px 40px; gap: 5px; }
  .mw-chip-row { display: flex; overflow-x: auto; gap: 6px; margin-top: 7px; }
  .mw-chip-row button { flex: 1 0 72px; }
  .mw-message { min-height: 18px; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mw-modal { place-items: end stretch; }
  .mw-modal-box { width: 100%; height: auto; max-height: 78vh; border-radius: 20px 20px 0 0; animation-name: mwSheetIn; }
  @keyframes mwSheetIn { from { transform: translateY(100%); } }
}
@media (max-width: 360px) {
  .mw-topbar { grid-template-columns: 38px minmax(0,1fr) auto 38px; padding-left: 8px; padding-right: 8px; gap: 6px; }
  .mw-balance span { display: none; }
  .mw-stage-heading p { max-width: 290px; margin-left: auto; margin-right: auto; }
  .mw-bet-row { grid-template-columns: 36px 34px minmax(0,1fr) 34px 36px; gap: 4px; }
  .mw-bet-row button { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mw-center-spin:not(:disabled), .mw-canvas-wrap.is-spinning::before, .mw-canvas-wrap.is-spinning .mw-spark, .mw-next-banner, .mw-win-overlay, .mw-confetti-piece, .mw-celebrating .mw-stage-card { animation: none; }
}

/* Theme the shared asset loader for this game without changing other games. */
#le-game-loader {
  --le-loader-bg: #100833;
  --le-loader-gold: #e8c874;
  --le-loader-green: #7c3aed;
  background:
    radial-gradient(circle at 50% 38%, rgba(90,32,144,.94), rgba(44,18,104,.92) 48%, #100833 100%),
    radial-gradient(circle, rgba(0,212,255,.34) 1px, transparent 1.7px);
}
#le-game-loader .le-loader-fill { background: linear-gradient(90deg,#4c1d95,#7c3aed 48%,#7fd4ff 72%,#e8c874); }
