#lotteryLiveStage{position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:20px;border:1px solid #ba9050;border-radius:0;background:radial-gradient(ellipse at 25% 40%,#4a1757,#100919 65%);color:#f8e4bd;overflow:hidden;box-sizing:border-box;font-family:var(--ui-font);grid-template-rows:70px minmax(0,1fr) 48px;gap:14px;align-content:stretch;place-items:stretch}
#lotteryLiveStage[open]{display:grid}#lotteryLiveStage:not([open]){display:none}#lotteryLiveStage::backdrop{background:#09040def}
#lotteryLiveStage button{min-height:42px;padding:7px 16px;background:linear-gradient(#5c356b,#291332);border:1px solid #d9b675;color:#fff0c3;font:700 15px var(--ui-font)}#lotteryLiveStage button::before,#lotteryLiveStage button::after{display:none}
.ld-header,.ld-footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.ld-header small{color:#bba0c5;font-size:12px}.ld-header h2{font:800 32px var(--ui-font);margin:0!important;color:#ffe29a!important;text-shadow:0 2px #8c5524}.ld-actions{display:flex;gap:10px}.ld-footer{font-size:14px;color:#c5b3cc}
.ld-scene{position:relative;min-height:0;display:grid;grid-template-columns:26% minmax(0,1fr);gap:20px;isolation:isolate}
.ld-performer{min-height:0;position:relative;display:grid;grid-template-rows:minmax(0,1fr) 100px 26px;text-align:center;align-items:center;color:#f4ca75;font-weight:800}
.ld-character{height:100%;min-height:0;container-type:size;position:relative}.ld-character::before{content:'';position:absolute;width:min(100cqw,100cqh);aspect-ratio:1;bottom:0;left:50%;transform:translateX(-50%);background:url('/assets/ui/fortune-character-poses-v1.png') 0 0/300% 200%;filter:drop-shadow(0 0 16px #b95fec55)}
#lotteryLiveStage[data-pose=prepare] .ld-character::before{background-position:50% 0}#lotteryLiveStage[data-pose=throw] .ld-character::before{background-position:100% 0}#lotteryLiveStage[data-pose=celebrate] .ld-character::before{background-position:0 100%}#lotteryLiveStage[data-pose=bow] .ld-character::before{background-position:100% 100%}
.ld-deck{height:90px;position:relative;margin:auto;transform:rotate(-12deg);aspect-ratio:.64;border-radius:6px;box-shadow:4px 4px #76502c,8px 8px #302035}.ld-deck img{width:100%;height:100%;object-fit:contain}.ld-result{min-width:0;min-height:0;display:grid;grid-template-rows:48px minmax(0,1fr) minmax(100px,.7fr);gap:14px}
#lotteryLiveStatus{margin:0!important;font:800 24px var(--ui-font)!important;color:#f3d598!important;text-align:center;align-self:center}
.ld-slots{min-height:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:minmax(0,1fr);gap:12px;align-items:stretch}
.ld-slot{min-width:0;min-height:0;border:1px solid #cfac6b;border-radius:10px;background:#0c0716a8;display:grid;grid-template-rows:minmax(0,1fr);place-items:center;position:relative;padding:8px}.ld-slot>small{position:absolute;top:4px;left:6px;color:#ba9ec5}.ld-card-placeholder{font-size:40px;color:#745080}.ld-slot .lottery-playing-card{width:auto;height:100%;max-width:100%;max-height:220px;min-width:0;min-height:0}.ld-slot img{object-fit:contain}
#ldSummary{min-height:0;text-align:center;display:flex;flex-direction:column;justify-content:center;gap:8px}#ldSummary>strong{color:#ffdfa2;font-size:19px}#ldSummary p{margin:0;font-size:15px;color:#cbb9d2}
.ld-best-ticket{min-height:0;display:flex;align-items:center;justify-content:center;gap:8px}.ld-best-ticket>span:first-child{font-size:12px}.ld-best-ticket .lottery-playing-card{height:80px;width:auto;min-height:0;max-height:100%}
#ldFx{position:absolute;inset:0;z-index:5;pointer-events:none;overflow:hidden}.ld-flying{position:absolute;perspective:700px}.ld-flip{width:100%;height:100%;position:relative;transform-style:preserve-3d}.ld-flip img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;backface-visibility:hidden}.ld-front{transform:rotateY(180deg)}.ld-spark{position:absolute;width:5px;height:5px;border-radius:50%;background:#ffdc6f;box-shadow:0 0 6px #ffe19b}
@media(max-height:650px) and (orientation:landscape){
 #lotteryLiveStage{padding:8px;grid-template-rows:42px minmax(0,1fr) 34px;gap:6px}.ld-header small{font-size:9px}.ld-header h2{font-size:21px}.ld-actions{gap:6px}#lotteryLiveStage button{min-height:32px;font-size:11px;padding:4px 10px}.ld-footer{font-size:10px}
 .ld-scene{grid-template-columns:20% minmax(0,1fr);gap:8px}.ld-performer{grid-template-rows:minmax(0,1fr) 50px 16px;font-size:10px}.ld-deck{height:45px}.ld-result{grid-template-rows:30px minmax(0,1fr) minmax(80px,.85fr);gap:6px}#lotteryLiveStatus{font-size:15px!important}.ld-slots{gap:5px}.ld-slot{padding:5px;border-radius:6px}.ld-slot>small{font-size:9px;left:2px;top:1px}.ld-card-placeholder{font-size:22px}
 #ldSummary{gap:4px}#ldSummary>strong{font-size:12px}#ldSummary p{font-size:10px}.ld-best-ticket{gap:4px}.ld-best-ticket>span:first-child{font-size:9px}.ld-best-ticket .lottery-playing-card{height:40px}
}
@media(prefers-reduced-motion:reduce){#lotteryLiveStage *{animation:none!important}}
.ld-header h2{line-height:1.15}.ld-header small{display:block;line-height:1.2}
#lotteryLiveStage .lottery-playing-card{grid-template-rows:minmax(0,1fr);aspect-ratio:.64}
#lotteryLiveStage .lottery-playing-card img{min-width:0;min-height:0}
.ld-best-ticket>span:not(.lottery-playing-card){font-size:12px;min-width:85px}.ld-best-ticket small{display:block;font-size:10px;color:#d5c0df}
#lotteryLiveStage .ld-best-ticket button{padding:2px 8px;min-width:30px;min-height:32px;font-size:20px}
@media(max-height:650px) and (orientation:landscape){.ld-best-ticket>span:not(.lottery-playing-card){min-width:65px;font-size:9px}.ld-best-ticket small{font-size:8px}#lotteryLiveStage .ld-best-ticket button{min-width:26px;padding:2px 6px}}
#lotteryProof{width:min(900px,96vw);max-width:none;max-height:none;height:min(590px,96dvh);padding:22px;border:1px solid #c9a16c;border-radius:16px;background:linear-gradient(130deg,#3c1b49,#110d19);color:#e9d9be;overflow:hidden;box-sizing:border-box;grid-template-rows:auto auto minmax(0,1fr) auto;gap:14px}
#lotteryProof[open]{display:grid}#lotteryProof::backdrop{background:#07030cda}#lotteryProof header{display:flex;align-items:center;justify-content:space-between}#lotteryProof h2{font:800 25px/1.1 var(--ui-font);color:#ffe3a3;margin:5px 0}#lotteryProof header small{font-size:11px}#lotteryProof p{font:700 17px/1.2 var(--ui-font);margin:0}#lotteryProof[data-valid=true] #lpStatus{color:#b9eaa0}#lotteryProof[data-valid=false] #lpStatus{color:#ffd093}#lotteryProof button{min-width:36px;min-height:36px;padding:4px 10px;background:#492550;color:#ffe3a4}
#lpData{min-height:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));gap:10px}#lpData article{min-width:0;min-height:0;border-bottom:1px solid #806046;padding:8px}#lpData small{display:block;font-size:12px;color:#c2accc;margin-bottom:7px}#lpData code{display:block;overflow-wrap:anywhere;font:12px/1.4 monospace}#lotteryProof footer{font:12px/1.3 var(--ui-font);color:#baaac3}
@media(max-height:650px) and (orientation:landscape){#lotteryProof{padding:10px;gap:7px}#lotteryProof h2{font-size:19px;margin:1px 0}#lotteryProof p{font-size:12px}#lpData{gap:5px}#lpData article{padding:3px}#lpData small{font-size:9px;margin-bottom:2px}#lpData code{font-size:10px;line-height:1.15}#lotteryProof footer{font-size:9px}}
