.lottery-widget{border:1px solid #d8af59;background:#fffdf6;margin:6px 0 12px;border-radius:3px;overflow:hidden}

body.classic-theme.route-lottery { background: #f1f3f8; }
.route-lottery .classic-shell { width: min(100%, 824px); padding: 10px 10px 24px; background: none; box-shadow: none; }
.classic-theme.route-lottery .page-content { min-height: 0; padding: 0; }
.draw-history {
    --draw-history-line: #6d89e1;
    --draw-history-accent: #3157bc;
    --draw-history-ball-size: clamp(23px, 7.6vw, 38px);
    border: 1px solid var(--draw-history-line);
    background: #fff;
    color: #151923;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}
.draw-history-heading {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    min-height: 40px;
    color: #fff;
    background: linear-gradient(180deg, #243e95, #4672e1);
}
.draw-history-heading h1 { margin: 0; color: inherit; text-align: center; font-size: clamp(19px, 3.3vw, 25px); line-height: 1.3; }
.draw-history-heading a { display: grid; place-items: center; min-height: 40px; color: inherit; }
.draw-history-heading a .icon { width: 24px; height: 24px; }
.draw-history-back .icon { transform: rotate(180deg); }
.draw-history-filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.classic-theme .draw-history-filters select {
    width: 100%; min-width: 0; min-height: 35px; margin: 0; padding: 2px 5px;
    border: 0; border-right: 1px solid var(--draw-history-line); border-bottom: 1px solid var(--draw-history-line);
    border-radius: 0; color: var(--draw-history-accent); background: #fff;
    font-size: clamp(12px, 2.6vw, 16px); text-align: center; cursor: pointer;
}
.classic-theme .draw-history-filters select:last-of-type { border-right: 0; }
.draw-history-filters noscript { grid-column: 1 / -1; }
.draw-history-submit { width: 100%; padding: 6px; border: 0; color: #fff; background: var(--draw-history-accent); cursor: pointer; }
.draw-history-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--draw-history-line); border-bottom: 1px solid var(--draw-history-line); }
.draw-history-options > * {
    display: grid; place-items: center; min-width: 0; min-height: 28px; padding: 3px 2px;
    color: #fff; background: #456bd2; text-align: center;
    font-size: clamp(11px, 2vw, 14px); line-height: 1.2; white-space: nowrap;
}
.draw-history-options .draw-history-options-label { background: #fff; color: var(--draw-history-accent); }
.draw-history-options a[aria-current] { background: #eef2fc; color: #26489f; box-shadow: inset 0 0 0 1px #7391ea; }
.draw-history a:focus-visible, .draw-history select:focus-visible { position: relative; outline: 2px solid #102d83; outline-offset: -2px; }
.draw-history-row {
    display: grid; grid-template-columns: clamp(79px, 19%, 150px) minmax(0, 1fr);
    min-height: 75px; border-bottom: 1px solid var(--draw-history-line);
}
.draw-history-row:last-child { border-bottom: 0; }
.draw-history-period {
    display: flex; flex-direction: column; justify-content: center; gap: 3px;
    margin: 0; padding: 7px 8px; background: #efeff1; color: inherit;
    font-size: clamp(11px, 2.7vw, 14px); font-weight: 400; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.draw-history-issue { color: #ba211a; }
.draw-history-balls {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)) clamp(10px, 5%, 48px) minmax(0, 1fr);
    align-items: start; gap: 2px; min-width: 0; margin: 0; padding: 5px 3px 6px; list-style: none;
}
.draw-history-number { display: grid; justify-items: center; gap: 3px; min-width: 0; text-align: center; }
.draw-history-ball {
    display: grid; place-items: center; width: min(100%, var(--draw-history-ball-size)); aspect-ratio: 1;
    border-radius: 50%; background: #ecf0f7 center / contain no-repeat;
    color: #05070c; font-size: clamp(12px, 3.3vw, 16px); line-height: 1; font-variant-numeric: tabular-nums;
}
.draw-history-tone-0 { background-color: transparent; background-image: url("reference-ball-red.png"); }
.draw-history-tone-1 { background-color: transparent; background-image: url("reference-ball-blue.png"); }
.draw-history-tone-2 { background-color: transparent; background-image: url("reference-ball-green.png"); }
.draw-history-ball.draw-history-long { font-size: clamp(8px, 2.2vw, 12px); }
.draw-history-number > span { max-width: 100%; font-size: clamp(9px, 2.45vw, 13px); line-height: 1.24; overflow-wrap: anywhere; }
.draw-history-number span b { font-weight: 400; }
.draw-history-plus { display: grid; place-items: center; height: var(--draw-history-ball-size); font-size: 17px; line-height: 1; }
.draw-history-gold { color: #885700; }
.draw-history-wood, .draw-history-wave-2 { color: #16763c; }
.draw-history-water, .draw-history-wave-1 { color: #2463a9; }
.draw-history-fire, .draw-history-wave-0 { color: #be2a23; }
.draw-history-earth { color: #81533a; }
.draw-history-empty { margin: 0; padding: 34px 12px; text-align: center; color: #545e73; }
.draw-history-replays { padding: 10px 12px; border-bottom: 1px solid #e8ebf2; }
.draw-history-replays summary { cursor: pointer; font-weight: 600; }
.draw-history-replays ul { margin: 8px 0 0; padding-inline-start: 24px; }
.draw-history-replays li { margin: 5px 0; }
.draw-history-replays a { color: #26489f; }
.draw-history .load-more { margin: 0; border-top: 1px solid var(--draw-history-line); padding: 12px; }
.draw-history .load-more a { border-color: var(--draw-history-line); color: var(--draw-history-accent); background: #f2f5ff; }
@media (max-width: 600px) {
    .route-lottery .classic-shell { padding: 0 0 16px; }
    .draw-history-row { min-height: 60px; }
    .draw-history-period { padding: 5px 4px; }
    .draw-history-number { gap: 2px; }
    .draw-history-balls { gap: 1px; padding-inline: 2px; }
}
.home-lottery-widget [data-lottery-balls]{background:#fff}
.home-lottery-widget .lottery-balls-reference{grid-template-columns:repeat(6,minmax(0,1fr)) 18px minmax(0,1fr);gap:4px;padding:10px 8px;align-items:start}
.home-lottery-widget .lottery-balls-reference>li{gap:0}
.home-lottery-widget .lottery-balls-reference .lottery-ball{width:100%;max-width:56px;height:auto;aspect-ratio:1;border:0;border-radius:0;background-color:transparent;background-position:center;background-repeat:no-repeat;background-size:100% 100%;box-shadow:none;color:#000;font:700 20px/1 Arial,"Microsoft YaHei",sans-serif;letter-spacing:0;text-shadow:none}
.home-lottery-widget .lottery-tone-0{background-image:url("reference-ball-red.png")}
.home-lottery-widget .lottery-tone-1{background-image:url("reference-ball-blue.png")}
.home-lottery-widget .lottery-tone-2{background-image:url("reference-ball-green.png")}
.home-lottery-widget .lottery-ball.lottery-long-number{font-size:14px}
.home-lottery-widget .lottery-balls-reference .lottery-ball-label{font:400 16px/22px Arial,"Microsoft YaHei",sans-serif;color:#000;min-height:22px;max-width:100%;white-space:normal;overflow:visible;text-overflow:clip;overflow-wrap:anywhere;text-align:center}
.home-lottery-widget .lottery-balls-reference>.lottery-separator{align-self:stretch;height:auto;margin-bottom:22px;color:#f00;font:700 24px/1 Arial,sans-serif;text-shadow:none}
@media(max-width:600px){.home-lottery-widget .lottery-balls-reference{gap:3px;padding:10px 4px}.home-lottery-widget .lottery-balls-reference .lottery-ball{font-size:18px}.home-lottery-widget .lottery-balls-reference .lottery-ball-label{font-size:14px;line-height:20px;min-height:20px}.home-lottery-widget .lottery-balls-reference>.lottery-separator{margin-bottom:20px;font-size:22px}.home-lottery-widget .lottery-ball.lottery-long-number{font-size:10px}}
@media(max-width:359px){.home-lottery-widget .lottery-balls-reference{gap:2px;padding-left:3px;padding-right:3px;grid-template-columns:repeat(6,minmax(0,1fr)) 14px minmax(0,1fr)}.home-lottery-widget .lottery-balls-reference .lottery-ball{font-size:16px}.home-lottery-widget .lottery-balls-reference .lottery-ball-label{font-size:12px}}
.lottery-balls small{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;max-width:100%;overflow-wrap:anywhere;text-align:center;line-height:1.5;min-height:1.5em}
.lottery-history-editor{margin-bottom:20px}.lottery-history-inputs{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:9px;margin:18px 0}.lottery-history-inputs input{width:100%;min-width:0}.lottery-history-inputs label{font-size:12px}.lottery-history-inputs small{display:block;overflow-wrap:anywhere;font-size:11px;color:#9a8664}.lottery-history-actions{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin-top:16px}.lottery-history-actions form{margin:0}.lottery-number-description{min-width:100px;max-width:240px;overflow-wrap:anywhere}
@media(max-width:600px){.lottery-history-inputs{grid-template-columns:repeat(2,minmax(0,1fr))}.lottery-history-heading{align-items:start;flex-wrap:wrap}.lottery-history-actions .button{font-size:12px;padding:8px 10px}.lottery-widget-heading strong{min-width:0}.lottery-widget-heading strong>span{display:inline-block}}
.lottery-widget-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;background:#cf2011;color:#fff1b4;padding:10px 14px;font-size:16px}
.lottery-widget-heading strong>span{font-size:13px;font-weight:400;margin-left:8px}.lottery-widget-heading>a{color:#fff1b4;font-size:13px;white-space:nowrap}
.lottery-balls{list-style:none;display:grid;grid-template-columns:repeat(6,minmax(0,1fr)) 24px minmax(0,1fr);gap:8px;margin:0;padding:20px 18px 16px}
.lottery-balls>.lottery-separator{align-self:start;display:flex;align-items:center;justify-content:center;height:56px;font-size:34px;font-weight:900;line-height:1;color:#cd2411;text-shadow:0 1px #fff}
.lottery-balls>li{display:flex;flex-direction:column;align-items:center;min-width:0;gap:5px}.lottery-ball{display:flex;align-items:center;justify-content:center;border-radius:50%;width:56px;height:56px;color:#fff;font-size:26px;line-height:1;font-variant-numeric:tabular-nums;box-shadow:inset 0 2px 2px #fff9,inset 0 -3px 5px #0002;border:1px solid #0001}
.lottery-tone-0{background:linear-gradient(145deg,#fa6650,#d52214)}.lottery-tone-1{background:linear-gradient(145deg,#61a7ed,#1c64b7)}.lottery-tone-2{background:linear-gradient(145deg,#67bd7e,#21834b)}
.lottery-ball.lottery-long-number{font-size:14px}.lottery-balls span{font-size:12px;color:#796246;max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.lottery-balls small{font-size:10px;color:#a99d89}
.lottery-next{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-top:1px dashed #e5d9bd;font-size:12px;color:#765f3c}.lottery-next b{color:#bf2316;white-space:nowrap;font-size:13px;font-variant-numeric:tabular-nums}
.lottery-next[hidden]{display:none}
.lottery-display-note{margin:0;padding:0 14px 10px;font-size:11px;color:#a09176}.lottery-history-list{display:grid;gap:14px}.lottery-history-card{padding:18px 14px;min-width:0}.lottery-history-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:12px}.lottery-history-heading h2{font-size:17px;color:#8d5720;margin:0}.lottery-history-heading small{font-size:11px;font-weight:400;color:#9e8a68;margin-left:7px}.lottery-locked{display:flex;gap:3px;align-items:center;font-size:11px;color:#8f826b;white-space:nowrap}.lottery-locked .icon{width:13px;height:13px}.lottery-history-card h3{font-size:14px;color:#55452e;overflow-wrap:anywhere}.lottery-history-note{font-size:13px;line-height:1.8;color:#83704d;overflow-wrap:anywhere}.lottery-history-time{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-size:11px;color:#a29682;border-top:1px solid #eee5d4;padding-top:12px}.lottery-back-home{display:inline-block;margin:18px 0;color:#94702b;font-size:13px}
.lottery-admin-nav,.lottery-category-nav{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.lottery-admin-nav>a,.lottery-category-nav>a{padding:8px 12px;background:#fff8e8;border:1px solid #e4d8bb;border-radius:3px;color:#846935;font-size:13px}.lottery-admin-nav>a.active,.lottery-category-nav>a.active{background:#cf2815;border-color:#cf2815;color:#fff1c8}.lottery-category-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}.lottery-category-nav>a{text-align:center;overflow-wrap:anywhere;padding:9px 5px;font-size:12px}
.lottery-settings,.lottery-plan{margin-bottom:16px}.lottery-help{font-size:12px;color:#9a8664;line-height:1.9;margin:10px 0 16px}.lottery-plan-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px}.lottery-plan-heading h2{margin:0}.lottery-position-list{display:grid;gap:9px;margin-bottom:18px}.lottery-slot{display:grid;grid-template-columns:64px 130px 1fr;align-items:center;gap:12px;background:#fffaf0;border:1px solid #eee0c5;padding:11px;border-radius:3px}.lottery-slot>b{color:#a66e25;font-size:13px}.lottery-slot input,.lottery-slot select{margin:0;width:100%;min-width:0}.lottery-slot [hidden]{display:none!important}.lottery-manual-draw{border-top:1px dashed #dcc9a4;padding-top:18px;display:flex;align-items:center;gap:14px;margin-top:16px}.lottery-manual-draw>span{font-size:12px;color:#a08e6a}.lottery-manual-draw button:disabled{opacity:.5;cursor:not-allowed}.lottery-number-actions{display:flex;align-items:center;gap:15px;white-space:nowrap}.lottery-number-actions>form{margin:0}.lottery-number-actions button{background:none;border:0;cursor:pointer;font:inherit;padding:3px}.lottery-table-foot{padding:10px 15px;margin:0}.lottery-number-table{font-size:13px}
.load-more{padding:18px 10px;display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:10px}.load-more-status{font-size:12px;color:#a18b64}.load-more a[aria-disabled=true]{opacity:.6;cursor:wait}.classic-category-filter>[data-category-more]{background:#fff6df;border:1px solid #dcc58b;color:#8c671b;border-radius:3px;font-size:12px;padding:3px 8px;cursor:pointer}.category-more-button{margin-top:9px;border:1px solid #ddc68c;padding:7px 12px;color:#977528;background:#fff8e6;border-radius:3px;font-size:12px;cursor:pointer}
@media(max-width:600px){.lottery-widget-heading{padding:9px 8px;font-size:14px}.lottery-widget-heading strong>span{margin-left:4px;font-size:11px}.lottery-widget-heading>a{font-size:12px}.lottery-balls{gap:3px;padding:16px 6px 12px}.lottery-ball{width:39px;height:39px;font-size:21px}.lottery-ball.lottery-long-number{font-size:10px}.lottery-balls span{font-size:10px}.lottery-balls small{font-size:9px}.lottery-next{flex-wrap:wrap;padding:9px 8px;font-size:11px;gap:6px}.lottery-next b{font-size:12px}.lottery-display-note{padding:0 8px 8px;font-size:10px}.lottery-history-card{padding:15px 8px}.lottery-history-heading h2{font-size:15px}.lottery-history-heading small{font-size:10px;margin-left:3px}.lottery-slot{grid-template-columns:52px minmax(0,1fr);gap:9px}.lottery-slot>[data-slot-number],.lottery-slot>[data-slot-category]{grid-column:2}.lottery-category-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.lottery-plan-heading h2{font-size:16px}.lottery-manual-draw{flex-wrap:wrap;gap:8px}.lottery-admin-nav{gap:6px}.lottery-admin-nav>a{font-size:12px;padding:8px 10px}.lottery-history-time{font-size:10px}.load-more{padding:15px 6px}}
@media(max-width:359px){.lottery-ball{width:34px;height:34px;font-size:18px}.lottery-balls{gap:2px;padding-left:3px;padding-right:3px}.lottery-ball.lottery-long-number{font-size:9px}}
@media(max-width:600px){.lottery-balls{grid-template-columns:repeat(6,minmax(0,1fr)) 18px minmax(0,1fr)}.lottery-balls>.lottery-separator{height:39px;font-size:28px}}
@media(max-width:359px){.lottery-balls>.lottery-separator{height:34px;font-size:26px}}
.classic-channel-tabs>a{width:auto;flex:1;min-width:0}
.lottery-widget-links{display:flex;gap:12px;flex-shrink:0;font-size:12px;white-space:nowrap}.lottery-widget-links a{color:#fff1b4}
.lottery-balls .lottery-ball-attributes{color:#876a3f;font-size:10px;white-space:nowrap;overflow:visible;display:block}
.number-reference{margin:0 auto 18px;min-width:0}.number-reference-tabs{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px;margin-bottom:12px}
.number-reference-tabs a{padding:10px 4px;text-align:center;border:1px solid #dec794;border-radius:3px;background:#fff9e9;color:#876223;font-size:14px;font-weight:bold}.number-reference-tabs a.active{background:#ce2918;border-color:#ce2918;color:#fff2c7}
.number-reference-kinds{display:flex;flex-wrap:wrap;gap:7px;margin:12px 0}.number-reference-kinds a{font-size:13px;padding:6px 10px;background:#fffaf0;border:1px solid #e8d9b9;border-radius:3px;color:#876223}.number-reference-kinds a.active{background:#e4b759;color:#57370a;border-color:#d29b2d}
.number-lookup{display:flex;align-items:center;gap:10px;padding:12px;background:#fff9eb;border:1px solid #e5d7bb;border-radius:3px}.number-lookup label{font-size:13px;font-weight:bold;color:#85602a}.number-lookup input{width:94px;min-width:0;padding:8px;margin:0}.number-lookup-result{display:flex;align-items:center;gap:16px;margin-top:12px;padding:15px;border:1px solid #dfc88d;background:#fffdf5;border-radius:3px}.number-lookup-result strong{font-size:15px;color:#755021}.number-lookup-result p{margin:5px 0 0;font-size:13px;overflow-wrap:anywhere}.number-lookup-message{font-size:13px;color:#bd351d}
.number-reference-note{font-size:12px;line-height:1.8;color:#99815c;margin:12px 0}.number-reference-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.number-reference-group{border:1px solid #dfcdab;border-radius:4px;background:#fffdf7;overflow:hidden;min-width:0}.number-reference-group h2{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0!important;padding:10px 13px;background:#f9ecd0;color:#a52918;font-size:18px!important;line-height:1.4}.number-reference-group h2 small{font-size:11px;font-weight:normal;color:#967546}.number-reference-group>.number-reference-note{padding:0 12px}.number-reference-animals{font-size:12px;color:#8c714e;line-height:1.6;padding:0 12px;margin:10px 0 0;overflow-wrap:anywhere}
.number-reference-numbers{list-style:none;padding:12px;margin:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(47px,1fr));gap:12px 5px}.number-reference-numbers li{min-width:0}.number-reference-numbers a{display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}.number-chip{display:flex;align-items:center;justify-content:center;width:37px;height:37px;border-radius:50%;font-size:19px;font-variant-numeric:tabular-nums;color:white;background:#92836b;box-shadow:inset 0 2px 3px #fff9,inset 0 -2px 3px #0002;border:1px solid #0001}.number-wave-red{background:linear-gradient(145deg,#f26651,#ce2618)}.number-wave-blue{background:linear-gradient(145deg,#62a7e8,#2564ac)}.number-wave-green{background:linear-gradient(145deg,#65b479,#287c4b)}.number-reference-numbers span{font-size:11px;color:#806645;text-align:center}.number-reference-numbers small{font-size:10px;line-height:1.5;color:#9f855d;text-align:center;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
@media(max-width:600px){.lottery-widget-links{gap:7px;font-size:10px}.lottery-widget-heading{gap:5px}.lottery-balls .lottery-ball-attributes{font-size:8px;letter-spacing:-.3px}.number-reference-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}.number-reference-tabs a{font-size:13px;padding:8px 3px}.number-reference-list{grid-template-columns:1fr;gap:9px}.number-reference-group h2{font-size:17px!important}.number-reference-numbers{grid-template-columns:repeat(auto-fit,minmax(42px,1fr));gap:11px 5px}.number-reference-kinds{gap:5px}.number-reference-kinds a{padding:6px 8px;font-size:12px}.number-lookup{gap:8px;padding:10px}.number-lookup input{width:80px}.number-lookup-result strong{font-size:13px}.number-reference-note{font-size:11px}}
