/* ==========================================================================
   一定牛 · 开奖数据中心  样式系统
   --------------------------------------------------------------------------
   01 设计变量 / 02 基础重置 / 03 布局骨架 / 04 顶栏与导航 / 05 通用组件
   06 首页 / 07 历史开奖 / 08 走势分析 / 09 路珠分析 / 10 玩法规则
   11 页脚与移动端底栏 / 12 响应式
   ========================================================================== */

/* ---------- 01 设计变量 ---------- */
:root {
    /* 品牌色 */
    --red: #A8342A;
    --red-deep: #8E2620;
    --red-soft: #FBF0EE;
    --red-line: #E7C4BF;
    --gold: #B8862B;

    /* 中性色 */
    --ink: #14161B;
    --ink-2: #363C48;
    --ink-3: #5B6273;
    --muted: #858C9B;
    --line: #E4E4E4;
    --line-soft: #EFEFEF;
    --bg: #F0F0F0;
    --white: #FFFFFF;

    /* 单双大小用的辅助色 */
    --blue: #4286DA;

    /* 尺寸 */
    --r-lg: 16px;
    --r-md: 12px;
    --r-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow-md: 0 2px 4px rgba(16, 24, 40, .04), 0 12px 28px -16px rgba(16, 24, 40, .18);
    --shadow-lg: 0 4px 10px rgba(16, 24, 40, .05), 0 30px 60px -30px rgba(16, 24, 40, .28);

    --header-h: 64px;
    --container: 1200px;

    /* 数字字体栈：等宽数字，表格对齐 */
    --font-num: "DIN Alternate", "Bahnschrift", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- 02 基础重置 ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; border: 0; }
button { font: inherit; color: inherit; }
table { border-collapse: collapse; border-spacing: 0; }

::selection { background: var(--red); color: #fff; }

/* 数字统一等宽，避免跳动 */
.num,
.ball,
.data-table td,
.countdown b { font-variant-numeric: tabular-nums; }

/* ---------- 03 布局骨架 ---------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.page-main { padding: 24px 0 64px; }

.stack-24 > * + * { margin-top: 24px; }

/* ---------- 04 顶栏与导航 ---------- */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--line);
}

.app-header .container {
    display: flex;
    align-items: center;
    gap: 28px;
    height: var(--header-h);
}

/* 品牌标志：纯矢量重建，比 105KB 的位图更清晰 */
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(150deg, #F2293F 0%, var(--red) 45%, var(--red-deep) 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -1px;
    box-shadow: 0 4px 10px -4px rgba(222, 15, 42, .8);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: .5px;
    color: var(--ink);
}
.brand-sub {
    font-size: 10px;
    letter-spacing: 2.2px;
    color: var(--muted);
    text-transform: uppercase;
}

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; }

.main-nav a {
    position: relative;
    padding: 8px 14px;
    border-radius: var(--r-sm);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-2);
    transition: color .16s, background .16s;
    white-space: nowrap;
}

.main-nav a:hover { color: var(--red); background: var(--red-soft); }

.main-nav a.is-active { color: var(--red); font-weight: 700; }

.main-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--red);
}

.header-tools { display: flex; align-items: center; gap: 14px; flex: none; }

.views {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
}
.views b {
    font-family: var(--font-num);
    font-size: 16px;
    color: var(--red);
    letter-spacing: .5px;
}

/* 彩种切换下拉 */
.type-select { position: relative; }

.type-select-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 12px 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color .16s, box-shadow .16s;
}
.type-select-btn:hover { border-color: var(--red-line); box-shadow: 0 2px 8px -2px rgba(222, 15, 42, .25); }
.type-select-btn::after {
    content: "";
    width: 6px;
    height: 6px;
    border-right: 1.6px solid var(--muted);
    border-bottom: 1.6px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
}

.type-select-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 168px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 120;
}
.type-select.is-open .type-select-menu { display: block; }

.type-select-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--ink-2);
}
.type-select-menu a:hover { background: var(--red-soft); color: var(--red); }
.type-select-menu a.is-on { color: var(--red); font-weight: 700; }
.type-select-menu a.is-on::after { content: "✓"; font-size: 12px; }

/* ---------- 05 通用组件 ---------- */
/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .12s, box-shadow .16s, background .16s, border-color .16s;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 16px -8px rgba(222, 15, 42, .9); }
.btn-primary:hover { background: #C90C25; }

.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--red-line); color: var(--red); background: var(--red-soft); }

.btn-sm { height: 32px; padding: 0 14px; font-size: 13px; }

/* 胶囊筛选 */
.chip-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    color: var(--ink-3);
    cursor: pointer;
    transition: all .16s;
    white-space: nowrap;
}
.chip:hover { border-color: var(--red-line); color: var(--red); }
.chip.is-on {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 14px -8px rgba(222, 15, 42, .9);
}

/* 卡片 / 面板 */
.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
}

.card-title::before {
    content: "";
    width: 4px;
    height: 16px;
    border-radius: 3px;
    background: var(--red);
}

.card-body { padding: 20px; }

/* 号码球 */
.ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid var(--blue);
    background: #fff;
    color: var(--blue);
    font-family: var(--font-num);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    flex: none;
}

