/* 品牌横幅、顶栏与开奖卡片的桌面版精细排版 */
.wrap{width:min(1200px,calc(100% - 32px))}.topbar{height:72px}.topbar .head-inner{width:min(1200px,calc(100% - 32px));justify-content:space-between}.brand{gap:12px}.logo{width:66px;height:54px;object-fit:contain;border-radius:0}.brand-name{font-size:25px;letter-spacing:.5px}.brand-slogan{display:inline;padding-left:14px;margin-left:2px;font-size:15px}.head-tools{gap:14px;margin-left:0;color:#6f819c;font-size:14px;font-variant-numeric:tabular-nums}.week{padding-left:0}.theme-switch{height:39px;padding:3px}.theme-switch>span,.theme-switch .theme-toggle{width:31px;height:31px;font-size:18px}.theme-switch>span{background:#fff;color:#637792;box-shadow:0 2px 6px #27415e14}.theme-switch .theme-toggle{background:transparent;color:#637792;cursor:pointer}.theme-switch .theme-toggle:hover{background:#e4ebf4}.hero-banner{display:block;margin:18px 0 24px;border-radius:26px;overflow:hidden;background:#fff;box-shadow:var(--shadow);line-height:0}.hero-banner img{display:block;width:100%;height:auto;aspect-ratio:3/1;object-fit:cover;transition:transform .25s ease}.hero-banner:hover img{transform:scale(1.012)}
/* 给彩球和标签保留独立的可用横向空间，避免压入倒计时区域。 */
.template-draw{grid-template-columns:minmax(300px,1.15fr) minmax(650px,2.5fr) minmax(270px,.85fr) 205px}.template-draw>div{padding:26px 28px}.template-draw .draw-info{min-width:0}.template-draw .draw-numbers{min-width:0;justify-content:center;gap:30px}.template-draw .balls-wrap{flex:0 0 auto}.template-draw .draw-tags{flex:0 0 auto}.template-draw .next-draw{min-width:0}.template-draw .draw-actions{padding:26px 24px}.template-draw .draw-actions button{white-space:nowrap}.template-draw .ball{width:80px;height:80px}.template-draw .draw-tags .tag{width:62px;height:62px;min-width:62px}.template-draw .viewing{display:none}
/* 1200px 宽电脑页：按参考图采用紧凑的四栏比例。 */
@media(min-width:981px){.template-draw{grid-template-columns:260px minmax(0,1fr) 190px 170px;margin:18px 20px}.template-draw>div{padding:20px 16px}.template-draw .draw-game{font-size:27px}.template-draw .draw-info>span,.template-draw .draw-info time{font-size:14px}.template-draw .draw-info .issue-line{margin:14px 0 6px;font-size:17px}.template-draw .draw-info .issue-line b{font-size:29px}.template-draw .draw-numbers{gap:14px}.template-draw .balls{gap:8px;min-height:62px}.template-draw .ball{width:58px;height:58px;font-size:28px}.template-draw .op{font-size:23px}.template-draw .draw-tags{gap:6px;padding-left:14px}.template-draw .draw-tags .tag{width:46px;height:46px;min-width:46px;font-size:19px}.template-draw .next-draw>p{margin-bottom:10px;font-size:15px;white-space:nowrap}.template-draw .next-draw>p b{font-size:25px}.template-draw .cd-box{font-size:31px}.template-draw .countdown em{font-size:14px}.template-draw .draw-actions{padding:18px 12px;gap:10px}.template-draw .draw-actions button{height:44px;font-size:14px}}
body.dark .theme-switch{background:#101b2a;box-shadow:inset 0 1px 2px #0008}body.dark .theme-switch>span{background:#26374c;color:#f4d57b}body.dark .theme-switch .theme-toggle{color:#d7e5f7}body.dark .hero-banner{box-shadow:0 14px 38px #0008}
@media(max-width:1500px){.template-draw{grid-template-columns:minmax(230px,.95fr) minmax(520px,2.05fr) minmax(210px,.8fr) 174px}.template-draw>div{padding:22px 18px}.template-draw .draw-numbers{gap:18px}.template-draw .ball{width:65px;height:65px;font-size:32px}.template-draw .draw-tags{padding-left:18px}.template-draw .draw-tags .tag{width:51px;height:51px;min-width:51px;font-size:20px}.template-draw .op{font-size:25px}.template-draw .draw-game{font-size:28px}}
@media(max-width:980px){.wrap{width:min(100% - 28px,760px)}.topbar{height:auto}.head-inner{padding:14px 0}.logo{width:84px;height:48px}.brand-name{font-size:23px}.head-tools{gap:9px;font-size:12px}.theme-switch{height:40px;padding:3px}.theme-switch>span,.theme-switch .theme-toggle{width:32px;height:32px;font-size:18px}.hero-banner{margin:16px 0;border-radius:16px}.template-draw{grid-template-columns:1fr 1fr}.template-draw .draw-numbers{grid-column:1/-1}.template-draw .next-draw,.template-draw .draw-actions{border-top:1px solid var(--line)}}
@media(max-width:600px){.wrap{width:min(calc(100% - 20px),520px)}.brand-name{font-size:18px}.logo{width:68px;height:40px}.head-tools time{display:none}.hero-banner{border-radius:12px}.template-draw .draw-numbers{gap:8px}.template-draw .balls{gap:5px}.template-draw .ball{width:46px;height:46px;font-size:23px}.template-draw .op{font-size:18px}.template-draw .draw-tags{padding-left:10px;gap:4px}.template-draw .draw-tags .tag{width:36px;height:36px;min-width:36px;font-size:15px}}

/* 覆盖旧浏览器对 min() 中算式的解析差异。 */
@media(max-width:980px){.wrap{width:min(calc(100% - 28px),760px)}}

@media(max-width:980px){.topbar .head-inner{justify-content:space-between}.topbar .head-tools{margin-left:0}}

/* 此规则放在末尾，确保桌面紧凑卡片不被中间断点覆盖。 */
@media(min-width:981px) and (max-width:1500px){.template-draw{grid-template-columns:260px minmax(0,1fr) 190px 170px;margin:18px 20px}.template-draw>div{padding:20px 16px}.template-draw .draw-game{font-size:27px}.template-draw .draw-info>span,.template-draw .draw-info time{font-size:14px}.template-draw .draw-info .issue-line{margin:14px 0 6px;font-size:17px}.template-draw .draw-info .issue-line b{font-size:29px}.template-draw .draw-numbers{gap:14px}.template-draw .balls{gap:8px;min-height:62px}.template-draw .ball{width:58px;height:58px;font-size:28px}.template-draw .op{font-size:23px}.template-draw .draw-tags{gap:6px;padding-left:14px}.template-draw .draw-tags .tag{width:46px;height:46px;min-width:46px;font-size:19px}.template-draw .next-draw>p{margin-bottom:10px;font-size:15px;white-space:nowrap}.template-draw .next-draw>p b{font-size:25px}.template-draw .cd-box{font-size:31px}.template-draw .countdown em{font-size:14px}.template-draw .draw-actions{padding:18px 12px;gap:10px}.template-draw .draw-actions button{height:44px;font-size:14px}}

/* 咪牌覆盖彩球与开奖标签，刮开后才同时显示。 */
.template-draw .draw-numbers{position:relative}.template-draw .draw-numbers>.scratch{position:absolute;inset:10px;width:calc(100% - 20px);height:calc(100% - 20px);z-index:8;border-radius:12px}

.template-draw .cd-wait{color:#9752c9;font-size:20px;font-weight:800;letter-spacing:.5px}
.template-draw .cd-wait[hidden]{display:none!important}

/* 夜间模式：参考深蓝灰层级，所有承载文字的区域均使用可读对比度。 */
body.dark{--bg:#0d1926;--card:#162536;--ink:#edf4fc;--muted:#9bacbf;--line:#2c4359;--shadow:0 14px 38px #0008;background:#0d1926;color:#edf4fc}body.dark .topbar{background:#132131;border-color:#263d53}body.dark .game-nav,body.dark .dashboard,body.dark .latest-grid,body.dark .template-draw,body.dark .panel,body.dark .footer-note{background:#162536;border-color:#2c4359}body.dark .hero-banner{background:#162536}body.dark .game-nav button{background:#192a3c;color:#dce8f6}body.dark .game-nav button.active{background:linear-gradient(100deg,#2a3440,#192a3c);color:#ffd269}body.dark .template-draw .draw-numbers,body.dark .template-draw .next-draw,body.dark .template-draw .draw-actions,body.dark .template-draw .draw-tags{border-color:#2c4359}body.dark .template-draw .scratch-btn,body.dark .road-controls button,body.dark .number-picker button,body.dark .sample-tabs button,body.dark .filter-tabs button,body.dark .predict-tabs button,body.dark .subtabs button{background:#1b2c3e;border-color:#355067;color:#dce8f6}body.dark .template-draw .scratch-btn:hover,body.dark .road-controls button:hover,body.dark .number-picker button:hover,body.dark .sample-tabs button:hover,body.dark .filter-tabs button:hover,body.dark .predict-tabs button:hover{background:#263c52}body.dark .tabs{border-color:#2c4359;background:#162536}body.dark .tabs button{color:#aebdd0}body.dark .tabs button.active{color:#f5c34d}body.dark .insight-card,body.dark .analysis-metrics article,body.dark .dragon-cards article,body.dark .metric-grid article,body.dark .predict-cards article,body.dark .follow-grid article,body.dark .summary-box,body.dark .sum-grid article,body.dark .abc-tables table{background:#18293b;border-color:#2f475e;color:#edf4fc}body.dark .insight-card{background:linear-gradient(145deg,#1a2b3e,#162638)}body.dark .insight-title{color:#dbe8f6}body.dark .insight-title span{background:#e4eefb;color:#3174db}body.dark .tbl,body.dark .history-table,body.dark .abc-tables table{border-color:#2c4359}body.dark .tbl th,body.dark .history-table th,body.dark .abc-tables th,body.dark .summary-box h4{background:#203448;color:#b9c8d9}body.dark .tbl td,body.dark .history-table td,body.dark .abc-tables td,body.dark .summary-box p{border-color:#2c4359;color:#e6eef8}body.dark .tbl tbody tr:hover{background:#203448}body.dark .history-table tbody tr:nth-child(even){background:#1b2d3f}body.dark .history-table tbody tr:nth-child(odd){background:#162536}body.dark .draw-cell{color:#bdcbda}body.dark .road-grid{background:#142334;border-color:#2c4359}body.dark .road-cell,.dark .line-chart,.dark .road-line{border-color:#2c4359}body.dark .shape-row span{background:#22364a;color:#c9d6e3}body.dark .hot-numbers span,body.dark .omission-grid article{background:#20364b;color:#e8f1fb}body.dark .omission-grid article.cold{background:#422a32}body.dark .footer-note{color:#aebdd0}body.dark .footer-note h3{color:#edf4fc}body.dark .theme-switch{background:#0d1926}body.dark .theme-switch>span{background:#263a4f;color:#ffd269}body.dark .head-tools,body.dark .brand-slogan{color:#aebdd0}body.dark .panel-heading h3,body.dark .section-title h3,body.dark .accent-title{color:#edf4fc}

@media(max-width:980px) and (min-width:601px){.wrap{width:min(calc(100% - 28px),760px)}}

/* 手机端按原站紧凑规格排版：不溢出，开奖信息分为倒计时与开奖结果两段。 */
@media(max-width:600px){.topbar{height:74px}.topbar .head-inner{width:calc(100% - 28px);padding:0}.topbar .logo{width:58px;height:48px}.topbar .brand{gap:8px;min-width:0}.topbar .brand-name{font-size:21px;white-space:nowrap}.topbar .brand-slogan,.topbar .head-tools time,.topbar .head-tools .week{display:none}.topbar .head-tools{flex:0 0 auto;margin:0}.topbar .theme-switch{height:38px}.topbar .theme-switch>span,.topbar .theme-switch .theme-toggle{width:30px;height:30px;font-size:17px}.hero-banner{margin:16px 0;border-radius:15px}.game-nav{padding:8px;margin:0;border-radius:14px}.game-nav button{justify-content:center;padding:9px}.game-nav small{font-size:12px}.dashboard{margin-top:16px;overflow:hidden}.template-draw{display:grid;grid-template-columns:minmax(0,1fr) 136px;margin:14px;border-radius:16px}.template-draw>div{padding:16px 12px}.template-draw .next-draw{order:1;grid-column:1;border:0;text-align:center}.template-draw .draw-actions{order:2;grid-column:2;border:0;border-left:1px solid var(--line);padding:13px 10px}.template-draw .draw-info{order:3;grid-column:1/-1;border-top:1px solid var(--line);padding:16px 14px 12px}.template-draw .draw-numbers{order:4;grid-column:1/-1;border-top:1px solid var(--line);padding:14px 6px;gap:7px;justify-content:center}.template-draw .draw-info .draw-game{font-size:27px}.template-draw .draw-info>span,.template-draw .draw-info time{font-size:14px}.template-draw .draw-info .issue-line{margin:12px 0 5px;font-size:17px}.template-draw .draw-info .issue-line b{font-size:29px}.template-draw .next-draw>p{margin-bottom:5px;font-size:15px}.template-draw .next-draw>p b{font-size:25px}.template-draw .cd-box{font-size:29px}.template-draw .countdown em{font-size:14px}.template-draw .draw-actions button{height:48px;font-size:14px}.template-draw .balls{gap:4px;min-height:42px;flex-wrap:nowrap}.template-draw .ball{width:38px;height:38px;font-size:21px}.template-draw .op{font-size:16px}.template-draw .draw-tags{gap:3px;padding-left:8px}.template-draw .draw-tags .tag{width:32px;height:32px;min-width:32px;font-size:15px}.template-draw .draw-numbers>.scratch{inset:7px;width:calc(100% - 14px);height:calc(100% - 14px)}.insight-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:0 14px 14px;gap:9px}.insight-card{min-height:150px;padding:13px}.insight-title{font-size:15px}.insight-values{margin-top:18px}.insight-values b{font-size:17px}.tabs-seven{grid-template-columns:repeat(4,1fr)}.tabs-seven button:nth-child(n+5){border-top:1px solid var(--line)}}

@media(max-width:600px){.template-draw .draw-info{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px 14px}.template-draw .draw-info .draw-game,.template-draw .draw-info>span{display:none}.template-draw .draw-info .issue-line{margin:0;font-size:16px;white-space:nowrap}.template-draw .draw-info .issue-line b{font-size:23px}.template-draw .draw-info time{font-size:13px;white-space:nowrap;text-align:right}.template-draw .draw-numbers{justify-content:space-between;padding:12px 14px}.template-draw .draw-tags{margin-left:auto}.template-draw .cd-wait{font-size:22px}.template-draw .countdown strong[hidden]{display:none!important}}

/* 窄屏顶栏跟随 7C 标志高度，不再留下底部空白。 */
@media(max-width:980px){.topbar{height:64px}.topbar .head-inner{height:64px;padding:0;align-items:center}.topbar .logo{width:54px;height:46px}.topbar .brand{height:100%;align-items:center}.topbar .head-tools{align-items:center}}
@media(max-width:600px){.topbar,.topbar .head-inner{height:64px}.topbar .head-inner{width:calc(100% - 28px)}.topbar .logo{width:52px;height:46px}}
