:root { color-scheme: dark; font-family: Arial, Helvetica, sans-serif; background: #111763; }
* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; overflow-x: hidden; }
body { min-height: 100vh; min-height: 100svh; color: #fff; background: #111763 url("assets/aztecGold/img/page-bg.webp") center / cover fixed no-repeat; }
button, a { -webkit-tap-highlight-color: transparent; }
.page { position: relative; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; align-items: center; padding: max(8px, env(safe-area-inset-top)) 2px max(18px, env(safe-area-inset-bottom)); overflow: hidden; }
.page::before { content: ""; position: fixed; z-index: -1; inset: 0; background: linear-gradient(rgba(14,14,72,.04), rgba(13,9,74,.25)); pointer-events: none; }
.logo { position: relative; z-index: 6; display: block; width: min(430px, 62vw); height: auto; margin: -5px auto -9px; filter: drop-shadow(0 7px 8px rgba(0,0,0,.55)); }
.game { position: relative; z-index: 2; width: min(1060px, 100%); display: flex; flex-direction: column; align-items: center; }
.game h1 { position: relative; z-index: 7; margin: 0; color: #fff2a4; font-size: clamp(25px, 4vw, 43px); line-height: 1; text-align: center; text-shadow: 0 4px 2px #681711, 0 0 10px #ffb72a; }
.stage { position: relative; width: min(790px, 100vw); aspect-ratio: 1; margin-top: 1px; }
.wheel-wrap { position: absolute; z-index: 3; width: 88%; aspect-ratio: 1; top: 2%; left: 6%; }
.rotor { position: absolute; inset: 8.3%; z-index: 1; overflow: hidden; border-radius: 50%; transform: rotate(0deg); will-change: transform; }
.rotor img, .wheel-frame { display: block; width: 100%; height: 100%; }
.rotor img { position: absolute; inset: 0; object-fit: contain; }
.wheel-base { z-index: 0; }
.wheel-labels { z-index: 1; }
.wheel-frame { position: absolute; inset: 0; z-index: 2; object-fit: contain; pointer-events: none; }
.pointer { position: absolute; z-index: 5; width: 14%; height: auto; top: 0; left: 43%; filter: drop-shadow(0 4px 5px rgba(0,0,0,.55)); }
.spin { position: absolute; z-index: 6; width: 23%; aspect-ratio: 1; top: 38.5%; left: 38.5%; border: 0; border-radius: 50%; color: #fff8c2; background: transparent url("assets/aztecGold/img/btn.webp") center / contain no-repeat; font: 900 clamp(17px, 3vw, 30px)/1 Arial, sans-serif; text-shadow: 0 3px 2px #4d1110, 0 0 5px #fff2ad; cursor: pointer; filter: drop-shadow(0 5px 6px rgba(0,0,0,.5)); animation: pulse 1.4s ease-in-out infinite; }
.spin:disabled { cursor: default; animation: none; opacity: .95; }
.spin:focus-visible, .claim:focus-visible, .close:focus-visible { outline: 4px solid #fff; outline-offset: 3px; }
.decor { position: absolute; z-index: 4; height: auto; pointer-events: none; filter: drop-shadow(0 8px 8px rgba(0,0,0,.55)); }
.totem { width: 26%; left: -5%; bottom: 2%; }
.explorer { width: 27%; right: -5%; bottom: 1%; }
.status { position: relative; z-index: 7; min-height: 28px; margin: -8% 0 0; text-align: center; color: #fff6ae; font-size: clamp(17px, 2.4vw, 24px); font-weight: 900; text-shadow: 0 3px 2px #681711; }
.modal[hidden] { display: none; }
.modal { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 14px; background: rgba(8,8,55,.84); backdrop-filter: blur(5px); }
.modal-card { position: relative; width: min(500px, 94vw); max-height: calc(100vh - 28px); max-height: calc(100svh - 28px); padding: 35px 24px 29px; overflow-y: auto; overscroll-behavior: contain; text-align: center; border: 4px solid #ffd83e; border-radius: 28px; color: #fff; background: #511510 url("assets/aztecGold/img/modal-bg.webp") center / cover no-repeat; box-shadow: 0 0 0 6px #9e3715, 0 18px 70px rgba(0,0,40,.7), inset 0 0 30px rgba(255,221,90,.22); }
.modal-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: rgba(47,10,3,.13); pointer-events: none; }
.modal-card > * { position: relative; }
.win-art { display: block; width: min(84vw, 420px); max-width: 100%; max-height: min(18vh, 120px); max-height: min(18svh, 120px); height: auto; object-fit: contain; margin: 0 auto 10px; }
.modal h2 { margin: 2px 0 8px; font-size: clamp(24px, 7vw, 38px); color: #fff0a0; text-shadow: 0 3px 2px #681711; }
.modal p { margin: 0; font-size: 20px; font-weight: 800; }
.result { display: block; margin: 5px 0 19px; color: #ffe763; font-size: clamp(31px, 9vw, 47px); text-shadow: 0 3px 2px #681711; }
.claim { display: inline-flex; justify-content: center; align-items: center; min-width: 230px; min-height: 60px; padding: 13px 30px; border: 3px solid #fff2a1; border-radius: 999px; color: #42120a; background: linear-gradient(#fff986, #ffc52f 58%, #e77a12); box-shadow: 0 5px 0 #78300d, 0 8px 22px rgba(0,0,0,.45); text-decoration: none; font-size: 25px; font-weight: 900; }
.close { position: absolute; z-index: 3; top: 7px; right: 11px; border: 0; color: #fff; background: transparent; font: 700 38px/1 Arial, sans-serif; cursor: pointer; }
@keyframes pulse { 50% { transform: scale(1.06); filter: drop-shadow(0 5px 13px rgba(255,198,40,.8)); } }
@media (max-width: 640px) {
  body { background-image: url("assets/aztecGold/img/page-bg-mobile.webp"); background-attachment: scroll; }
  .logo { width: min(390px, 76vw); }
  .stage { width: min(660px, 100vw); }
  .wheel-wrap { width: 94%; left: 3%; top: 2%; }
  .totem { width: 21%; left: -3%; bottom: 5%; }
  .explorer { width: 22%; right: -3%; bottom: 4%; }
  .status { margin-top: -9%; }
  .modal { padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
  .modal-card { width: calc(100vw - 20px); max-width: 430px; max-height: calc(100vh - 20px); max-height: calc(100svh - 20px); padding: 29px 17px 23px; }
  .win-art { width: min(84vw, 370px); max-height: min(16vh, 105px); max-height: min(16svh, 105px); }
}
@media (max-width: 360px), (max-height: 620px) {
  .modal-card { padding: 23px 13px 17px; }
  .win-art { width: min(78vw, 310px); max-height: 13vh; max-height: 13svh; }
  .modal h2 { margin-top: 0; font-size: clamp(22px, 7vw, 30px); }
  .result { margin-bottom: 13px; font-size: clamp(28px, 9vw, 37px); }
  .claim { min-height: 53px; padding-block: 9px; }
}
@media (max-height: 720px) and (orientation: landscape) { .logo { width: 330px; } .game h1 { font-size: 22px; } .stage { width: min(500px, 72vh); } .status { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