.ball.is-blue { border-color: var(--blue); color: var(--blue); }
.ball.is-solid {
    background: linear-gradient(160deg, #F2293F, var(--red-deep));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 6px 14px -8px rgba(222, 15, 42, .9);
}
.ball.ball-lg { width: 56px; height: 56px; font-size: 26px; border-width: 2px; }
.ball.ball-xl { width: 72px; height: 72px; font-size: 34px; border-width: 3px; }
.ball.ball-sm { width: 26px; height: 26px; font-size: 13px; border-width: 1.5px; }

.ball-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

/* 单双大小标签 */
.tag { font-weight: 600; font-size: 13px; }
.tag-red { color: var(--red); }
.tag-blue { color: var(--blue); }

/* 表格 */
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    font-size: 14px;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid var(--line-soft);
}

.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #FBFBFD;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
    border-bottom: 1px solid var(--line);
}

.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #FCFCFE; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 加载 / 空状态 */
.loading,
.empty {
    padding: 64px 20px;
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.empty b { display: block; font-size: 30px; margin-bottom: 10px; opacity: .28; }

.skeleton {
    background: linear-gradient(90deg, #F1F3F7 25%, #F8F9FC 37%, #F1F3F7 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s ease infinite;
    border-radius: 6px;
    color: transparent;
}

@keyframes shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* 返回顶部 */
.to-top {
    position: fixed;
    right: 24px;
    bottom: 32px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink-3);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .22s;
    z-index: 90;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--red); border-color: var(--red-line); }
.to-top svg { width: 18px; height: 18px; }

/* ---------- 06 首页 ---------- */
/* 公告条 */
.notice-bar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-3);
}
.notice-bar .container {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 38px;
    overflow: hidden;
}
.notice-tag {
    flex: none;
    padding: 1px 8px;
    border-radius: 4px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .5px;
}
.notice-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--muted);
}

/* Hero 主视觉 */
.hero {
    position: relative;
    margin-top: 20px;
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 88% -10%, rgba(255, 214, 148, .30) 0%, rgba(255, 214, 148, 0) 55%),
        radial-gradient(100% 100% at 10% 110%, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 60%),
        linear-gradient(140deg, #2A0B10 0%, #6E0A18 42%, var(--red-deep) 78%, #D8192F 100%);
    color: #fff;
    box-shadow: 0 24px 50px -30px rgba(120, 8, 20, .9);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 0;
}

.hero-main { padding: 28px 30px 26px; }

.hero-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, .62);
    text-transform: uppercase;
}
.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #62E39B;
    box-shadow: 0 0 0 3px rgba(98, 227, 155, .2);
    animation: pulse 2s ease infinite;
}
@keyframes pulse {
    50% { box-shadow: 0 0 0 6px rgba(98, 227, 155, 0); }
}

.hero-tabs { display: flex; gap: 6px; margin-top: 18px; }

.hero-tabs button {
    height: 30px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
    cursor: pointer;
    transition: all .16s;
}
.hero-tabs button:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.hero-tabs button.is-on {
    background: #fff;
    border-color: #fff;
    color: var(--red-deep);
    font-weight: 700;
}

.hero-issue {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.hero-issue .no {
    font-family: var(--font-num);
    font-size: 30px;
    font-weight: 700;
    letter-spacing: 1px;
}
.hero-issue .no small { font-size: 14px; font-weight: 400; opacity: .6; margin-left: 2px; }
.hero-issue .time { font-size: 13px; color: rgba(255, 255, 255, .58); }

.hero-balls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 18px;
    flex-wrap: wrap;
}
.hero-balls .ball {
    border-color: transparent;
    background: linear-gradient(160deg, #FFF5F6 0%, #FFD9DE 100%);
    color: var(--red-deep);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .8);
}
.hero-balls .plus { font-size: 20px; opacity: .35; margin: 0 2px; }

.hero-facts { display: flex; gap: 22px; flex-wrap: wrap; }
.hero-fact { font-size: 12px; color: rgba(255, 255, 255, .58); }
.hero-fact b {
    display: block;
    font-family: var(--font-num);
    font-size: 18px;
    color: #fff;
    margin-top: 2px;
}

.hero-count {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .1);
}
.hero-count .label { font-size: 12px; color: rgba(255, 255, 255, .6); flex: none; }
.hero-count .countdown {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-num);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}
.hero-count .countdown i {
    font-style: normal;
    font-size: 12px;
    font-weight: 400;
    color: rgba(255, 255, 255, .5);
    margin-right: 4px;
}

.hero-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 20px;
}
.hero-actions a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .14);
    font-size: 13px;
    font-weight: 600;
    transition: all .16s;
}
.hero-actions a:hover { background: #fff; color: var(--red-deep); border-color: #fff; }

/* 右侧：今日速览 */
.hero-side {
    padding: 28px 26px 26px;
    background: rgba(0, 0, 0, .18);
    border-left: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-direction: column;
}
.side-title {
    font-size: 12px;
    letter-spacing: 1.6px;
    color: rgba(255, 255, 255, .55);
    text-transform: uppercase;
}
.side-list { margin-top: 14px; display: flex; flex-direction: column; gap: 2px; flex: 1; }

.side-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.side-item:last-child { border-bottom: none; }

.side-item .si-name { font-size: 13px; color: rgba(255, 255, 255, .82); flex: 1; }
.side-item .si-name small {
    display: block;
    font-size: 11px;
    color: rgba(255, 255, 255, .4);
    margin-top: 1px;
}
.side-item .si-balls { display: flex; gap: 5px; }
.side-item .si-balls span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .12);
    font-family: var(--font-num);
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

