@font-face{font-family:Cinzel;src:url('./fonts/cinzel.ttf') format('truetype');font-weight:400 900;font-display:swap}
:root{color-scheme:dark;--ink:#101919;--gold:#e5b964;--pale:#ffe6a8;--line:rgba(229,185,100,.46);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#fff4d8;background:#091010}*{box-sizing:border-box}
body{margin:0;min-height:100svh;display:flex;flex-direction:column;isolation:isolate}body::before{content:'';position:fixed;inset:0;z-index:-2;background:linear-gradient(180deg,#07100ed9,transparent 24%,transparent 53%,#070e0ef5),linear-gradient(90deg,#0a0d13b8,#110b0042 54%,#060e1099),url('./art/temple.webp') center 47%/cover}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible{outline:3px solid #fff1b0;outline-offset:3px}button:disabled{cursor:default}header{display:flex;align-items:center;justify-content:space-between;width:min(1260px,100%);margin:0 auto;padding:20px clamp(18px,5vw,70px)}.demo,.label,footer{font-size:11px;font-weight:650;letter-spacing:.14em;text-transform:uppercase}.demo{display:flex;gap:10px;align-items:center;color:#e9d3aa}.demo i{width:8px;height:8px;transform:rotate(45deg);background:var(--gold);box-shadow:0 0 12px #ffd48866}nav{display:flex;gap:8px}.tool{background:#111c1abf;border:1px solid var(--line);border-radius:50%;width:42px;height:42px;display:grid;place-items:center;color:var(--pale)}svg{display:block}.tool svg,#spin svg{width:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}[hidden]{display:none!important}
main{width:min(1060px,100%);margin:auto;display:grid;grid-template-columns:1fr minmax(340px,450px);gap:clamp(30px,7vw,100px);align-items:center;padding:20px 32px}.intro{text-shadow:0 3px 16px #000}.sunseal{width:116px;display:flex;align-items:center;gap:10px;color:var(--pale);margin-bottom:12px}.sunseal:after,.sunseal:before{content:'';height:1px;background:var(--line);flex:1}.sunseal span{font-size:24px}.intro h1{font-family:Cinzel,Georgia,serif;font-size:clamp(65px,7.7vw,110px);font-weight:600;color:#ffe19a;line-height:.99;margin:0;letter-spacing:-.055em;text-shadow:0 2px #593411,0 5px 24px #100902}.intro h1 em{font:italic .43em Georgia,serif;letter-spacing:-.02em;display:block;margin:6px 0 2px;color:#fff2cf}.lead{font-family:Georgia,serif;font-size:19px;color:#f3e6ce;line-height:1.35;margin:22px 0}.stats{display:flex;gap:30px;margin-top:27px}.stats>div+div{padding-left:28px;border-left:1px solid var(--line)}.label{color:#e0cba1;white-space:nowrap}.value{font:36px/1.2 Cinzel,Georgia,serif;color:#fff1c7;margin-top:4px;font-variant-numeric:tabular-nums}.outof{font-size:.55em;opacity:.7}.play{width:100%;min-width:0;margin:0 auto}
.cabinet{position:relative;padding:0 10px 7px;border:2px solid #c9a062;border-radius:8px;background:linear-gradient(110deg,#3c2511 0%,#8b6836 2%,#2e2824 4%,#425656 48%,#232522 70%,#a37837 98%,#3c2511);box-shadow:inset 0 0 0 2px #3d2818,0 0 0 2px #362817,0 12px 28px #000a}.frieze{height:27px;display:flex;justify-content:center;align-items:center;gap:10px;color:#edc975}.frieze span{font-size:22px;line-height:1}.frieze b{width:32%;height:6px;border-block:1px solid #caa463;background:repeating-linear-gradient(125deg,transparent 0 6px,#bd955f 7px 8px,transparent 9px 12px);opacity:.9}
.window{position:relative;border:2px solid #e8c17d;overflow:hidden;border-radius:2px;background:#12191c;box-shadow:0 0 0 2px #302011}.reels{display:grid;grid-template-columns:repeat(3,1fr);aspect-ratio:1.14;overflow:hidden}.col{min-height:0;position:relative;overflow:hidden;background:linear-gradient(90deg,#101b21,#263236 46%,#111c21)}.col+.col{border-left:2px solid #987642}.track{position:absolute;inset:0}.cell{height:calc(100% / 3);display:grid;place-items:center;position:relative;border-bottom:1px solid #ac94674a;background:radial-gradient(ellipse at 50% 55%,#e0b46b16,transparent 65%)}.cell img{display:block;width:90%;height:89%;object-fit:contain;position:absolute;filter:drop-shadow(0 3px 2px #0008)}.cell.lit{background:radial-gradient(ellipse,#c0903852,#8463222b);box-shadow:inset 0 0 0 1.5px #eaca88}.inlay{height:3px;margin:5px 1px 0;border-top:1px solid #c49d5e}.window>svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}.window polyline{stroke:#ffdb75;stroke-width:3;fill:none;filter:drop-shadow(0 0 3px #7a3900);stroke-linejoin:round;stroke-linecap:round;opacity:.86}
.message{text-align:center;font:italic 18px/1.2 Georgia,serif;min-height:37px;display:grid;align-content:center;margin:4px 0;color:#ffebba;text-shadow:0 1px 6px black}.message.win{color:#ffdb74}#spin{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:54px;background:linear-gradient(180deg,#ffe3a2,#dfb768 55%,#d4a254);color:#30200e;border:1px solid #f7d493;border-radius:6px;box-shadow:inset 0 0 0 3px #be914e,inset 0 0 0 4px #ffe4a580,0 4px 8px #0008;font:700 20px Cinzel,Georgia,serif;letter-spacing:.035em}#spin:enabled:not([aria-disabled="true"]):hover{filter:brightness(1.08)}#spin:active{transform:translateY(1px)}#spin:disabled,#spin[aria-disabled="true"]{filter:saturate(.5)}.paystrip{display:flex;align-items:center;gap:12px;justify-content:center;margin-top:10px}.paystrip .label{font-size:9px}.paystrip>div,#line-guide{display:flex;gap:3px}.payline{padding:6px 3px;width:35px;height:38px;border:0;background:transparent;color:#e3cba0}.payline svg,#line-guide svg{width:100%;height:100%;filter:drop-shadow(0 1px 2px #000)}.payline.active{color:#fff19b}.payline.active svg{background:#ca993a32}.miniPath{stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:2.5}.dots{fill:#b3a78c;opacity:.58}
footer{padding:14px 14px max(18px,env(safe-area-inset-bottom));display:flex;gap:12px;align-items:center;justify-content:center;color:#d6cbb5;font-size:9px;letter-spacing:.09em}footer span{color:var(--gold)}dialog{background:linear-gradient(155deg,#223026,#121b1d 68%);border:1px solid #ac8954;border-radius:10px;padding:0;color:#fcecc8;width:min(430px,calc(100vw - 30px));max-height:85svh;box-shadow:0 20px 70px #000a}dialog::backdrop{background:#080d0dbd;backdrop-filter:blur(4px)}.sheet{padding:24px;position:relative}.sheet h2,.sheet h3{font-family:Cinzel,Georgia,serif;color:#ffdb90;margin:5px 0 10px}.sheet h3{margin-top:20px;font-size:16px}.sheet p{line-height:1.5;font-size:14px;color:#e4dcce}.sheet .note{font-size:12px}.sheet .tool{float:right;width:34px;height:34px;font-size:24px}#legend{display:grid;grid-template-columns:1fr 1fr;gap:5px 9px}.legend-row{display:flex;gap:6px;align-items:center;border-bottom:1px solid #e6cf9a20;font-size:12px;padding:6px 0}.legend-row img{width:36px;height:36px;object-fit:contain}.legend-row small{color:#e8c073;display:block;margin-top:2px}#line-guide>div{display:grid;width:16%;text-align:center;font-size:10px;color:#e2c58d}#line-guide svg{height:30px}
@media(max-width:740px){header{padding:10px 18px}.tool{width:38px;height:38px}.demo{font-size:10px}body::before{background:linear-gradient(180deg,#060d1080,#19171025 18%,#10151891 49%,#0a1112f5 94%),url('./art/temple.webp') center top/auto 100svh no-repeat,#101515}main{display:flex;flex-direction:column;gap:12px;padding:4px 18px;width:min(434px,100%)}.intro{width:100%;text-align:center}.sunseal{margin:0 auto 3px;width:78px}.sunseal span{font-size:14px}.intro h1{font-size:clamp(35px,10.6vw,48px);line-height:1.12;white-space:nowrap;letter-spacing:-.05em}.intro h1 em{display:inline;font-size:.55em;margin:0}.lead{font-size:15px;margin:5px 0 0}.stats{justify-content:space-between;align-items:center;border-block:1px solid var(--line);margin:13px 0 0;padding:7px 8px;background:linear-gradient(90deg,transparent,#151b17aa,transparent)}.stats>div{display:flex;align-items:center;gap:8px}.stats>div+div{padding:0;border:0}.stats .label{font-size:9px;letter-spacing:.1em}.value{font-size:22px;margin:0}.cabinet{padding-inline:7px}.frieze{height:22px}.frieze span{font-size:19px}.paystrip{gap:8px}.payline{width:32px}.message{font-size:16px;min-height:32px}footer{font-size:8px;padding-top:8px}}@media(max-height:720px) and (max-width:740px){main{gap:7px}.sunseal{display:none}.reels{aspect-ratio:1.25}.stats{margin-top:9px}.paystrip{margin-top:4px}}
.loader{position:fixed;inset:0;z-index:5;display:grid;place-items:center;padding:20px;background:linear-gradient(#0e1819d9,#111814ed),url('./art/temple.webp') center/cover}
.loader-card{width:min(320px,100%);text-align:center;color:var(--pale)}
.loader-sun{display:inline-block;font-size:42px;line-height:1;color:var(--gold)}
.loader h2{font:600 32px/1.2 Cinzel,Georgia,serif;margin:12px 0 22px}
.loader h2 em{font:italic .66em Georgia,serif}.loader p{font-size:14px;color:#f1dfba}
.loader progress{display:block;width:72%;height:5px;margin:14px auto;background:#333b36;border:0;border-radius:4px;accent-color:var(--gold);overflow:hidden}
.loader progress::-webkit-progress-bar{background:#333b36}.loader progress::-webkit-progress-value{background:var(--gold)}.loader progress::-moz-progress-bar{background:var(--gold)}
#retry-load{display:block;margin:20px auto 0;background:#342a1a;border:1px solid var(--gold);padding:9px 20px;border-radius:5px}

/* Lock the game to Safari's visible viewport. Manipulation keeps pinch zoom
   available while disabling double-tap zoom, including over clipped reels. */
html,body{overflow:hidden;overscroll-behavior:none}
html,body,body *{touch-action:manipulation}
body{position:fixed;inset:0;height:100dvh;min-height:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left)}
header,footer{flex:none}
dialog{max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:hidden}
@media (max-width:740px) and (orientation:portrait){
  .reels{max-height:calc(100dvh - 426px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}
@media (max-height:625px) and (orientation:portrait){
  .sheet{padding:14px}.legend-row{padding:2px 0}.sheet h3,.sheet p{margin:8px 0}
}
@media (orientation:landscape) and (max-height:660px){
  header{padding:4px 16px}.tool{width:34px;height:34px}
  main{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:"intro reels" "message reels" "spin reels" "lines reels";gap:3px 16px;width:min(880px,100%);padding:2px 16px}
  .play{display:contents}.intro{grid-area:intro;text-align:center}.sunseal{display:none}
  .intro h1{font-size:clamp(24px,4.6vw,47px);line-height:1.1;white-space:nowrap}
  .intro h1 em{display:inline;font-size:.55em;margin:0}.lead{font-size:14px;margin:3px 0}
  .stats{justify-content:center;gap:16px;margin:8px 0;padding:0;border:0;background:none}
  .stats>div{display:flex;align-items:center;gap:6px}.stats>div+div{border:0;padding:0}.stats .label{font-size:9px}.value{font-size:22px;margin:0}
  .cabinet{grid-area:reels;justify-self:center;width:min(100%,calc((100dvh - 110px - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 1.14));padding-inline:6px}
  .frieze{height:17px}.frieze span{font-size:16px}.reels{aspect-ratio:1.14}
  .message{grid-area:message;min-height:24px;margin:0;font-size:14px}
  #spin{grid-area:spin;min-height:40px;font-size:16px}
  .paystrip{grid-area:lines;margin:0;gap:5px}.payline{height:28px;width:clamp(20px,3.5vw,32px);padding:3px 1px}
  footer{padding:4px 8px max(4px,env(safe-area-inset-bottom));font-size:8px}
  dialog{width:min(690px,calc(100% - 24px))}.sheet{padding:12px 16px}.sheet h2,.sheet h3,.sheet p{margin:4px 0}.sheet p{font-size:12px}
  #legend{grid-template-columns:repeat(4,1fr)}.legend-row{padding:2px 0}.legend-row img{width:29px;height:29px}
  #line-guide{max-width:360px}#line-guide svg{height:24px}
}

@media (orientation:portrait) and (max-width:740px) and (max-height:625px){
  header{padding:4px 16px}.tool{width:34px;height:34px}
  .intro h1{font-size:32px}.lead{font-size:13px;margin-top:2px}
  .stats{padding:3px 5px;margin-top:4px}.stats .value{font-size:19px}
  .frieze{height:16px}.message{min-height:24px;margin:2px 0}
  #spin{min-height:42px}.payline{height:27px}footer{padding-block:4px max(4px,env(safe-area-inset-bottom))}
  .reels{max-height:calc(100dvh - 316px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  .sheet p{font-size:12px;line-height:1.3}.sheet h2{font-size:21px}.sheet h3{margin:5px 0}
  .legend-row img{width:27px;height:27px}#line-guide svg{height:22px}
}
@media (orientation:landscape) and (max-height:285px){
  .lead{display:none}.sheet{padding:6px 12px}.sheet h2{font-size:18px}
  .sheet p{font-size:11px;line-height:1.25}.sheet h3{font-size:13px}
  .legend-row img{height:22px;width:22px}.legend-row{font-size:11px;padding:0}
  #line-guide svg{height:18px}.sheet .note{font-size:10px}
}

@keyframes win-pulse {
  0%, 100% { transform:scale(1); filter:drop-shadow(0 3px 2px #0008) brightness(1) drop-shadow(0 0 0 transparent) }
  46% { transform:scale(1.3); filter:drop-shadow(0 3px 2px #0008) brightness(1.16) drop-shadow(0 0 5px rgba(255,202,105,.72)) }
}
.cell .win-art { position:absolute; width:90%; height:89%; object-fit:contain; pointer-events:none; filter:drop-shadow(0 3px 2px #0008) }
.cell.has-win-art img { opacity:0 }
@media (prefers-reduced-motion:no-preference) {
  .cell.win-pulse img { transform-origin:center; animation:win-pulse 1.34s ease-in-out infinite }
  /* Let the outer rows expand toward the middle of the reel window. */
  .cell.win-pulse:first-child img { transform-origin:center 24% }
  .cell.win-pulse:last-child img { transform-origin:center 76% }
}

/* Keep the spin button's touch target stable throughout the reel animation. */
#spin{touch-action:none;-webkit-user-select:none;user-select:none}
#spin>*{pointer-events:none}

#round-summary{width:min(360px,calc(100vw - 28px));text-align:center}
.bonus-card{position:relative;padding:22px;background:radial-gradient(ellipse at top,#72532d55,transparent 65%)}
#close-summary{position:absolute;top:9px;right:9px;width:36px;height:36px;font-size:22px}
#bonus-art img{width:74px;height:66px;object-fit:contain}
.bonus-card h2{margin:3px 0;color:var(--pale);font:650 32px/1.2 Cinzel,Georgia,serif}
#round-score{margin:3px 0 16px;font-size:13px;color:#e5d5b5}
#bonus-description{font:18px Georgia,serif;margin:0 0 10px}
.bonus-code{display:flex;align-items:center;justify-content:center;gap:12px;padding:10px;border:1px dashed var(--line);border-radius:5px}
.bonus-code>div{min-width:0}
#copy-promo{width:44px;height:44px;flex:none}
#promo-code{display:block;margin-top:2px;font:bold 21px/1.2 ui-monospace,monospace;color:var(--pale);overflow-wrap:anywhere;user-select:all}
#bonus-link{display:block;margin-top:14px;padding:12px 8px;border-radius:5px;background:#ebc783;color:#312110;font-weight:700;text-decoration:none}
#bonus-link:focus-visible{outline:3px solid var(--pale);outline-offset:3px}
@media(max-height:400px){
  .bonus-card{padding:10px 18px}#bonus-art{display:none}.bonus-card h2{font-size:24px}
  #round-score{margin:2px 0 7px}.bonus-code{padding:5px}#bonus-link{margin-top:8px;padding:8px}
}
