:root{color-scheme:light;--red:#c90816;--ink:#25262b;--muted:#81858d;--line:#eceef1;--bg:#f6f7f9}

*{box-sizing:border-box}
body{margin:0;background:#eceef2;color:var(--ink);font:15px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}
button,input{font:inherit}
button,a,input{-webkit-tap-highlight-color:transparent}
a{color:inherit;text-decoration:none}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.5}
[hidden]{display:none!important}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #1976d2;outline-offset:3px}
.site-shell{max-width:760px;min-height:100vh;margin:auto;background:var(--bg);padding-bottom:calc(80px + env(safe-area-inset-bottom))}
.site-header{height:82px;background:var(--red);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 24px;gap:12px}
.site-header>a:not(.brand){max-width:100px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.site-header button{border:0;background:none;color:white;padding:8px 0}
.brand{text-align:center;flex:1}
.brand strong{display:block;font-size:25px;letter-spacing:4px;line-height:1.25}
.brand span{font-size:10px;letter-spacing:3px;opacity:.85}
.announcement{display:flex;gap:12px;align-items:flex-start;padding:12px 22px;background:white;border-bottom:1px solid var(--line);font-size:13px}
.announcement strong{flex-shrink:0;color:var(--red)}
#announcement-content{min-width:0;overflow-wrap:anywhere;max-height:120px;overflow-y:auto}
.announcement p{margin:0 0 4px}
.announcement p:last-child{margin:0}
.statement{margin:0;padding:8px 22px;background:#eeeef0;color:#646870;font-size:12px}
.category-bar{position:sticky;top:0;z-index:5;background:rgba(255,255,255,.98);border-bottom:1px solid var(--line)}
#categories{display:flex;gap:6px;overflow-x:auto;padding:14px 18px;scrollbar-width:thin}
#categories button{flex-shrink:0;background:transparent;border:0;border-radius:22px;padding:8px 16px;color:#444;font-weight:600;max-width:210px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#categories button[aria-pressed=true]{background:var(--red);color:white}
.list-toolbar{display:flex;align-items:center;justify-content:space-between;padding:22px 22px 12px;gap:12px}
.list-toolbar>div{display:flex;align-items:baseline;gap:10px;min-width:0}
.list-toolbar h1{font-size:18px;margin:0;overflow-wrap:anywhere}
.list-toolbar span{font-size:12px;color:var(--muted);white-space:nowrap}
.text-button{border:0;background:transparent;color:var(--red);padding:6px;white-space:nowrap}
.search-wrap{padding:0 22px 6px}
.search-wrap input{width:100%;border:1px solid #e0e2e7;border-radius:8px;background:white;padding:10px 13px;font-size:13px;appearance:none}
.list-status{font-size:12px;color:var(--muted);margin:6px 22px 12px;min-height:18px}
.list-status.is-error{color:#ae4d1c}
.lottery-list{display:grid;gap:14px;padding:0 20px}
.lottery-card{background:white;border:1px solid var(--line);border-radius:16px;padding:20px;box-shadow:0 2px 6px #20283a04;min-width:0}
.card-heading{display:flex;align-items:center;gap:12px}
.lottery-icon{width:48px;height:48px;flex-shrink:0;border-radius:50%;background:#fbe7e9;color:var(--red);display:grid;place-items:center;font-size:22px;font-weight:700;overflow:hidden}
.lottery-icon img{width:100%;height:100%;object-fit:cover}
.card-name{min-width:0;flex:1}
.card-name h2{font-size:17px;line-height:1.4;margin:0;overflow-wrap:anywhere}
.period{font-size:12px;color:var(--muted);margin:4px 0 0;overflow-wrap:anywhere}
.draw-clock{flex-shrink:0;text-align:right;min-width:80px}
.clock-value{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;color:#db761c;font-size:21px;font-weight:700;white-space:nowrap}
.clock-value:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#39b97a;margin:0 7px 2px 0}
.clock-caption{display:block;font-size:11px;color:var(--muted);margin-top:3px}
.draw-clock.is-unknown .clock-value{color:#92969e}
.draw-clock.is-unknown .clock-value:before{background:#b6bac1}
.draw-clock.is-opening .clock-value{font-family:inherit;font-size:17px}
.draw-clock.is-opening .clock-value:before{animation:pulse 1s ease-in-out infinite}
.award-balls{display:flex;flex-wrap:wrap;gap:5px;margin:18px 0 14px;align-items:center;min-height:32px}
.ball{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:32px;padding:0 4px;border-radius:5px;background:#687fa4;color:white;font:700 18px/1 ui-monospace,Consolas,monospace;box-shadow:inset 0 -2px 0 #00000012}
.ball.n0{background:#7c8798}
.ball.n1{background:#ddb320;color:#292619}
.ball.n2{background:#3988d7}
.ball.n3{background:#627085}
.ball.n4{background:#e78628}
.ball.n5{background:#54baba}
.ball.n6{background:#6964b8}
.ball.n7{background:#a5a9b0}
.ball.n8{background:#db525a}
.ball.n9{background:#a55c45}
.ball.round{border-radius:50%;background:#d94b57}
.ball.round:last-child{background:#397cca}
.ball-plus{color:#9a9ea6;font-weight:400;margin:0 2px}
.card-footer{display:flex;gap:12px;align-items:center;justify-content:space-between;border-top:1px solid #f2f3f5;padding-top:11px;font-size:11px;color:var(--muted)}
.result-label{min-width:0}
.opening-dots{display:none;margin-left:8px;white-space:nowrap}
.opening-dots i{display:inline-block;width:4px;height:4px;background:#df8d2f;border-radius:50%;margin:0 2px;animation:pulse 1s infinite}
.opening-dots i:nth-child(2){animation-delay:.2s}
.opening-dots i:nth-child(3){animation-delay:.4s}
.lottery-card.is-opening .opening-dots{display:inline-block}
.empty-state{text-align:center;padding:48px 22px;color:#888}
.empty-state strong{font-size:17px;color:#444}
.empty-state p{font-size:13px}
.page-footer{display:flex;justify-content:center;flex-wrap:wrap;gap:14px;color:#969aa3;font-size:11px;padding:32px 16px}
.bottom-nav{position:fixed;z-index:10;bottom:0;width:100%;max-width:760px;display:flex;background:white;border-top:1px solid var(--line);padding:8px 0 calc(8px + env(safe-area-inset-bottom))}
.bottom-nav a{flex:1;display:flex;align-items:center;flex-direction:column;font-size:12px;color:#6b7079;gap:2px}
.bottom-nav .nav-icon{display:block;width:28px;height:28px;flex-shrink:0;background:url(../image/nav.png) no-repeat;background-size:22px auto}
.bottom-nav .nav-icon-home{background-position:center 0}
.bottom-nav .nav-icon-discover{background-position:center -80px}
.bottom-nav .nav-icon-api{background-position:center -120px}
.bottom-nav .nav-icon-about{background-position:center -160px}
.bottom-nav a[aria-current=page]{color:var(--red)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.history-pagination{display:flex;justify-content:space-between;align-items:center;margin-top:12px;font-size:13px}
.history-pagination button{border:1px solid #e0e2e6;border-radius:6px;background:white;padding:7px 12px}
@keyframes pulse{0%,100%{opacity:.35;transform:translateY(0)}
50%{opacity:1;transform:translateY(-2px)}
}

@media(min-width:700px){.lottery-card{padding:24px}
.card-name h2{font-size:19px}
.ball{min-width:38px;height:38px;font-size:21px}
.award-balls{gap:8px}
.clock-value{font-size:25px}
}

@media(max-width:380px){.site-header{padding:0 16px}
.lottery-list{padding:0 12px}
.lottery-card{padding:16px 12px}
.card-heading{gap:8px}
.lottery-icon{width:38px;height:38px;font-size:18px}
.card-name h2{font-size:15px}
.clock-value{font-size:18px}
.draw-clock{min-width:74px}
.ball{min-width:25px;height:29px;font-size:16px}
.award-balls{gap:4px}
}

.lottery-card.is-opening .ball{animation:draw-wait 1.2s ease-in-out infinite}
.lottery-card.is-opening .ball:nth-child(2n){animation-delay:.15s}
.lottery-card.is-opening .ball:nth-child(3n){animation-delay:.3s}
@keyframes draw-wait{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}
@media(prefers-reduced-motion:reduce){*,*:before{animation:none!important;scroll-behavior:auto!important}
}


/* Shared, explicit game presentation. Used by the standalone detail page too. */
.lottery-card{display:block;transition:border-color .16s,box-shadow .16s}
.lottery-card:hover{border-color:#e1bdc0;box-shadow:0 3px 12px #7d27300a}
.lottery-card:active{border-color:var(--red)}
.card-arrow{font-size:24px;line-height:16px;color:#bb7a7e}
.result-label{font-size:12px;color:#767b84}
.ball-cell{display:inline-flex;flex-direction:column;align-items:center;gap:4px;flex-shrink:0}
.ball-cell small{font:11px/1.2 "Microsoft YaHei",sans-serif;color:#91969e}
.ball.digit-0{background:#bd5562}.ball.digit-1{background:#dab439;color:#302809}
.ball.digit-2{background:#e45280}.ball.digit-3{background:#e99341}.ball.digit-4{background:#8e82d3}
.ball.digit-5{background:#55b7d4}.ball.digit-6{background:#69b737}.ball.digit-7{background:#a26ec9}
.ball.digit-8{background:#e45d69}.ball.digit-9{background:#58b79b}
.ball.race-1{background:#dbbd35;color:#302809}.ball.race-2{background:#4088d9}.ball.race-3{background:#5c616a}
.ball.race-4{background:#ec9d39}.ball.race-5{background:#4fb9c7}.ball.race-6{background:#7165c1}
.ball.race-7{background:#a8adb5;color:#292d34}.ball.race-8{background:#e5585e}.ball.race-9{background:#a65b46}.ball.race-10{background:#58ab4b}
.ball.wave-red{background:#cf4f60}.ball.wave-blue{background:#4487c1}.ball.wave-green{background:#4ca773}
.ball.pc28-ball{background:#64b642}.ball.symbol.warm{background:#d7655d}.ball.symbol.cool{background:#6aa4cd}
.ball.fish-name{font:600 12px/1 "Microsoft YaHei",sans-serif;min-width:32px}
.lottery-card .kind-racing{flex-wrap:nowrap;gap:4px}
.lottery-card .kind-racing .ball-cell{flex:1;min-width:0;max-width:38px}
.lottery-card .kind-racing .ball{width:100%;min-width:0;padding:0 1px;font-size:16px}
@media(max-width:380px){.lottery-card .kind-racing .ball{font-size:13px}}
