:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gold: #ffd76c;
  --deep-gold: #a66114;
  --teal: #0ab6ad;
  --teal-dark: #052d31;
  --orchid: #f05ed9;
  --ink: #031416;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; background: #020707; }
button { font: inherit; }
[hidden] { display: none !important; }

body {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(14, 107, 101, 0.3), transparent 48%),
    linear-gradient(#020809, #010303);
  user-select: none;
}

#gameShell {
  position: relative;
  width: min(100vw, calc(100vh * 1.776833));
  aspect-ratio: 1672 / 941;
  container-type: inline-size;
  overflow: hidden;
  isolation: isolate;
  background: #061d1f;
  box-shadow: 0 0 80px #000, 0 0 35px rgba(0, 208, 194, 0.22);
}

#gameCanvas,
.screenOverlay,
.bigWinCharacters {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#gameCanvas { z-index: 1; display: block; }

.srOnly {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.preloader {
  position: absolute;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff4cd;
  text-align: center;
  background:
    linear-gradient(rgba(1, 18, 20, 0.84), rgba(1, 7, 9, 0.93)),
    url("../assets/spa/background.png") center / cover;
  transition: opacity 650ms ease, visibility 650ms ease;
}

.preloaderCard {
  position: relative;
  width: min(64%, 960px);
  aspect-ratio: 3 / 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: clamp(3px, 0.6cqw, 10px);
  padding: 10% 12% 9%;
  background: url("../assets/ui/spa-panel.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.88));
  animation: panelIn 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.preloader.isReady { opacity: 0; visibility: hidden; pointer-events: none; }
.loaderLotus { color: var(--gold); font-size: clamp(18px, 4.4cqw, 74px); filter: drop-shadow(0 0 18px #20fff2); animation: lotusPulse 1.8s ease-in-out infinite; }
.preloaderCard h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(20px, 4.25cqw, 72px); color: var(--gold); text-shadow: 0 3px 0 #63300b, 0 0 22px #f9d978; }
.preloaderCard p { margin: 0; font-size: clamp(8px, 1.15cqw, 19px); letter-spacing: 0.12em; text-transform: uppercase; }
.preloaderTrack { width: min(30cqw, 480px); height: clamp(5px, 0.65cqw, 12px); overflow: hidden; border: 1px solid #d6ae4e; border-radius: 99px; background: #001012; box-shadow: inset 0 2px 8px #000; }
.preloaderTrack div { width: 0; height: 100%; background: linear-gradient(90deg, #0d7c76, #63fff0, #ffe386); box-shadow: 0 0 16px #58fff2; transition: width 180ms ease; }
.preloaderCard > strong { color: white; font-size: clamp(8px, 1cqw, 16px); font-variant-numeric: tabular-nums; }
.preloader.hasError .loaderLotus { color: #ff9d84; filter: drop-shadow(0 0 18px #ff4238); }
.preloader.hasError .preloaderTrack div { background: linear-gradient(90deg, #7c241b, #ff7967); box-shadow: 0 0 14px #ff5447; }

.hud { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.meter { position: absolute; display: grid; align-content: end; justify-items: center; color: white; text-align: center; text-shadow: 0 2px 4px #000; }
.meter > span { display: none; }
.meter > strong { display: block; width: 100%; padding-bottom: 2%; font-size: clamp(10px, 1.55vw, 28px); letter-spacing: 0; font-variant-numeric: tabular-nums; color: #fff7d3; }
.balanceMeter { left: 11.73%; top: 86.8%; width: 14.7%; height: 10.3%; }
.betMeter { left: 30.34%; top: 88.4%; width: 10.1%; height: 8.2%; }
.winMeter { left: 67.66%; top: 86.8%; width: 17.8%; height: 10.3%; }

.featureHud {
  position: absolute;
  z-index: 8;
  top: 11%;
  left: -2.85%;
  margin-left: 20px;
  margin-top: 25px;
  width: 17.5%;
  aspect-ratio: 1448 / 1086;
  color: #fff6bc;
  background: url("../assets/ui/bonus-hud-panel.png") center / contain no-repeat;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 8px rgba(255, 197, 64, 0.4));
  animation: featureHudIn 420ms cubic-bezier(0.16, 0.8, 0.24, 1.1) both;
}
.featureReadout { position: absolute; left: 19%; right: 19%; display: grid; place-content: center; text-align: center; line-height: 1; }
.featureReadout.totalReadout { top: 34.5%; height: 22%; }
.featureReadout.spinsReadout { top: 64%; height: 20%; }
.featureReadout span { color: #8ff8ec; font-size: clamp(7px, 0.72cqw, 13px); font-weight: 800; letter-spacing: 0.13em; text-transform: uppercase; text-shadow: 0 2px 3px #00191b; }
.featureReadout strong { margin-top: 0.16em; color: #fff1a4; font: 900 clamp(12px, 1.44cqw, 26px)/1 Georgia, serif; font-variant-numeric: tabular-nums; text-shadow: 0 2px 0 #6c3109, 0 0 8px rgba(255, 218, 88, 0.58); }

.paylineRail {
  position: absolute;
  z-index: 7;
  top: 18.75%;
  width: 2.35%;
  height: 64.2%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  overflow: visible;
}
.leftPaylines { left: 13.5%; }
.rightPaylines { right: 13.45%; }
.lineBadge {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff6c8;
  background: transparent url("../assets/ui/payline-medallion.png") center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 2px #000);
  box-shadow: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(6px, 0.72vw, 14px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 2px #001719, 0 0 4px #000, 0 0 5px #20d9d0;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}
.lineBadge:hover,
.lineBadge:focus-visible,
.lineBadge.isPreview { transform: scale(1.14); filter: brightness(1.3) saturate(1.18) drop-shadow(0 0 6px #38fff2); box-shadow: 0 0 9px #38fff2; outline: none; }
.lineBadge.isWin { color: white; filter: brightness(1.34) saturate(1.32) drop-shadow(0 0 7px #ff74ec); box-shadow: 0 0 12px #ff74ec; animation: lineWinPulse 700ms ease-in-out infinite alternate; }

.controls { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.artHit {
  position: absolute;
  pointer-events: auto;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms ease, filter 120ms ease;
}
.artHit::after {
  content: "";
  position: absolute;
  inset: 7%;
  border: 2px solid transparent;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.artHit:hover { filter: brightness(1.16) saturate(1.18); transform: none; }
.artHit:hover::after,
.artHit:focus-visible::after { opacity: 1; border-color: #fff2a0; box-shadow: 0 0 14px #56fff1, inset 0 0 13px rgba(255, 255, 255, 0.25); }
.artHit:focus-visible { outline: none; }
.artHit:active { transform: translateY(1.8%) scale(0.97); filter: brightness(0.9); }
.artHit:disabled { cursor: not-allowed; filter: saturate(0.15) brightness(0.64); }
.menuButton { left: 4.2%; top: 85.07%; width: 7.5%; height: 13.7%; border-radius: 50%; }
.betDownButton { left: 27.45%; top: 89.7%; width: 4.6%; height: 8.6%; border-radius: 50%; }
.betUpButton { left: 38.73%; top: 89.86%; width: 4.6%; height: 8.6%; border-radius: 50%; }
.spinButton { left: calc(43.66% + 2px); top: 77.45%; width: 12.92%; height: 22.95%; border-radius: 50%; }
.maxBetButton { left: 56.878%; top: 85.76%; width: 9.689%; height: 12.646%; border-radius: 16%; }
.autoButton { left: 87.08134%; top: 85.33475%; width: 7.11722%; height: 13.0712%; border-radius: 50%; transform: none; }
.maxBetButton::after { inset: 2.2%; border-radius: 16%; }
.autoButton::after { inset: 0; border-radius: 50%; transform: none; }
.spinButton::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -5%;
  border-radius: 50%;
  opacity: 1;
  background: url("../assets/ui/spin-base.png") center / contain no-repeat;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.58));
  transform: translateY(1.15%) scale(1);
  transition: transform 150ms ease, filter 150ms ease, background-image 80ms linear;
}
.spinButton:not(.isStopping):hover::before,
.spinButton:not(.isStopping):focus-visible::before {
  background-image: url("../assets/ui/spin-hover.png");
  filter: drop-shadow(0 0 14px rgba(49, 255, 229, 0.82)) drop-shadow(0 6px 7px rgba(0, 0, 0, 0.55));
  transform: translateY(1.15%) scale(1);
}
.spinButton.isStopping::before {
  filter: drop-shadow(0 0 16px rgba(255, 42, 56, 0.9)) drop-shadow(0 6px 7px rgba(0, 0, 0, 0.55));
  transform: translateY(1.15%) scale(1);
}
.spinButton:hover { transform: none; }
.spinButton:hover::after { opacity: 0; border-color: transparent; box-shadow: none; }
.spinButton:active { transform: scale(0.985); }
.spinButton.isStopping:hover::before { filter: brightness(1.1) drop-shadow(0 0 20px #ff263c) drop-shadow(0 6px 7px rgba(0, 0, 0, 0.55)); transform: translateY(1.15%) scale(1); }
.stopFace {
  position: absolute;
  z-index: 1;
  inset: -5%;
  border-radius: 50%;
  opacity: 0;
  background: url("../assets/ui/stop-button.png") center / contain no-repeat;
  clip-path: circle(31.5% at 50% 50%);
  transform: translateY(1.15%) scale(1);
  transition: opacity 100ms ease, filter 120ms ease;
  pointer-events: none;
}
.spinButton.isStopping .stopFace { opacity: 1; }
.spinButton.isStopping:hover .stopFace { filter: brightness(1.1) saturate(1.08); }
.stopSquare {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  width: 27%;
  aspect-ratio: 1;
  border: clamp(2px, 0.25vw, 5px) solid #fff0a6;
  border-radius: 10%;
  opacity: 0;
  background: linear-gradient(145deg, #fffdf0 0 34%, #ffe276 58%, #e79a2c 100%);
  box-shadow: 0 3px 0 #76110d, inset 0 0 5px #fff, 0 0 13px rgba(255, 220, 101, 0.74);
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 120ms ease, transform 140ms ease, filter 120ms ease;
  pointer-events: none;
}
.spinButton.isStopping .stopSquare { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.spinButton.isStopping:hover .stopSquare { filter: brightness(1.12); transform: translate(-50%, -50%) scale(1); }
.spinButton::after { z-index: 3; pointer-events: none; }
#autoCountBadge {
  position: absolute;
  z-index: 4;
  left: 50%;
  top: 50%;
  width: 27%;
  transform: translate(-50%, -50%);
  color: #492006;
  background: transparent;
  border: 0;
  font: 900 clamp(8px, 1vw, 18px)/1 Georgia, serif;
  text-align: center;
  text-shadow: 0 1px 0 #fff8c5, 0 0 3px rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.artPanel {
  background: url("../assets/ui/spa-panel.png") center / 100% 100% no-repeat;
  color: #fff4d0;
  filter: drop-shadow(0 18px 26px rgba(0, 0, 0, 0.72));
}
.popover {
  position: absolute;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 32%;
  min-height: 0;
  aspect-ratio: 3 / 2;
  padding: 4.8% 4.3% 4.1%;
  overflow: hidden;
  animation: panelIn 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.gameMenuPanel {
  left: 2.5%;
  bottom: 10.3%;
  aspect-ratio: 4 / 3;
  padding: 6.7% 5.2% 7.4%;
  background-image: url("../assets/ui/spa-menu-panel.png");
}
.gameMenuPanel header { margin: -1% 0 1%; }
.gameMenuPanel .menuOptions { gap: clamp(4px, 0.6cqw, 10px); margin-top: 1.5%; }
.gameMenuPanel .menuOptions button { min-height: 0; padding-block: 1.6%; }
.autoSpinChoice { right: 2.3%; bottom: 10.3%; }
.popover header { flex: 0 0 auto; text-align: center; margin: -2% 0 2%; }
.popover header small,
.messageCard > small { display: block; color: #7ff9ec; text-transform: uppercase; letter-spacing: 0.16em; font-size: clamp(7px, 0.78vw, 14px); }
.popover h2,
.messageCard h2 { margin: 0.1em 0 0; color: var(--gold); font: 700 clamp(16px, 2.1vw, 38px)/1 Georgia, serif; text-shadow: 0 2px 0 #6a310b, 0 0 12px rgba(255, 215, 108, 0.5); }
.autoSpinOptions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5%; margin: 4% 4% 2%; }
.autoSpinOptions button,
.panelAction,
.menuOptions button,
.paytableTabs button {
  border: 1px solid #e7bd5c;
  color: #fff6d4;
  background: linear-gradient(180deg, rgba(17, 106, 103, 0.95), rgba(3, 38, 43, 0.96));
  box-shadow: inset 0 0 10px rgba(70, 255, 236, 0.14), 0 3px 6px rgba(0, 0, 0, 0.5);
  cursor: pointer;
  transition: transform 110ms ease, filter 110ms ease, box-shadow 110ms ease;
}
.autoSpinOptions button:hover,
.panelAction:hover,
.menuOptions button:hover,
.paytableTabs button:hover { filter: brightness(1.28); box-shadow: inset 0 0 12px rgba(111, 255, 242, 0.32), 0 0 10px #15bdb2; transform: translateY(-1px); }
.autoSpinOptions button { padding: 4.5% 3%; border-radius: 10px; font-size: clamp(11px, 1.35vw, 24px); font-weight: 800; }
.autoSpinOptions small { display: block; color: #9de9e2; font-size: 0.48em; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; }
.panelAction { display: block; width: 64%; margin: 5% auto 0; padding: 2.5% 5%; border-radius: 99px; font-weight: 800; font-size: clamp(9px, 0.95vw, 17px); text-transform: uppercase; letter-spacing: 0.08em; }
.menuOptions { display: grid; gap: 2.2%; margin: 2.5% 2% 0; }
.menuOptions button { display: grid; grid-template-columns: 13% minmax(0, 1fr) auto; align-items: center; gap: 3%; padding: 2% 3.2%; border-radius: 10px; text-align: left; }
.menuOptions i { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #d9b34f; border-radius: 50%; color: var(--gold); font-style: normal; font-size: clamp(11px, 1.25vw, 22px); background: rgba(0, 10, 12, 0.6); }
.menuOptions span { display: grid; }
.menuOptions strong { color: #fff5cf; font-size: clamp(8px, 0.9vw, 16px); }
.menuOptions small { color: #82d8d2; font-size: clamp(6px, 0.6vw, 11px); overflow-wrap: anywhere; }
.menuOptions b { color: var(--gold); font-size: clamp(14px, 1.7vw, 30px); }
.menuOptions .toggle { width: 1.6em; padding: 0.15em; border-radius: 99px; color: #61fff0; background: #075852; text-align: right; font-size: clamp(8px, 0.8vw, 14px); }
.menuOptions button[aria-pressed="false"] .toggle { color: #806e56; background: #241d1d; text-align: left; }

.screenOverlay { z-index: 50; display: grid; place-items: center; background: rgba(0, 7, 9, 0.72); }
.screenOverlay.isFadingOut {
  pointer-events: none;
  animation: overlayFadeOut 650ms cubic-bezier(0.4, 0, 0.8, 0.3) both;
}

.pickPediOverlay {
  z-index: 58;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 48%, rgba(126, 23, 142, 0.34), transparent 43%),
    rgba(1, 8, 12, 0.68);
  -webkit-backdrop-filter: blur(7px) brightness(0.54);
  backdrop-filter: blur(7px) brightness(0.54);
  animation: pediVeilIn 950ms ease both;
}
.pickPediBloom {
  position: absolute;
  inset: -25%;
  opacity: 0.76;
  background:
    radial-gradient(circle at 19% 43%, rgba(255, 223, 105, 0.28) 0 0.18%, transparent 0.6%),
    radial-gradient(circle at 78% 57%, rgba(246, 103, 255, 0.32) 0 0.2%, transparent 0.72%),
    radial-gradient(circle at 54% 24%, rgba(255, 233, 148, 0.26) 0 0.14%, transparent 0.58%),
    conic-gradient(from 20deg at 50% 50%, transparent, rgba(218, 71, 255, 0.13), transparent, rgba(255, 210, 79, 0.12), transparent);
  filter: blur(0.3px);
  animation: pediBloomTurn 13s linear infinite;
}
.pickPediStage { position: relative; z-index: 1; width: 96%; height: 94%; text-align: center; }
.pickPediTitle {
  position: absolute;
  left: 50%;
  top: 0.4%;
  width: 48%;
  height: 26%;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.72)) drop-shadow(0 0 17px rgba(255, 193, 62, 0.4));
  animation: pediTitleIn 720ms 180ms cubic-bezier(0.16, 0.82, 0.2, 1.12) both;
}
#pickPediPrompt {
  position: absolute;
  top: calc(22.5% + 10px);
  left: 20%;
  right: 20%;
  margin: 0;
  color: #fff1b3;
  font: 800 clamp(9px, 1.12cqw, 20px)/1.15 Georgia, serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-shadow: 0 2px 4px #160019, 0 0 12px #cf45da;
  animation: copyRise 600ms 620ms both;
}
.pediChoices {
  position: absolute;
  left: 3.2%;
  right: 3.2%;
  top: 29%;
  bottom: 10%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 1.15%;
}
.pediChoice {
  --pedi-delay: 0ms;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  transform: translateY(125%) scale(0.68) rotate(-4deg);
  filter: drop-shadow(0 15px 14px rgba(0, 0, 0, 0.72));
  transition: opacity 650ms ease, transform 650ms cubic-bezier(0.16, 0.82, 0.22, 1.08), filter 220ms ease;
}
.pickPediOverlay.isEntering .pediChoice { animation: pediRise 720ms cubic-bezier(0.16, 0.82, 0.2, 1.12) both; animation-delay: var(--pedi-delay); }
.pediChoice:nth-child(1) { --pedi-delay: 520ms; }
.pediChoice:nth-child(2) { --pedi-delay: 650ms; }
.pediChoice:nth-child(3) { --pedi-delay: 780ms; }
.pediChoice:nth-child(4) { --pedi-delay: 910ms; }
.pediChoice:nth-child(5) { --pedi-delay: 1040ms; }
.pediChoice:hover:not(:disabled),
.pediChoice:focus-visible:not(:disabled) { z-index: 4; outline: none; transform: translateY(-2.5%) scale(1.055); filter: brightness(1.15) drop-shadow(0 0 15px #ffb7f5) drop-shadow(0 14px 13px #000); }
.pediMedallion { position: absolute; inset: 0; display: grid; place-items: center; }
.pediMedallion::before {
  content: "";
  position: absolute;
  inset: 8%;
  border-radius: 50%;
  opacity: 0;
  background: conic-gradient(transparent, rgba(255, 242, 150, 0.88), transparent 25%, rgba(255, 112, 235, 0.66), transparent 62%);
  filter: blur(8px);
  transition: opacity 180ms ease;
  animation: pediHaloTurn 1.4s linear infinite;
}
.pediStatic,
.pediPrize,
.pediVideoCanvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 620ms ease, filter 620ms ease, transform 620ms ease; }
.pediVideoCanvas { z-index: 2; pointer-events: none; }
.pediPrize { z-index: 2; opacity: 0; transform: scale(0.78) rotate(-5deg); }
.pediInstantAmount {
  position: absolute;
  z-index: 1;
  inset: 19%;
  display: grid;
  place-items: center;
  color: #fff1a0;
  font: 900 clamp(18px, 2.35cqw, 42px)/0.92 Georgia, serif;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  -webkit-text-stroke: clamp(1px, 0.1cqw, 2px) #6b2102;
  text-shadow: 0 3px 0 #7b2e05, 0 0 12px #ffcf43, 0 0 24px #f75be6, 0 7px 12px #000;
  filter: brightness(1.8) blur(5px);
  transform: scale(0.7);
  transition: opacity 620ms ease, transform 760ms cubic-bezier(0.16, 0.82, 0.2, 1.12), filter 620ms ease;
}
.pediChoice.isFlashing .pediMedallion::before { opacity: 1; }
.pediChoice.isFlashing .pediStatic { filter: brightness(1.38) saturate(1.18) drop-shadow(0 0 13px #fff0a0); transform: scale(1.055); }
.pediChoice.isSelected { z-index: 5; transform: scale(1.11); filter: brightness(1.1) drop-shadow(0 0 18px #ffdc77) drop-shadow(0 18px 16px #000); }
.pediChoice.isSelected .pediMedallion::before { opacity: 1; }
.pediChoice.isAnimating .pediStatic { opacity: 0; }
.pediChoice.isPrizeVisible .pediStatic,
.pediChoice.isPrizeVisible .pediVideoCanvas { opacity: 0; }
.pediChoice.isPrizeVisible .pediPrize { opacity: 1; transform: scale(1) rotate(0); filter: drop-shadow(0 0 12px rgba(255, 221, 99, 0.46)); }
.pediChoice.isInstantPrizeRevealing .pediPrize { opacity: 0; transform: scale(1.16); filter: brightness(2.1) blur(5px) drop-shadow(0 0 18px #ffe47a); }
.pediChoice.isInstantPrizeRevealing .pediInstantAmount { opacity: 1; transform: scale(1); filter: brightness(1) blur(0); }
.pickPediOverlay.isAllRevealed .pediChoice { opacity: 0.42; transform: scale(0.93); filter: grayscale(0.2) brightness(0.72) drop-shadow(0 10px 10px #000); }
.pickPediOverlay.isAllRevealed .pediChoice.isSelected { opacity: 1; transform: scale(1.12); filter: brightness(1.12) drop-shadow(0 0 20px #ffda70) drop-shadow(0 16px 14px #000); }

.winSpinDoors { position: absolute; z-index: 16; inset: 0; pointer-events: none; perspective: 1000px; }
.winSpinDoor { position: absolute; top: 39.78%; height: 20.97%; opacity: 0; transform: translateY(50%) scale(0.62); filter: drop-shadow(0 6px 7px rgba(0, 0, 0, 0.72)); }
.winSpinDoor:nth-child(1) { left: 16.03%; width: 13.40%; }
.winSpinDoor:nth-child(2) { left: 29.90%; width: 13.22%; }
.winSpinDoor:nth-child(3) { left: 43.54%; width: 13.40%; }
.winSpinDoor:nth-child(4) { left: 57.42%; width: 12.98%; }
.winSpinDoor:nth-child(5) { left: 70.87%; width: 13.28%; }
.winSpinDoors.isPopping .winSpinDoor { animation: doorPop 520ms cubic-bezier(0.16, 0.83, 0.22, 1.14) both; animation-delay: calc(var(--door-index, 0) * 90ms); }
.winSpinDoor:nth-child(1) { --door-index: 0; }
.winSpinDoor:nth-child(2) { --door-index: 1; }
.winSpinDoor:nth-child(3) { --door-index: 2; }
.winSpinDoor:nth-child(4) { --door-index: 3; }
.winSpinDoor:nth-child(5) { --door-index: 4; }
.doorHalf { position: absolute; top: 0; bottom: 0; width: 50.25%; overflow: hidden; backface-visibility: hidden; transition: transform 820ms cubic-bezier(0.28, 0.72, 0.18, 1), filter 420ms ease; }
.doorHalf::before { content: ""; position: absolute; top: 0; bottom: 0; width: 200%; background: url("../assets/ui/pick-a-pedi/reveal-door.png") 49.9% 37.04% / 147.84% 115.19% no-repeat; }
.doorLeft { left: 0; transform-origin: left center; }
.doorLeft::before { left: 0; }
.doorRight { right: 0; transform-origin: right center; }
.doorRight::before { right: 0; }
.winSpinDoor i { position: absolute; z-index: 4; left: 50%; top: 13%; bottom: 9%; width: 2px; opacity: 0.65; background: linear-gradient(transparent, #fff4b0, transparent); box-shadow: 0 0 9px #ffe879; transform: translateX(-50%); transition: opacity 240ms ease; }
.winSpinDoors.isOpening .winSpinDoor { filter: drop-shadow(0 0 12px #ffe891) drop-shadow(0 7px 7px #000); }
.winSpinDoors.isOpening .doorLeft { transform: perspective(480px) rotateY(-96deg); }
.winSpinDoors.isOpening .doorRight { transform: perspective(480px) rotateY(96deg); }
.winSpinDoors.isOpening .winSpinDoor i { opacity: 0; }
.winSpinDoors.isLeaving { animation: doorsLeave 460ms ease both; }

.pediMultiplierOverlay { position: absolute; z-index: 17; inset: 0; overflow: hidden; pointer-events: none; }
#pediMultiplierValue {
  position: absolute;
  left: 50%;
  top: 48%;
  min-width: 42%;
  color: #ffe777;
  font: 900 clamp(78px, 14cqw, 230px)/0.82 Georgia, serif;
  letter-spacing: -0.055em;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  -webkit-text-stroke: clamp(1px, 0.14cqw, 3px) #6f2600;
  text-shadow: 0 5px 0 #8b3504, 0 10px 18px rgba(0, 0, 0, 0.78), 0 0 20px #ffbd22, 0 0 48px #ff5bdd;
  filter: drop-shadow(0 0 8px #fff4b4);
  transform: translate(-50%, -50%) scale(0.62);
  transition: left 720ms cubic-bezier(0.2, 0.76, 0.18, 1), top 720ms cubic-bezier(0.2, 0.76, 0.18, 1), transform 720ms cubic-bezier(0.2, 0.76, 0.18, 1), opacity 180ms ease, filter 220ms ease;
  will-change: left, top, transform, opacity, filter;
}
.pediMultiplierOverlay.isEntering #pediMultiplierValue { opacity: 1; animation: pediMultiplierEnter 700ms cubic-bezier(0.16, 0.84, 0.18, 1.12) both; }
.pediMultiplierOverlay.isParked #pediMultiplierValue { left: 19%; top: 17.5%; min-width: 22%; opacity: 1; transform: translate(-50%, -50%) scale(0.34); filter: drop-shadow(0 0 7px #fff4b4) brightness(1.05); }
.pediMultiplierOverlay.isReturning #pediMultiplierValue { left: 50%; top: 48%; min-width: 42%; opacity: 1; transform: translate(-50%, -50%) scale(1); filter: drop-shadow(0 0 16px #fff8d7) brightness(1.18); }
.pediMultiplierOverlay.isFlashing #pediMultiplierValue { left: 50%; top: 48%; min-width: 42%; opacity: 1; animation: pediMultiplierFlash 390ms ease-in-out 2; }
.pediMultiplierOverlay.isLeaving #pediMultiplierValue { left: 50%; top: 48%; min-width: 42%; animation: pediMultiplierLeave 520ms cubic-bezier(0.45, 0, 0.75, 0.25) both; }
.messageCard { width: 57%; min-height: 54%; padding: 8% 9% 6%; text-align: center; animation: panelIn 260ms ease-out; }
.messageCard p { margin: 2% auto; max-width: 80%; color: #d4f4ef; font-size: clamp(9px, 1.1vw, 20px); line-height: 1.45; }
.messageCard > strong { display: block; margin: 2%; color: #fff3a3; font: 800 clamp(21px, 4vw, 74px)/1 Georgia, serif; text-shadow: 0 0 16px #df68df; }

.bonusTransition {
  overflow: hidden;
  background: #070610 url("../assets/ui/bonus-transition.png") center / cover no-repeat;
  animation: transitionBloom 900ms ease-out;
}
.bonusTransition::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: conic-gradient(from 0deg, transparent, rgba(106, 255, 245, 0.17), transparent, rgba(255, 106, 235, 0.2), transparent);
  animation: portalSpin 8s linear infinite;
}
.bonusTransition::after {
  content: "";
  position: absolute;
  inset: 9% 26%;
  border-radius: 50%;
  box-shadow: inset 0 0 70px 24px rgba(255, 255, 255, 0.26), 0 0 80px 26px rgba(218, 91, 255, 0.26);
  animation: portalPulse 1.4s ease-in-out infinite alternate;
}
.portalCopy { position: relative; z-index: 2; width: 38%; color: white; text-align: center; text-shadow: 0 3px 6px #260027, 0 0 22px #e461ff; animation: copyRise 700ms 300ms both; }
.portalCopy h2 { margin: 1% 0 0; color: #ffe486; font: 900 clamp(28px, 5.4vw, 98px)/0.88 Georgia, serif; text-transform: uppercase; }
.portalCopy strong { display: block; margin: 1%; color: white; font: 900 clamp(48px, 8vw, 145px)/0.9 Georgia, serif; }
.skipButton { position: absolute; z-index: 3; right: 2.3%; bottom: 2.6%; padding: 0.65% 1.5%; border: 1px solid #ffe286; border-radius: 99px; color: #fff7d2; background: rgba(4, 25, 28, 0.82); cursor: pointer; font-size: clamp(8px, 0.85vw, 15px); text-transform: uppercase; letter-spacing: 0.08em; }
.skipButton:hover { background: rgba(16, 105, 100, 0.92); box-shadow: 0 0 12px #4affed; }
.bonusTransition.isAwardSummary .portalCopy { width: 42%; top: -5%; }
.bonusTransition.isAwardSummary .portalCopy h2 { font-size: clamp(28px, 4.15vw, 74px); line-height: 1; white-space: nowrap; }
.bonusTransition.isAwardSummary .portalCopy strong { margin: clamp(8px, 0.9cqw, 15px) 0 0; font-size: clamp(22px, 3.25vw, 58px); line-height: 1; color: #fff5cb; text-transform: uppercase; white-space: nowrap; }
.bonusTransition.isExitSummary .portalCopy { top: -5%; }

.bigWinOverlay { overflow: hidden; background: #02090a url("../assets/ui/big-win-stage.png") center / cover no-repeat; }
.bigWinOverlay::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, transparent 0 28%, rgba(0, 8, 10, 0.1) 52%, rgba(0, 0, 0, 0.55)); pointer-events: none; }
.bigWinCharacters { z-index: 1; pointer-events: none; }
.bigWinReadout { position: relative; z-index: 2; width: 48%; margin-top: -4%; text-align: center; }
.bigWinReadout h2 { margin: 0; color: #ffe57a; font: 900 clamp(35px, 6vw, 110px)/0.95 Georgia, serif; text-transform: uppercase; text-shadow: 0 4px 0 #7e3909, 0 0 24px #ffc936; animation: bigWinTitle 760ms ease-in-out infinite alternate; }
#bigWinNumberCanvas { display: block; width: 100%; height: auto; margin-top: 3%; filter: drop-shadow(0 5px 1px #5d2508) drop-shadow(0 0 12px #ffdc67); }

dialog {
  width: min(94vw, calc(90vh * 1.5));
  height: auto;
  aspect-ratio: 3 / 2;
  padding: 0;
  border: 0;
  color: white;
  background: transparent;
  overflow: visible;
}
dialog::backdrop { background: rgba(0, 4, 6, 0.86); backdrop-filter: blur(5px); }
.dialogFrame { position: relative; width: 100%; height: 100%; padding: 6.8% 6.6% 5.2%; background-image: url("../assets/ui/paytable-frame.png"); filter: drop-shadow(0 22px 34px #000); }
.closeButton { position: absolute; z-index: 2; right: 3.9%; top: 4.8%; width: 4.6%; aspect-ratio: 1; border: 1px solid #ffe28d; border-radius: 50%; color: #fff5cb; background: #321027; cursor: pointer; font-size: clamp(18px, 2vw, 34px); line-height: 1; }
.closeButton:hover { filter: brightness(1.4); box-shadow: 0 0 12px #ff69e6; }
.paytableContent { height: 83%; padding: 0.5% 1%; overflow: hidden auto; scrollbar-color: #d2a83d #052629; scrollbar-gutter: stable; }
.paytablePage { display: none; height: 100%; animation: pageIn 180ms ease; }
.paytablePage.isActive { display: block; }
.paytablePage h2 { margin: 0 0 0.8%; text-align: center; color: var(--gold); font: 800 clamp(18px, 2.45vw, 42px)/1 Georgia, serif; text-shadow: 0 2px 0 #66330c, 0 0 10px rgba(255, 221, 105, 0.3); }
.paytablePage .lead { max-width: 92%; margin: 0 auto 1.4%; color: #c4eee8; text-align: center; font-size: clamp(9px, 0.86vw, 16px); line-height: 1.25; }
.symbolPayGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 1.2% 1.5%; height: 82%; }
.symbolPay { display: grid; grid-template-columns: 27% minmax(0, 1fr); align-items: center; min-height: 0; padding: 1.3%; border: 1px solid rgba(235, 198, 92, 0.62); border-radius: 10px; background: linear-gradient(145deg, rgba(3, 76, 75, 0.82), rgba(11, 24, 35, 0.88)); box-shadow: inset 0 0 12px rgba(83, 255, 235, 0.09), 0 2px 5px rgba(0, 0, 0, 0.45); overflow: hidden; }
.symbolIcon { width: 100%; aspect-ratio: 1; background-image: url("../assets/spa/symbols-atlas.png"); background-size: 400% 300%; background-repeat: no-repeat; filter: drop-shadow(0 3px 4px #000); }
.symbolPay h3 { margin: 0 0 3%; color: #fff0a8; font-size: clamp(9px, 0.92vw, 17px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.symbolPayouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2%; }
.symbolPayouts span { display: grid; place-items: center; padding: 4% 1%; border: 1px solid rgba(255, 222, 118, 0.36); border-radius: 5px; color: #b6eee8; background: rgba(0, 19, 23, 0.55); line-height: 1; }
.symbolPayouts b { color: #7ff7ea; font-size: clamp(6px, 0.56vw, 10px); }
.symbolPayouts em { margin-top: 0.2em; color: #fff4b2; font: 800 normal clamp(7px, 0.72vw, 13px)/1 Georgia, serif; }
.ruleCards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 2%; height: 80%; }
.ruleCard { display: grid; grid-template-columns: 18% minmax(0, 1fr); align-items: center; gap: 4%; padding: 3%; border: 1px solid #cda54d; border-radius: 12px; background: linear-gradient(145deg, rgba(4, 82, 79, 0.84), rgba(24, 10, 36, 0.86)); box-shadow: inset 0 0 16px rgba(93, 255, 239, 0.08), 0 3px 7px rgba(0, 0, 0, 0.42); overflow: hidden; }
.ruleCard > i { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #e5bc54; border-radius: 50%; color: #fff0a0; background: radial-gradient(circle, #167f79, #073235 70%); font: 800 clamp(10px, 1.25vw, 22px)/1 Georgia, serif; box-shadow: 0 0 8px rgba(74, 255, 236, 0.26); }
.ruleCard h3 { margin: 0 0 3%; color: #ffe98c; font: 700 clamp(10px, 1vw, 18px)/1.1 Georgia, serif; }
.ruleCard p { margin: 0; color: #d2eee9; font-size: clamp(7px, 0.72vw, 13px); line-height: 1.28; }
.pediRuleGrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.2%; height: 70%; }
.pediRuleGrid article { min-width: 0; padding: 1.6% 2.8% 3%; overflow: hidden; border: 1px solid rgba(241, 198, 83, 0.72); border-radius: 12px; background: linear-gradient(160deg, rgba(75, 11, 77, 0.88), rgba(3, 55, 57, 0.94)); box-shadow: inset 0 0 18px rgba(255, 107, 234, 0.1), 0 4px 8px rgba(0, 0, 0, 0.46); text-align: center; }
.pediRuleGrid img { display: block; width: 76%; max-height: 53%; margin: -3% auto -1%; object-fit: contain; filter: drop-shadow(0 4px 5px #000); }
.pediRuleGrid h3 { margin: 0 0 4%; color: #ffe792; font: 800 clamp(9px, 0.94vw, 17px)/1.05 Georgia, serif; }
.pediRuleGrid p { margin: 0 auto; color: #d2eee9; font-size: clamp(6px, 0.63vw, 11px); line-height: 1.28; }
.pediMathNote { margin: 1.3% auto 0; max-width: 92%; color: #a7eee5; text-align: center; font-size: clamp(7px, 0.68vw, 12px); line-height: 1.25; }
.lineGallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-template-rows: repeat(5, minmax(0, 1fr)); gap: 1.2%; height: 82%; }
.lineMini { position: relative; aspect-ratio: 5 / 3; border: 1px solid #b68d36; border-radius: 6px; background: #02191b; overflow: hidden; }
.lineMini canvas { width: 100%; height: 100%; }
.lineMini span { position: absolute; left: 3%; top: 2%; color: #fff2a1; font-size: clamp(6px, 0.65vw, 12px); font-weight: 900; }
.paytableTabs { display: flex; justify-content: center; gap: 1.2%; height: 9%; padding-top: 0.8%; }
.paytableTabs button { min-width: 12%; padding: 0.4% 1.2%; border-radius: 99px; font-size: clamp(8px, 0.82vw, 15px); }
.paytableTabs button[aria-selected="true"] { color: #062225; background: linear-gradient(#fff3a3, #d99a30); box-shadow: 0 0 12px #ffe47c; }

.testControls { position: absolute; z-index: 80; right: 0.6%; top: 0.8%; }
#testMenuButton { width: clamp(22px, 2.1vw, 38px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,0.25); border-radius: 50%; color: rgba(255,255,255,0.55); background: rgba(0,0,0,0.32); cursor: pointer; }
#testMenuPanel { position: absolute; right: 0; top: 115%; width: clamp(145px, 13vw, 230px); max-height: 82cqh; padding: 8%; overflow: auto; border: 1px solid #bc9140; border-radius: 10px; background: rgba(1, 25, 28, 0.97); box-shadow: 0 10px 25px #000; }
#testMenuPanel strong { display: block; margin-bottom: 5%; color: #ffe38a; font-size: clamp(9px, 0.85vw, 14px); }
#testMenuPanel button { width: 100%; margin: 2% 0; padding: 4%; border: 1px solid #507976; border-radius: 5px; color: white; background: #063f40; cursor: pointer; font-size: clamp(8px, 0.72vw, 12px); }

.orientationHint { position: absolute; z-index: 200; inset: 0; display: grid; place-items: center; padding: 10%; color: #fff2b3; background: #031517; text-align: center; font: 700 6vw/1.2 Georgia, serif; }

@keyframes lotusPulse { 50% { transform: scale(1.12) rotate(8deg); filter: drop-shadow(0 0 28px #b1fff8); } }
@keyframes pediVeilIn { from { opacity: 0; -webkit-backdrop-filter: blur(0) brightness(1); backdrop-filter: blur(0) brightness(1); } }
@keyframes pediBloomTurn { to { transform: rotate(360deg) scale(1.05); } }
@keyframes pediTitleIn { from { opacity: 0; transform: translate(-50%, -28%) scale(0.72); filter: brightness(2.2) blur(5px); } }
@keyframes pediRise { from { opacity: 0; transform: translateY(125%) scale(0.68) rotate(-4deg); } 72% { opacity: 1; transform: translateY(-4%) scale(1.04) rotate(1deg); } to { opacity: 1; transform: none; } }
@keyframes pediHaloTurn { to { transform: rotate(360deg); } }
@keyframes doorPop { from { opacity: 0; transform: translateY(50%) scale(0.62); } 72% { opacity: 1; transform: translateY(-5%) scale(1.045); } to { opacity: 1; transform: none; } }
@keyframes doorsLeave { to { opacity: 0; filter: brightness(1.8) blur(5px); } }
@keyframes pediMultiplierEnter { from { opacity: 0; transform: translate(-50%, -50%) scale(0.42); filter: brightness(2.2) blur(6px); } 72% { opacity: 1; transform: translate(-50%, -50%) scale(1.09); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes pediMultiplierFlash { 0%, 100% { transform: translate(-50%, -50%) scale(1); filter: brightness(1) drop-shadow(0 0 10px #ffce45); } 48% { transform: translate(-50%, -50%) scale(1.16); filter: brightness(1.8) drop-shadow(0 0 32px #fff8c6) drop-shadow(0 0 56px #ff69eb); } }
@keyframes pediMultiplierLeave { from { opacity: 1; transform: translate(-50%, -50%) scale(1); } to { opacity: 0; transform: translate(-50%, -50%) scale(1.32); filter: brightness(2.25) blur(7px); } }
@keyframes featureHudIn { from { opacity: 0; transform: translateX(-28%) scale(0.88); } }
@keyframes lineWinPulse { to { transform: scale(1.17); filter: brightness(1.4); } }
@keyframes panelIn { from { opacity: 0; transform: translateY(4%) scale(0.94); } }
@keyframes transitionBloom { from { opacity: 0; filter: brightness(2.4) blur(8px); transform: scale(1.12); } }
@keyframes overlayFadeOut {
  from { opacity: 1; filter: brightness(1) blur(0); transform: scale(1); }
  to { opacity: 0; filter: brightness(0.72) blur(5px); transform: scale(1.025); }
}
@keyframes portalSpin { to { transform: rotate(360deg); } }
@keyframes portalPulse { to { transform: scale(1.04); opacity: 0.62; } }
@keyframes copyRise { from { opacity: 0; transform: translateY(18%) scale(0.82); } }
@keyframes bigWinTitle { to { transform: scale(1.04); filter: brightness(1.24); } }
@keyframes pageIn { from { opacity: 0; transform: translateX(1.5%); } }

@media (orientation: portrait) and (max-width: 760px) {
  #orientationHint { display: grid !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: 1ms !important; }
}
