html{overflow-x:clip}
*{box-sizing:border-box}body{margin:0;background:#fff2d8;color:#8d211c;font-family:Arial,sans-serif;min-height:100svh;overflow-x:hidden}body:before{content:'';position:fixed;inset:12px;border:1px solid #d6a85c;pointer-events:none;z-index:-1}header{max-width:1200px;margin:auto;padding:40px 40px 10px;display:flex;justify-content:space-between;align-items:center}.brand{font-weight:800;letter-spacing:4px;font-size:23px;color:#176748;text-decoration:none}.brand span{display:block;font-size:8px;letter-spacing:1.7px;margin-top:8px}.season{font-size:10px;letter-spacing:3px;margin-right:100px}main{max-width:1120px;margin:36px auto 0;padding:0 40px 35px;display:grid;grid-template-columns:.9fr 1.1fr;align-items:center;gap:35px;min-height:650px}.eyebrow{font-size:10px;font-weight:700;letter-spacing:2.7px}h1{font-family:Georgia,serif;font-weight:400;font-size:clamp(60px,6vw,88px);line-height:1.04;margin:28px 0;color:#ab2820;letter-spacing:-3px}h1 em{color:#c47d24;font-weight:400}#description{font-size:15px;line-height:1.9;color:#87644d}.wish{display:flex;gap:18px;align-items:center;margin-top:38px;color:#bc8a36;font-size:40px}.wish span{font-family:Georgia,serif;font-size:19px;line-height:1.5;font-style:italic}.play{text-align:center}.wheel-shell{width:min(100%,490px);aspect-ratio:1;margin:auto;position:relative;border:13px solid #b52c24;border-radius:50%;padding:8px;box-shadow:0 0 0 2px #dbac53,0 0 0 8px #f3ca79,0 15px 0 #8d211c,0 24px 35px #952d232b;background:#f0c36e}.wheel{width:100%;height:100%;border-radius:50%;overflow:hidden;will-change:transform;transition:transform 6s cubic-bezier(.13,.65,.08,1)}.wheel svg{width:100%;height:100%;display:block}.pointer{position:absolute;z-index:5;left:calc(50% - 15px);top:-26px;width:30px;height:44px;background:#8d211c;clip-path:polygon(0 0,100% 0,50% 100%);filter:drop-shadow(0 2px 2px #0005)}.hub{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:84px;height:84px;border:5px solid #f4d491;border-radius:50%;background:#b52c24;color:#ffedb5;display:grid;place-content:center;font-family:Georgia,serif;font-size:23px;box-shadow:0 3px 8px #0003}.hub span{font-size:14px}button{cursor:pointer;background:#ae2d24;color:#fff2d8;border:1px solid #8b211a;border-radius:7px;padding:16px 45px;font-weight:700;font-size:16px;box-shadow:0 4px 0 #7c1b16;transition:opacity .2s}button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible{outline:3px solid #176748;outline-offset:6px}#spin{margin-top:36px;min-width:250px}#status{min-height:24px;line-height:1.5;font-size:14px;margin:16px 0 8px}small{font-size:11px;line-height:1.5;color:#8b6d55;display:block;max-width:320px;margin:auto}footer{text-align:center;letter-spacing:3px;font-size:9px;padding:20px 15px 30px;color:#94744e}.lantern{position:absolute;top:-15px;width:85px;height:108px;border:3px solid #d9a44d;background:repeating-linear-gradient(90deg,#be2a20 0 17px,#dd6b37 18px 20px);border-radius:45%;z-index:-1;transform-origin:top;animation:sway 5s ease-in-out infinite alternate}.lantern:before,.lantern:after{content:'';position:absolute;left:28px;width:25px;background:#e0ad4d;height:10px}.lantern:before{top:-5px}.lantern:after{bottom:-10px;height:35px;background:repeating-linear-gradient(90deg,#dda547 0 2px,transparent 2px 5px)}.lantern span{display:block;text-align:center;margin-top:42px;color:#ffe0a0;font-size:23px}.left{left:3%;top:130px;transform:scale(.7)}.right{right:5%}.flowers{position:absolute;bottom:12%;left:-20px;color:#e6ac32;font-size:110px;z-index:-1;transform:rotate(20deg)}.flowers span{font-size:60px;position:relative;top:65px;left:-25px}.cloud{position:absolute;background:#f6dbac;height:45px;width:150px;border-radius:70px;z-index:-1;opacity:.5}.cloud:before{content:'';position:absolute;background:inherit;border-radius:50%;height:65px;width:65px;left:30px;top:-27px}.cloud-one{top:180px;right:-30px}.cloud-two{bottom:75px;right:10%}dialog{border:2px solid #d5a350;border-radius:18px;background:#fff5df;color:#8d211c;width:min(440px,90vw);padding:35px;text-align:center;box-shadow:0 20px 100px #0004}dialog::backdrop{background:#401b16a6;backdrop-filter:blur(4px)}dialog h2{font-family:Georgia,serif;font-size:32px;font-weight:400}dialog strong{display:block;font-size:26px;margin:20px 0}dialog p{line-height:1.6;font-size:14px}.gift{display:block;font-size:70px;color:#d39e38}dialog button{margin-top:12px}#celebration{pointer-events:none;position:fixed;inset:0;overflow:hidden}#celebration i{position:absolute;width:7px;height:14px;top:-20px;animation:fall 3s ease-in forwards}.unregistered main{display:flex;min-height:65vh;text-align:center;justify-content:center}.unregistered .intro,.unregistered .wheel-shell,.unregistered #spin,.unregistered #rules{display:none}.unregistered #status{font-family:Georgia,serif;font-size:26px;max-width:650px;padding:30px;line-height:1.6}@keyframes fall{to{transform:translateY(105vh) rotate(700deg)}}@keyframes sway{to{rotate:6deg}}@media(max-width:750px){header{padding:32px 30px 0}.brand{font-size:19px}.season{display:none}main{display:flex;flex-direction:column;margin-top:28px;padding:0 28px 25px;gap:25px;min-height:0}.intro{text-align:center}h1{font-size:48px;line-height:1.05;margin:14px 0}h1 br{display:none}h1 em{display:block}#description{font-size:13px;margin-bottom:0}.wish{display:none}.play{width:100%;max-width:420px}.eyebrow{font-size:9px;letter-spacing:1.7px}.wheel-shell{border-width:9px;padding:5px;width:calc(100% - 14px)}.hub{width:64px;height:64px;font-size:19px}#spin{margin-top:27px}.right{right:10px;scale:.65}.left{left:-27px;top:200px;scale:.7}.flowers{bottom:100px;font-size:80px}footer{font-size:8px;letter-spacing:1.5px}}@media(prefers-reduced-motion:reduce){.lantern{animation:none}.wheel{transition-duration:.1s}#celebration{display:none}}

#petals{position:fixed;inset:0;pointer-events:none;overflow:hidden;z-index:4}#petals i{position:absolute;left:var(--x);top:-24px;width:var(--size);height:calc(var(--size)*1.35);border-radius:80% 15% 70% 25%;background:#ed9bb1;opacity:0;animation:petal-fall var(--duration) var(--delay) linear infinite}#petals .apricot{background:#e9bd38;border-radius:65% 40% 60% 35%}@keyframes petal-fall{0%{transform:translate3d(0,-20px,0) rotate(0);opacity:0}12%{opacity:.45}50%{transform:translate3d(calc(var(--drift)*.35),50vh,0) rotate(150deg);opacity:.55}90%{opacity:.4}100%{transform:translate3d(var(--drift),105vh,0) rotate(330deg);opacity:0}}
@media(max-width:750px){body:before{inset:8px}header{padding:23px 26px 0}.brand{font-size:16px;letter-spacing:3px}.brand span{font-size:6px;letter-spacing:1.4px}.right{top:-38px;right:7px;scale:.55}main{margin-top:22px;gap:20px;padding:0 22px 20px}h1{font-size:43px;letter-spacing:-1.8px;margin:12px 0}#description{font-size:12px;line-height:1.65}.wheel-shell{width:calc(100% - 16px)}#spin{width:calc(100% - 16px);min-height:52px;padding:14px 18px}#status{margin:12px 0 6px;font-size:13px;min-height:0}small{font-size:10px;max-width:285px}footer{padding:10px 20px 24px;font-size:7px}.flowers{font-size:65px;bottom:10%}.cloud-two{bottom:30px}.left{top:150px;scale:.5}#petals i:nth-child(n+11){display:none}}
@media(max-width:370px){h1{font-size:36px}main{padding-inline:16px;gap:15px}header{padding-top:20px}.eyebrow{font-size:8px}#description{font-size:11px}}
@media(prefers-reduced-motion:reduce){#petals{display:none}}

#result{max-height:90svh;overflow:auto}#prize-image{display:block;max-width:100%;width:220px;height:180px;object-fit:contain;margin:16px auto}#prize-image[hidden],.gift[hidden]{display:none}

.brand{display:block}.brand img{display:block;width:260px;max-width:100%;height:auto}.brand span{text-align:center;margin-top:0}@media(max-width:750px){.brand img{width:210px}}

/* Mobile: dành phần chiều cao còn lại cho vòng quay, kể cả trình duyệt trong app. */
@media(max-width:750px){
 html{height:100%;overflow:hidden}
 body{height:100svh;height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px)}
 header{flex:none;width:100%;padding:4px 20px 0;max-width:none}
 .brand img{width:clamp(150px,25vh,200px)}
 main{flex:1;min-height:0;width:100%;margin:0;padding:0 18px 12px;gap:4px}
 .intro{flex:none;width:100%}
 .intro .eyebrow{margin:2px 0;font-size:8px;letter-spacing:1.5px}
 h1{font-size:clamp(26px,5.2vh,42px);line-height:1.02;margin:5px 0 8px;letter-spacing:-1px;overflow-wrap:anywhere}
 .play{flex:1;min-height:0;max-width:440px;display:grid;grid-template-rows:minmax(0,1fr) auto auto auto;gap:6px;padding-bottom:4px}
 .wheel-space{min-height:0;width:100%;container-type:size;display:grid;place-items:center}
 .wheel-shell{width:min(calc(100cqw - 20px),calc(100cqh - 34px));margin:0;align-self:center;border-width:8px;padding:5px}
 .hub{width:54px;height:54px;font-size:16px;border-width:4px}.hub span{font-size:11px}
 #spin{margin:0 auto;width:calc(100% - 16px);min-height:44px;padding:10px 12px;font-size:14px}
 #status{margin:0;font-size:11px;line-height:1.3;min-height:0}#status:empty{display:none}
 #rules{font-size:9px;line-height:1.3;max-width:100%;padding:0 10px}
 footer{flex:none;padding:4px 12px 10px;font-size:7px;line-height:1.2}
 .unregistered main{min-height:0}.unregistered .wheel-space{display:none}.unregistered .play{display:flex;align-items:center;justify-content:center}.unregistered #status{font-size:20px;padding:16px}
}
@media(max-width:750px) and (max-height:500px){
 header{padding-top:0}.brand img{width:130px}
 .intro .eyebrow,footer{display:none}
 h1{font-size:24px;margin:0 0 4px}h1 em{display:inline}h1 em:before{content:' '}
 .play{gap:4px}#rules{font-size:8px}.hub{width:40px;height:40px;font-size:12px}.hub span{display:none}
}
