/* Lottery reference: independent desktop / landscape composition. */
#lottery .lottery-reward-guide-pending{grid-column:1/-1}
#lottery .lottery-replay{min-height:28px;font-size:11px;padding:3px 10px;background:#492550;color:#ffe3a4;border-color:#ac8751}
#lottery .lottery-own-tickets{min-height:28px;padding:3px 8px;font-size:11px;background:#24152f;color:#efcc87;border-color:#997648}
#lottery .lottery-filter-button{min-height:32px;padding:4px 12px;font-size:12px;background:#382047;color:#f5d99c;border-color:#ac8751}
#lottery .lottery-archive-card.lottery-cancelled header>b{color:#efc88c}#lottery .lottery-cancel-note{grid-column:1/-1;color:#d6bddb;justify-content:center;font-size:12px}
#lotteryHistoryFilters{width:min(560px,96vw);height:min(370px,94dvh);max-width:none;max-height:none;padding:20px;border:1px solid #c8a16a;border-radius:14px;background:linear-gradient(130deg,#492452,#110b1c);color:#f2dbb6;overflow:hidden;box-sizing:border-box}#lotteryHistoryFilters::backdrop{background:#090311dd}#lotteryHistoryFilters form{height:100%;display:grid;grid-template-rows:48px minmax(0,1fr) minmax(0,1fr) 40px;gap:12px}#lotteryHistoryFilters header,#lotteryHistoryFilters footer{display:flex;justify-content:space-between;align-items:center;gap:10px}#lotteryHistoryFilters h2{font:800 26px/1.1 var(--ui-font);color:#ffe4a6;margin:0}#lotteryHistoryFilters label{display:grid;gap:5px;font:14px/1.2 var(--ui-font);align-content:center}#lotteryHistoryFilters select{min-height:38px;font:14px var(--ui-font);color:#ffe9c2;background:#302039;border:1px solid #b88f57;border-radius:7px;padding:5px;width:100%}#lotteryHistoryFilters button{min-height:36px;padding:6px 14px;font:700 14px/1.15 var(--ui-font);background:#4b2b56;color:#ffe0a0;border:1px solid #c9a063}
@media(max-height:650px) and (orientation:landscape){#lotteryHistoryFilters{padding:12px;height:286px}#lotteryHistoryFilters form{grid-template-rows:34px minmax(0,1fr) minmax(0,1fr) 34px;gap:8px}#lotteryHistoryFilters h2{font-size:20px}#lotteryHistoryFilters label,#lotteryHistoryFilters select{font-size:12px}#lotteryHistoryFilters select{min-height:32px}#lotteryHistoryFilters button{font-size:12px;min-height:32px}}
#lottery [data-lottery-panel=history] .lottery-empty{gap:6px;padding:10px}#lottery [data-lottery-panel=history] .lottery-empty>span{font-size:26px}#lottery [data-lottery-panel=history] .lottery-empty strong{font-size:18px}#lottery [data-lottery-panel=history] .lottery-empty p{font-size:12px;margin:2px}#lottery [data-lottery-panel=history] .lottery-empty button{min-height:30px;padding:4px 12px;font-size:12px}
#lottery .lottery-history-actions{display:flex;gap:6px}#lottery .lottery-proof-button{min-height:28px;font-size:11px;padding:3px 8px;background:#271c36;color:#ffe3a4;border-color:#ac8751}
#lottery .lottery-orientation-note .shared-brand{display:none}
#lottery .lottery-shell{font-family:var(--ui-font),sans-serif;border-color:#8c673b;border-radius:14px;grid-template-rows:112px minmax(0,1fr) 70px;padding:12px;gap:10px}
#lottery button::before,#lottery button::after{display:none!important}#lottery button{line-height:1.2;animation:none!important;transform:none}#lottery .lottery-back{width:44px;padding:0}
#lottery[data-tab=rules] .lottery-header{display:none}#lottery[data-tab=rules] .lottery-shell{grid-template-rows:minmax(0,1fr) 70px}
#lottery .lottery-quantity button{padding:0}
#lottery .lottery-jackpot,#lottery .lottery-draw-summary,#lottery .lottery-sales{min-height:0}
#lottery .lottery-header{grid-template-columns:44px minmax(140px,.7fr) minmax(250px,1.5fr) minmax(200px,1fr) minmax(200px,1fr);text-align:center;gap:8px}
#lottery .lottery-brand{justify-content:center}#lottery .lottery-brand span{margin:0;gap:5px}#lottery .lottery-brand strong{font-family:var(--ui-font);font-size:30px}#lottery .lottery-brand small{font-size:16px}
#lottery .lottery-jackpot.safe-prize strong{font-size:clamp(18px,2vw,32px);overflow:visible;white-space:normal}
#lottery .lottery-jackpot em{font-size:12px}#lottery .lottery-jackpot{box-shadow:inset 0 1px #fbe2a355;border-color:#bf8b4a}
#lottery .lottery-draw-panel{grid-template-columns:minmax(0,1fr) 29%;gap:10px}
#lottery .lottery-picker{grid-template-rows:43% minmax(0,1fr)}
#lottery .lottery-joker-art{background:url('/assets/ui/fortune-character-poses-v1.png') 0 0/300% 200% no-repeat;mix-blend-mode:normal;right:0;bottom:0;width:24%;height:90%;filter:drop-shadow(0 0 10px #b14ace55)}
#lottery .lottery-slots{width:75%;gap:8px}#lottery .lottery-slots>button{border-color:#d2a0dc}#lottery .lottery-slots>button .lottery-playing-card{width:auto;height:100%;max-width:100%;max-height:100%}
#lottery .lottery-slots,#lottery .lottery-slots>button{grid-template-rows:minmax(0,1fr)}#lottery .lottery-slots>button .lottery-playing-card{min-width:0;min-height:0}
#lottery .lottery-slots-card>header{position:relative;z-index:2}
#lottery .lottery-joker-art{background:none;height:calc(100% - 24px);container-type:size}
#lottery .lottery-joker-art::before{content:"";position:absolute;bottom:0;right:0;width:min(100cqw,100cqh);aspect-ratio:1;background:url('/assets/ui/fortune-character-poses-v1.png') 0 0/300% 200% no-repeat}
#lottery .lottery-playing-card img{object-fit:contain}
#lottery .lottery-deck>button{position:relative;gap:8px;padding:3px 5px;font:800 clamp(18px,2vw,32px)/1 Georgia,serif;transition:transform .16s,box-shadow .16s}
#lottery .lottery-deck>button b{font:inherit}#lottery .lottery-deck>button i{font-size:inherit}#lottery .lottery-deck>button img{width:auto;max-width:34%;height:100%;object-fit:contain;border-radius:2px}
#lottery .lottery-purchase-card{grid-template-rows:28px 48px 44px auto auto minmax(55px,1fr) auto auto;gap:6px;padding:10px;overflow:hidden}
#lottery .lottery-purchase-card>header{justify-content:center;font-size:14px}#lottery .lottery-quantity{grid-template-columns:48px 1fr 48px;padding-bottom:0}#lottery .lottery-quantity button{min-height:40px}
#lottery .lottery-autopick{min-height:40px;font-size:14px}#lottery .lottery-packages span{font-size:11px}#lottery .lottery-packages button{min-height:26px}
#lottery .lottery-price>span,#lottery .lottery-total>span{font-size:12px}#lottery .lottery-price>strong{font-size:25px}#lottery .lottery-price>strong small{font-size:13px}
#lottery .lottery-total>strong{font-size:28px}#lottery .lottery-total>strong small{font-size:14px}#lottery .lottery-buy{min-height:55px;font-size:18px}#lottery .lottery-limit,#lottery .lottery-message{font-size:11px;line-height:1.25;min-height:0}
#lottery .lottery-buy{align-self:end;height:74px;align-content:center;gap:6px}#lottery .lottery-packages button{padding:1px}
#lottery .lottery-tabs button{grid-template-columns:40px 1fr;padding:8px 14px}#lottery .lottery-tabs button strong{font-size:16px}#lottery .lottery-tabs button small{font-size:12px}
#lottery [data-lottery-panel=tickets]{grid-template-rows:auto minmax(0,1fr) 42px}
#lottery [data-lottery-panel=history]{grid-template-rows:auto minmax(0,1fr) 42px}
#lottery .lottery-history-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr);overflow:hidden;padding:0;align-content:stretch}
#lottery .lottery-archive-card{display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;min-height:0;gap:12px;padding:16px;border:1px solid #c49955;border-radius:12px;background:linear-gradient(140deg,#31173e,#090911)}
#lottery .lottery-archive-card header{display:flex;align-items:center;flex-wrap:wrap;gap:8px;justify-content:space-between;font-size:14px}#lottery .lottery-archive-card header strong{font-size:22px;color:#ffdf90}#lottery .lottery-archive-card header b{color:#97d785}
#lottery .lottery-archive-cards{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-template-rows:minmax(0,1fr);align-items:center;justify-items:center;min-height:0;gap:8px}#lottery .lottery-archive-cards .lottery-playing-card{max-height:150px;height:100%;width:auto;max-width:100%;min-height:0;min-width:0}#lottery .lottery-archive-cards>p{grid-column:1/-1;text-align:center}
#lottery .lottery-archive-counts{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;text-align:center}#lottery .lottery-archive-counts span{display:grid;padding:6px;border:1px solid #694c32;border-radius:6px;font-size:12px}#lottery .lottery-archive-counts b{font-size:22px;color:#ffdf90}#lottery .lottery-archive-card footer{display:flex;flex-wrap:wrap;gap:6px;justify-content:space-between;font-size:13px;color:#bdb0c7}
#lottery .lottery-ticket-list{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));overflow:hidden;padding:0;align-content:stretch}
#lottery .lottery-ticket{min-height:0;grid-template-rows:auto minmax(0,1fr) auto;border-color:#c29857;padding:12px;gap:7px;font-size:14px}
#lottery .lottery-ticket>div{min-height:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));align-items:center;justify-items:center}
#lottery .lottery-ticket>div{grid-template-rows:minmax(0,1fr)}#lottery .lottery-ticket .lottery-playing-card{min-height:0;min-width:0}#lottery .lottery-ticket>footer{min-height:16px}
#lottery .lottery-ticket .lottery-playing-card{height:100%;width:auto;max-width:100%;max-height:120px}
#lottery .lottery-ticket-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:14px}
#lottery .lottery-ticket-pager button{min-height:38px;background:#24152f;border-color:#b38d49;color:#f2d598}
#lottery .lottery-empty{grid-column:1/-1;grid-row:1/-1;min-height:0}
#lottery [data-lottery-panel=rules]{grid-template-rows:auto minmax(0,1fr) auto}
#lottery .lottery-reference-rules{min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px}
#lottery .lottery-reference-rules article{min-width:0;min-height:0;display:flex;flex-direction:column;justify-content:center;text-align:center;gap:8px;padding:12px;border:1px solid #bd9659;border-radius:10px;background:linear-gradient(140deg,#32163e,#0f0c18)}
#lottery .lottery-reference-rules strong{font-size:26px;color:#ffe0a0;text-shadow:0 2px #9b611e}
#lottery .lottery-reference-rules h3{font-size:16px;color:#f2d098;margin:0}#lottery .lottery-reference-rules p{margin:0;font-size:14px;line-height:1.4;color:#d8ccdc}
#lottery .lottery-reference-prizes{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}#lottery .lottery-reference-prizes>div{display:grid;text-align:center;padding:8px;border:1px solid #936c39;border-radius:8px;font-size:13px}#lottery .lottery-reference-prizes b{font-size:17px;color:#ffe0a0}
@media(max-width:1099px),(max-height:650px) and (orientation:landscape){
 #lottery .lottery-shell{grid-template-rows:60px minmax(0,1fr) 38px;gap:4px;padding:5px;border-radius:8px}#lottery .lottery-back{width:30px}
 #lottery[data-tab=rules] .lottery-shell{grid-template-rows:minmax(0,1fr) 38px}
 #lottery .lottery-header{grid-template-columns:32px minmax(70px,.65fr) minmax(125px,1.35fr) minmax(110px,1fr) minmax(95px,.9fr);gap:3px}
 #lottery .lottery-brand small{font-size:10px}#lottery .lottery-brand strong{font-size:14px}
 #lottery .lottery-jackpot,#lottery .lottery-draw-summary,#lottery .lottery-sales{padding:2px 4px}
 #lottery .lottery-jackpot small{font-size:9px}#lottery .lottery-jackpot.safe-prize strong{font-size:14px}#lottery .lottery-jackpot em{font-size:8px;line-height:1.15}#lottery .lottery-jackpot>span{font-size:14px}
 #lottery .lottery-draw-summary strong,#lottery .lottery-sales>small{font-size:10px}#lottery .lottery-draw-summary small,#lottery .lottery-sales>span{font-size:8px}#lottery .lottery-draw-summary b,#lottery .lottery-sales b{font-size:17px}#lottery .lottery-draw-summary span{font-size:9px}#lottery .lottery-sales strong{font-size:13px}
 #lottery .lottery-draw-panel{grid-template-columns:minmax(0,1fr) 28%;gap:4px}#lottery .lottery-picker{grid-template-rows:39% minmax(0,1fr);gap:4px}
 #lottery .lottery-slots-card,#lottery .lottery-deck-card{padding:3px 4px}#lottery .lottery-slots-card{grid-template-rows:20px minmax(0,1fr) 12px}#lottery .lottery-deck-card{grid-template-rows:20px minmax(0,1fr)}
 #lottery .lottery-slots-card>header,#lottery .lottery-deck-card>header{font-size:9px;gap:3px}#lottery .lottery-deck-card>header span{display:none}#lottery .lottery-slots-card>header button{font-size:9px;min-height:20px;padding:1px 5px}
 #lottery .lottery-slots-card>p{font-size:9px;margin:0}#lottery .lottery-slots{gap:4px}#lottery .lottery-slots>button>small{font-size:9px;width:14px;height:14px}
 #lottery .lottery-deck{grid-template-columns:16px repeat(9,minmax(0,1fr));gap:3px}#lottery .lottery-deck>button{gap:2px;padding:1px;font-size:16px;border-radius:4px}#lottery .lottery-deck>button img{display:none}
 #lottery .lottery-purchase-card{grid-template-rows:12px 24px 28px 21px 23px minmax(40px,1fr) 18px;gap:3px;padding:4px}
 #lottery .lottery-purchase-card>header{font-size:9px}#lottery .lottery-quantity{grid-template-columns:30px 1fr 30px}#lottery .lottery-quantity button{min-height:24px;font-size:19px}#lottery .lottery-quantity strong{font-size:20px}
 #lottery .lottery-autopick{font-size:9px;min-height:28px}#lottery .lottery-packages{gap:2px}#lottery .lottery-packages span{display:none}#lottery .lottery-packages button{min-height:28px;font-size:12px}
 #lottery .lottery-price,#lottery .lottery-total{padding:2px 4px}#lottery .lottery-price>span,#lottery .lottery-total>span{font-size:8px}#lottery .lottery-price>strong{font-size:16px}#lottery .lottery-price>strong small{font-size:9px}#lottery .lottery-price>small{font-size:8px;line-height:1.1}
 #lottery .lottery-price>small{display:none}
 #lottery .lottery-total>strong{font-size:18px}#lottery .lottery-total>strong small{font-size:8px}#lottery .lottery-total>em{display:none}#lottery .lottery-buy{min-height:44px;height:44px;font-size:10px;gap:2px;padding:2px}#lottery .lottery-buy small{font-size:10px}
 #lottery .lottery-limit,#lottery .lottery-message{font-size:8px}#lottery .lottery-message:empty{display:none}
 #lottery .lottery-message:not(:empty){position:fixed;left:5px;right:5px;bottom:45px;z-index:5;padding:6px;background:#25122ff5;border:1px solid #c19a50;border-radius:6px;font-size:10px}
 #lottery .lottery-tabs button{grid-template-columns:24px 1fr;padding:3px 5px}#lottery .lottery-tabs button strong{font-size:11px}#lottery .lottery-tabs button small{font-size:9px}#lottery .lottery-tabs button>span{font-size:20px}
 #lottery .lottery-panel:not(.lottery-draw-panel){padding:6px;gap:5px}#lottery .lottery-page-heading h2{font:800 20px var(--ui-font);margin:0}#lottery .lottery-page-heading span{font-size:10px}
 #lottery [data-lottery-panel=tickets]{grid-template-rows:30px minmax(0,1fr) 34px}#lottery .lottery-ticket-list{grid-template-rows:minmax(0,1fr);gap:6px}#lottery .lottery-ticket{padding:6px;gap:4px;font-size:10px;grid-template-rows:28px minmax(0,1fr) 16px}#lottery .lottery-ticket header{flex-direction:column;gap:2px}#lottery .lottery-ticket>div{gap:4px}#lottery .lottery-ticket .lottery-playing-card{max-height:110px}
 #lottery [data-lottery-panel=history]{grid-template-rows:30px minmax(0,1fr) 34px}#lottery .lottery-history-list{grid-template-columns:minmax(0,1fr)}#lottery .lottery-archive-card{padding:5px;gap:4px;grid-template-rows:20px minmax(0,1fr) 24px 28px}
 #lottery .lottery-archive-card header{font-size:9px;gap:3px}#lottery .lottery-archive-card header strong{font-size:13px}#lottery .lottery-archive-cards{gap:6px}#lottery .lottery-archive-cards .lottery-playing-card{max-height:130px}#lottery .lottery-archive-counts span{display:flex;align-items:center;justify-content:center;gap:8px;padding:2px;font-size:10px}#lottery .lottery-archive-counts b{font-size:13px}#lottery .lottery-archive-card footer{font-size:9px;gap:3px;line-height:1.1}#lottery .lottery-archive-card footer small{font-size:8px}
 #lottery .lottery-ticket-pager{font-size:11px}#lottery .lottery-ticket-pager button{min-height:32px;padding:4px 12px;font-size:11px}
 #lottery [data-lottery-panel=rules]{grid-template-rows:26px minmax(0,1fr) 32px 32px}
 #lottery .lottery-reference-rules{gap:5px;grid-template-rows:minmax(0,1fr)}#lottery .lottery-reference-rules article{padding:5px;gap:4px}#lottery .lottery-reference-rules strong{font-size:19px}#lottery .lottery-reference-rules h3{font-size:11px}#lottery .lottery-reference-rules p{font-size:10px;line-height:1.2}#lottery .lottery-reference-prizes{gap:5px}#lottery .lottery-reference-prizes>div{padding:2px;font-size:9px}#lottery .lottery-reference-prizes b{font-size:11px}
}
@media(max-width:620px) and (orientation:landscape){#lottery .lottery-brand{display:none}#lottery .lottery-header{grid-template-columns:30px minmax(145px,1.25fr) minmax(120px,1fr) minmax(110px,1fr)}#lottery .lottery-deck>button{font-size:14px}#lottery .lottery-joker-art{width:23%}}
@media(prefers-reduced-motion:reduce){#lottery *{animation:none!important;transition:none!important}}
@media(max-width:1099px),(max-height:650px) and (orientation:landscape){
 #lottery[data-tab=history] .lottery-header{display:none}#lottery[data-tab=history] .lottery-shell{grid-template-rows:minmax(0,1fr) 38px}
 #lottery [data-lottery-panel=history] .lottery-page-heading>div>span{display:none}
 #lottery [data-lottery-panel=history] .lottery-page-heading button{min-height:28px;padding:4px 10px;font-size:11px}
 #lottery .lottery-archive-cards .lottery-playing-card{grid-template-rows:minmax(0,1fr);aspect-ratio:.64}#lottery .lottery-archive-cards img{min-width:0;min-height:0}
}
