/* Reference artwork is used locally so the temple scene stays consistent offline. */
.win-stat-icon { display: block; width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 1px 2px #0005); }
.bet-label-icon { width: 15px; height: 15px; fill: #eac854; stroke: #ffe18b; stroke-width: 1.3; }
.wheel-spin-sparks { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transform-origin: 50% 50%; transition: transform 4.3s cubic-bezier(.12,.82,.18,1), opacity .2s ease-out; }
.wheel-is-spinning .wheel-spin-sparks { opacity: 1; }
.wheel-spin-sparks i { position: absolute; left: var(--sx); top: var(--sy); width: 2px; height: var(--length); border-radius: 50%; background: #fff4ca; box-shadow: 0 0 3px #ffe4a0, 0 0 6px #ffa321; animation: wheel-spark-fly var(--life) var(--delay) ease-out infinite; animation-play-state: paused; }
.wheel-is-spinning .wheel-spin-sparks i { animation-play-state: running; }
@keyframes wheel-spark-fly {
    0% { opacity: 0; transform: translate(0,0) rotate(var(--angle)) scale(.5); }
    12% { opacity: 1; }
    65% { opacity: .9; }
    100% { opacity: 0; transform: translate(var(--dx),var(--dy)) rotate(var(--angle)) scale(.1); }
}
@media (prefers-reduced-motion: reduce) { .wheel-spin-sparks { display: none; } }
.sidebar-bonus .gift img { animation: bonus-gift-hop 3s ease-in-out infinite; transform-origin: center bottom; }
@keyframes bonus-gift-hop {
    0%, 58%, 100% { transform: translateY(0) rotate(0); }
    68% { transform: translateY(-9px) rotate(-4deg); }
    77% { transform: translateY(0) rotate(2deg); }
    86% { transform: translateY(-4px) rotate(-2deg); }
    94% { transform: translateY(0) rotate(0); }
}
@media (prefers-reduced-motion: reduce) { .sidebar-bonus .gift img { animation: none; } }
.wheel-title-logo { position: absolute; left: 50%; bottom: 106%; transform: translateX(-50%); width: clamp(74px, 24%, 106px); z-index: 6; pointer-events: none; }
.wheel-title-logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 3px 5px #0008); }
.jackpot-promo { position: absolute; z-index: 6; left: 7%; top: 30%; width: 180px; filter: drop-shadow(0 9px 12px #000b); animation: jackpot-float 3.8s ease-in-out infinite; }
.jackpot-promo img { display: block; width: 100%; height: auto; object-fit: contain; }
@keyframes jackpot-float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@media (max-width: 950px) { .jackpot-promo { left: 4%; top: 31%; width: 140px; } }
@media (max-width: 620px) { .jackpot-promo { left: 3%; top: 28%; width: 105px; } }
@media (prefers-reduced-motion: reduce) { .jackpot-promo { animation: none; } }
html { scroll-padding-top: 80px; }
.modal-backdrop { overflow-y: auto; overscroll-behavior: contain; }
.modal { max-height: calc(100dvh - 40px); overflow-y: auto; }
@media (min-width: 621px) and (max-width: 950px) {
    .game-hero .temple-scene { height: 470px; }
    .game-hero .temple-scene .final-wheel-area { left: 34%; width: min(330px, 48%); }
    .temple-scene .scene-recent-wins { width: 215px; right: 10px; }
}
@media (max-width: 620px) {
    .topbar { height: 62px; gap: 5px; padding: 0 8px; }
    .topbar .mobile-menu { width: 30px; padding: 0; flex-shrink: 0; font-size: 23px; }
    .topbar .brand-logo { width: 44px; height: 44px; }
    .topbar .top-actions { margin-left: auto; gap: 5px; }
    .topbar .top-balance { min-height: 34px; max-width: 132px; padding: 6px 7px; }
    .topbar .top-balance strong { min-width: 0; }
    .topbar #headerBalance { overflow: hidden; text-overflow: ellipsis; }
    .topbar .header-deposit { min-height: 34px; }
    .app-main { padding: 8px 8px calc(82px + env(safe-area-inset-bottom)); }
    .game-hero .temple-scene { height: clamp(320px, 98vw, 430px); border-radius: 14px 14px 0 0; }
    .game-hero .temple-scene .scene-logo { top: 13px; left: 14px; width: clamp(90px, 25vw, 120px); }
    .game-hero .temple-scene .final-wheel-area { top: 59%; left: 50%; width: min(76vw, 310px); }
    .game-hero > .game-controls { border-radius: 0 0 14px 14px; }
    .game-controls .bet-box input { font-size: 16px; }
    .game-note { margin: 10px 4px; font-size: 11px; line-height: 1.6; }
    .mobile-nav { height: calc(64px + env(safe-area-inset-bottom)); padding: 5px 5px calc(5px + env(safe-area-inset-bottom)); background: #03121ef5; backdrop-filter: blur(12px); }
    .mobile-nav a { min-width: 48px; min-height: 44px; justify-content: center; font-size: 10px; }
    .sidebar.menu-open { top: 62px; bottom: calc(64px + env(safe-area-inset-bottom)); width: min(270px, 84vw); }
    .sidebar.menu-open nav a { min-height: 48px; }
    .modal-backdrop { padding: 12px; }
    .modal { width: 100%; max-height: calc(100dvh - 24px); padding: 27px 19px 22px; border-radius: 17px; }
    .modal h2 { font-size: 24px; padding-right: 24px; }
    .modal input { font-size: 16px; min-height: 44px; border-radius: 8px; }
    .modal label { font-size: 12px; letter-spacing: 0; }
    .modal-close { width: 40px; height: 40px; top: 5px; right: 5px; }
    .modal .button, .modal .switch-auth { min-height: 44px; }
    .navigation-panel { max-width: 100%; }
    .navigation-panel table { min-width: 450px; }
    .toast { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); border-radius: 10px; }
    .win-celebration-card { padding: 18px 20px 24px; }
    .win-emblem { width: 68px; height: 68px; }
    .win-emblem svg { width: 58px; height: 58px; }
}
@media (max-width: 360px) {
    .topbar .header-deposit svg { display: none; }
    .topbar .brand-logo { width: 36px; height: 40px; }
    .topbar .top-balance { max-width: 108px; }
}
.navigation-panel { width: min(680px, 94vw); max-height: 85svh; overflow-y: auto; border-radius: 18px; }
.navigation-panel p { line-height: 1.8; }
.navigation-panel details { padding: 14px 0; border-bottom: 1px solid #234154; }
.navigation-panel summary { cursor: pointer; color: #e8cd90; }
@media (max-width: 950px) {
    .sidebar.menu-open { display: block; top: 66px; bottom: 70px; z-index: 40; box-shadow: 12px 0 40px #0009; }
}
@media (min-width: 951px) {
    .temple-scene .scene-recent-wins {
        top: 18px; bottom: 18px; display: flex; flex-direction: column;
        padding: 13px 9px 10px; overflow: hidden;
        border-color: #d6af526e;
        background: linear-gradient(155deg, #061c24f5, #020d17f2);
    }
    .scene-recent-wins .scene-recent-title { flex-shrink: 0; padding-bottom: 13px; }
    .scene-recent-wins #sceneRecentWins { flex: 1; min-height: 0; gap: 4px; }
    .scene-recent-wins #sceneRecentWins li { height: var(--win-row-height, 35px); min-height: 0; }
}
#authModal [hidden] { display: none !important; }
.game-hero > .game-controls { width: 100%; max-width: none; }
@media (min-width: 621px) {
    .game-hero > .game-controls {
        grid-template-columns: minmax(200px, 250px) 100px minmax(110px, 150px) minmax(140px, 190px);
        justify-content: center;
        gap: clamp(14px, 2.5vw, 40px);
    }
}
@media (min-width: 621px) and (max-width: 1100px) {
    .game-hero > .game-controls {
        grid-template-columns: minmax(180px, 220px) 80px minmax(90px, 120px) minmax(120px, 160px);
        gap: 12px;
        padding-inline: 12px;
    }
}
@media (min-width: 951px) {
    .app-main { padding-bottom: 16px; max-width: none; }
    .game-hero { min-height: calc(100svh - 90px); }
    .game-hero .temple-scene { height: max(430px, calc(100svh - 206px)); }
    .game-hero .temple-scene .final-wheel-area { width: min(440px, 44%); }
}
.topbar { background: linear-gradient(110deg, #03121e, #010a14 70%); border-bottom-color: #163348; box-shadow: 0 4px 16px #0003; }
.top-actions { gap: 20px; min-width: 0; }
.top-balance { min-height: 46px; padding: 9px 19px; gap: 10px; border: 1px solid #284b74; border-radius: 24px; background: linear-gradient(145deg, #071726, #020e1a); box-shadow: inset 0 1px 0 #ffffff06; }
.top-balance svg, .header-deposit svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.top-balance svg { color: #ffcf29; }
.top-balance label { color: #e3e9f2; font-size: 14px; }
.top-balance strong { display: flex; white-space: nowrap; font-variant-numeric: tabular-nums; }
.top-balance strong span { font: 700 21px/1.2 Arial, sans-serif; color: #ffda39; }
.topbar .header-deposit { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 21px; border: 1px solid #ffe785; border-radius: 14px; background: linear-gradient(#ffe96a, #ffd128 47%, #efaa00); box-shadow: inset 0 1px 1px #fff6c2, 0 4px 15px #e8b12215; color: #251e08; font-size: 15px; font-weight: 700; }
.header-profile { display: flex; align-items: center; gap: 10px; padding-left: 20px; border-left: 1px solid #183044; }
.header-profile .profile-button { display: grid; place-items: center; width: 44px; height: 44px; padding: 7px; background: #071525; border-color: #567cac; }
.profile-button svg { width: 28px; height: 28px; fill: #a9c7ec; }
.profile-name { border: 0; padding: 5px 0; background: transparent; font-size: 15px; }
.bell svg { display: block; width: 26px; height: 28px; fill: none; stroke: #b3cdeb; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.top-actions button:focus-visible { outline: 2px solid #ffe087; outline-offset: 3px; }
@media (max-width: 950px) {
    .top-actions { gap: 9px; }
    .top-balance { min-height: 38px; padding: 7px 10px; gap: 6px; }
    .top-balance strong span { font-size: 15px; }
    .topbar .header-deposit { min-height: 38px; padding: 8px 12px; font-size: 12px; gap: 6px; border-radius: 10px; }
    .header-profile { padding-left: 8px; }
    .header-profile .profile-button { width: 36px; height: 36px; }
}
@media (max-width: 620px) {
    .header-profile { display: none; }
    .topbar { padding-inline: 8px; }
    .top-actions { gap: 5px; }
    .top-balance { padding: 6px 8px; }
    .top-balance svg, .header-deposit svg { width: 18px; height: 18px; }
    .top-balance strong span { font-size: 12px; }
    .topbar .header-deposit { padding: 8px; font-size: 10px; }
    .top-actions .music-toggle { width: 28px; height: 28px; font-size: 15px; }
}
.sidebar-bonus .gift img { display: block; width: 86px; height: 86px; object-fit: contain; margin: 0 auto; }
.sidebar { padding: 20px 12px 18px; overflow-y: auto; scrollbar-width: thin; background: linear-gradient(135deg, #03121f, #010b15); }
.sidebar nav { gap: 3px; }
.sidebar nav a { min-height: 53px; padding: 12px 10px; gap: 13px; border-radius: 0 12px 12px 0; }
.sidebar nav a svg { width: 26px; height: 26px; flex: 0 0 26px; color: #a5c3e5; }
.sidebar nav a span { width: auto; text-align: left; font-size: 13px; color: inherit; white-space: nowrap; }
.sidebar nav a.active { color: #ffda32; background: linear-gradient(100deg, #d7ad3029, #242321a6); border-left-color: #ffe035; }
.sidebar nav a.active svg { color: #ffca22; fill: #ffc21d; stroke: #ffd85b; }
.sidebar nav a:focus-visible { outline: 2px solid #eaca70; outline-offset: -2px; }
.sidebar-bonus {
    position: relative; overflow: hidden; margin: 26px 3px 0; padding: 15px 9px 16px;
    border: 1px solid #45416a; border-radius: 14px;
    background: radial-gradient(ellipse at 50% 22%, #73331d55, transparent 47%), radial-gradient(ellipse at 85% 80%, #56210f44, transparent 55%), linear-gradient(145deg, #0b0e28, #020719 70%);
    box-shadow: inset 0 0 22px #07041e, 0 8px 20px #0004;
}
.sidebar-bonus::before { content: '✦ · ✧'; position: absolute; top: 29px; left: 12px; right: 12px; color: #ffd141; font-size: 24px; letter-spacing: 20px; text-shadow: 0 0 12px #ffad24; pointer-events: none; }
.sidebar-bonus .gift { position: relative; font-size: 55px; line-height: 1.25; filter: drop-shadow(0 0 13px #f6a32266); }
.sidebar-bonus strong { margin: 14px 0 7px; color: #dbc494; font: 600 10px/1.5 Arial, sans-serif; letter-spacing: 1.1px; }
.sidebar-bonus > b {
    color: #f4cf78; font: 700 46px/1.1 Arial, Helvetica, sans-serif; letter-spacing: -1px;
    background: linear-gradient(180deg, #fff4cb 10%, #edc16c 43%, #b77928 54%, #ffe3a0 82%);
    background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: none; filter: drop-shadow(0 2px 2px #0008);
}
.sidebar-bonus small { margin: 10px 0 19px; font: 400 11px/1.7 Arial, sans-serif; color: #b9b2ab; }
.sidebar-bonus small em { font-style: normal; font-weight: 600; font-size: 12px; letter-spacing: .2px; color: #efd59c; }
.sidebar-bonus .button {
    min-height: 39px; border: 1px solid #e7c479; border-radius: 8px;
    background: linear-gradient(180deg, #ffebac, #e6ba60 52%, #ca9139);
    color: #352511; font-size: 10px; font-weight: 700; letter-spacing: 1.2px;
    box-shadow: inset 0 1px 0 #fff5d4, 0 4px 12px #0005;
}
.wheel-blast { position: absolute; inset: -8%; z-index: 10; pointer-events: none; }
.wheel-blast[hidden] { display: none; }
.blast-core, .blast-ring, .blast-spark { position: absolute; display: block; left: 50%; top: 50%; }
.blast-core {
    width: 70%; height: 70%; border-radius: 50%;
    background: radial-gradient(circle, #fff2b6 0%, #ffc04c 18%, #f7751bd9 37%, #8f301377 57%, transparent 72%);
    animation: blast-bloom 1.2s ease-out both;
}
.blast-ring {
    width: 65%; height: 65%; border: 5px solid #ffc26c; border-radius: 50%;
    box-shadow: 0 0 18px #ff892a, inset 0 0 15px #ff892a;
    animation: blast-wave .85s ease-out both;
}
.blast-spark {
    width: 6px; height: 9px; border-radius: 50%; background: #ffd18b;
    box-shadow: 0 0 9px #ff742b;
    animation: blast-sparks 1.1s ease-out both;
}
@keyframes blast-bloom {
    0% { transform: translate(-50%, -50%) scale(.15); opacity: .5; }
    20% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; }
}
@keyframes blast-wave {
    from { transform: translate(-50%, -50%) scale(.2); opacity: .9; }
    to { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}
@keyframes blast-sparks {
    from { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    to { transform: translate(var(--dx), var(--dy)) scale(.15); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .blast-core { animation: none; transform: translate(-50%, -50%); opacity: .45; }
    .blast-ring, .blast-spark { display: none; }
}
.music-toggle {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 1px solid #c9a65c60;
    border-radius: 50%;
    background: linear-gradient(145deg, #19383b, #081a23);
    color: #f3d48d;
    font-size: 18px;
}
.music-toggle[aria-pressed="false"] { color: #9eaaa9; border-color: #60777866; }
.music-toggle:focus-visible { outline: 2px solid #f3d48d; outline-offset: 3px; }
.win-celebration {
    position: absolute;
    inset: 0;
    z-index: 12;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
    background: radial-gradient(ellipse, #f5cd5e18, transparent 65%);
}
.win-celebration[hidden] { display: none; }
.win-celebration { background: radial-gradient(ellipse, #000b, #00101a33 70%); }
.win-celebration-card {
    position: relative;
    z-index: 1;
    width: min(340px, 86%);
    max-width: 90%;
    padding: 25px 24px 32px;
    border: 1px solid #d7b56d99;
    border-radius: 24px;
    text-align: center;
    background: radial-gradient(ellipse at 50% 0, #314136, transparent 65%), linear-gradient(155deg, #0b2029, #030d17 80%);
    box-shadow: 0 14px 45px #0009, 0 0 40px #e8c16b33, inset 0 1px 0 #fff4c533;
    animation: win-card-enter .45s ease-out both;
}
.win-celebration-card span { display: block; color: #fff1cb; font-size: 25px; font-weight: 600; margin-bottom: 7px; }
.win-caption { display: block; color: #9eafaf; font-size: 12px; margin-bottom: 13px; }
.win-celebration-card strong { display: block; color: #ffda72; font-size: clamp(24px, 5vw, 38px); overflow-wrap: anywhere; }
.win-celebration::before {
    content: ''; position: absolute; width: min(460px, 95%); aspect-ratio: 1;
    border-radius: 50%;
    background: repeating-conic-gradient(from 0deg, #f8d67b18 0deg 12deg, transparent 12deg 30deg);
    mask-image: radial-gradient(circle, #000 15%, transparent 70%);
    animation: win-rays 12s linear infinite;
}
.win-celebration-card::before {
    content: ''; position: absolute; inset: -7px; border-radius: 30px;
    border: 1px solid #f5d47755; box-shadow: 0 0 35px #f5d47725;
    pointer-events: none;
}
.win-emblem {
    display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto 12px;
    border-radius: 50%; border: 1px solid #e2bf6640;
    background: radial-gradient(circle, #f3ca6130, #e9be5705 70%);
    box-shadow: 0 0 0 7px #e9be5706, 0 0 35px #ffd36b15;
    animation: win-medal .7s cubic-bezier(.2,.8,.2,1) both;
}
.win-emblem svg { width: 73px; height: 73px; filter: drop-shadow(0 4px 6px #0006); }
.win-celebration-card strong { font-family: Arial, sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; color: #ffde88; letter-spacing: -.7px; text-shadow: 0 2px 3px #0008, 0 0 24px #f8cf6633; }
@keyframes win-rays { to { transform: rotate(360deg); } }
@keyframes win-medal { from { opacity: 0; transform: scale(.4) rotate(-60deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
@media (prefers-reduced-motion: reduce) { .win-emblem, .win-celebration::before { animation: none; } }
.win-confetti {
    position: absolute;
    top: -16px;
    left: var(--x);
    width: 7px;
    height: 12px;
    border-radius: 2px;
    animation: win-confetti-fall 2.7s var(--delay) ease-in both;
}
@keyframes win-card-enter { from { opacity: 0; transform: translateY(12px) scale(.92); } to { opacity: 1; transform: none; } }
@keyframes win-confetti-fall { from { transform: translate(0, -20px) rotate(0); opacity: 1; } to { transform: translate(var(--drift), 650px) rotate(var(--turn)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .win-celebration-card { animation: none; } .win-confetti { display: none; } }

/* Premium win presentation */
.win-celebration {
    background: radial-gradient(circle at center, #173d42a8 0%, #031019d9 58%, #01070ddf 100%);
    backdrop-filter: blur(2px);
}
.win-celebration-card {
    width: min(350px, 88vw);
    padding: 28px 28px 34px;
    border: 1px solid #e6c57b;
    border-radius: 26px;
    background: linear-gradient(145deg, #0d2830f2 0%, #071a22f5 52%, #031017f8 100%);
    box-shadow: 0 20px 55px #000b, 0 0 0 1px #ffffff09 inset, 0 0 45px #e5bb5d2b;
}
.win-celebration-card::before { inset: 7px; border: 1px solid #e7c8792e; border-radius: 20px; box-shadow: none; }
.win-emblem {
    width: 88px; height: 88px; margin-bottom: 13px;
    border: 1px solid #e4c47766;
    background: radial-gradient(circle, #e7bd5b20 0%, #0b282d 67%, #07161d 100%);
    box-shadow: 0 0 0 8px #d7ad4e0b, 0 0 30px #e8c2692b;
}
.win-emblem svg { width: 67px; height: 67px; }
.win-celebration-card span { position: relative; margin-bottom: 4px; color: #fff5dc; font: 600 27px/1.25 Arial, sans-serif; letter-spacing: -.3px; }
.win-caption { position: relative; margin-bottom: 12px; color: #9eb8b5; font: 400 12px/1.4 Arial, sans-serif; }
.win-celebration-card strong { position: relative; color: #ffd978; font: 800 clamp(34px, 9vw, 44px)/1.12 Arial, sans-serif; letter-spacing: -.8px; text-shadow: 0 2px 3px #000b, 0 0 25px #f3c95d3b; }
.win-celebration-card.win-tier-big-win { border-color: #e7bd55; background: linear-gradient(145deg, #162e2d, #07161d); }
.win-celebration-card.win-tier-big-win .win-emblem { box-shadow: 0 0 0 8px #e7bd5510, 0 0 38px #e7bd5545; }
.win-celebration-card.win-tier-mega-win { width: min(380px, 90vw); border-color: #64d2b1; background: radial-gradient(ellipse at 50% 0, #155b55, transparent 62%), linear-gradient(145deg, #092d32, #06131d); box-shadow: 0 20px 60px #000c, 0 0 45px #39d6b143; }
.win-celebration-card.win-tier-mega-win .win-emblem { transform: scale(1.08); box-shadow: 0 0 0 9px #4ad4b018, 0 0 45px #48d7bb66; }
.win-celebration-card.win-tier-super-win, .win-celebration-card.win-tier-jackpot { width: min(410px, 92vw); border-color: #ffe080; background: radial-gradient(ellipse at 50% 0, #73511b, transparent 58%), linear-gradient(145deg, #38250f, #12151a); box-shadow: 0 20px 70px #000e, 0 0 65px #ffd34870; }
.win-celebration-card.win-tier-super-win span, .win-celebration-card.win-tier-jackpot span { color: #ffe98e; font-size: clamp(29px, 8vw, 38px); letter-spacing: 1px; text-shadow: 0 2px 0 #74450d, 0 0 20px #ffd34c; }
.win-celebration-card.win-tier-super-win strong, .win-celebration-card.win-tier-jackpot strong { color: #fff0a9; font-size: clamp(38px, 10vw, 54px); text-shadow: 0 3px 0 #865216, 0 0 30px #ffd650; }
#roundStatus:empty { display: none; }
.game-rules summary { cursor: pointer; color: #d9bd79; width: fit-content; margin: 10px auto; }
.game-rules > div { line-height: 1.9; padding: 8px 12px; }
.topbar .brand { flex-shrink: 0; }
.brand-logo { display: block; width: 64px; height: 64px; object-fit: contain; }
@media (max-width: 620px) {
    .brand-logo { width: 54px; height: 54px; }
}

.temple-scene {
    background-image: url('/assets/images/temple-background.webp');
    background-size: cover;
    background-position: center;
}

.temple-scene .torch,
.temple-scene .treasure,
.temple-scene .scene-status {
    display: none;
}

.temple-scene .wheel-area {
    position: relative;
    display: grid;
    z-index: 6;
}

.temple-scene .final-wheel-area { position: absolute; inset: auto; left: 50%; top: 53%; transform: translate(-50%, -50%); width: min(390px, 94%); aspect-ratio: 1; }
.final-wheel { position: absolute; inset: 0; filter: drop-shadow(0 16px 16px rgba(0, 0, 0, .62)); }
/* Re-centre the source PNG's painted hub (620, 610 in 1254px). */
.final-wheel img { position: absolute; left: .56%; top: 1.36%; display: block; width: 100%; height: 100%; transition: transform 4.3s cubic-bezier(.12, .82, .18, 1); transform-origin: 49.44% 48.64%; }
/* Transparent padding in each PNG is included in these reference proportions. */
.final-lion { position: absolute; width: 34.5%; height: auto; left: 50.2%; top: 50.75%; transform: translate(-50%, -50%); z-index: 3; pointer-events: none; }
.final-pointer { position: absolute; width: 24%; height: auto; left: 50%; top: -5.6%; transform: translateX(-50%); z-index: 5; pointer-events: none; filter: drop-shadow(0 3px 2px #300); }

.new-wheel {
    width: 390px;
    height: 390px;
    min-width: 390px;
    min-height: 390px;
    flex: 0 0 390px;
}

.new-wheel canvas {
    display: block;
    width: 390px !important;
    height: 390px !important;
}

.phaser-wheel {
    display: none;
    width: 390px;
    height: 390px;
    min-width: 390px;
    min-height: 390px;
    flex: 0 0 390px;
}

.phaser-wheel.ready {
    display: block;
    width: 390px;
    height: 390px;
}

.phaser-wheel.ready + .game-wheel {
    display: none;
}

.phaser-wheel canvas {
    display: block;
    width: 390px !important;
    height: 390px !important;
    margin: 0 auto;
}

.temple-scene .game-wheel {
    width: 390px;
    height: 390px;
}

.temple-scene .scene-logo {
    display: block;
    position: absolute;
    top: 34px;
    left: 4%;
    width: 160px;
    z-index: 7;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .62));
}

.temple-scene .scene-logo img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

.scene-recent-wins {
    position: absolute;
    top: 28px;
    right: 16px;
    width: 250px;
    padding: 11px 9px 9px;
    border: 1px solid rgba(218, 168, 48, .88);
    border-radius: 15px;
    background: linear-gradient(145deg, rgba(1, 13, 24, .97), rgba(5, 31, 39, .94));
    box-shadow: 0 10px 28px rgba(0, 0, 0, .58), inset 0 1px 0 rgba(255, 229, 127, .12);
    backdrop-filter: blur(8px);
    z-index: 8;
}

.scene-recent-title {
    color: #ffd42d;
    font: 700 15px Georgia, serif;
    font-weight: bold;
    letter-spacing: .01em;
    padding: 1px 5px 11px;
}

.scene-recent-title span {
    font-size: 21px;
    margin-right: 8px;
}

.scene-recent-wins ul {
    display: flex;
    flex-direction: column;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

.scene-recent-wins li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) 91px;
    min-width: 0;
    flex-shrink: 0;
    align-items: center;
    min-height: 35px;
    gap: 6px;
    padding: 3px 5px;
    border-radius: 6px;
    background: linear-gradient(90deg, rgba(9, 38, 58, .88), rgba(5, 24, 39, .74));
    color: #eef5fb;
    font: 500 11px/1.35 Arial, Helvetica, sans-serif;
    transition: background .2s ease;
}

.scene-recent-wins li:nth-child(even) {
    background: linear-gradient(90deg, rgba(4, 24, 37, .9), rgba(2, 15, 27, .78));
}

.scene-recent-wins li:hover {
    background: linear-gradient(90deg, rgba(31, 77, 71, .95), rgba(8, 35, 43, .9));
    transform: translateX(-2px);
}

.scene-recent-wins li i {
    display: grid;
    flex: 0 0 29px;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #e3b331;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 28%, #fff0a0, #d49822 48%, #704008 100%);
    color: #5a2c00;
    font-style: normal;
    font-size: 17px;
    box-shadow: inset 0 0 0 2px rgba(255, 229, 115, .28), 0 2px 5px rgba(0, 0, 0, .45);
}

.scene-recent-wins li:nth-child(2) i,
.scene-recent-wins li:nth-child(5) i {
    background: radial-gradient(circle at 35% 28%, #f2a6ff, #8c1d94 52%, #321348);
    color: #ffe77a;
}

.scene-recent-wins li:nth-child(3) i,
.scene-recent-wins li:nth-child(6) i {
    background: radial-gradient(circle at 35% 28%, #d4f5ff, #1772c9 52%, #092455);
    color: #ffdf46;
}

.scene-recent-wins li:nth-child(8) i {
    background: radial-gradient(circle at 35% 28%, #b4d9ff, #155ca4 52%, #071c46);
    color: #d9edff;
}

.scene-recent-wins li span {
    min-width: 0;
    color: #e2edf3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.scene-recent-wins li b {
    margin-left: 0;
    text-align: right;
    color: #ffd62e;
    font: 700 11px/1.35 Arial, Helvetica, sans-serif;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.scene-recent-wins small {
    display: block;
    padding: 9px 5px 0;
    color: #6f9b9b;
    font-size: 8px;
    letter-spacing: .14em;
}

@keyframes recent-win-enter {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

.below-grid .recent-card {
    display: none;
}

@media (max-width: 620px) {
    .temple-scene {
        background-image: url('/assets/images/temple-background.webp');
        background-size: cover;
        background-position: center;
    }

    .temple-scene .game-wheel {
        width: 280px;
        height: 280px;
    }

    .phaser-wheel {
        width: 280px;
        height: 280px;
        min-width: 280px;
        min-height: 280px;
        flex-basis: 280px;
    }

    .new-wheel {
        width: 280px;
        height: 280px;
        min-width: 280px;
        min-height: 280px;
        flex-basis: 280px;
    }

    .new-wheel canvas {
        width: 280px !important;
        height: 280px !important;
    }

    .phaser-wheel canvas {
        width: 280px !important;
        height: 280px !important;
    }

    .temple-scene .scene-logo {
        top: 22px;
        left: 3%;
        width: 135px;
    }

    .scene-recent-wins {
        display: none;
    }

    .temple-scene .final-wheel-area { width: min(280px, 94%); top: 60%; }
}

.temple-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(3, 17, 20, .1), transparent 42%, rgba(1, 10, 17, .23)), linear-gradient(0deg, rgba(2, 14, 18, .28), transparent 34%);
    mix-blend-mode: multiply;
    z-index: 1;
}

.panel {
    background: linear-gradient(145deg, rgba(7, 39, 48, .98), rgba(3, 18, 30, .98));
    border-color: rgba(28, 91, 88, .7);
}

.help-strip,
.history-section {
    border-color: rgba(28, 91, 88, .7);
}

.game-controls {
    border-color: rgba(39, 105, 96, .85);
    background: linear-gradient(180deg, rgba(4, 37, 42, .98), rgba(2, 17, 29, .98));
    box-shadow: 0 12px 28px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 225, 103, .08);
}

.bet-control,
.result-stat {
    background: linear-gradient(180deg, rgba(7, 45, 50, .84), rgba(3, 24, 35, .82));
    border: 1px solid rgba(41, 101, 112, .9);
    border-radius: 9px;
    padding: 9px;
}

.bet-control label,
.result-stat label {
    color: #c5d8d7;
    font-size: 11px;
}

.game-controls .bet-control {
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(209, 174, 101, .24);
    border-radius: 14px;
    background: linear-gradient(155deg, #122e32, #071b22 75%);
    box-shadow: inset 0 1px 0 #ffffff08, 0 4px 12px #0003;
}

.scene-recent-wins li i.win-avatar,
.recent-list li i.win-avatar {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border: 1px solid #ffffff30;
    border-radius: 9px;
    color: #fff4d9;
    font: 600 15px Arial, sans-serif;
    box-shadow: inset 0 1px 0 #ffffff18, 0 2px 4px #0003;
}
.game-controls .bet-control label {
    margin-bottom: 8px;
    color: #c7b68e;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .03em;
}
.bet-box {
    min-width: 0;
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #c9a65c30;
    border-radius: 10px;
    background: #041219;
    box-shadow: inset 0 2px 6px #0005;
}
.bet-box input {
    width: 100%;
    min-width: 0;
    height: 34px;
    padding: 0 2px;
    border: 0;
    border-radius: 5px;
    text-align: center;
    font: 600 17px Arial, sans-serif;
    font-variant-numeric: tabular-nums;
    background: transparent;
    color: #fff0cb;
    appearance: textfield;
    -moz-appearance: textfield;
}
.bet-box input::-webkit-inner-spin-button,
.bet-box input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.bet-box button {
    display: grid;
    place-items: center;
    flex: 0 0 32px;
    width: 32px;
    height: 34px;
    padding: 0;
    border: 1px solid #c9a65c38;
    border-radius: 7px;
    background: linear-gradient(160deg, #203739, #112329);
    color: #ebd6a4;
    font: 400 22px Arial, sans-serif;
    box-shadow: inset 0 1px 0 #ffffff09;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.bet-box #maxBet {
    flex-basis: 36px;
    width: 36px;
    padding: 0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #f3d48d;
    background: linear-gradient(145deg, #493c24, #292619);
    border-color: #c9a65c55;
}
.bet-box button:hover:not(:disabled) { background: #35463b; border-color: #d8b76e; }
.bet-box button:active:not(:disabled) { transform: translateY(1px); }
.bet-box button:disabled { opacity: .4; cursor: default; }
.bet-box :focus-visible { outline: 2px solid #e2c27c; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .bet-box button { transition: none; } }

.result-stat strong {
    color: #ffd42d;
    text-shadow: 0 0 10px rgba(255, 207, 45, .2);
}

.result-stat:first-of-type strong {
    color: #35df70;
}

.spin-button {
    position: relative;
    isolation: isolate;
    width: 76px;
    height: 76px;
    padding: 0;
    border-radius: 50%;
    justify-self: center;
    display: grid;
    place-items: center;
    border: 1px solid #fff0b3;
    background: linear-gradient(145deg, #fff4bf 0%, #e5b84f 35%, #916019 68%, #f6d77f 100%);
    box-shadow: 0 5px 12px #0009, 0 0 0 3px #061b22, 0 0 0 4px #b38a384d, 0 0 22px #e8b94a20, inset 0 1px 1px #fff3b7;
    transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.spin-button::before { content: ""; position: absolute; inset: 5px; z-index: -1; border-radius: 50%; border: 1px solid #f4d17c8c; background: radial-gradient(ellipse at 35% 12%, #fff5c4 0%, #f8d773 32%, #e1aa35 68%, #b87718 100%); box-shadow: inset 0 2px 3px #fff9df, inset 0 -4px 6px #88500b80, 0 0 0 1px #80551d; }
.spin-button::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; border: 1px solid #fff5c45c; pointer-events: none; }
.spin-button svg { display: block; width: 46px; height: 46px; pointer-events: none; filter: drop-shadow(0 1px 0 #fff1b5); }
.spin-button svg path[stroke] { stroke: #153538; stroke-width: 4; }
.spin-button svg path[fill] { fill: #153538; }
.spin-button:hover:not(:disabled) { filter: brightness(1.14); transform: translateY(-1px); box-shadow: 0 7px 16px #0009, 0 0 0 3px #061b22, 0 0 0 4px #d8af596e, 0 0 25px #e8b94a40; }
.spin-button:active:not(:disabled) { transform: translateY(2px) scale(.97); }
.spin-button:disabled { cursor: wait; filter: saturate(.75); }
.spin-button:disabled svg { animation: spin-button-turn 1.6s linear infinite; }
.spin-button:focus-visible { outline: 2px solid #fff0b5; outline-offset: 6px; }
@keyframes spin-button-turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin-button { transition: none; } .spin-button:disabled svg { animation: none; } }
@media (max-width: 620px) {
    .spin-button { width: 72px; height: 72px; }
}

@media (max-width: 620px) {
    .game-hero > .game-controls {
        height: auto;
        grid-template-columns: minmax(0, 1fr) 86px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 10px 12px;
        padding: 18px 12px 12px;
        align-items: center;
    }
    .game-controls .spin-button { grid-column: 2; grid-row: 1; width: 80px; height: 80px; margin: 0 auto; }
    .game-controls .bet-control { grid-column: 1; grid-row: 1; min-width: 0; width: 100%; max-width: 145px; justify-self: end; padding: 7px 4px 4px; border-radius: 12px; }
    .game-controls .result-stat { grid-row: 2; min-width: 0; padding: 10px 5px; display: flex; flex-direction: column; justify-content: center; border-radius: 13px; }
    .game-controls .bet-control, .game-controls .result-stat {
        border: 1px solid #9dbbb329;
        background: linear-gradient(155deg, #143238, #071b24 85%);
        box-shadow: inset 0 1px 0 #ffffff07, 0 4px 9px #0002;
    }
    .game-controls .result-stat:nth-child(3) { grid-column: 3; grid-row: 1; width: 100%; max-width: 145px; min-height: 62px; justify-self: start; }
    .game-controls .result-stat:nth-child(4) {
        grid-column: 1 / -1; grid-row: 2; justify-self: center;
        flex-direction: row; align-items: center; gap: 9px;
        padding: 6px 18px; border-radius: 20px; max-width: 100%;
        background: #03151ba6; border-color: #d7b46326; box-shadow: none;
    }
    .game-controls .result-stat:nth-child(4) label { margin: 0; }
    .game-controls .result-stat:nth-child(4) strong { font-size: 14px; }
    .game-controls .bet-control label, .game-controls .result-stat label { color: #aebfbe; font-size: 10px; font-weight: 500; letter-spacing: 0; margin-bottom: 7px; }
    .game-controls .result-stat strong { color: #ffe2a0; font-size: clamp(12px, 3.5vw, 17px); line-height: 1.4; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; text-shadow: none; }
    .game-controls .result-stat:nth-child(3) strong { color: #8ce3c3; }
    .game-controls .bet-box { display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: 3px; padding: 3px; border-color: #ffffff09; border-radius: 9px; background: #03151d; }
    .game-controls .bet-box input { grid-column: 1 / -1; grid-row: 1; height: 27px; font-size: 16px; color: #fff0cd; }
    .game-controls .bet-box button { grid-row: 2; width: 100%; height: 32px; font-size: 20px; border-color: #b8d2cc26; background: linear-gradient(#26444a, #172e35); border-radius: 6px; color: #f2dfb7; }
    .game-controls .bet-box #maxBet { width: 100%; font-size: 9px; background: linear-gradient(#69542e, #40351f); border-color: #dcb96f55; color: #ffe2a0; }
}

.bet-picker-trigger { display: none; }
.bet-picker-dialog { width: min(380px, 94vw); border: 1px solid #c4a45d; border-radius: 16px; background: linear-gradient(145deg, #27281e, #111c20); padding: 23px 16px 16px; }
.bet-picker-dialog h2 { font: 600 20px Arial, sans-serif; color: #f7dfa5; margin: 0 30px 18px 0; }
.bet-amount-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.bet-amount-grid button { min-height: 48px; border: 1px solid #d5b97525; border-radius: 7px; background: #302b20; color: #f7edd5; font: 600 20px Arial, sans-serif; }
.bet-amount-grid button[aria-pressed="true"] { background: linear-gradient(145deg, #706037, #3f3c25); border-color: #f0d78e; box-shadow: inset 0 0 0 2px #ffe7a433; color: #fff2bb; }
.bet-amount-grid button:disabled { opacity: .3; cursor: not-allowed; }
.bet-amount-grid button:focus-visible { outline: 2px solid #ffe3a0; outline-offset: 1px; }
.custom-bet-form > div { display: flex; gap: 8px; align-items: center; }
.custom-bet-form input { min-width: 0; flex: 1; margin: 0; font-size: 16px; }
.custom-bet-form .button { padding: 10px; border-radius: 7px; font-size: 11px; }
.custom-bet-form p:empty { display: none; }
@media (max-width: 620px) {
    .game-controls .bet-control { padding: 0; border: 0; background: none; box-shadow: none; justify-self: center; }
    .game-controls .bet-control > label, .game-controls .bet-control > .bet-box { display: none; }
    .bet-picker-trigger { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; border: 0; padding: 4px; background: none; color: #d7c9a6; font-size: 11px; }
    .bet-picker-trigger b { color: #ffedbc; font-size: 13px; }
    .bet-coin { display: grid; place-items: center; width: 57px; height: 57px; border: 1px solid #f0d18b; border-radius: 50%; background: linear-gradient(145deg, #d5b46d, #78592c); box-shadow: inset 0 0 0 3px #f4da9c35, 0 4px 9px #0006; }
    .bet-coin svg { width: 43px; height: 43px; }
    .bet-picker-trigger:disabled { opacity: .45; }
    .bet-picker-trigger:focus-visible { outline: 2px solid #e8ca85; border-radius: 10px; }
    .bet-picker-trigger:active:not(:disabled) .bet-coin { transform: scale(.95); }
}

.win-celebration .win-artwork-card {
    width: min(560px, 88%); max-width: 560px; padding: 0; border: 0;
    border-radius: 0; background: none; box-shadow: none;
    animation: win-art-enter .65s cubic-bezier(.16,.8,.25,1.15) both;
}
.win-artwork-card::before { inset: -15%; border: 0; border-radius: 50%; background: radial-gradient(ellipse, #ffc62d66, #e8a82915 50%, transparent 70%); box-shadow: none; z-index: -1; }
.win-title-art { display: block; width: 100%; max-height: 310px; object-fit: contain; filter: drop-shadow(0 8px 5px #0008) drop-shadow(0 0 25px #ffd54c66); }
.win-celebration .win-artwork-card strong {
    display: block; margin: 6px auto 0; padding: 8px 12px 12px; width: 94%;
    border: 0;
    background: none;
    color: #ffebae; font: 700 clamp(30px, 5vw, 56px)/1.2 "Segoe UI", Arial, sans-serif;
    font-variant-numeric: lining-nums tabular-nums;
    text-align: center;
    text-shadow: 0 2px 5px #000c, 0 0 18px #ffc75c40; letter-spacing: .3px;
}
@keyframes win-art-enter { from { opacity: 0; transform: scale(.35) translateY(25px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@media (max-width: 620px) {
    .win-celebration .win-artwork-card { width: 94%; }
    .win-title-art { max-height: 210px; }
    .win-celebration .win-artwork-card strong { font-size: clamp(28px, 8.5vw, 40px); padding: 8px 10px; }
}
@media (prefers-reduced-motion: reduce) { .win-celebration .win-artwork-card { animation: none; } }

/* Gold glass controls, matching the temple artwork. */
.game-hero > .game-controls {
    border: 1px solid #d5aa467d;
    background: linear-gradient(180deg, #06141bc9, #010a12e6);
    box-shadow: inset 0 1px 0 #ffe6a236, 0 8px 24px #0007;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 22px;
}
.game-controls .bet-control, .game-controls .result-stat {
    border: 1px solid #c99b3c8c;
    background: linear-gradient(145deg, #06131bb3, #01080fce);
    border-radius: 15px;
    box-shadow: inset 0 1px 0 #ffe6a21a, 0 2px 9px #0005;
}
.game-controls .bet-control label, .game-controls .result-stat label { color: #e4dccb; }
.game-controls .result-stat strong { color: #ffcf50; text-shadow: 0 0 12px #e4a52430; }
.game-controls .bet-box { border-color: transparent; background: #010b1266; box-shadow: none; }
.game-controls .bet-box button { border-color: #cfa64d77; background: linear-gradient(155deg, #172329, #041017); color: #ffe4a0; }
.game-controls .bet-box #maxBet { border-color: #e4b54e99; background: linear-gradient(155deg, #302b1c, #10140f); color: #ffe299; }
.game-controls .spin-button {
    border-color: #fff0a6;
    box-shadow: 0 0 0 4px #171808, 0 0 0 5px #d7a736aa, 0 0 24px #ffba2960, inset 0 1px 2px #fff6c4;
}
@media (min-width: 951px) {
    .game-hero > .game-controls {
        position: relative; margin-top: -100px; margin-bottom: 8px;
        width: calc(100% - 40px); max-width: 980px; height: 92px;
        grid-template-columns: minmax(190px, 1.5fr) 90px minmax(110px, .85fr) minmax(130px, 1fr);
        gap: 16px; padding: 9px 18px; z-index: 9;
    }
    .game-hero .temple-scene { height: max(540px, calc(100svh - 106px)); }
    .game-controls .bet-control, .game-controls .result-stat { min-height: 66px; padding: 8px; }
    .game-controls .spin-button { width: 76px; height: 76px; }
    .temple-scene .scene-recent-wins { bottom: 110px; }
}
@media (max-width: 620px) {
    .game-hero > .game-controls { border-radius: 0 0 17px 17px; }
    .game-controls .bet-control { border: 0; background: none; box-shadow: none; }
    .game-controls .result-stat:nth-child(4) { background: #020c14a6; border-color: #c99b3c66; }
}

@media (min-width: 621px) {
    .game-controls .bet-control {
        position: relative; padding: 8px 12px 9px; border-radius: 19px;
        border: 1px solid #d9b45a; background: linear-gradient(155deg, #0a1419e8, #01080deb);
        box-shadow: inset 0 1px 0 #fff0ae55, 0 0 0 4px #071017, 0 0 0 5px #aa813b80;
    }
    .game-controls .bet-control::after {
        content: '❖'; position: absolute; right: -10px; top: 50%; transform: translateY(-50%);
        color: #e9c357; font-size: 18px; text-shadow: 0 1px 3px #000, 0 0 6px #ffc44444;
    }
    .game-controls .bet-control label {
        display: flex; align-items: center; justify-content: center; gap: 5px;
        margin: 0 0 5px; font: 700 9px/1.2 Arial, sans-serif; letter-spacing: .15px; color: #e7e7df;
    }
    .game-controls .bet-box {
        display: grid; grid-template-columns: 29px minmax(50px, 1fr) 29px 44px;
        gap: 8px; padding: 0; border: 0; background: none; box-shadow: none;
    }
    .game-controls .bet-box input {
        height: 29px; padding: 0; border: 0; background: transparent;
        color: #f8f8ef; font: 700 16px/1 Arial, sans-serif;
    }
    .game-controls .bet-box button {
        width: 29px; height: 29px; border: 1px solid #a788434d; border-radius: 7px;
        background: linear-gradient(#14252c, #031017); color: #f3db96;
        font-size: 21px; box-shadow: inset 0 1px 0 #f2d18625;
    }
    .game-controls .bet-box #maxBet {
        width: 44px; padding: 0; font: 700 11px Arial, sans-serif;
        border-color: #bb943b99; background: linear-gradient(#191d18, #080e0c); color: #ffe277;
    }
}
.game-controls .result-stat label { display: flex; align-items: center; justify-content: center; gap: 6px; }
.stat-icon { width: 15px; height: 15px; fill: none; stroke: #d9be7e; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 621px) {
    .game-hero > .game-controls {
        background: linear-gradient(160deg, #142b2deb, #06141bef 55%, #09171dec);
        border-color: #c7a76488; border-radius: 24px;
        box-shadow: inset 0 1px 0 #fff0bb25, 0 12px 25px #0008;
    }
    .game-controls .bet-control, .game-controls .result-stat {
        min-height: 68px; border-radius: 14px; border: 1px solid #c3a56566;
        background: linear-gradient(155deg, #12292db3, #03121bd9);
        box-shadow: inset 0 1px 0 #f6e5b316, 0 3px 8px #0003;
    }
    .game-controls .bet-control { padding: 8px 10px; }
    .game-controls .bet-control::after { content: none; }
    .game-controls .bet-control label { font-size: 10px; letter-spacing: .6px; margin-bottom: 6px; color: #bfc8bf; }
    .game-controls .bet-box { grid-template-columns: 32px minmax(45px, 1fr) 32px 45px; gap: 6px; }
    .game-controls .bet-box button { width: 32px; height: 32px; border-radius: 8px; }
    .game-controls .bet-box #maxBet { width: 45px; height: 32px; }
    .game-controls .bet-box input { height: 32px; font-size: 19px; color: #fff0c7; font-variant-numeric: tabular-nums; }
    .game-controls .result-stat { display: flex; flex-direction: column; justify-content: center; padding: 8px; gap: 4px; }
    .game-controls .result-stat label { margin: 0; color: #bfc8bf; font-size: 11px; font-weight: 500; letter-spacing: 0; }
    .game-controls .result-stat strong { font: 700 clamp(19px, 1.7vw, 25px)/1.15 Arial, sans-serif; font-variant-numeric: tabular-nums; color: #ffe1a0; text-shadow: 0 1px 4px #0006; overflow-wrap: anywhere; }
    .game-controls .result-stat:nth-child(3) strong { color: #94e2c1; }
    .game-controls .spin-button { box-shadow: 0 0 0 3px #0a171b, 0 0 0 4px #d7b05b88, 0 5px 15px #0008, 0 0 20px #edbe442b; }
}
@media (min-width: 951px) {
    .game-hero > .game-controls { grid-template-columns: minmax(210px, 1.3fr) 94px minmax(110px, .9fr) minmax(140px, 1.1fr); padding: 10px 14px; gap: 16px; }
}
/* Phone layout: artwork has its own top row, clear of the wheel. */
@media (max-width: 620px) {
    body { min-height: 100svh; background: #020b13; }
    .app-main { padding: 8px 6px calc(72px + env(safe-area-inset-bottom)); }
    .game-hero { padding: 0; min-height: 0; }
    .game-hero .temple-scene {
        --phone-wheel: min(78vw, 330px);
        height: max(calc(var(--phone-wheel) + 116px), calc(100svh - 330px - env(safe-area-inset-bottom)));
        border-radius: 14px 14px 0 0;
    }
    .game-hero .temple-scene .scene-logo { top: 10px; left: 12px; width: 86px; }
    .game-hero .temple-scene .jackpot-promo { top: 8px; right: 13px; left: auto; width: 65px; animation: none; }
    .game-hero .temple-scene .final-wheel-area {
        width: var(--phone-wheel); top: auto; bottom: clamp(64px, 10svh, 85px); left: 50%;
        transform: translateX(-50%);
    }
    .game-hero > .game-controls {
        margin: 0; width: 100%; height: auto; padding: 13px 12px 10px;
        grid-template-columns: minmax(0,1fr) 88px minmax(0,1fr); gap: 8px 10px;
        border-top-color: #d2ad5a55; background: linear-gradient(#072028, #030e17);
    }
    .game-controls .spin-button { width: 74px; height: 74px; }
    .game-controls .bet-control { min-height: 0; }
    .game-controls .result-stat:nth-child(3) { min-height: 58px; border-radius: 12px; }
    .game-controls .result-stat:nth-child(4) { padding: 5px 15px; }
    .bet-coin { width: 50px; height: 50px; }
    .bet-coin svg { width: 39px; height: 39px; }
    .bet-picker-trigger { gap: 4px; }
    .game-note { margin: 8px 0 0; padding: 0 8px; }
    .mobile-nav { box-shadow: 0 -4px 18px #0004; }
}

.bet-picker-trigger .bet-coin { border: 0; background: none; box-shadow: none; }
.game-controls .result-stat:nth-child(3) {
    border: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 8px 5px;
}
.game-controls .result-stat:nth-child(3) label {
    margin: 0;
    gap: 5px;
    color: #e6ddc5;
    line-height: 1.3;
}
.game-controls .result-stat:nth-child(3) strong {
    color: #a0efd1;
    font-variant-numeric: tabular-nums;
    letter-spacing: .2px;
    line-height: 1.25;
    text-shadow: 0 1px 3px #0005;
}
.bet-coin img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 3px 4px #0005); }
@media (max-width: 620px) {
    .game-controls .bet-control { padding: 4px; }
    .game-controls .bet-picker-trigger { padding: 0; gap: 4px; }
    .game-controls .result-stat:nth-child(3) { padding: 4px; gap: 4px; }
    .game-controls .result-stat:nth-child(3) label {
        width: 50px; height: 50px; flex: 0 0 50px; margin: 0;
    }
    .game-controls .win-stat-icon { width: 40px; height: 40px; }
    .game-controls .bet-picker-trigger > span:last-child,
    .game-controls .result-stat:nth-child(3) strong {
        min-height: 18px; line-height: 18px;
    }
}

.game-controls .spin-button {
    border: 0; background: transparent; box-shadow: none; overflow: visible;
}
.game-controls .spin-button::before, .game-controls .spin-button::after { content: none; }
.spin-fire-art { display: block; width: 118%; height: 118%; max-width: none; position: absolute; inset: -9%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 0 5px #f9a52c44); }
.game-controls .spin-button:hover:not(:disabled) { box-shadow: none; filter: brightness(1.15); }
.game-controls .spin-button:disabled { filter: saturate(.8); }
.game-controls .spin-button:disabled .spin-fire-art { animation: spin-fire-breathe 1.2s ease-in-out infinite alternate; }
@keyframes spin-fire-breathe { from { opacity: .7; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .game-controls .spin-button:disabled .spin-fire-art { animation: none; } }

/* Join the phone controls directly to the bottom navigation. */
@media (max-width: 620px) {
    body { display: flex; flex-direction: column; min-height: 100svh; }
    .topbar { flex-shrink: 0; }
    .app-main { display: flex; flex-direction: column; flex: 1; width: 100%; padding: 8px 6px 0; }
    .game-hero { display: flex; flex-direction: column; flex: 1; }
    .game-hero .temple-scene { flex: 1; height: auto; min-height: calc(var(--phone-wheel) + 116px); }
    .game-hero > .game-controls { flex-shrink: 0; border: 0; border-radius: 0; box-shadow: none; margin-bottom: 0; }
    .game-note { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .mobile-nav { position: sticky; bottom: 0; flex-shrink: 0; width: 100%; box-shadow: none; }
}

.top-actions .music-toggle {
    width: 38px; height: 38px; padding: 9px;
    border: 1px solid #d7b66c88;
    background: linear-gradient(145deg, #234047, #0b1c26 75%);
    color: #ffe1a0;
    box-shadow: inset 0 1px 0 #fff1be26, 0 2px 6px #0004;
    transition: color .2s, border-color .2s, background .2s, transform .2s;
}
.music-toggle svg { display: block; width: 100%; height: 100%; }
.top-actions .music-toggle[aria-pressed="false"] { color: #9caeb9; border-color: #75919e66; background: linear-gradient(145deg, #1b303a, #091822); }
.top-actions .music-toggle:hover { border-color: #f5d68d; color: #ffebbc; }
.top-actions .music-toggle:active { transform: scale(.94); }
@media (max-width: 620px) { .top-actions .music-toggle { width: 34px; height: 34px; padding: 8px; } }
@media (prefers-reduced-motion: reduce) { .top-actions .music-toggle { transition: none; } }

.mobile-nav a { flex: 1; gap: 5px; color: #9db3c5; }
.mobile-nav a svg { display: block; width: 23px; height: 23px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.mobile-nav a.active { color: #f2d17c; }
.mobile-nav a.active svg { filter: drop-shadow(0 0 4px #e4bd4530); }
.mobile-nav a:focus-visible { outline: 2px solid #f2d17c; outline-offset: -2px; border-radius: 8px; }