/* 彩种卡片网格 */
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.section-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.2px;
}
.section-desc { font-size: 13px; color: var(--muted); margin-top: 2px; }

.lottery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.lot-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 18px 0;
    transition: border-color .18s, box-shadow .18s, transform .18s;
    display: flex;
    flex-direction: column;
}
.lot-card:hover {
    border-color: var(--red-line);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.lot-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.lot-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
}
.lot-badge {
    padding: 1px 7px;
    border-radius: 5px;
    background: var(--red-soft);
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .4px;
}
.lot-badge.is-gray { background: #F2F4F8; color: var(--ink-3); }
.lot-issue {
    font-family: var(--font-num);
    font-size: 12px;
    color: var(--muted);
}

.lot-balls {
    display: flex;
    gap: 8px;
    margin: 14px 0 10px;
}
.lot-balls .ball { width: 40px; height: 40px; font-size: 19px; }

.lot-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--muted);
    padding-bottom: 16px;
}
.lot-meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line); }

.lot-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--line-soft);
    margin: 0 -18px;
}
.lot-links a {
    padding: 11px 0;
    text-align: center;
    font-size: 12.5px;
    color: var(--ink-3);
    border-left: 1px solid var(--line-soft);
    transition: all .14s;
}
.lot-links a:first-child { border-left: none; }
.lot-links a:hover { color: var(--red); background: var(--red-soft); }

/* ---------- 07 历史开奖 ---------- */
.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.page-title {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.4px;
    line-height: 1.25;
}
.page-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--muted);
    margin-bottom: 14px;
}
.breadcrumb a:hover { color: var(--red); }
.breadcrumb .sep { opacity: .5; }

.toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
    background: #FCFCFE;
}
.toolbar .spacer { flex: 1; }
.toolbar-label { font-size: 12.5px; color: var(--muted); }

.stat-cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 16px 20px 20px;
}
.stat-card {
    padding: 14px 16px;
    border-radius: var(--r-md);
    background: #FAFBFD;
    border: 1px solid var(--line-soft);
}
.stat-card .k { font-size: 12px; color: var(--muted); }
.stat-card .v {
    font-family: var(--font-num);
    font-size: 22px;
    font-weight: 700;
    margin-top: 2px;
}
.stat-card .v small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 3px; }

.sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-3);
    cursor: pointer;
}
.sort-btn:hover { color: var(--red); }
.sort-btn svg { width: 12px; height: 12px; transition: transform .2s; }
.sort-btn.is-asc svg { transform: rotate(180deg); }

.history-table .col-idx { color: var(--muted); font-size: 12.5px; width: 56px; }
.history-table .col-issue { font-family: var(--font-num); font-weight: 600; }
.history-table .col-time { color: var(--ink-3); font-size: 13px; }
.history-table .col-sum { font-family: var(--font-num); font-weight: 700; font-size: 15px; padding-right: 26px; }
.history-table tbody tr.is-latest { background: var(--red-soft); }
.history-table tbody tr.is-latest .col-issue { color: var(--red); }

/* ---------- 08 走势分析 ---------- */
.an-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}
.an-tabs::-webkit-scrollbar { display: none; }
.an-tabs a {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-3);
    transition: all .16s;
}
.an-tabs a:hover { border-color: var(--red-line); color: var(--red); }
.an-tabs a.is-on {
    background: var(--red);
    border-color: var(--red);
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(222, 15, 42, .9);
}

.an-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.an-note {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    padding: 10px 20px;
    font-size: 12.5px;
    color: var(--ink-3);
    background: #FCFCFE;
    border-bottom: 1px solid var(--line-soft);
}
.an-note label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.an-note input { accent-color: var(--red); width: 14px; height: 14px; }

/* 走势图主体：固定表头 + 横向滚动 */
.chart-scroll {
    position: relative;
    overflow: auto;
    max-height: none;
}

.chart-table {
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
    table-layout: fixed;
    width: auto;
    min-width: 100%;
}

.chart-table th,
.chart-table td {
    padding: 0;
    text-align: center;
    border-right: 1px solid #ECECEC;
    border-bottom: 1px solid #ECECEC;
}

.chart-table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 46px;
    background: #FAFAFA;
    font-weight: 600;
    color: var(--ink-3);
    font-size: 11.5px;
    line-height: 1.25;
    padding: 4px 0;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
}

.chart-table thead tr.group th {
    height: 34px;
    background: #F3F3F3;
    color: var(--ink-2);
    font-weight: 700;
    font-size: 12px;
}

