:root{color-scheme:dark;--gold:#ffdc92;--muted:#dab3a8;--border:#ffffff20}*{box-sizing:border-box}body{margin:0;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;color:#fff6e8;background:radial-gradient(ellipse at 50% 5%,#942d35 0,transparent 52%),radial-gradient(ellipse at 0 90%,#482332 0,transparent 50%),#200f1a;min-height:100vh}body:before{content:"";position:fixed;inset:0;pointer-events:none;background-image:radial-gradient(#efc68a40 1px,transparent 1px);background-size:48px 48px;opacity:.45}header,main{position:relative}header{max-width:1320px;margin:auto;padding:24px 32px;display:flex;align-items:center;gap:22px;border-bottom:1px solid var(--border)}header a{color:var(--gold);text-decoration:none;letter-spacing:3px;font-size:13px;font-weight:700}header span{color:var(--muted);font-size:13px;flex:1}main{max-width:1180px;margin:auto;padding:0 32px}.intro{text-align:center;padding:54px 0 32px}.eyebrow{letter-spacing:4px;font-size:11px;color:var(--gold)}h1{font-size:clamp(30px,4vw,58px);line-height:1.3;margin:15px 0;color:#ffe4af;letter-spacing:3px;overflow-wrap:anywhere}.intro p{color:var(--muted);letter-spacing:3px;font-size:15px}.stage{border:1px solid #e5b47055;border-radius:24px;background:linear-gradient(145deg,#7a2c3480,#301827e0);box-shadow:0 26px 70px #0003,inset 0 0 65px #dc8d2910;padding:28px 38px}.stage-top{display:flex;justify-content:space-between;gap:16px;align-items:center;color:var(--muted);font-size:14px}#prize-label{display:inline-block;padding:10px 24px;border-radius:30px;border:1px solid #e9bd7150;color:var(--gold);font-weight:700;font-size:19px;overflow-wrap:anywhere}.display{min-height:220px;display:flex;align-items:center;justify-content:center;gap:18px;flex-wrap:wrap;padding:25px 0}.welcome{text-align:center}.star{color:var(--gold);font-size:42px}.welcome h2{font-size:clamp(24px,3vw,38px);margin:14px}.welcome p{color:var(--muted);font-size:14px}.winner{padding:24px 28px;border:1px solid #ffd78b80;background:#a4483838;border-radius:14px;min-width:165px;text-align:center;max-width:100%;overflow-wrap:anywhere}.winner small{display:block;font-size:11px;letter-spacing:2px;color:var(--gold);margin-bottom:9px}.winner strong{font-size:clamp(25px,3vw,44px)}.rolling .winner{border-color:#ffdc9235}.celebrate .winner{animation:reveal .5s ease both}@keyframes reveal{from{transform:scale(.92);opacity:.2}to{transform:scale(1);opacity:1}}#message{text-align:center;color:var(--muted);font-size:13px;min-height:20px;line-height:1.7}.draw-controls{display:flex;align-items:center;justify-content:center;gap:16px;flex-wrap:wrap}.draw-controls label{color:var(--muted);font-size:14px}input#batch{width:65px;padding:10px;margin:0 6px}button,.file-button{border:1px solid #ffdc9238;background:#ffffff08;color:#ffe5bb;border-radius:10px;padding:12px 18px;font:inherit;font-size:13px;cursor:pointer;transition:background .15s}button:hover,.file-button:hover{background:#ffffff16}button:disabled{opacity:.45;cursor:not-allowed}.primary{background:linear-gradient(110deg,#ffe2a4,#efbe6d);border:0;color:#4a2325;font-weight:800;padding:15px 36px;font-size:17px;box-shadow:0 5px 22px #efbe6d22}.primary:hover{background:#ffe2a4}.primary:disabled{box-shadow:none}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,.file-button:focus-within{outline:2px solid #ffe2a4;outline-offset:3px}.hint{text-align:center;color:#c4998e;font-size:11px;margin:20px 0 0}.history{padding:36px 0}.section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.section-head h2{margin:10px 0;font-size:24px}.section-head button{margin:5px 0 5px 6px}.empty{text-align:center;color:var(--muted);font-size:14px;padding:30px;border:1px dashed var(--border);border-radius:14px}.history-group{border:1px solid var(--border);background:#ffffff05;border-radius:14px;padding:20px;margin-top:16px}.history-group h3{color:var(--gold);margin:0 0 16px;font-size:16px}.history-names{display:flex;flex-wrap:wrap;gap:10px}.history-names span{background:#ffffff08;padding:8px 14px;border-radius:8px;overflow-wrap:anywhere;max-width:100%}footer{text-align:center;color:#b78d86;font-size:12px;line-height:2;padding:10px 0 35px}dialog{width:min(620px,calc(100% - 28px));max-height:90vh;background:#321a26;color:#fff6e8;border:1px solid #e5b47066;border-radius:18px;padding:24px 28px}dialog::backdrop{background:#100813b5;backdrop-filter:blur(6px)}form>label{display:block;font-size:14px;margin:18px 0}form label span{font-size:11px;color:var(--muted);display:block;margin:6px 0}input,textarea,select{font:inherit;color:#fff6e8;background:#190e18;border:1px solid #ffffff26;border-radius:8px;padding:11px;width:100%}form input,textarea,select{display:block;margin-top:8px}textarea{resize:vertical;line-height:1.8}.file-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.file-row span,.note{color:var(--muted);font-size:11px;line-height:1.8}.note{margin:16px 0}#form-error{color:#ffacac;font-size:13px}form>.primary{width:100%}.file-button{display:block}body:fullscreen{overflow:auto}@media(max-width:600px){header{padding:18px;gap:10px}header a{font-size:10px;letter-spacing:1px}header span{display:none}header button{margin-left:auto}main{padding:0 16px}.intro{padding:32px 0 20px}.stage{padding:20px 16px;border-radius:18px}.stage-top{font-size:11px;align-items:flex-start}#prize-label{font-size:16px;padding:8px 16px}.display{min-height:200px}.draw-controls{gap:12px}.draw-controls .primary{min-width:170px}.winner{min-width:125px;padding:18px}.section-head h2{font-size:21px}.section-head button{font-size:11px;padding:10px}.history{padding-top:26px}dialog{padding:20px}h1{letter-spacing:1px}.intro p{font-size:12px;letter-spacing:1px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
.sound-settings{margin:22px 0;padding:16px;border:1px solid var(--border);border-radius:12px;min-width:0}.sound-settings legend{color:var(--gold);font-size:14px;padding:0 8px}.sound-row{display:flex;align-items:center;gap:12px;margin:16px 0}.sound-row label{flex:1;min-width:0;font-size:13px}.sound-row input{font-size:11px;padding:9px;width:100%}.sound-row span{font-size:11px;color:var(--muted);display:block;margin-top:6px}.sound-row button{flex:none;padding:9px 12px}.sound-settings>label{display:block;font-size:13px}.sound-settings input[type=range]{accent-color:var(--gold);padding:0;border:0}.sound-actions{display:flex;gap:10px;margin-top:12px}#audio-status{color:var(--muted);font-size:11px;line-height:1.7;overflow-wrap:anywhere}#volume-value{float:right}header #sound-toggle{font-size:12px;white-space:nowrap}@media(max-width:600px){header{gap:6px}header button{padding:10px;font-size:11px}header #sound-toggle{font-size:11px}header #sound-toggle+button{margin-left:0}.sound-row{gap:8px}}
.lottery-brand{flex:1;color:var(--gold);font-size:18px;font-weight:600;letter-spacing:1px;line-height:1.5;white-space:nowrap}@media(max-width:600px){.lottery-brand{font-size:12px;letter-spacing:0}header button{margin-left:0}}
.template-link{text-decoration:none;text-align:center}
.intro{padding:26px 0 24px}.intro h1{font-size:clamp(28px,3.4vw,46px);margin:12px 0}.intro p{margin-bottom:0}.display{position:relative;isolation:isolate;min-height:340px;padding:22px 0;gap:20px}.display:before,.display:after{content:"";position:absolute;z-index:-1;pointer-events:none;left:50%;top:50%;width:420px;height:300px;max-width:90%;border-radius:50%;transform:translate(-50%,-50%)}.display:before{border:1px solid #ffd68a25;box-shadow:0 0 65px #ffbe5310,inset 0 0 55px #ffbe530a}.display:after{width:460px;height:330px;border:1px dashed #ffd68a25}.rolling:after{animation:orbit 18s linear infinite}.winner{--row-height:76px;position:relative;background:linear-gradient(145deg,#f8ca6a0c,#28132260);padding:22px 22px 14px;min-width:0;width:calc(33.333% - 14px);border-radius:20px;border:1px solid #ffd78b55;box-shadow:0 14px 38px #18081230;overflow:hidden}.winner small{margin:0 0 8px;font-size:10px;letter-spacing:2px}.reel-window{height:calc(var(--row-height)*3);overflow:hidden;position:relative}.reel-window:before,.reel-window:after{content:"";position:absolute;left:0;right:0;z-index:2;height:30%;pointer-events:none}.reel-window:before{top:0;background:linear-gradient(#55262c55,transparent)}.reel-window:after{bottom:0;background:linear-gradient(transparent,#30162566)}.reel-track{display:grid;grid-auto-rows:var(--row-height)}.reel-name{display:flex;align-items:center;justify-content:center;min-width:0;overflow-wrap:anywhere;line-height:1.15}.winner .primary-name{font-size:clamp(28px,3vw,48px);font-weight:800;color:#fff0c9;text-shadow:0 2px 20px #eeb95930}.ghost-name{font-size:22px;color:#ffc783;opacity:.25;filter:blur(1px);font-weight:600}.rolling .reel-track{animation:reel-step .18s ease-out both}.celebrate .ghost-name{color:var(--gold);opacity:.45;filter:none}.celebrate .winner{border-color:#ffe3a5;box-shadow:0 0 55px #eeb34c24,inset 0 0 40px #f5c46b0b}.single .winner{--row-height:86px;width:min(80%,660px);padding:24px 38px 14px}.single .winner .primary-name{font-size:clamp(60px,6.8vw,104px);letter-spacing:2px}.single .ghost-name{font-size:30px}.single .winner small{font-size:12px;letter-spacing:3px}.winner .long-name,.single .winner .long-name{font-size:clamp(16px,2vw,30px);letter-spacing:0;word-break:break-all}.compact .winner{--row-height:52px;padding:16px 12px;width:calc(25% - 15px)}.compact .winner .primary-name{font-size:28px}.compact .ghost-name{font-size:16px}.compact .winner small{font-size:8px;letter-spacing:1px}.welcome h2{font-size:clamp(28px,3.5vw,44px)}@keyframes reel-step{from{transform:translateY(-18px);opacity:.6}to{transform:translateY(0);opacity:1}}@keyframes orbit{to{transform:translate(-50%,-50%) rotate(360deg)}}@media(min-width:1500px){main{max-width:1400px}.display{min-height:390px}.single .winner{--row-height:100px;width:740px}.single .winner .primary-name{font-size:112px}.single .winner .long-name{font-size:32px}}@media(max-width:600px){.intro{padding:24px 0 20px}.intro h1{font-size:28px}.display{min-height:310px;padding:20px 0;gap:12px}.single .winner{--row-height:76px;width:100%;padding:18px 14px 12px}.single .winner .primary-name{font-size:54px;letter-spacing:1px}.single .winner .long-name{font-size:16px;letter-spacing:0}.single .ghost-name{font-size:24px}.single .winner small{font-size:9px;letter-spacing:1px}.multiple .winner,.compact .winner{--row-height:48px;width:calc(50% - 6px);padding:14px 8px}.multiple .winner .primary-name,.compact .winner .primary-name{font-size:28px}.multiple .winner .long-name,.compact .winner .long-name{font-size:14px}.multiple .ghost-name{font-size:16px}.multiple .winner small{font-size:8px;letter-spacing:0}.display:before{width:250px;height:270px}.display:after{width:290px;height:290px}}@media(prefers-reduced-motion:reduce){.rolling:after,.rolling .reel-track{animation:none}.ghost-name{filter:none}}
.stage-top #prize-label{flex-shrink:0;max-width:50%}.stage-top #remaining{min-width:0;text-align:right}
.draw-controls .speed-label{display:flex;align-items:center;gap:8px}.draw-controls #speed{width:88px;margin:0;padding:10px;font-size:13px}.rolling .reel-track{animation:reel-step var(--roll-time,153ms) ease-out both}.winner .primary-name{white-space:normal;word-break:break-word}.ghost-name{overflow:hidden;white-space:nowrap}@media(max-width:600px){.draw-controls{column-gap:14px;row-gap:12px}.draw-controls #speed{padding:9px}}
.lottery-layout{display:grid;grid-template-columns:minmax(0,1fr) clamp(220px,19vw,280px);gap:20px;align-items:stretch}.lottery-layout .stage{min-width:0}.lottery-layout .history{min-width:0;padding:20px 16px;border:1px solid #e5b47038;border-radius:20px;background:#381b2570;display:flex;flex-direction:column}.history .section-head{gap:8px}.history .section-head h2{font-size:22px;margin:8px 0}.history .eyebrow{font-size:9px;letter-spacing:2px}.history .section-head>div:last-child{display:flex;width:100%;gap:8px}.history .section-head button{font-size:11px;padding:10px 8px;margin:0;flex:1;white-space:nowrap}.history #history{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#e5b47055 transparent;padding-right:3px;margin-top:14px;position:relative}.history .history-group{padding:14px 12px;margin:0 0 12px;border-radius:12px}.history .history-group h3{font-size:13px;line-height:1.6;margin-bottom:10px}.history .history-names{gap:7px}.history .history-names span{font-size:14px;padding:7px 10px;flex:1 0 100%;line-height:1.5}.history .empty{font-size:12px;padding:24px 12px;line-height:1.8;margin:0}.history:focus-within{border-color:#e5b47070}@media(min-width:1024px) and (min-height:600px){body{height:100svh;min-height:0;display:flex;flex-direction:column;overflow:hidden}header{width:100%;max-width:1600px;flex:none;padding:14px 26px}main{max-width:1600px;width:100%;min-height:0;flex:1;display:flex;flex-direction:column;padding:0 26px}.intro{flex:none;padding:14px 0 18px}.intro h1{font-size:clamp(28px,3vw,40px);margin:8px 0}.intro p{font-size:13px;line-height:1.5;margin-top:6px}.intro .eyebrow{font-size:10px;letter-spacing:3px}.lottery-layout{flex:1;min-height:0}.lottery-layout .stage{display:flex;flex-direction:column;min-height:0;padding:20px 24px}.stage-top{flex:none}.stage .display{flex:1;min-height:0;padding:12px 0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.stage #message{flex:none;font-size:12px;margin:10px 0}.stage .draw-controls{flex:none;gap:12px}.stage .draw-controls label{font-size:12px}.stage .draw-controls .primary{font-size:16px;padding:13px 28px}.stage .hint{flex:none;margin-top:12px;font-size:10px}.single .winner{--row-height:clamp(58px,9vh,96px);width:min(86%,740px);padding:18px 28px 10px}.single .winner .primary-name{font-size:clamp(56px,6.8vw,104px)}.single .winner small{font-size:11px;letter-spacing:2px}.single .ghost-name{font-size:26px}.display:before{height:260px}.display:after{height:290px}footer{flex:none;padding:8px 0 10px;font-size:10px;line-height:1.5}footer br{display:none}}@media(max-width:1023px),(max-height:599px){.lottery-layout{grid-template-columns:minmax(0,1fr)}.lottery-layout .history{margin-top:4px}.history #history{max-height:340px}.history .section-head>div:last-child{width:auto}.history .section-head button{padding:10px 12px}.history .history-names span{flex:0 1 auto}.history .section-head{justify-content:space-between}.history .history-group{padding:16px}.history .empty{padding:24px}.lottery-layout{gap:20px}}
@media(min-width:1024px) and (min-height:600px) and (max-height:760px){.intro{padding:10px 0 12px}.intro .eyebrow,.intro p{display:none}.intro h1{font-size:30px;margin:4px 0}.lottery-layout .stage{padding:16px 20px}.stage #message{margin:8px 0}.stage .hint{margin-top:8px}.single .winner{--row-height:60px;padding:14px 24px 8px}.single .winner .primary-name{font-size:68px}.single .ghost-name{font-size:22px}.display:before{height:190px}.display:after{height:230px}.stage .draw-controls button{padding:10px 16px}.stage .draw-controls .primary{padding:11px 22px}.stage .draw-controls{gap:8px}}
@media(min-width:1024px) and (min-height:600px){.lottery-layout{grid-template-rows:minmax(0,1fr)}.lottery-layout .history{min-height:0;overflow:hidden}.stage .display.multiple{align-items:flex-start;align-content:flex-start}}
#prize-dialog{width:min(560px,calc(100% - 28px))}#prize-options{display:grid;gap:12px;margin-top:18px}.prize-option{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;text-align:left;padding:18px;background:#ffffff06}.prize-option strong{font-size:18px;overflow-wrap:anywhere}.prize-option span{font-size:12px;color:var(--muted);grid-row:2;line-height:1.7}.prize-option em{grid-column:2;grid-row:1 / 3;align-self:center;font-style:normal;font-size:11px;color:var(--gold);padding:6px 10px;border-radius:16px;background:#fbd08412}.prize-option[aria-current=true]{border-color:#fbd084;background:#fbd08410}.prize-option:hover{border-color:#fbd08485}@media(max-width:600px){.stage-top #prize-label{padding:8px 10px;max-width:58%}.prize-option{padding:14px}.prize-option strong{font-size:16px}.prize-option span{font-size:11px}}
#next-prize[hidden]{display:none!important}.check-label{display:flex;align-items:center;gap:10px}.check-label input{width:auto;margin:0}.history-record{max-width:100%;min-width:0}.history-record small{display:block;color:var(--muted);font-size:10px;margin:5px 0}.history-names .forfeited{text-decoration:line-through;opacity:.55}#manage-dialog{width:min(760px,calc(100% - 28px))}#manage-results{max-height:32vh;overflow-y:auto}.manage-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--border)}.manage-row span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13px}.manage-row button{flex-shrink:0;font-size:11px;padding:9px}#manage-dialog label{display:block;font-size:13px;margin:14px 0}#roster-check p{margin:6px 0}#save-status,#manage-status{font-size:12px;color:var(--gold);line-height:1.8}body.simple-mode .intro,body.simple-mode footer{display:none}body.simple-mode header{min-height:60px}body.simple-mode .lottery-layout{margin-top:18px}body.simple-mode .hint,body.simple-mode #message{visibility:hidden}body.simple-mode .lottery-layout{height:calc(100dvh - 100px)}body.simple-mode.controls-hidden header button,body.simple-mode.controls-hidden .draw-controls,body.simple-mode.controls-hidden .history .section-head button{opacity:0;pointer-events:none}body.simple-mode .draw-controls{transition:opacity .25s}body.simple-mode .stage{position:relative}body.simple-mode.controls-hidden{cursor:none}body.simple-mode:has(dialog[open]){cursor:auto}body.simple-mode:has(dialog[open]) .draw-controls{opacity:1;pointer-events:auto}@media(max-width:1023px){body.simple-mode .lottery-layout{height:auto}body.simple-mode header{flex-wrap:wrap}#next-prize{max-width:100%}}@media(max-width:600px){header{flex-wrap:wrap}.manage-row{align-items:flex-start;flex-direction:column}.history-record small{font-size:10px}}
.history .section-head>div:last-child{flex-wrap:wrap}.history .section-head #manage-open{flex-basis:100%;white-space:normal}.history-record{flex:1 0 100%}.history-record>span{display:block}.history-record small{line-height:1.6}body.simple-mode main{padding-bottom:16px}body.simple-mode .lottery-layout{height:auto}
@media(min-width:1024px) and (min-height:600px){header,main{max-width:none}.stage .display.single{container-type:size;overflow:hidden}.stage .single .winner{width:94%;--row-height:clamp(36px,calc((86cqh - 64px)/3),190px);padding:22px 32px 16px}.stage .single .winner .primary-name{font-size:clamp(40px,min(14cqw,23cqh),190px);line-height:1.08;letter-spacing:2px}.stage .single .winner small{font-size:clamp(11px,1.3cqw,18px);margin-bottom:8px;line-height:1.5}.stage .single .ghost-name{font-size:clamp(20px,5cqh,40px)}.stage .display.single:before{width:78cqw;height:68cqh;max-width:none}.stage .display.single:after{width:84cqw;height:76cqh;max-width:none}}
