:root{font-family:system-ui,-apple-system,"Segoe UI",sans-serif;color:#fff4cb;color-scheme:dark}*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#220d05}button{font:inherit;cursor:pointer;touch-action:manipulation}button:focus-visible{outline:3px solid #fff;outline-offset:4px}[hidden]{display:none!important}.page{position:relative;isolation:isolate;overflow:hidden;min-height:100svh;max-width:620px;margin:auto;padding:calc(16px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));display:flex;flex-direction:column;align-items:center;background:#55250c}.backdrop{position:absolute;inset:0;z-index:-2;background:linear-gradient(180deg,#2e0b06b8,#7b39078c 38%,#411503d9 85%,#1d0904f5),url('assets/castle.png') center/cover;filter:sepia(.65) saturate(1.35)}.page:after{content:"";position:absolute;inset:0;z-index:-1;box-shadow:inset 0 0 90px #270b05;pointer-events:none}header{width:100%;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;gap:8px;align-items:center;color:#ffe58c;font-size:30px;text-shadow:0 2px 10px #ffae23}.brand span{font-size:9px;line-height:1.1;font-weight:900;letter-spacing:.12em}.info{width:34px;height:34px;border:2px solid #ffdf83;border-radius:50%;background:#7c310e;color:#fff4bd;font-weight:900}.hero{text-align:center;width:100%;margin-top:clamp(20px,4vh,45px)}.crown,.dialog-crown{font-family:Georgia,serif;color:#ffda53;font-size:55px;line-height:.9;text-shadow:0 4px #a8430d,0 0 25px #ffc347}.eyebrow,.kicker{margin-top:14px;color:#ffdb79;font-size:10px;font-weight:900;letter-spacing:.2em}.hero h1{margin:12px 0 15px;font-size:clamp(34px,9.5vw,56px);font-weight:1000;letter-spacing:-.04em;line-height:1.02;color:#fff4bf;text-shadow:0 3px #d77c24,0 6px #7e260d,0 9px 14px #240802}.hero h1 em{font-style:normal;color:#ffd555}.ribbon{display:inline-block;padding:8px 24px;background:linear-gradient(90deg,transparent,#a31e13 12%,#d4441c 50%,#a31e13 88%,transparent);border-block:1px solid #ffcf68;color:#fff5c8;font-size:10px;font-weight:900;letter-spacing:.12em}.hero p{font-size:15px;font-weight:800;color:#ffebbb;text-shadow:0 2px 5px #381205}.stage{position:relative;flex:1;width:100%;min-height:300px;display:flex;flex-direction:column;justify-content:center;align-items:center}.light{position:absolute;width:120%;aspect-ratio:1;background:radial-gradient(circle,#ffd95b88 0,#ffae262c 35%,transparent 68%);pointer-events:none;animation:glow 2s ease-in-out infinite}.stage-label{z-index:1;color:#ffefb7;font-weight:1000;font-size:17px;letter-spacing:.12em;text-shadow:0 3px 7px #4b1602}.stage-label span{color:#ffcc45}.chests{display:flex;width:100%;align-items:center;justify-content:center;z-index:2;margin:10px -4px}.chest{position:relative;display:flex;align-items:center;justify-content:center;width:33.333%;max-width:190px;aspect-ratio:1;min-width:0;padding:0;background:none;border:0;filter:drop-shadow(0 10px 8px #1f0807a6);animation:float 2.1s ease-in-out infinite}.chest:nth-child(2){animation-delay:.25s;transform:scale(1.08)}.chest:nth-child(3){animation-delay:.5s}.chest-image{position:absolute;inset:0;background:url('assets/chest.png') center/contain no-repeat}.number{position:absolute;bottom:4%;display:grid;place-items:center;width:30px;height:30px;border:2px solid #fff0ae;border-radius:50%;background:linear-gradient(#ffdf5e,#c96c0d);box-shadow:0 3px #873507;color:#6b2803;font-weight:1000;font-size:16px}.chest:active{scale:.95}.chest.chosen{z-index:4;animation:open-chest 1.7s ease-in-out forwards}.chests.opening .chest:not(.chosen){opacity:.3;transition:opacity .3s}.hint{position:relative;z-index:2;color:#fff2bd;font-size:15px;font-weight:900;text-align:center;text-shadow:0 2px 8px #531a03}.skip{z-index:3;margin-top:8px;padding:8px;background:none;border:0;color:#ffe7a3;text-decoration:underline}.particles{position:absolute;inset:0;pointer-events:none;z-index:5}.particle{position:absolute;left:50%;top:50%;font-size:var(--size);animation:burst 1.3s var(--delay) ease-out forwards;opacity:0}.bottom{width:100%;max-width:400px;text-align:center}.promise{display:flex;align-items:center;justify-content:center;gap:14px;padding:13px;background:linear-gradient(90deg,transparent,#9f4c0a88,transparent);border-block:1px solid #e3a64288;color:#ffe7a5}.promise span{font-size:22px}.promise b,.promise small{display:block}.promise b{font-size:13px;letter-spacing:.08em}.promise small{font-size:11px;margin-top:3px}.bottom p,.disclaimer{font-size:10px;line-height:1.5;color:#edcda5}.overlay{position:fixed;inset:0;z-index:10;display:grid;place-items:center;padding:22px;background:#210700e8;overflow:hidden}.rays{position:absolute;width:130vmax;aspect-ratio:1;background:repeating-conic-gradient(from 0deg,#ffcf4c30 0deg 12deg,transparent 12deg 24deg);animation:spin 24s linear infinite}.dialog{position:relative;width:min(100%,390px);padding:26px 24px 30px;text-align:center;border:4px solid #ffe397;border-radius:25px;background:radial-gradient(circle at 50% 33%,#dd781c,#9e2b0c 55%,#501105);box-shadow:inset 0 0 0 2px #fff0ad,0 0 0 6px #9d4a10,0 0 55px #ffb52d99,0 20px 80px #220600;animation:pop .45s both}.dialog-crown{font-size:54px}.confetti{color:#ffe985;font-size:20px;letter-spacing:5px}.dialog h2{font-size:clamp(35px,10vw,48px);line-height:1;margin:8px 0;color:#fff0a7;font-weight:1000;text-shadow:0 3px #d67613,0 5px #70200a}.dialog .kicker{font-size:10px}.win-copy{font-size:15px;font-weight:800;margin:10px 0;color:#ffedbe}.amount{display:flex;justify-content:center;align-items:baseline;color:#fff18a;text-shadow:0 4px #ba550d,0 7px 12px #4a0c00;font-weight:1000;line-height:1}.amount small{font-size:28px;margin-right:4px}.amount strong{font-size:clamp(82px,24vw,112px);letter-spacing:-.06em}.amount span{font-size:29px}.amount-caption{font-size:11px;font-weight:900;letter-spacing:.18em;color:#ffe9a6}.coins{font-size:27px;margin:7px 0}.claim{position:relative;width:100%;min-height:59px;border:2px solid #fff0ad;border-radius:32px;background:linear-gradient(#fff7af,#ffd85a 35%,#ff9c13 78%,#df6e09);box-shadow:inset 0 3px #fffdd5,0 5px 0 #983407,0 8px 22px #4a0b00;color:#6b2404;font-weight:1000;font-size:18px;text-shadow:0 1px #ffef9d}#claim{animation:claim-pulse 1s ease-in-out infinite}#claim:active{animation:none;transform:scale(.97)}.claim span{position:absolute;right:24px;font-size:27px;line-height:22px}.close{position:absolute;top:8px;right:14px;border:0;background:none;color:#fff1bc;font-size:28px}.info-dialog p:not(.kicker){font-size:14px;text-align:left;line-height:1.6}.info-dialog .claim{margin-top:12px}@keyframes float{50%{translate:0 -9px}}@keyframes glow{50%{transform:scale(1.1);opacity:.75}}@keyframes open-chest{0%,20%{transform:scale(1) rotate(0)}30%,50%,70%{transform:scale(1.15) rotate(-8deg)}40%,60%,80%{transform:scale(1.2) rotate(8deg)}100%{transform:scale(1.4);filter:brightness(2)}}@keyframes burst{0%{opacity:1;transform:translate(0,0) scale(.4)}100%{opacity:0;transform:translate(var(--x),var(--y)) scale(1.2) rotate(180deg)}}@keyframes pop{from{opacity:0;transform:scale(.65)}to{opacity:1;transform:scale(1)}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes claim-pulse{0%,100%{transform:scale(1) rotate(0)}15%{transform:scale(1.08) rotate(-3deg)}30%{transform:scale(1.1) rotate(3deg)}45%{transform:scale(1.08) rotate(-3deg)}60%{transform:scale(1.1) rotate(2deg)}75%{transform:scale(1.04)}}@media(max-height:680px){.hero{margin-top:8px}.hero h1{font-size:34px;margin:7px 0}.crown{font-size:36px}.hero p{margin:8px}.stage{min-height:220px}.dialog{padding:15px 22px 20px}.amount strong{font-size:75px}.coins{margin:3px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}#claim{animation:none}}
.chest:nth-child(1) .chest-image{background-image:url('assets/chest-ruby.png')}
.chest:nth-child(2) .chest-image{background-image:url('assets/chest-sapphire.png')}
.chest:nth-child(3) .chest-image{background-image:url('assets/chest-emerald.png')}
/* Suppress the mobile browser's rectangular tap flash on treasure chests. */
.chest{-webkit-tap-highlight-color:transparent;outline:none}
.chest:focus-visible{outline:3px solid #fff4c4;outline-offset:3px;border-radius:14px}
.chest-image{pointer-events:none}
/* Royal red and gold theme */
html,body{background:#5e0010}
.page{background:#a4071b}
.backdrop{background:linear-gradient(180deg,rgba(108,0,17,.94),rgba(170,5,24,.79) 45%,rgba(112,0,14,.94) 85%,#4d000b),url('assets/castle.png') center/cover;filter:none}
.page:after{box-shadow:inset 0 0 90px #4f000b}
.brand,.eyebrow,.kicker{color:#ffe083}
.info{background:linear-gradient(#d31d2a,#a00016);border-color:#ffdf75;color:#fff7d2}
.hero h1{color:#fff1b1;text-shadow:0 3px #d69a23,0 6px #8d0011,0 9px 14px #58000c}
.hero h1 em{color:#ffdc4d}
.ribbon{background:linear-gradient(90deg,transparent,#b50018 12%,#ed2935 50%,#b50018 88%,transparent);border-color:#ffe078}
.hero p,.hint{color:#fff4cf;text-shadow:0 2px 6px #72000e}
.light{background:radial-gradient(circle,#ffd957aa 0,#fbaa223d 36%,transparent 70%)}
.promise{background:linear-gradient(90deg,transparent,#c51924bb,transparent);border-color:#f4ca5a;color:#ffe8a2}
.bottom p,.disclaimer{color:#ffe4c4}
.overlay{background:#50000eea}
.dialog{background:radial-gradient(circle at 50% 30%,#ec3b36,#bb071c 55%,#78000e);border-color:#ffe18b;box-shadow:inset 0 0 0 2px #fff1ac,0 0 0 6px #aa6411,0 0 55px #ffc33399,0 20px 80px #3b0008}
.dialog h2{color:#fff0a7;text-shadow:0 3px #da951c,0 5px #85000b}
.amount{color:#ffed75;text-shadow:0 4px #b8690b,0 7px 12px #69000b}
.claim{background:linear-gradient(#fff6a3,#ffd735 35%,#ffac0a 78%,#e87908);border-color:#fff2a1;box-shadow:inset 0 3px #fffed0,0 5px 0 #a85409,0 8px 22px #65000b;color:#8b1406}
/* A deeper burgundy backdrop keeps the gold chests and title prominent. */
html,body{background:#210b12}
.page{background:#49101d}
.backdrop{background:linear-gradient(180deg,rgba(35,9,21,.84) 0%,rgba(81,15,27,.57) 35%,rgba(76,16,22,.48) 60%,rgba(35,9,16,.94) 100%),url('assets/castle.png') center/cover;filter:saturate(.85)}
.page:after{box-shadow:inset 0 0 85px #1e080f88}
.brand{color:#f9d68a;text-shadow:0 2px 10px #a55817}
.info{background:linear-gradient(#8e2633,#561423);border-color:#d8aa5d;color:#fff2ce}
.hero h1{color:#fff0c6;text-shadow:0 2px #e3a94f,0 5px #81291e,0 8px 16px #2a0910}
.hero h1 em{color:#ffd870}
.hero p,.hint{color:#fff0d1;text-shadow:0 2px 7px #3b0a12}
.ribbon{background:linear-gradient(90deg,transparent,#79162bcc 16%,#a92d38 50%,#79162bcc 84%,transparent);border-color:#d9a657;color:#ffebc0}
.light{background:radial-gradient(circle,#ffd88172 0,#e9a63f30 35%,transparent 68%)}
.promise{background:linear-gradient(90deg,transparent,#7435279c,transparent);border-color:#c59050a8;color:#f9deb0}
.bottom p{color:#e6c7ac}
.chest:nth-child(1) .chest-image{background-image:url('assets/chest-series-red.png')}
.chest:nth-child(2) .chest-image{background-image:url('assets/chest-series-gold.png')}
.chest:nth-child(3) .chest-image{background-image:url('assets/chest-series-purple.png')}
/* Palace-inspired art direction */
.page{background:#210914;padding-inline:clamp(16px,5vw,30px)}
.backdrop{background:linear-gradient(180deg,#1b0712a6 0%,#2609134d 43%,#24071365 72%,#16060bbe 100%),url('assets/palace.png') center/cover;filter:none}
.page:after{box-shadow:inset 0 0 55px #140409aa}
header{position:relative;z-index:2}
.brand{font-size:31px;color:#ffe6a0;text-shadow:0 0 12px #ffa731}
.brand span{font-family:Georgia,serif;font-size:10px;line-height:1.05;letter-spacing:.09em}
.info{width:37px;height:37px;background:linear-gradient(#6c132c,#330812);border:2px solid #ffd273;box-shadow:inset 0 0 0 2px #ab561d,0 2px 10px #160306;font-family:Georgia,serif;font-size:21px}
.hero{margin-top:clamp(5px,2vh,20px)}
.crown{font-size:clamp(52px,9vh,75px);color:#ffdc64;text-shadow:0 3px #bb5a17,0 0 20px #ffa428}
.eyebrow,.ribbon,.stage-label{font-family:Georgia,'Times New Roman',serif;font-weight:700;color:#ffdfa0;letter-spacing:.12em;text-shadow:0 2px #5c180e}
.eyebrow{display:table;margin:8px auto 0;padding:6px 25px;font-size:clamp(10px,2.8vw,14px);border:1px solid #d8a15b;background:linear-gradient(90deg,#310c1b,#5e1d25,#310c1b);box-shadow:inset 0 0 0 2px #200811,0 2px 10px #100006;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%)}
.hero h1{font-family:Georgia,'Times New Roman',serif;font-size:clamp(32px,9vw,58px);font-weight:900;font-style:italic;letter-spacing:-.04em;line-height:.95;color:#fff1bf;text-shadow:0 2px #ffd16d,0 4px #d67c22,0 6px #6c190c,0 9px 14px #170007;margin:12px 0}
.hero h1 em{color:#ffe69b}
.ribbon{display:table;margin:auto;padding:7px 28px;background:linear-gradient(90deg,#310816,#861b25,#310816);border:1px solid #ffcb70;box-shadow:inset 0 0 0 2px #651522,0 3px 12px #100006;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%);font-size:clamp(10px,2.7vw,14px)}
.hero p{font-family:Georgia,serif;font-style:italic;font-size:clamp(14px,3.5vw,19px);font-weight:700;color:#fff0cc;margin:12px 0;text-shadow:0 2px 6px #160006}
.stage{min-height:270px;justify-content:center}
.stage-label{position:relative;width:min(95%,390px);text-align:center;padding:10px 15px;border:1px solid #ffd27d;background:linear-gradient(90deg,#2e0b18,#631d24,#2e0b18);box-shadow:inset 0 0 0 2px #9f552e,0 4px 14px #160308;clip-path:polygon(5% 0,95% 0,100% 50%,95% 100%,5% 100%,0 50%);font-size:clamp(15px,4vw,21px)}
.chests{align-items:flex-end;margin:10px -4px 4px}
.chest:before{content:'';position:absolute;bottom:4%;left:2%;width:96%;height:15%;border:2px solid #ffe18a;border-radius:50%;background:radial-gradient(ellipse,#fff4ad,#e9a33b 45%,#79360b 72%);box-shadow:0 4px 0 #81370b,0 7px 16px #f1a52875}
.chest-image{z-index:1;inset:0 0 7%}
.hint{font-family:Georgia,serif;font-style:italic;font-size:clamp(14px,3.7vw,19px);font-weight:700;color:#fff0cd;margin-top:10px}
.bottom{max-width:430px}
.promise{position:relative;background:linear-gradient(90deg,#300b18ee,#591b25ee,#300b18ee);border:2px solid #d79b4e;box-shadow:inset 0 0 0 3px #4a1820,inset 0 0 0 4px #ab722e,0 4px 16px #140306;padding:12px 16px;color:#ffe2a3}
.promise b{font-family:Georgia,serif;font-size:clamp(15px,4vw,20px);letter-spacing:.06em}
.promise small{font-family:Georgia,serif;font-size:12px;font-style:italic;color:#fff0d4}
.bottom p{font-size:10px;color:#f0d5b8;margin:8px 0}
@media(max-height:700px){.hero{margin-top:0}.crown{font-size:40px}.hero h1{font-size:34px;margin:7px 0}.hero p{margin:7px}.stage{min-height:210px}.chests{margin:4px -4px}.promise{padding:8px 12px}}
/* Remove the individual pedestals beneath the chests. */
.chest:before{content:none}