.chart-table .fix-col {
    position: sticky;
    left: 0;
    z-index: 4;
    background: #fff;
    min-width: 86px;
    font-family: var(--font-num);
    font-size: 12.5px;
    color: var(--ink-2);
}
.chart-table thead .fix-col { z-index: 6; background: #F7F8FB; }

.chart-table .fix-col-2 {
    position: sticky;
    left: 86px;
    z-index: 4;
    background: #fff;
    min-width: 82px;
    color: var(--muted);
    font-size: 11.5px;
}
.chart-table thead .fix-col-2 { z-index: 6; background: #F7F8FB; }

.chart-table tbody tr:nth-child(even) .fix-col,
.chart-table tbody tr:nth-child(even) .fix-col-2 { background: #FCFCFE; }

.chart-table td { height: 30px; }

/* 号码格 */
.cell-num {
    font-family: var(--font-num);
    font-size: 11px;
    color: #C4C4C4;
    width: 21px;
    min-width: 21px;
}

.cell-hit {
    display: inline-grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--red);
    color: #fff;
    font-family: var(--font-num);
    font-weight: 700;
    font-size: 11.5px;
    box-shadow: 0 4px 10px -6px rgba(222, 15, 42, .9);
}

.cell-hit.is-blue { background: var(--blue); box-shadow: 0 4px 10px -6px rgba(29, 111, 232, .9); }

.cell-hot { color: var(--red); font-family: var(--font-num); font-weight: 700; font-size: 12px; }

/* 折线层 */
.chart-canvas-wrap { position: relative; }
.chart-lines {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 5;
    overflow: visible;
}

/* 底部统计表 */
.chart-stats {
    border-top: 1px solid var(--line);
    background: #FCFCFE;
}
.chart-stats th,
.chart-stats td {
    padding: 8px 6px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
    border-bottom: 1px solid var(--line-soft);
    font-family: var(--font-num);
}
.chart-stats th {
    color: var(--ink-3);
    font-weight: 600;
    background: #F7F8FB;
    font-family: inherit;
}

/* ---------- 09 路珠分析 ---------- */
.lz-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.lz-block { border-bottom: 1px solid var(--line-soft); }
.lz-block:last-child { border-bottom: none; }

.lz-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px 10px;
    flex-wrap: wrap;
}
.lz-pos {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
}
.lz-pos span.count {
    font-size: 12px;
    font-weight: 400;
    color: var(--muted);
}
.lz-sum { display: flex; align-items: center; gap: 14px; font-size: 12.5px; color: var(--muted); }
.lz-sum b { font-family: var(--font-num); font-size: 14px; }
.lz-sum .hi { color: var(--red); }

.lz-track {
    display: flex;
    gap: 3px;
    padding: 0 20px 18px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.lz-track::-webkit-scrollbar { height: 6px; }
.lz-track::-webkit-scrollbar-thumb { background: #DDE1E9; border-radius: 3px; }

.lz-run {
    flex: none;
    min-width: 26px;
    padding: 6px 0;
    border-radius: 6px;
    text-align: center;
    background: #F7F8FB;
}
.lz-run.alt { background: #EFF2F7; }

.lz-run i {
    display: block;
    font-style: normal;
    font-family: var(--font-num);
    font-size: 13px;
    line-height: 20px;
    color: var(--ink-3);
}
.lz-run i.hi { color: var(--red); font-weight: 700; }
.lz-run i.last { font-weight: 700; }
.lz-run i.last.hi { color: #fff; }
.lz-run i.last.hi::after { content: ""; }

.lz-run:last-child i.last { background: var(--red); color: #fff; border-radius: 4px; }
.lz-run:last-child i.last:not(.hi) { background: var(--ink-2); color: #fff; }

/* ---------- 10 玩法规则 ---------- */
.rule-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.rule-nav {
    position: sticky;
    top: calc(var(--header-h) + 20px);
    padding: 14px;
}
.rule-nav .t { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 8px; }
.rule-nav a {
    display: block;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    font-size: 13px;
    color: var(--ink-3);
    line-height: 1.45;
}
.rule-nav a:hover { background: var(--red-soft); color: var(--red); }

.rule-body { padding: 28px 32px 36px; }

.rule-body h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 20px;
    letter-spacing: -.3px;
}
.rule-body h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    margin: 26px 0 10px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
    color: var(--ink);
}
.rule-body h3:first-of-type { border-top: none; padding-top: 0; }
.rule-body p {
    font-size: 14px;
    line-height: 1.85;
    color: var(--ink-2);
    margin: 6px 0;
}
.rule-body .rule_box { margin: 0 !important; }

/* ---------- 11 页脚 ---------- */
.site-footer {
    margin-top: 48px;
    padding: 32px 0 40px;
    background: #fff;
    border-top: 1px solid var(--line);
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}
.footer-brand { max-width: 320px; }
.footer-brand .brand { margin-bottom: 12px; }
.footer-brand p { font-size: 12.5px; color: var(--muted); line-height: 1.8; }

.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-col .t { font-size: 12px; font-weight: 700; color: var(--ink-2); margin-bottom: 10px; letter-spacing: .5px; }
.footer-col a { display: block; font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.footer-col a:hover { color: var(--red); }

.footer-copy {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
    font-size: 12px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* 移动端底部导航 */
.tabbar { display: none; }

/* ---------- 12 响应式 ---------- */
@media (max-width: 1100px) {
    .lottery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { border-left: none; border-top: 1px solid rgba(255, 255, 255, .1); }
    .rule-layout { grid-template-columns: 1fr; }
    .rule-nav { display: none; }
}

@media (max-width: 860px) {
    .main-nav { display: none; }
    .header-tools .views { display: none; }
    .page-main { padding: 16px 0 88px; }
    .container { padding: 0 14px; }
    .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
    :root { --header-h: 56px; }

    body { font-size: 14px; }

    /* 顶栏：品牌 + 彩种切换 */
    .app-header .container { gap: 12px; }
    .brand-mark { width: 34px; height: 34px; font-size: 18px; }
    .brand-name { font-size: 15px; }
    .brand-sub { font-size: 8px; letter-spacing: 1.6px; }
    .type-select-btn { height: 32px; font-size: 12.5px; padding: 0 10px 0 12px; }

    /* 公告条 */
    .notice-bar .container { height: 34px; }
    .notice-text { font-size: 12px; }

    /* Hero */
    .hero { border-radius: 18px; }
    .hero-main { padding: 20px 18px; }
    .hero-issue .no { font-size: 24px; }
    .hero-balls { gap: 10px; }
    .hero-balls .ball { width: 52px; height: 52px; font-size: 24px; }
    .hero-actions { grid-template-columns: repeat(2, 1fr); }
    .hero-facts { gap: 18px; }
    .hero-side { padding: 20px 18px; }

    /* 彩种卡片：单列 */
    .lottery-grid { grid-template-columns: 1fr; gap: 12px; }
    .lot-card { padding: 16px 16px 0; }
    .lot-links { margin: 0 -16px; }
    .lot-links a { padding: 12px 0; font-size: 12px; }
    .lot-balls .ball { width: 38px; height: 38px; font-size: 18px; }

    .section-title { font-size: 17px; }
    .page-title { font-size: 21px; }

    /* 历史页 */
    .toolbar { padding: 12px 14px; gap: 10px; }
    .stat-cards { padding: 12px 14px 14px; gap: 10px; }
    .stat-card { padding: 12px; }
    .stat-card .v { font-size: 18px; }
    .data-table th,
    .data-table td { padding: 10px 8px; }

    /* 走势图筛选 */
    .an-filters { padding: 12px 14px; gap: 8px; }
    .an-note { padding: 10px 14px; gap: 12px; }

    /* 规则 */
    .rule-body { padding: 20px 18px 26px; }
    .rule-body h1 { font-size: 20px; }
    .rule-body h3 { font-size: 15px; }

    /* 页脚换成底栏 */
    .site-footer { display: none; }

    .tabbar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 95;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        background: rgba(255, 255, 255, .96);
        backdrop-filter: saturate(180%) blur(14px);
        border-top: 1px solid var(--line);
        padding-bottom: env(safe-area-inset-bottom);
    }
    .tabbar a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 7px 0 6px;
        font-size: 10.5px;
        color: var(--muted);
    }
    .tabbar a svg { width: 21px; height: 21px; }
    .tabbar a.is-active { color: var(--red); }

    .to-top { bottom: 76px; right: 14px; width: 40px; height: 40px; }
}

@media (hover: none) {
    .lot-card:hover { transform: none; box-shadow: none; border-color: var(--line); }
}

/* ==========================================================================
   追加：历史列表（移动端）、走势图叠层、下拉样式、遗漏分层
   ========================================================================== */

/* 移动端历史列表 */
.hist-list { display: none; }
.hist-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 23px 12px 14px;
    border-bottom: 1px solid var(--line-soft);
}

/* 渐进式加载：长列表只渲染可视区域，滚动更顺滑 */
.history-table tbody tr,
.hist-item {
    content-visibility: auto;
}
.history-table tbody tr { contain-intrinsic-size: 0 46px; }
.hist-item { contain-intrinsic-size: 0 76px; }
.hist-item:last-child { border-bottom: none; }
.hist-item .h-l { display: flex; flex-direction: column; min-width: 126px; line-height: 1.4; }
.hist-item .h-issue { font-family: var(--font-num); font-size: 13.5px; font-weight: 600; }
.hist-item .h-date { font-size: 11.5px; color: var(--muted); }
.hist-item .h-balls { display: flex; gap: 6px; flex: 1; align-items: center; }
.hist-item .h-sum {
    font-family: var(--font-num);
    font-size: 16px;
    font-weight: 700;
    color: var(--ink-2);
    line-height: 1.2;
    min-width: 34px;
    text-align: center;
}

/* 走势图：叠层与折线 */
.chart-canvas-wrap {
    position: relative;
    isolation: isolate;
    min-width: 100%;
}
.chart-lines {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 0;
    pointer-events: none;
    overflow: visible;
}
.chart-table { position: relative; z-index: 1; }

/* 遗漏值深浅分层 */
.cell-num { color: #C4C4C4; }
.cell-num.lost-1 { color: #A6A6A6; }
.cell-num.lost-2 { color: #6B6B6B; font-weight: 700; }
.cell-num.lost-3 { color: #2F2F2F; font-weight: 700; }

/* 表尾统计（与主表同列，保证对齐） */
.chart-table tfoot th,
.chart-table tfoot td {
    padding: 8px 6px;
    font-family: var(--font-num);
    font-size: 12px;
    text-align: center;
    background: #FCFCFE;
    border-top: 1px solid var(--line);
    color: var(--ink-2);
}
.chart-table tfoot th {
    font-family: inherit;
    font-weight: 600;
    color: var(--ink-3);
    text-align: left;
    padding-left: 14px;
    position: sticky;
    left: 0;
    z-index: 4;
    background: #FCFCFE;
}

/* 下拉：复用 chip 外观 */
select.chip {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23858C9B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    font-family: inherit;
}
select.chip:focus { outline: 2px solid rgba(222, 15, 42, .25); outline-offset: 1px; }

@media (max-width: 720px) {
    .history-table { display: none; }
    .hist-list { display: block; }

    .chart-table thead th { font-size: 11px; }
    .chart-table .fix-col { min-width: 74px; font-size: 12px; }
    .chart-table .fix-col-2 { left: 74px; }

    .lz-track { padding: 0 14px 16px; }
    .lz-head { padding: 12px 14px 8px; }
    .lz-run { min-width: 24px; }

    .rule-nav { display: none; }
}

/* ---------- 细节修正 ---------- */
/* 今日速览：提高对比度 */
.hero-side .si-balls span {
    background: #fff;
    color: var(--red-deep);
    font-weight: 700;
    box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .9);
}

/* Hero 指标：等宽分隔 */
.hero-facts { gap: 0; }
.hero-fact {
    padding: 0 20px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}
.hero-fact:first-child { padding-left: 0; border-left: none; }

/* 走势图：限制高度，表头与期号列保持吸顶 */
.chart-scroll { max-height: 74vh; }
.chart-scroll::-webkit-scrollbar { width: 10px; height: 10px; }
.chart-scroll::-webkit-scrollbar-thumb { background: #D7DCE5; border-radius: 5px; border: 2px solid #fff; }
.chart-scroll::-webkit-scrollbar-track { background: #F7F8FB; }

/* 表尾统计标签：必须单行，sticky 会让 colspan 宽度塌陷 */
.chart-table tfoot th {
    position: static;
    white-space: nowrap;
    text-align: left;
    padding-left: 14px;
}

/* 历史表格更紧凑 */
.history-table th,
.history-table td { padding: 9px 8px; }

/* 规则正文阅读宽度 */
.rule-body > * { max-width: 780px; }

/* 路珠：列更松、块内滚动 */
.lz-run { min-width: 30px; }
.lz-track { align-items: flex-start; }

/* 加载更多 */
.load-more {
    display: flex;
    justify-content: center;
    padding: 16px;
    border-top: 1px solid var(--line-soft);
}

/* ==========================================================================
   移动端专项（≤720px）—— 以 390px 为基准重排
   ========================================================================== */
@media (max-width: 720px) {

    /* ---------- 顶栏更紧凑 ---------- */
    .app-header .container { height: 54px; gap: 10px; }
    .brand-mark { width: 32px; height: 32px; font-size: 17px; border-radius: 9px; }
    .brand-name { font-size: 15px; }
    .type-select-btn { height: 32px; padding: 0 10px; font-size: 12.5px; }

    .notice-bar .container { height: 32px; gap: 8px; }
    .notice-tag { font-size: 10px; padding: 1px 6px; }
    .notice-text { font-size: 11.5px; }

    /* ---------- Hero：压缩纵向高度 ---------- */
    .hero { margin-top: 12px; border-radius: 16px; }
    .hero-main { padding: 16px 16px 14px; }
    .hero-eyebrow { font-size: 10.5px; letter-spacing: 1.4px; }
    .hero-tabs { margin-top: 10px; gap: 6px; }
    .hero-tabs button { height: 28px; padding: 0 12px; font-size: 12.5px; }

    .hero-issue { margin-top: 10px; gap: 8px; }
    .hero-issue .no { font-size: 23px; }
    .hero-issue .no small { font-size: 12px; }
    .hero-issue .time { font-size: 11.5px; }

    .hero-balls { margin: 12px 0 12px; gap: 9px; }
    .hero-balls .ball { width: 54px; height: 54px; font-size: 25px; }

    .hero-facts { display: grid; grid-template-columns: repeat(4, 1fr); }
    .hero-fact { padding: 0 10px; font-size: 11px; }
    .hero-fact:first-child { padding-left: 0; }
    .hero-fact b { font-size: 16px; margin-top: 0; }

    .hero-count { margin-top: 12px; padding: 9px 12px; gap: 8px; }
    .hero-count .label { font-size: 11px; }
    .hero-count .countdown { font-size: 18px; }
    .hero-count .countdown i { font-size: 10px; }

    .hero-actions { grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; }
    .hero-actions a { height: 40px; font-size: 12px; border-radius: 9px; }

    /* 今日速览：2×2 小卡 */
    .hero-side { padding: 14px 16px 16px; display: block; }
    .side-title { font-size: 10.5px; }
    .side-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        margin-top: 10px;
    }
    .side-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 9px 10px;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 10px;
        background: rgba(255, 255, 255, .06);
    }
    .side-item .si-name { font-size: 12px; }
    .side-item .si-name small { font-size: 10.5px; }
    .side-item .si-balls span { width: 25px; height: 25px; font-size: 12.5px; }

    /* ---------- 彩种卡片 ---------- */
    .section-head { margin-bottom: 12px; align-items: center; }
    .section-title { font-size: 16.5px; }
    .section-desc { font-size: 12px; }
    .lottery-grid { gap: 10px; }
    .lot-card { padding: 14px 14px 0; border-radius: 14px; }
    .lot-top { gap: 8px; }
    .lot-name { font-size: 14.5px; }
    .lot-badge { font-size: 9.5px; padding: 1px 6px; }
    .lot-issue { font-size: 11.5px; }
    .lot-balls { margin: 10px 0 8px; gap: 7px; }
    .lot-balls .ball { width: 38px; height: 38px; font-size: 18px; }
    .lot-meta { padding-bottom: 12px; font-size: 11.5px; }
    .lot-links { margin: 0 -14px; }
    .lot-links a { padding: 11px 0; font-size: 12px; }

    /* ---------- 页头 / 筛选 ---------- */
    .page-head { flex-direction: column; align-items: stretch; gap: 10px; margin-bottom: 14px; }
    .page-title { font-size: 20px; }
    .page-sub { font-size: 12px; margin-top: 3px; }

    /* 彩种、年份 chips 一律横向滚动，不换行占两屏 */
    .chip-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
    }
    .chip-row::-webkit-scrollbar { display: none; }
    .chip { flex: none; height: 34px; padding: 0 14px; font-size: 13px; }

    .toolbar { padding: 10px 12px; gap: 8px; flex-wrap: nowrap; }
    .toolbar .toolbar-label { display: none; }
    .toolbar .spacer { display: none; }
    #yearChips { flex: 1 1 auto; min-width: 0; }
    #yearChips .chip { height: 32px; padding: 0 12px; font-size: 12.5px; }
    .toolbar .sort-btn { flex: none; font-size: 12.5px; }
    #exportBtn { display: none; }

    /* 统计卡 2×2 */
    .stat-cards { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
    .stat-card { padding: 10px 12px; border-radius: 10px; }
    .stat-card .k { font-size: 11px; }
    .stat-card .v { font-size: 18px; }

    /* ---------- 历史列表 ---------- */
    .hist-item { padding: 11px 23px 11px 14px; gap: 10px; }
    .hist-item .h-l { min-width: 118px; }
    .hist-item .h-issue { font-size: 13px; }
    .hist-item .h-date { font-size: 11px; }
    .hist-item .h-balls { gap: 5px; }
    .hist-item .h-sum { font-size: 15px; }
    .load-more { padding: 12px; }

    /* ---------- 走势图筛选 ---------- */
    .an-tabs { gap: 6px; margin-bottom: 12px !important; }
    .an-tabs a { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

    .an-filters { padding: 10px 12px; gap: 8px; display: flex; flex-wrap: wrap; }
    .an-filters #sizeChips { flex: 1 1 100%; gap: 6px; }
    .an-filters #sizeChips .chip { height: 32px; padding: 0 12px; font-size: 12.5px; }
    .an-filters .spacer { display: none !important; }
    .an-filters select.chip {
        flex: 1 1 30%;
        min-width: 0;
        height: 34px;
        padding: 0 24px 0 10px;
        font-size: 12px;
    }
    .an-note { padding: 9px 12px; gap: 12px; font-size: 12px; }

    .scroll-hint {
        display: block;
        padding: 6px 12px;
        font-size: 11px;
        color: var(--muted);
        text-align: center;
        background: #FCFCFE;
        border-bottom: 1px solid var(--line-soft);
    }

    .chart-table thead th { font-size: 10.5px; height: 40px; }
    .chart-table thead tr.group th { height: 30px; font-size: 11px; }
    .chart-table .fix-col { font-size: 11.5px; }
    .chart-table .fix-col div { font-size: 9.5px !important; }
    .cell-num { font-size: 10px; }
    .cell-hit { width: 18px; height: 18px; font-size: 10.5px; }
    .chart-scroll { max-height: 68vh; }

    /* ---------- 路珠 ---------- */
    .lz-toolbar { padding: 10px 12px; gap: 10px; }
    .lz-toolbar select.chip { height: 32px; font-size: 12.5px; }
    .lz-head { padding: 10px 12px 6px; gap: 6px; }
    .lz-pos { font-size: 13.5px; }
    .lz-pos .count { font-size: 11px; }
    .lz-sum { gap: 10px; font-size: 11.5px; }
    .lz-sum b { font-size: 13px; }
    .lz-track { padding: 0 12px 14px; gap: 3px; }
    .lz-run { min-width: 25px; padding: 5px 0; }
    .lz-run i { font-size: 12px; line-height: 19px; }

    /* ---------- 规则 ---------- */
    .rule-body { padding: 18px 16px 24px; border-radius: 14px; }
    .rule-body > * { max-width: 100%; }
    .rule-body h1 { font-size: 19px; }
    .rule-body h3 { font-size: 14.5px; margin: 20px 0 8px; padding-top: 16px; }
    .rule-body p { font-size: 13.5px; line-height: 1.8; }

    /* ---------- 底部导航 ---------- */
    .tabbar { box-shadow: 0 -6px 20px -12px rgba(16, 24, 40, .25); }
    .tabbar a { padding: 8px 0 7px; gap: 2px; font-size: 10px; }
    .tabbar a svg { width: 22px; height: 22px; }
    .tabbar a.is-active svg { transform: translateY(-1px); }

    .page-main { padding-bottom: 84px; }

    /* 触摸按下反馈 */
    .is-pressed { opacity: .72; }
}

/* 超小屏（iPhone SE 等） */
@media (max-width: 360px) {
    .hero-balls .ball { width: 48px; height: 48px; font-size: 22px; }
    .hero-actions a { font-size: 11px; }
    .hero-fact { padding: 0 6px; }
    .side-list { grid-template-columns: 1fr; }
}

/* 桌面端隐藏移动提示 */
.scroll-hint { display: none; }

/* ---------- 移动端二次优化 ---------- */
@media (max-width: 720px) {
    /* 滑动提示（上一段被后面的 display:none 覆盖了） */
    .scroll-hint { display: block; }

    /* 参考彩种（试机号/开机号）改用紧凑横排，节省一屏 */
    .lot-card.is-compact { padding: 12px 14px; }
    .lot-card.is-compact .lot-balls { margin: 8px 0 6px; }
    .lot-card.is-compact .lot-balls .ball { width: 32px; height: 32px; font-size: 15px; }
    .lot-card.is-compact .lot-meta { padding-bottom: 0; }
    .lot-card.is-compact .lot-links { display: none; }

    /* 历史行更紧凑 */
    .hist-item { padding: 9px 23px 9px 12px; }
    .hist-item .h-issue { font-size: 12.5px; }
    .hist-item .h-balls .ball { width: 26px; height: 26px; font-size: 13px; }

    /* 路珠：色柱等高，视觉更整齐 */
    .lz-track { align-items: stretch; }
    .lz-run { display: flex; flex-direction: column; }
}

/* 路珠色柱等高（桌面同理） */
.lz-track { align-items: stretch; }
.lz-run { display: flex; flex-direction: column; }

/* 参考彩种右侧箭头 */
.lot-go {
    display: inline-block;
    margin-left: 4px;
    color: var(--red);
    font-size: 15px;
    line-height: 1;
    vertical-align: -1px;
}

/* 走势图右边缘渐隐，提示还能横向滑动 */
@media (max-width: 720px) {
    .chart-scroll {
        -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
        mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 22px), transparent 100%);
    }
    .chart-scroll.at-end {
        -webkit-mask-image: none;
        mask-image: none;
    }
}

/* ==========================================================================
   横向溢出修复（移动端底栏被挤出屏幕的根因）
   —— 彩种/年份 chips 是 flex 子项，min-width:auto 会被内容撑开，
      连带把整个文档宽度撑大，底部固定栏按被撑大的宽度布局，最后一项跑到屏幕外。
   ========================================================================== */
html { overflow-x: clip; }

.page-head,
.page-head > div,
.toolbar,
.an-filters,
.lz-toolbar,
.card { min-width: 0; }

.chip-row {
    min-width: 0;
    max-width: 100%;
    overscroll-behavior-x: contain;
}

.an-tabs { min-width: 0; max-width: 100%; }

@media (max-width: 720px) {
    /* 底栏：5 列强制等分，任何一项都不许撑开 */
    .tabbar {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        width: 100%;
        max-width: 100%;
    }
    .tabbar a {
        min-width: 0;
        overflow: hidden;
        padding-left: 2px;
        padding-right: 2px;
    }
    .tabbar a span {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* 正文底部留白，避免最后一行被底栏压住 */
    .page-main { padding-bottom: 96px; }
    .rule-body { padding-bottom: 28px; }
}

/* 721–860px（小平板 / 折叠屏）原本既没有底部栏、顶部导航又被隐藏，这里补回顶部导航 */
@media (min-width: 721px) and (max-width: 860px) {
    .main-nav { display: flex; }
    .main-nav a { padding: 8px 10px; font-size: 14px; }
    .brand-text { display: none; }
    .page-main { padding-bottom: 40px; }
}

/* ==========================================================================
   09 同款首页：顶栏工具链接 / 横幅 / 彩种卡片
   ========================================================================== */
.header-links {
    display: none;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex: none;
    font-size: 13px;
    color: #666666;
    white-space: nowrap;
}
.header-links a { color: #666666; }
.header-links a:hover { color: var(--red); }
.header-links span { color: #D0D0D0; }

.hp-banner {
    position: relative;
    overflow: hidden;
    margin: 10px 0 12px;
    border-radius: 10px;
    border: 1px solid #F0DDDA;
    background: #FBF0EE;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.hp-banner-img { display: block; width: 100%; height: auto; }

/* 桌面端横幅按比例裁切，避免占满整屏 */
@media (min-width: 721px) {
    .hp-banner { height: 400px; }
    .hp-banner-img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
}

.hp-cards { display: flex; flex-direction: column; gap: 12px; }
.hp-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
    padding: 14px 16px 16px;
}
.hp-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}
.hp-card-title {
    font-family: var(--font-num);
    font-size: 21px;
    font-weight: 800;
    color: var(--red);
    letter-spacing: .02em;
}
.hp-card-date {
    font-family: var(--font-num);
    font-size: 21px;
    font-weight: 700;
    color: var(--red);
}
.hp-balls { display: flex; gap: 14px; margin: 14px 0 12px; }
.hp-balls .ball {
    width: 62px;
    height: 62px;
    font-size: 27px;
    font-weight: 700;
    border-width: 3px;
}
.hp-rule { height: 1px; background: #ECECEC; }
.hp-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding-top: 12px;
}
.hp-links a {
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--red);
    border-radius: 999px;
    color: var(--red);
    font-size: 16px;
    font-weight: 600;
    background: #fff;
    transition: background .16s, color .16s;
}
.hp-links a:hover { background: var(--red); color: #fff; }
.hp-empty { padding: 28px; text-align: center; color: var(--muted); }

@media (max-width: 720px) {
    .header-links { display: flex; }
    .header-tools .type-select { display: none; }
    .app-header .container { gap: 10px; }
    body.is-home .container { padding: 0 10px; }
    body.is-home .page-main { padding-top: 6px; }
    .hp-banner { margin: 8px 0 10px; border-radius: 6px; }
    .hp-card { padding: 11px 12px 12px; border-radius: 10px; }
    .hp-card-title, .hp-card-date { font-size: 16px; }
    .hp-balls { gap: 9px; margin: 10px 0 9px; }
    .hp-balls .ball { width: 32px; height: 32px; font-size: 15px; border-width: 2px; }
    .hp-links { gap: 6px; padding-top: 9px; }
    .hp-links a { height: 30px; font-size: 12.5px; }
    body.is-home .tabbar { display: none; }
    body.is-home .page-main { padding-bottom: 20px; }
}

/* ---------- 构建版本（用于自动检测缓存是否过期，勿删） ---------- */
:root { --build-version: 22; }
